1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.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() (size int) {
50 size += 4 // m.AsyncEnable
51 size += 1 * 64 // m.Engine
52 size += 1 * 64 // m.Algorithm
53 size += 1 * 64 // m.Ciphers
56 func (m *TLSOpensslSetEngine) Marshal(b []byte) ([]byte, error) {
58 b = make([]byte, m.Size())
60 buf := codec.NewBuffer(b)
61 buf.EncodeUint32(m.AsyncEnable)
62 buf.EncodeBytes(m.Engine, 64)
63 buf.EncodeBytes(m.Algorithm, 64)
64 buf.EncodeBytes(m.Ciphers, 64)
65 return buf.Bytes(), nil
67 func (m *TLSOpensslSetEngine) Unmarshal(b []byte) error {
68 buf := codec.NewBuffer(b)
69 m.AsyncEnable = buf.DecodeUint32()
70 m.Engine = make([]byte, 64)
71 copy(m.Engine, buf.DecodeBytes(len(m.Engine)))
72 m.Algorithm = make([]byte, 64)
73 copy(m.Algorithm, buf.DecodeBytes(len(m.Algorithm)))
74 m.Ciphers = make([]byte, 64)
75 copy(m.Ciphers, buf.DecodeBytes(len(m.Ciphers)))
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() (size int) {
98 func (m *TLSOpensslSetEngineReply) Marshal(b []byte) ([]byte, error) {
100 b = make([]byte, m.Size())
102 buf := codec.NewBuffer(b)
103 buf.EncodeInt32(m.Retval)
104 return buf.Bytes(), nil
106 func (m *TLSOpensslSetEngineReply) Unmarshal(b []byte) error {
107 buf := codec.NewBuffer(b)
108 m.Retval = buf.DecodeInt32()
112 func init() { file_tls_openssl_binapi_init() }
113 func file_tls_openssl_binapi_init() {
114 api.RegisterMessage((*TLSOpensslSetEngine)(nil), "tls_openssl_set_engine_e34d95c1")
115 api.RegisterMessage((*TLSOpensslSetEngineReply)(nil), "tls_openssl_set_engine_reply_e8d4e804")
118 // Messages returns list of all messages in this module.
119 func AllMessages() []api.Message {
120 return []api.Message{
121 (*TLSOpensslSetEngine)(nil),
122 (*TLSOpensslSetEngineReply)(nil),