1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
6 // Package pot contains generated bindings for API file pot.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
27 VersionCrc = 0xa9d8e55c
30 // PotProfileActivate defines message 'pot_profile_activate'.
31 type PotProfileActivate struct {
32 ID uint8 `binapi:"u8,name=id" json:"id,omitempty"`
33 ListName string `binapi:"string[],name=list_name" json:"list_name,omitempty"`
36 func (m *PotProfileActivate) Reset() { *m = PotProfileActivate{} }
37 func (*PotProfileActivate) GetMessageName() string { return "pot_profile_activate" }
38 func (*PotProfileActivate) GetCrcString() string { return "0770af98" }
39 func (*PotProfileActivate) GetMessageType() api.MessageType {
40 return api.RequestMessage
43 func (m *PotProfileActivate) Size() (size int) {
48 size += 4 + len(m.ListName) // m.ListName
51 func (m *PotProfileActivate) Marshal(b []byte) ([]byte, error) {
53 b = make([]byte, m.Size())
55 buf := codec.NewBuffer(b)
57 buf.EncodeString(m.ListName, 0)
58 return buf.Bytes(), nil
60 func (m *PotProfileActivate) Unmarshal(b []byte) error {
61 buf := codec.NewBuffer(b)
62 m.ID = buf.DecodeUint8()
63 m.ListName = buf.DecodeString(0)
67 // PotProfileActivateReply defines message 'pot_profile_activate_reply'.
68 type PotProfileActivateReply struct {
69 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
72 func (m *PotProfileActivateReply) Reset() { *m = PotProfileActivateReply{} }
73 func (*PotProfileActivateReply) GetMessageName() string { return "pot_profile_activate_reply" }
74 func (*PotProfileActivateReply) GetCrcString() string { return "e8d4e804" }
75 func (*PotProfileActivateReply) GetMessageType() api.MessageType {
76 return api.ReplyMessage
79 func (m *PotProfileActivateReply) Size() (size int) {
86 func (m *PotProfileActivateReply) Marshal(b []byte) ([]byte, error) {
88 b = make([]byte, m.Size())
90 buf := codec.NewBuffer(b)
91 buf.EncodeInt32(m.Retval)
92 return buf.Bytes(), nil
94 func (m *PotProfileActivateReply) Unmarshal(b []byte) error {
95 buf := codec.NewBuffer(b)
96 m.Retval = buf.DecodeInt32()
100 // PotProfileAdd defines message 'pot_profile_add'.
101 type PotProfileAdd struct {
102 ID uint8 `binapi:"u8,name=id" json:"id,omitempty"`
103 Validator uint8 `binapi:"u8,name=validator" json:"validator,omitempty"`
104 SecretKey uint64 `binapi:"u64,name=secret_key" json:"secret_key,omitempty"`
105 SecretShare uint64 `binapi:"u64,name=secret_share" json:"secret_share,omitempty"`
106 Prime uint64 `binapi:"u64,name=prime" json:"prime,omitempty"`
107 MaxBits uint8 `binapi:"u8,name=max_bits" json:"max_bits,omitempty"`
108 Lpc uint64 `binapi:"u64,name=lpc" json:"lpc,omitempty"`
109 PolynomialPublic uint64 `binapi:"u64,name=polynomial_public" json:"polynomial_public,omitempty"`
110 ListName string `binapi:"string[],name=list_name" json:"list_name,omitempty"`
113 func (m *PotProfileAdd) Reset() { *m = PotProfileAdd{} }
114 func (*PotProfileAdd) GetMessageName() string { return "pot_profile_add" }
115 func (*PotProfileAdd) GetCrcString() string { return "ad5da3a3" }
116 func (*PotProfileAdd) GetMessageType() api.MessageType {
117 return api.RequestMessage
120 func (m *PotProfileAdd) Size() (size int) {
125 size += 1 // m.Validator
126 size += 8 // m.SecretKey
127 size += 8 // m.SecretShare
129 size += 1 // m.MaxBits
131 size += 8 // m.PolynomialPublic
132 size += 4 + len(m.ListName) // m.ListName
135 func (m *PotProfileAdd) Marshal(b []byte) ([]byte, error) {
137 b = make([]byte, m.Size())
139 buf := codec.NewBuffer(b)
140 buf.EncodeUint8(m.ID)
141 buf.EncodeUint8(m.Validator)
142 buf.EncodeUint64(m.SecretKey)
143 buf.EncodeUint64(m.SecretShare)
144 buf.EncodeUint64(m.Prime)
145 buf.EncodeUint8(m.MaxBits)
146 buf.EncodeUint64(m.Lpc)
147 buf.EncodeUint64(m.PolynomialPublic)
148 buf.EncodeString(m.ListName, 0)
149 return buf.Bytes(), nil
151 func (m *PotProfileAdd) Unmarshal(b []byte) error {
152 buf := codec.NewBuffer(b)
153 m.ID = buf.DecodeUint8()
154 m.Validator = buf.DecodeUint8()
155 m.SecretKey = buf.DecodeUint64()
156 m.SecretShare = buf.DecodeUint64()
157 m.Prime = buf.DecodeUint64()
158 m.MaxBits = buf.DecodeUint8()
159 m.Lpc = buf.DecodeUint64()
160 m.PolynomialPublic = buf.DecodeUint64()
161 m.ListName = buf.DecodeString(0)
165 // PotProfileAddReply defines message 'pot_profile_add_reply'.
166 type PotProfileAddReply struct {
167 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
170 func (m *PotProfileAddReply) Reset() { *m = PotProfileAddReply{} }
171 func (*PotProfileAddReply) GetMessageName() string { return "pot_profile_add_reply" }
172 func (*PotProfileAddReply) GetCrcString() string { return "e8d4e804" }
173 func (*PotProfileAddReply) GetMessageType() api.MessageType {
174 return api.ReplyMessage
177 func (m *PotProfileAddReply) Size() (size int) {
181 size += 4 // m.Retval
184 func (m *PotProfileAddReply) Marshal(b []byte) ([]byte, error) {
186 b = make([]byte, m.Size())
188 buf := codec.NewBuffer(b)
189 buf.EncodeInt32(m.Retval)
190 return buf.Bytes(), nil
192 func (m *PotProfileAddReply) Unmarshal(b []byte) error {
193 buf := codec.NewBuffer(b)
194 m.Retval = buf.DecodeInt32()
198 // PotProfileDel defines message 'pot_profile_del'.
199 type PotProfileDel struct {
200 ListName string `binapi:"string[],name=list_name" json:"list_name,omitempty"`
203 func (m *PotProfileDel) Reset() { *m = PotProfileDel{} }
204 func (*PotProfileDel) GetMessageName() string { return "pot_profile_del" }
205 func (*PotProfileDel) GetCrcString() string { return "cd63f53b" }
206 func (*PotProfileDel) GetMessageType() api.MessageType {
207 return api.RequestMessage
210 func (m *PotProfileDel) Size() (size int) {
214 size += 4 + len(m.ListName) // m.ListName
217 func (m *PotProfileDel) Marshal(b []byte) ([]byte, error) {
219 b = make([]byte, m.Size())
221 buf := codec.NewBuffer(b)
222 buf.EncodeString(m.ListName, 0)
223 return buf.Bytes(), nil
225 func (m *PotProfileDel) Unmarshal(b []byte) error {
226 buf := codec.NewBuffer(b)
227 m.ListName = buf.DecodeString(0)
231 // PotProfileDelReply defines message 'pot_profile_del_reply'.
232 type PotProfileDelReply struct {
233 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
236 func (m *PotProfileDelReply) Reset() { *m = PotProfileDelReply{} }
237 func (*PotProfileDelReply) GetMessageName() string { return "pot_profile_del_reply" }
238 func (*PotProfileDelReply) GetCrcString() string { return "e8d4e804" }
239 func (*PotProfileDelReply) GetMessageType() api.MessageType {
240 return api.ReplyMessage
243 func (m *PotProfileDelReply) Size() (size int) {
247 size += 4 // m.Retval
250 func (m *PotProfileDelReply) Marshal(b []byte) ([]byte, error) {
252 b = make([]byte, m.Size())
254 buf := codec.NewBuffer(b)
255 buf.EncodeInt32(m.Retval)
256 return buf.Bytes(), nil
258 func (m *PotProfileDelReply) Unmarshal(b []byte) error {
259 buf := codec.NewBuffer(b)
260 m.Retval = buf.DecodeInt32()
264 // PotProfileShowConfigDetails defines message 'pot_profile_show_config_details'.
265 type PotProfileShowConfigDetails struct {
266 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
267 ID uint8 `binapi:"u8,name=id" json:"id,omitempty"`
268 Validator uint8 `binapi:"u8,name=validator" json:"validator,omitempty"`
269 SecretKey uint64 `binapi:"u64,name=secret_key" json:"secret_key,omitempty"`
270 SecretShare uint64 `binapi:"u64,name=secret_share" json:"secret_share,omitempty"`
271 Prime uint64 `binapi:"u64,name=prime" json:"prime,omitempty"`
272 BitMask uint64 `binapi:"u64,name=bit_mask" json:"bit_mask,omitempty"`
273 Lpc uint64 `binapi:"u64,name=lpc" json:"lpc,omitempty"`
274 PolynomialPublic uint64 `binapi:"u64,name=polynomial_public" json:"polynomial_public,omitempty"`
277 func (m *PotProfileShowConfigDetails) Reset() { *m = PotProfileShowConfigDetails{} }
278 func (*PotProfileShowConfigDetails) GetMessageName() string { return "pot_profile_show_config_details" }
279 func (*PotProfileShowConfigDetails) GetCrcString() string { return "b7ce0618" }
280 func (*PotProfileShowConfigDetails) GetMessageType() api.MessageType {
281 return api.ReplyMessage
284 func (m *PotProfileShowConfigDetails) Size() (size int) {
288 size += 4 // m.Retval
290 size += 1 // m.Validator
291 size += 8 // m.SecretKey
292 size += 8 // m.SecretShare
294 size += 8 // m.BitMask
296 size += 8 // m.PolynomialPublic
299 func (m *PotProfileShowConfigDetails) Marshal(b []byte) ([]byte, error) {
301 b = make([]byte, m.Size())
303 buf := codec.NewBuffer(b)
304 buf.EncodeInt32(m.Retval)
305 buf.EncodeUint8(m.ID)
306 buf.EncodeUint8(m.Validator)
307 buf.EncodeUint64(m.SecretKey)
308 buf.EncodeUint64(m.SecretShare)
309 buf.EncodeUint64(m.Prime)
310 buf.EncodeUint64(m.BitMask)
311 buf.EncodeUint64(m.Lpc)
312 buf.EncodeUint64(m.PolynomialPublic)
313 return buf.Bytes(), nil
315 func (m *PotProfileShowConfigDetails) Unmarshal(b []byte) error {
316 buf := codec.NewBuffer(b)
317 m.Retval = buf.DecodeInt32()
318 m.ID = buf.DecodeUint8()
319 m.Validator = buf.DecodeUint8()
320 m.SecretKey = buf.DecodeUint64()
321 m.SecretShare = buf.DecodeUint64()
322 m.Prime = buf.DecodeUint64()
323 m.BitMask = buf.DecodeUint64()
324 m.Lpc = buf.DecodeUint64()
325 m.PolynomialPublic = buf.DecodeUint64()
329 // PotProfileShowConfigDump defines message 'pot_profile_show_config_dump'.
330 type PotProfileShowConfigDump struct {
331 ID uint8 `binapi:"u8,name=id" json:"id,omitempty"`
334 func (m *PotProfileShowConfigDump) Reset() { *m = PotProfileShowConfigDump{} }
335 func (*PotProfileShowConfigDump) GetMessageName() string { return "pot_profile_show_config_dump" }
336 func (*PotProfileShowConfigDump) GetCrcString() string { return "005b7d59" }
337 func (*PotProfileShowConfigDump) GetMessageType() api.MessageType {
338 return api.RequestMessage
341 func (m *PotProfileShowConfigDump) Size() (size int) {
348 func (m *PotProfileShowConfigDump) Marshal(b []byte) ([]byte, error) {
350 b = make([]byte, m.Size())
352 buf := codec.NewBuffer(b)
353 buf.EncodeUint8(m.ID)
354 return buf.Bytes(), nil
356 func (m *PotProfileShowConfigDump) Unmarshal(b []byte) error {
357 buf := codec.NewBuffer(b)
358 m.ID = buf.DecodeUint8()
362 func init() { file_pot_binapi_init() }
363 func file_pot_binapi_init() {
364 api.RegisterMessage((*PotProfileActivate)(nil), "pot_profile_activate_0770af98")
365 api.RegisterMessage((*PotProfileActivateReply)(nil), "pot_profile_activate_reply_e8d4e804")
366 api.RegisterMessage((*PotProfileAdd)(nil), "pot_profile_add_ad5da3a3")
367 api.RegisterMessage((*PotProfileAddReply)(nil), "pot_profile_add_reply_e8d4e804")
368 api.RegisterMessage((*PotProfileDel)(nil), "pot_profile_del_cd63f53b")
369 api.RegisterMessage((*PotProfileDelReply)(nil), "pot_profile_del_reply_e8d4e804")
370 api.RegisterMessage((*PotProfileShowConfigDetails)(nil), "pot_profile_show_config_details_b7ce0618")
371 api.RegisterMessage((*PotProfileShowConfigDump)(nil), "pot_profile_show_config_dump_005b7d59")
374 // Messages returns list of all messages in this module.
375 func AllMessages() []api.Message {
376 return []api.Message{
377 (*PotProfileActivate)(nil),
378 (*PotProfileActivateReply)(nil),
379 (*PotProfileAdd)(nil),
380 (*PotProfileAddReply)(nil),
381 (*PotProfileDel)(nil),
382 (*PotProfileDelReply)(nil),
383 (*PotProfileShowConfigDetails)(nil),
384 (*PotProfileShowConfigDump)(nil),