1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: /usr/share/vpp/api/plugins/tls_openssl.api.json
7 // Package tls_openssl contains generated bindings for API file tls_openssl.api.
15 api "git.fd.io/govpp.git/api"
16 codec "git.fd.io/govpp.git/codec"
19 // This is a compile-time assertion to ensure that this generated file
20 // is compatible with the GoVPP api package it is being compiled against.
21 // A compilation error at this line likely means your copy of the
22 // GoVPP api package needs to be updated.
23 const _ = api.GoVppAPIPackageIsVersion2
26 APIFile = "tls_openssl"
28 VersionCrc = 0x7386fbcd
31 // TLSOpensslSetEngine defines message 'tls_openssl_set_engine'.
32 type TLSOpensslSetEngine struct {
33 AsyncEnable uint32 `binapi:"u32,name=async_enable" json:"async_enable,omitempty"`
34 Engine []byte `binapi:"u8[64],name=engine" json:"engine,omitempty"`
35 Algorithm []byte `binapi:"u8[64],name=algorithm" json:"algorithm,omitempty"`
36 Ciphers []byte `binapi:"u8[64],name=ciphers" json:"ciphers,omitempty"`
39 func (m *TLSOpensslSetEngine) Reset() { *m = TLSOpensslSetEngine{} }
40 func (*TLSOpensslSetEngine) GetMessageName() string { return "tls_openssl_set_engine" }
41 func (*TLSOpensslSetEngine) GetCrcString() string { return "e34d95c1" }
42 func (*TLSOpensslSetEngine) GetMessageType() api.MessageType {
43 return api.RequestMessage
46 func (m *TLSOpensslSetEngine) Size() int {
51 size += 4 // m.AsyncEnable
52 size += 1 * 64 // m.Engine
53 size += 1 * 64 // m.Algorithm
54 size += 1 * 64 // m.Ciphers
57 func (m *TLSOpensslSetEngine) Marshal(b []byte) ([]byte, error) {
60 buf = codec.NewBuffer(make([]byte, m.Size()))
62 buf = codec.NewBuffer(b)
64 buf.EncodeUint32(uint32(m.AsyncEnable))
65 buf.EncodeBytes(m.Engine[:], 64)
66 buf.EncodeBytes(m.Algorithm[:], 64)
67 buf.EncodeBytes(m.Ciphers[:], 64)
68 return buf.Bytes(), nil
70 func (m *TLSOpensslSetEngine) Unmarshal(b []byte) error {
71 buf := codec.NewBuffer(b)
72 m.AsyncEnable = buf.DecodeUint32()
73 copy(m.Engine[:], buf.DecodeBytes(64))
74 copy(m.Algorithm[:], buf.DecodeBytes(64))
75 copy(m.Ciphers[:], buf.DecodeBytes(64))
79 // TLSOpensslSetEngineReply defines message 'tls_openssl_set_engine_reply'.
80 type TLSOpensslSetEngineReply struct {
81 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
84 func (m *TLSOpensslSetEngineReply) Reset() { *m = TLSOpensslSetEngineReply{} }
85 func (*TLSOpensslSetEngineReply) GetMessageName() string { return "tls_openssl_set_engine_reply" }
86 func (*TLSOpensslSetEngineReply) GetCrcString() string { return "e8d4e804" }
87 func (*TLSOpensslSetEngineReply) GetMessageType() api.MessageType {
88 return api.ReplyMessage
91 func (m *TLSOpensslSetEngineReply) Size() int {
99 func (m *TLSOpensslSetEngineReply) Marshal(b []byte) ([]byte, error) {
100 var buf *codec.Buffer
102 buf = codec.NewBuffer(make([]byte, m.Size()))
104 buf = codec.NewBuffer(b)
106 buf.EncodeUint32(uint32(m.Retval))
107 return buf.Bytes(), nil
109 func (m *TLSOpensslSetEngineReply) Unmarshal(b []byte) error {
110 buf := codec.NewBuffer(b)
111 m.Retval = int32(buf.DecodeUint32())
115 func init() { file_tls_openssl_binapi_init() }
116 func file_tls_openssl_binapi_init() {
117 api.RegisterMessage((*TLSOpensslSetEngine)(nil), "tls_openssl_set_engine_e34d95c1")
118 api.RegisterMessage((*TLSOpensslSetEngineReply)(nil), "tls_openssl_set_engine_reply_e8d4e804")
121 // Messages returns list of all messages in this module.
122 func AllMessages() []api.Message {
123 return []api.Message{
124 (*TLSOpensslSetEngine)(nil),
125 (*TLSOpensslSetEngineReply)(nil),