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/pot.api.json
7 // Package pot contains generated bindings for API file pot.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
28 VersionCrc = 0xa9d8e55c
31 // PotProfileActivate defines message 'pot_profile_activate'.
32 type PotProfileActivate struct {
33 ID uint8 `binapi:"u8,name=id" json:"id,omitempty"`
34 ListName string `binapi:"string[],name=list_name" json:"list_name,omitempty"`
37 func (m *PotProfileActivate) Reset() { *m = PotProfileActivate{} }
38 func (*PotProfileActivate) GetMessageName() string { return "pot_profile_activate" }
39 func (*PotProfileActivate) GetCrcString() string { return "0770af98" }
40 func (*PotProfileActivate) GetMessageType() api.MessageType {
41 return api.RequestMessage
44 func (m *PotProfileActivate) Size() (size int) {
49 size += 4 + len(m.ListName) // m.ListName
52 func (m *PotProfileActivate) Marshal(b []byte) ([]byte, error) {
54 b = make([]byte, m.Size())
56 buf := codec.NewBuffer(b)
58 buf.EncodeString(m.ListName, 0)
59 return buf.Bytes(), nil
61 func (m *PotProfileActivate) Unmarshal(b []byte) error {
62 buf := codec.NewBuffer(b)
63 m.ID = buf.DecodeUint8()
64 m.ListName = buf.DecodeString(0)
68 // PotProfileActivateReply defines message 'pot_profile_activate_reply'.
69 type PotProfileActivateReply struct {
70 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
73 func (m *PotProfileActivateReply) Reset() { *m = PotProfileActivateReply{} }
74 func (*PotProfileActivateReply) GetMessageName() string { return "pot_profile_activate_reply" }
75 func (*PotProfileActivateReply) GetCrcString() string { return "e8d4e804" }
76 func (*PotProfileActivateReply) GetMessageType() api.MessageType {
77 return api.ReplyMessage
80 func (m *PotProfileActivateReply) Size() (size int) {
87 func (m *PotProfileActivateReply) Marshal(b []byte) ([]byte, error) {
89 b = make([]byte, m.Size())
91 buf := codec.NewBuffer(b)
92 buf.EncodeInt32(m.Retval)
93 return buf.Bytes(), nil
95 func (m *PotProfileActivateReply) Unmarshal(b []byte) error {
96 buf := codec.NewBuffer(b)
97 m.Retval = buf.DecodeInt32()
101 // PotProfileAdd defines message 'pot_profile_add'.
102 type PotProfileAdd struct {
103 ID uint8 `binapi:"u8,name=id" json:"id,omitempty"`
104 Validator uint8 `binapi:"u8,name=validator" json:"validator,omitempty"`
105 SecretKey uint64 `binapi:"u64,name=secret_key" json:"secret_key,omitempty"`
106 SecretShare uint64 `binapi:"u64,name=secret_share" json:"secret_share,omitempty"`
107 Prime uint64 `binapi:"u64,name=prime" json:"prime,omitempty"`
108 MaxBits uint8 `binapi:"u8,name=max_bits" json:"max_bits,omitempty"`
109 Lpc uint64 `binapi:"u64,name=lpc" json:"lpc,omitempty"`
110 PolynomialPublic uint64 `binapi:"u64,name=polynomial_public" json:"polynomial_public,omitempty"`
111 ListName string `binapi:"string[],name=list_name" json:"list_name,omitempty"`
114 func (m *PotProfileAdd) Reset() { *m = PotProfileAdd{} }
115 func (*PotProfileAdd) GetMessageName() string { return "pot_profile_add" }
116 func (*PotProfileAdd) GetCrcString() string { return "ad5da3a3" }
117 func (*PotProfileAdd) GetMessageType() api.MessageType {
118 return api.RequestMessage
121 func (m *PotProfileAdd) Size() (size int) {
126 size += 1 // m.Validator
127 size += 8 // m.SecretKey
128 size += 8 // m.SecretShare
130 size += 1 // m.MaxBits
132 size += 8 // m.PolynomialPublic
133 size += 4 + len(m.ListName) // m.ListName
136 func (m *PotProfileAdd) Marshal(b []byte) ([]byte, error) {
138 b = make([]byte, m.Size())
140 buf := codec.NewBuffer(b)
141 buf.EncodeUint8(m.ID)
142 buf.EncodeUint8(m.Validator)
143 buf.EncodeUint64(m.SecretKey)
144 buf.EncodeUint64(m.SecretShare)
145 buf.EncodeUint64(m.Prime)
146 buf.EncodeUint8(m.MaxBits)
147 buf.EncodeUint64(m.Lpc)
148 buf.EncodeUint64(m.PolynomialPublic)
149 buf.EncodeString(m.ListName, 0)
150 return buf.Bytes(), nil
152 func (m *PotProfileAdd) Unmarshal(b []byte) error {
153 buf := codec.NewBuffer(b)
154 m.ID = buf.DecodeUint8()
155 m.Validator = buf.DecodeUint8()
156 m.SecretKey = buf.DecodeUint64()
157 m.SecretShare = buf.DecodeUint64()
158 m.Prime = buf.DecodeUint64()
159 m.MaxBits = buf.DecodeUint8()
160 m.Lpc = buf.DecodeUint64()
161 m.PolynomialPublic = buf.DecodeUint64()
162 m.ListName = buf.DecodeString(0)
166 // PotProfileAddReply defines message 'pot_profile_add_reply'.
167 type PotProfileAddReply struct {
168 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
171 func (m *PotProfileAddReply) Reset() { *m = PotProfileAddReply{} }
172 func (*PotProfileAddReply) GetMessageName() string { return "pot_profile_add_reply" }
173 func (*PotProfileAddReply) GetCrcString() string { return "e8d4e804" }
174 func (*PotProfileAddReply) GetMessageType() api.MessageType {
175 return api.ReplyMessage
178 func (m *PotProfileAddReply) Size() (size int) {
182 size += 4 // m.Retval
185 func (m *PotProfileAddReply) Marshal(b []byte) ([]byte, error) {
187 b = make([]byte, m.Size())
189 buf := codec.NewBuffer(b)
190 buf.EncodeInt32(m.Retval)
191 return buf.Bytes(), nil
193 func (m *PotProfileAddReply) Unmarshal(b []byte) error {
194 buf := codec.NewBuffer(b)
195 m.Retval = buf.DecodeInt32()
199 // PotProfileDel defines message 'pot_profile_del'.
200 type PotProfileDel struct {
201 ListName string `binapi:"string[],name=list_name" json:"list_name,omitempty"`
204 func (m *PotProfileDel) Reset() { *m = PotProfileDel{} }
205 func (*PotProfileDel) GetMessageName() string { return "pot_profile_del" }
206 func (*PotProfileDel) GetCrcString() string { return "cd63f53b" }
207 func (*PotProfileDel) GetMessageType() api.MessageType {
208 return api.RequestMessage
211 func (m *PotProfileDel) Size() (size int) {
215 size += 4 + len(m.ListName) // m.ListName
218 func (m *PotProfileDel) Marshal(b []byte) ([]byte, error) {
220 b = make([]byte, m.Size())
222 buf := codec.NewBuffer(b)
223 buf.EncodeString(m.ListName, 0)
224 return buf.Bytes(), nil
226 func (m *PotProfileDel) Unmarshal(b []byte) error {
227 buf := codec.NewBuffer(b)
228 m.ListName = buf.DecodeString(0)
232 // PotProfileDelReply defines message 'pot_profile_del_reply'.
233 type PotProfileDelReply struct {
234 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
237 func (m *PotProfileDelReply) Reset() { *m = PotProfileDelReply{} }
238 func (*PotProfileDelReply) GetMessageName() string { return "pot_profile_del_reply" }
239 func (*PotProfileDelReply) GetCrcString() string { return "e8d4e804" }
240 func (*PotProfileDelReply) GetMessageType() api.MessageType {
241 return api.ReplyMessage
244 func (m *PotProfileDelReply) Size() (size int) {
248 size += 4 // m.Retval
251 func (m *PotProfileDelReply) Marshal(b []byte) ([]byte, error) {
253 b = make([]byte, m.Size())
255 buf := codec.NewBuffer(b)
256 buf.EncodeInt32(m.Retval)
257 return buf.Bytes(), nil
259 func (m *PotProfileDelReply) Unmarshal(b []byte) error {
260 buf := codec.NewBuffer(b)
261 m.Retval = buf.DecodeInt32()
265 // PotProfileShowConfigDetails defines message 'pot_profile_show_config_details'.
266 type PotProfileShowConfigDetails struct {
267 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
268 ID uint8 `binapi:"u8,name=id" json:"id,omitempty"`
269 Validator uint8 `binapi:"u8,name=validator" json:"validator,omitempty"`
270 SecretKey uint64 `binapi:"u64,name=secret_key" json:"secret_key,omitempty"`
271 SecretShare uint64 `binapi:"u64,name=secret_share" json:"secret_share,omitempty"`
272 Prime uint64 `binapi:"u64,name=prime" json:"prime,omitempty"`
273 BitMask uint64 `binapi:"u64,name=bit_mask" json:"bit_mask,omitempty"`
274 Lpc uint64 `binapi:"u64,name=lpc" json:"lpc,omitempty"`
275 PolynomialPublic uint64 `binapi:"u64,name=polynomial_public" json:"polynomial_public,omitempty"`
278 func (m *PotProfileShowConfigDetails) Reset() { *m = PotProfileShowConfigDetails{} }
279 func (*PotProfileShowConfigDetails) GetMessageName() string { return "pot_profile_show_config_details" }
280 func (*PotProfileShowConfigDetails) GetCrcString() string { return "b7ce0618" }
281 func (*PotProfileShowConfigDetails) GetMessageType() api.MessageType {
282 return api.ReplyMessage
285 func (m *PotProfileShowConfigDetails) Size() (size int) {
289 size += 4 // m.Retval
291 size += 1 // m.Validator
292 size += 8 // m.SecretKey
293 size += 8 // m.SecretShare
295 size += 8 // m.BitMask
297 size += 8 // m.PolynomialPublic
300 func (m *PotProfileShowConfigDetails) Marshal(b []byte) ([]byte, error) {
302 b = make([]byte, m.Size())
304 buf := codec.NewBuffer(b)
305 buf.EncodeInt32(m.Retval)
306 buf.EncodeUint8(m.ID)
307 buf.EncodeUint8(m.Validator)
308 buf.EncodeUint64(m.SecretKey)
309 buf.EncodeUint64(m.SecretShare)
310 buf.EncodeUint64(m.Prime)
311 buf.EncodeUint64(m.BitMask)
312 buf.EncodeUint64(m.Lpc)
313 buf.EncodeUint64(m.PolynomialPublic)
314 return buf.Bytes(), nil
316 func (m *PotProfileShowConfigDetails) Unmarshal(b []byte) error {
317 buf := codec.NewBuffer(b)
318 m.Retval = buf.DecodeInt32()
319 m.ID = buf.DecodeUint8()
320 m.Validator = buf.DecodeUint8()
321 m.SecretKey = buf.DecodeUint64()
322 m.SecretShare = buf.DecodeUint64()
323 m.Prime = buf.DecodeUint64()
324 m.BitMask = buf.DecodeUint64()
325 m.Lpc = buf.DecodeUint64()
326 m.PolynomialPublic = buf.DecodeUint64()
330 // PotProfileShowConfigDump defines message 'pot_profile_show_config_dump'.
331 type PotProfileShowConfigDump struct {
332 ID uint8 `binapi:"u8,name=id" json:"id,omitempty"`
335 func (m *PotProfileShowConfigDump) Reset() { *m = PotProfileShowConfigDump{} }
336 func (*PotProfileShowConfigDump) GetMessageName() string { return "pot_profile_show_config_dump" }
337 func (*PotProfileShowConfigDump) GetCrcString() string { return "005b7d59" }
338 func (*PotProfileShowConfigDump) GetMessageType() api.MessageType {
339 return api.RequestMessage
342 func (m *PotProfileShowConfigDump) Size() (size int) {
349 func (m *PotProfileShowConfigDump) Marshal(b []byte) ([]byte, error) {
351 b = make([]byte, m.Size())
353 buf := codec.NewBuffer(b)
354 buf.EncodeUint8(m.ID)
355 return buf.Bytes(), nil
357 func (m *PotProfileShowConfigDump) Unmarshal(b []byte) error {
358 buf := codec.NewBuffer(b)
359 m.ID = buf.DecodeUint8()
363 func init() { file_pot_binapi_init() }
364 func file_pot_binapi_init() {
365 api.RegisterMessage((*PotProfileActivate)(nil), "pot_profile_activate_0770af98")
366 api.RegisterMessage((*PotProfileActivateReply)(nil), "pot_profile_activate_reply_e8d4e804")
367 api.RegisterMessage((*PotProfileAdd)(nil), "pot_profile_add_ad5da3a3")
368 api.RegisterMessage((*PotProfileAddReply)(nil), "pot_profile_add_reply_e8d4e804")
369 api.RegisterMessage((*PotProfileDel)(nil), "pot_profile_del_cd63f53b")
370 api.RegisterMessage((*PotProfileDelReply)(nil), "pot_profile_del_reply_e8d4e804")
371 api.RegisterMessage((*PotProfileShowConfigDetails)(nil), "pot_profile_show_config_details_b7ce0618")
372 api.RegisterMessage((*PotProfileShowConfigDump)(nil), "pot_profile_show_config_dump_005b7d59")
375 // Messages returns list of all messages in this module.
376 func AllMessages() []api.Message {
377 return []api.Message{
378 (*PotProfileActivate)(nil),
379 (*PotProfileActivateReply)(nil),
380 (*PotProfileAdd)(nil),
381 (*PotProfileAddReply)(nil),
382 (*PotProfileDel)(nil),
383 (*PotProfileDelReply)(nil),
384 (*PotProfileShowConfigDetails)(nil),
385 (*PotProfileShowConfigDump)(nil),