1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
6 // Package tls_openssl contains generated bindings for API file tls_openssl.api.
14 api "git.fd.io/govpp.git/api"
15 codec "git.fd.io/govpp.git/codec"
18 // This is a compile-time assertion to ensure that this generated file
19 // is compatible with the GoVPP api package it is being compiled against.
20 // A compilation error at this line likely means your copy of the
21 // GoVPP api package needs to be updated.
22 const _ = api.GoVppAPIPackageIsVersion2
25 APIFile = "tls_openssl"
27 VersionCrc = 0x7386fbcd
30 // TLSOpensslSetEngine defines message 'tls_openssl_set_engine'.
31 type TLSOpensslSetEngine struct {
32 AsyncEnable uint32 `binapi:"u32,name=async_enable" json:"async_enable,omitempty"`
33 Engine []byte `binapi:"u8[64],name=engine" json:"engine,omitempty"`
34 Algorithm []byte `binapi:"u8[64],name=algorithm" json:"algorithm,omitempty"`
35 Ciphers []byte `binapi:"u8[64],name=ciphers" json:"ciphers,omitempty"`
38 func (m *TLSOpensslSetEngine) Reset() { *m = TLSOpensslSetEngine{} }
39 func (*TLSOpensslSetEngine) GetMessageName() string { return "tls_openssl_set_engine" }
40 func (*TLSOpensslSetEngine) GetCrcString() string { return "e34d95c1" }
41 func (*TLSOpensslSetEngine) GetMessageType() api.MessageType {
42 return api.RequestMessage
45 func (m *TLSOpensslSetEngine) Size() (size int) {
49 size += 4 // m.AsyncEnable
50 size += 1 * 64 // m.Engine
51 size += 1 * 64 // m.Algorithm
52 size += 1 * 64 // m.Ciphers
55 func (m *TLSOpensslSetEngine) Marshal(b []byte) ([]byte, error) {
57 b = make([]byte, m.Size())
59 buf := codec.NewBuffer(b)
60 buf.EncodeUint32(m.AsyncEnable)
61 buf.EncodeBytes(m.Engine, 64)
62 buf.EncodeBytes(m.Algorithm, 64)
63 buf.EncodeBytes(m.Ciphers, 64)
64 return buf.Bytes(), nil
66 func (m *TLSOpensslSetEngine) Unmarshal(b []byte) error {
67 buf := codec.NewBuffer(b)
68 m.AsyncEnable = buf.DecodeUint32()
69 m.Engine = make([]byte, 64)
70 copy(m.Engine, buf.DecodeBytes(len(m.Engine)))
71 m.Algorithm = make([]byte, 64)
72 copy(m.Algorithm, buf.DecodeBytes(len(m.Algorithm)))
73 m.Ciphers = make([]byte, 64)
74 copy(m.Ciphers, buf.DecodeBytes(len(m.Ciphers)))
78 // TLSOpensslSetEngineReply defines message 'tls_openssl_set_engine_reply'.
79 type TLSOpensslSetEngineReply struct {
80 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
83 func (m *TLSOpensslSetEngineReply) Reset() { *m = TLSOpensslSetEngineReply{} }
84 func (*TLSOpensslSetEngineReply) GetMessageName() string { return "tls_openssl_set_engine_reply" }
85 func (*TLSOpensslSetEngineReply) GetCrcString() string { return "e8d4e804" }
86 func (*TLSOpensslSetEngineReply) GetMessageType() api.MessageType {
87 return api.ReplyMessage
90 func (m *TLSOpensslSetEngineReply) Size() (size int) {
97 func (m *TLSOpensslSetEngineReply) Marshal(b []byte) ([]byte, error) {
99 b = make([]byte, m.Size())
101 buf := codec.NewBuffer(b)
102 buf.EncodeInt32(m.Retval)
103 return buf.Bytes(), nil
105 func (m *TLSOpensslSetEngineReply) Unmarshal(b []byte) error {
106 buf := codec.NewBuffer(b)
107 m.Retval = buf.DecodeInt32()
111 func init() { file_tls_openssl_binapi_init() }
112 func file_tls_openssl_binapi_init() {
113 api.RegisterMessage((*TLSOpensslSetEngine)(nil), "tls_openssl_set_engine_e34d95c1")
114 api.RegisterMessage((*TLSOpensslSetEngineReply)(nil), "tls_openssl_set_engine_reply_e8d4e804")
117 // Messages returns list of all messages in this module.
118 func AllMessages() []api.Message {
119 return []api.Message{
120 (*TLSOpensslSetEngine)(nil),
121 (*TLSOpensslSetEngineReply)(nil),