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() int {
50 size += 4 + len(m.ListName) // m.ListName
53 func (m *PotProfileActivate) Marshal(b []byte) ([]byte, error) {
56 buf = codec.NewBuffer(make([]byte, m.Size()))
58 buf = codec.NewBuffer(b)
60 buf.EncodeUint8(uint8(m.ID))
61 buf.EncodeString(m.ListName, 0)
62 return buf.Bytes(), nil
64 func (m *PotProfileActivate) Unmarshal(b []byte) error {
65 buf := codec.NewBuffer(b)
66 m.ID = buf.DecodeUint8()
67 m.ListName = buf.DecodeString(0)
71 // PotProfileActivateReply defines message 'pot_profile_activate_reply'.
72 type PotProfileActivateReply struct {
73 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
76 func (m *PotProfileActivateReply) Reset() { *m = PotProfileActivateReply{} }
77 func (*PotProfileActivateReply) GetMessageName() string { return "pot_profile_activate_reply" }
78 func (*PotProfileActivateReply) GetCrcString() string { return "e8d4e804" }
79 func (*PotProfileActivateReply) GetMessageType() api.MessageType {
80 return api.ReplyMessage
83 func (m *PotProfileActivateReply) Size() int {
91 func (m *PotProfileActivateReply) Marshal(b []byte) ([]byte, error) {
94 buf = codec.NewBuffer(make([]byte, m.Size()))
96 buf = codec.NewBuffer(b)
98 buf.EncodeUint32(uint32(m.Retval))
99 return buf.Bytes(), nil
101 func (m *PotProfileActivateReply) Unmarshal(b []byte) error {
102 buf := codec.NewBuffer(b)
103 m.Retval = int32(buf.DecodeUint32())
107 // PotProfileAdd defines message 'pot_profile_add'.
108 type PotProfileAdd struct {
109 ID uint8 `binapi:"u8,name=id" json:"id,omitempty"`
110 Validator uint8 `binapi:"u8,name=validator" json:"validator,omitempty"`
111 SecretKey uint64 `binapi:"u64,name=secret_key" json:"secret_key,omitempty"`
112 SecretShare uint64 `binapi:"u64,name=secret_share" json:"secret_share,omitempty"`
113 Prime uint64 `binapi:"u64,name=prime" json:"prime,omitempty"`
114 MaxBits uint8 `binapi:"u8,name=max_bits" json:"max_bits,omitempty"`
115 Lpc uint64 `binapi:"u64,name=lpc" json:"lpc,omitempty"`
116 PolynomialPublic uint64 `binapi:"u64,name=polynomial_public" json:"polynomial_public,omitempty"`
117 ListName string `binapi:"string[],name=list_name" json:"list_name,omitempty"`
120 func (m *PotProfileAdd) Reset() { *m = PotProfileAdd{} }
121 func (*PotProfileAdd) GetMessageName() string { return "pot_profile_add" }
122 func (*PotProfileAdd) GetCrcString() string { return "ad5da3a3" }
123 func (*PotProfileAdd) GetMessageType() api.MessageType {
124 return api.RequestMessage
127 func (m *PotProfileAdd) Size() int {
133 size += 1 // m.Validator
134 size += 8 // m.SecretKey
135 size += 8 // m.SecretShare
137 size += 1 // m.MaxBits
139 size += 8 // m.PolynomialPublic
140 size += 4 + len(m.ListName) // m.ListName
143 func (m *PotProfileAdd) Marshal(b []byte) ([]byte, error) {
144 var buf *codec.Buffer
146 buf = codec.NewBuffer(make([]byte, m.Size()))
148 buf = codec.NewBuffer(b)
150 buf.EncodeUint8(uint8(m.ID))
151 buf.EncodeUint8(uint8(m.Validator))
152 buf.EncodeUint64(uint64(m.SecretKey))
153 buf.EncodeUint64(uint64(m.SecretShare))
154 buf.EncodeUint64(uint64(m.Prime))
155 buf.EncodeUint8(uint8(m.MaxBits))
156 buf.EncodeUint64(uint64(m.Lpc))
157 buf.EncodeUint64(uint64(m.PolynomialPublic))
158 buf.EncodeString(m.ListName, 0)
159 return buf.Bytes(), nil
161 func (m *PotProfileAdd) Unmarshal(b []byte) error {
162 buf := codec.NewBuffer(b)
163 m.ID = buf.DecodeUint8()
164 m.Validator = buf.DecodeUint8()
165 m.SecretKey = buf.DecodeUint64()
166 m.SecretShare = buf.DecodeUint64()
167 m.Prime = buf.DecodeUint64()
168 m.MaxBits = buf.DecodeUint8()
169 m.Lpc = buf.DecodeUint64()
170 m.PolynomialPublic = buf.DecodeUint64()
171 m.ListName = buf.DecodeString(0)
175 // PotProfileAddReply defines message 'pot_profile_add_reply'.
176 type PotProfileAddReply struct {
177 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
180 func (m *PotProfileAddReply) Reset() { *m = PotProfileAddReply{} }
181 func (*PotProfileAddReply) GetMessageName() string { return "pot_profile_add_reply" }
182 func (*PotProfileAddReply) GetCrcString() string { return "e8d4e804" }
183 func (*PotProfileAddReply) GetMessageType() api.MessageType {
184 return api.ReplyMessage
187 func (m *PotProfileAddReply) Size() int {
192 size += 4 // m.Retval
195 func (m *PotProfileAddReply) Marshal(b []byte) ([]byte, error) {
196 var buf *codec.Buffer
198 buf = codec.NewBuffer(make([]byte, m.Size()))
200 buf = codec.NewBuffer(b)
202 buf.EncodeUint32(uint32(m.Retval))
203 return buf.Bytes(), nil
205 func (m *PotProfileAddReply) Unmarshal(b []byte) error {
206 buf := codec.NewBuffer(b)
207 m.Retval = int32(buf.DecodeUint32())
211 // PotProfileDel defines message 'pot_profile_del'.
212 type PotProfileDel struct {
213 ListName string `binapi:"string[],name=list_name" json:"list_name,omitempty"`
216 func (m *PotProfileDel) Reset() { *m = PotProfileDel{} }
217 func (*PotProfileDel) GetMessageName() string { return "pot_profile_del" }
218 func (*PotProfileDel) GetCrcString() string { return "cd63f53b" }
219 func (*PotProfileDel) GetMessageType() api.MessageType {
220 return api.RequestMessage
223 func (m *PotProfileDel) Size() int {
228 size += 4 + len(m.ListName) // m.ListName
231 func (m *PotProfileDel) Marshal(b []byte) ([]byte, error) {
232 var buf *codec.Buffer
234 buf = codec.NewBuffer(make([]byte, m.Size()))
236 buf = codec.NewBuffer(b)
238 buf.EncodeString(m.ListName, 0)
239 return buf.Bytes(), nil
241 func (m *PotProfileDel) Unmarshal(b []byte) error {
242 buf := codec.NewBuffer(b)
243 m.ListName = buf.DecodeString(0)
247 // PotProfileDelReply defines message 'pot_profile_del_reply'.
248 type PotProfileDelReply struct {
249 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
252 func (m *PotProfileDelReply) Reset() { *m = PotProfileDelReply{} }
253 func (*PotProfileDelReply) GetMessageName() string { return "pot_profile_del_reply" }
254 func (*PotProfileDelReply) GetCrcString() string { return "e8d4e804" }
255 func (*PotProfileDelReply) GetMessageType() api.MessageType {
256 return api.ReplyMessage
259 func (m *PotProfileDelReply) Size() int {
264 size += 4 // m.Retval
267 func (m *PotProfileDelReply) Marshal(b []byte) ([]byte, error) {
268 var buf *codec.Buffer
270 buf = codec.NewBuffer(make([]byte, m.Size()))
272 buf = codec.NewBuffer(b)
274 buf.EncodeUint32(uint32(m.Retval))
275 return buf.Bytes(), nil
277 func (m *PotProfileDelReply) Unmarshal(b []byte) error {
278 buf := codec.NewBuffer(b)
279 m.Retval = int32(buf.DecodeUint32())
283 // PotProfileShowConfigDetails defines message 'pot_profile_show_config_details'.
284 type PotProfileShowConfigDetails struct {
285 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
286 ID uint8 `binapi:"u8,name=id" json:"id,omitempty"`
287 Validator uint8 `binapi:"u8,name=validator" json:"validator,omitempty"`
288 SecretKey uint64 `binapi:"u64,name=secret_key" json:"secret_key,omitempty"`
289 SecretShare uint64 `binapi:"u64,name=secret_share" json:"secret_share,omitempty"`
290 Prime uint64 `binapi:"u64,name=prime" json:"prime,omitempty"`
291 BitMask uint64 `binapi:"u64,name=bit_mask" json:"bit_mask,omitempty"`
292 Lpc uint64 `binapi:"u64,name=lpc" json:"lpc,omitempty"`
293 PolynomialPublic uint64 `binapi:"u64,name=polynomial_public" json:"polynomial_public,omitempty"`
296 func (m *PotProfileShowConfigDetails) Reset() { *m = PotProfileShowConfigDetails{} }
297 func (*PotProfileShowConfigDetails) GetMessageName() string { return "pot_profile_show_config_details" }
298 func (*PotProfileShowConfigDetails) GetCrcString() string { return "b7ce0618" }
299 func (*PotProfileShowConfigDetails) GetMessageType() api.MessageType {
300 return api.ReplyMessage
303 func (m *PotProfileShowConfigDetails) Size() int {
308 size += 4 // m.Retval
310 size += 1 // m.Validator
311 size += 8 // m.SecretKey
312 size += 8 // m.SecretShare
314 size += 8 // m.BitMask
316 size += 8 // m.PolynomialPublic
319 func (m *PotProfileShowConfigDetails) Marshal(b []byte) ([]byte, error) {
320 var buf *codec.Buffer
322 buf = codec.NewBuffer(make([]byte, m.Size()))
324 buf = codec.NewBuffer(b)
326 buf.EncodeUint32(uint32(m.Retval))
327 buf.EncodeUint8(uint8(m.ID))
328 buf.EncodeUint8(uint8(m.Validator))
329 buf.EncodeUint64(uint64(m.SecretKey))
330 buf.EncodeUint64(uint64(m.SecretShare))
331 buf.EncodeUint64(uint64(m.Prime))
332 buf.EncodeUint64(uint64(m.BitMask))
333 buf.EncodeUint64(uint64(m.Lpc))
334 buf.EncodeUint64(uint64(m.PolynomialPublic))
335 return buf.Bytes(), nil
337 func (m *PotProfileShowConfigDetails) Unmarshal(b []byte) error {
338 buf := codec.NewBuffer(b)
339 m.Retval = int32(buf.DecodeUint32())
340 m.ID = buf.DecodeUint8()
341 m.Validator = buf.DecodeUint8()
342 m.SecretKey = buf.DecodeUint64()
343 m.SecretShare = buf.DecodeUint64()
344 m.Prime = buf.DecodeUint64()
345 m.BitMask = buf.DecodeUint64()
346 m.Lpc = buf.DecodeUint64()
347 m.PolynomialPublic = buf.DecodeUint64()
351 // PotProfileShowConfigDump defines message 'pot_profile_show_config_dump'.
352 type PotProfileShowConfigDump struct {
353 ID uint8 `binapi:"u8,name=id" json:"id,omitempty"`
356 func (m *PotProfileShowConfigDump) Reset() { *m = PotProfileShowConfigDump{} }
357 func (*PotProfileShowConfigDump) GetMessageName() string { return "pot_profile_show_config_dump" }
358 func (*PotProfileShowConfigDump) GetCrcString() string { return "005b7d59" }
359 func (*PotProfileShowConfigDump) GetMessageType() api.MessageType {
360 return api.RequestMessage
363 func (m *PotProfileShowConfigDump) Size() int {
371 func (m *PotProfileShowConfigDump) Marshal(b []byte) ([]byte, error) {
372 var buf *codec.Buffer
374 buf = codec.NewBuffer(make([]byte, m.Size()))
376 buf = codec.NewBuffer(b)
378 buf.EncodeUint8(uint8(m.ID))
379 return buf.Bytes(), nil
381 func (m *PotProfileShowConfigDump) Unmarshal(b []byte) error {
382 buf := codec.NewBuffer(b)
383 m.ID = buf.DecodeUint8()
387 func init() { file_pot_binapi_init() }
388 func file_pot_binapi_init() {
389 api.RegisterMessage((*PotProfileActivate)(nil), "pot_profile_activate_0770af98")
390 api.RegisterMessage((*PotProfileActivateReply)(nil), "pot_profile_activate_reply_e8d4e804")
391 api.RegisterMessage((*PotProfileAdd)(nil), "pot_profile_add_ad5da3a3")
392 api.RegisterMessage((*PotProfileAddReply)(nil), "pot_profile_add_reply_e8d4e804")
393 api.RegisterMessage((*PotProfileDel)(nil), "pot_profile_del_cd63f53b")
394 api.RegisterMessage((*PotProfileDelReply)(nil), "pot_profile_del_reply_e8d4e804")
395 api.RegisterMessage((*PotProfileShowConfigDetails)(nil), "pot_profile_show_config_details_b7ce0618")
396 api.RegisterMessage((*PotProfileShowConfigDump)(nil), "pot_profile_show_config_dump_005b7d59")
399 // Messages returns list of all messages in this module.
400 func AllMessages() []api.Message {
401 return []api.Message{
402 (*PotProfileActivate)(nil),
403 (*PotProfileActivateReply)(nil),
404 (*PotProfileAdd)(nil),
405 (*PotProfileAddReply)(nil),
406 (*PotProfileDel)(nil),
407 (*PotProfileDelReply)(nil),
408 (*PotProfileShowConfigDetails)(nil),
409 (*PotProfileShowConfigDump)(nil),