Improve binapi generator
[govpp.git] / binapi / dslite / dslite.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2 // versions:
3 //  binapi-generator: v0.4.0-dev
4 //  VPP:              20.05-release
5 // source: /usr/share/vpp/api/plugins/dslite.api.json
6
7 // Package dslite contains generated bindings for API file dslite.api.
8 //
9 // Contents:
10 //  12 messages
11 //
12 package dslite
13
14 import (
15         api "git.fd.io/govpp.git/api"
16         _ "git.fd.io/govpp.git/binapi/interface_types"
17         ip_types "git.fd.io/govpp.git/binapi/ip_types"
18         codec "git.fd.io/govpp.git/codec"
19 )
20
21 // This is a compile-time assertion to ensure that this generated file
22 // is compatible with the GoVPP api package it is being compiled against.
23 // A compilation error at this line likely means your copy of the
24 // GoVPP api package needs to be updated.
25 const _ = api.GoVppAPIPackageIsVersion2
26
27 const (
28         APIFile    = "dslite"
29         APIVersion = "1.0.0"
30         VersionCrc = 0xb62715c5
31 )
32
33 // DsliteAddDelPoolAddrRange defines message 'dslite_add_del_pool_addr_range'.
34 type DsliteAddDelPoolAddrRange struct {
35         StartAddr ip_types.IP4Address `binapi:"ip4_address,name=start_addr" json:"start_addr,omitempty"`
36         EndAddr   ip_types.IP4Address `binapi:"ip4_address,name=end_addr" json:"end_addr,omitempty"`
37         IsAdd     bool                `binapi:"bool,name=is_add" json:"is_add,omitempty"`
38 }
39
40 func (m *DsliteAddDelPoolAddrRange) Reset()               { *m = DsliteAddDelPoolAddrRange{} }
41 func (*DsliteAddDelPoolAddrRange) GetMessageName() string { return "dslite_add_del_pool_addr_range" }
42 func (*DsliteAddDelPoolAddrRange) GetCrcString() string   { return "c448457a" }
43 func (*DsliteAddDelPoolAddrRange) GetMessageType() api.MessageType {
44         return api.RequestMessage
45 }
46
47 func (m *DsliteAddDelPoolAddrRange) Size() int {
48         if m == nil {
49                 return 0
50         }
51         var size int
52         size += 1 * 4 // m.StartAddr
53         size += 1 * 4 // m.EndAddr
54         size += 1     // m.IsAdd
55         return size
56 }
57 func (m *DsliteAddDelPoolAddrRange) Marshal(b []byte) ([]byte, error) {
58         var buf *codec.Buffer
59         if b == nil {
60                 buf = codec.NewBuffer(make([]byte, m.Size()))
61         } else {
62                 buf = codec.NewBuffer(b)
63         }
64         buf.EncodeBytes(m.StartAddr[:], 4)
65         buf.EncodeBytes(m.EndAddr[:], 4)
66         buf.EncodeBool(m.IsAdd)
67         return buf.Bytes(), nil
68 }
69 func (m *DsliteAddDelPoolAddrRange) Unmarshal(b []byte) error {
70         buf := codec.NewBuffer(b)
71         copy(m.StartAddr[:], buf.DecodeBytes(4))
72         copy(m.EndAddr[:], buf.DecodeBytes(4))
73         m.IsAdd = buf.DecodeBool()
74         return nil
75 }
76
77 // DsliteAddDelPoolAddrRangeReply defines message 'dslite_add_del_pool_addr_range_reply'.
78 type DsliteAddDelPoolAddrRangeReply struct {
79         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
80 }
81
82 func (m *DsliteAddDelPoolAddrRangeReply) Reset() { *m = DsliteAddDelPoolAddrRangeReply{} }
83 func (*DsliteAddDelPoolAddrRangeReply) GetMessageName() string {
84         return "dslite_add_del_pool_addr_range_reply"
85 }
86 func (*DsliteAddDelPoolAddrRangeReply) GetCrcString() string { return "e8d4e804" }
87 func (*DsliteAddDelPoolAddrRangeReply) GetMessageType() api.MessageType {
88         return api.ReplyMessage
89 }
90
91 func (m *DsliteAddDelPoolAddrRangeReply) Size() int {
92         if m == nil {
93                 return 0
94         }
95         var size int
96         size += 4 // m.Retval
97         return size
98 }
99 func (m *DsliteAddDelPoolAddrRangeReply) Marshal(b []byte) ([]byte, error) {
100         var buf *codec.Buffer
101         if b == nil {
102                 buf = codec.NewBuffer(make([]byte, m.Size()))
103         } else {
104                 buf = codec.NewBuffer(b)
105         }
106         buf.EncodeUint32(uint32(m.Retval))
107         return buf.Bytes(), nil
108 }
109 func (m *DsliteAddDelPoolAddrRangeReply) Unmarshal(b []byte) error {
110         buf := codec.NewBuffer(b)
111         m.Retval = int32(buf.DecodeUint32())
112         return nil
113 }
114
115 // DsliteAddressDetails defines message 'dslite_address_details'.
116 type DsliteAddressDetails struct {
117         IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
118 }
119
120 func (m *DsliteAddressDetails) Reset()               { *m = DsliteAddressDetails{} }
121 func (*DsliteAddressDetails) GetMessageName() string { return "dslite_address_details" }
122 func (*DsliteAddressDetails) GetCrcString() string   { return "ec26d648" }
123 func (*DsliteAddressDetails) GetMessageType() api.MessageType {
124         return api.ReplyMessage
125 }
126
127 func (m *DsliteAddressDetails) Size() int {
128         if m == nil {
129                 return 0
130         }
131         var size int
132         size += 1 * 4 // m.IPAddress
133         return size
134 }
135 func (m *DsliteAddressDetails) Marshal(b []byte) ([]byte, error) {
136         var buf *codec.Buffer
137         if b == nil {
138                 buf = codec.NewBuffer(make([]byte, m.Size()))
139         } else {
140                 buf = codec.NewBuffer(b)
141         }
142         buf.EncodeBytes(m.IPAddress[:], 4)
143         return buf.Bytes(), nil
144 }
145 func (m *DsliteAddressDetails) Unmarshal(b []byte) error {
146         buf := codec.NewBuffer(b)
147         copy(m.IPAddress[:], buf.DecodeBytes(4))
148         return nil
149 }
150
151 // DsliteAddressDump defines message 'dslite_address_dump'.
152 type DsliteAddressDump struct{}
153
154 func (m *DsliteAddressDump) Reset()               { *m = DsliteAddressDump{} }
155 func (*DsliteAddressDump) GetMessageName() string { return "dslite_address_dump" }
156 func (*DsliteAddressDump) GetCrcString() string   { return "51077d14" }
157 func (*DsliteAddressDump) GetMessageType() api.MessageType {
158         return api.RequestMessage
159 }
160
161 func (m *DsliteAddressDump) Size() int {
162         if m == nil {
163                 return 0
164         }
165         var size int
166         return size
167 }
168 func (m *DsliteAddressDump) Marshal(b []byte) ([]byte, error) {
169         var buf *codec.Buffer
170         if b == nil {
171                 buf = codec.NewBuffer(make([]byte, m.Size()))
172         } else {
173                 buf = codec.NewBuffer(b)
174         }
175         return buf.Bytes(), nil
176 }
177 func (m *DsliteAddressDump) Unmarshal(b []byte) error {
178         return nil
179 }
180
181 // DsliteGetAftrAddr defines message 'dslite_get_aftr_addr'.
182 type DsliteGetAftrAddr struct{}
183
184 func (m *DsliteGetAftrAddr) Reset()               { *m = DsliteGetAftrAddr{} }
185 func (*DsliteGetAftrAddr) GetMessageName() string { return "dslite_get_aftr_addr" }
186 func (*DsliteGetAftrAddr) GetCrcString() string   { return "51077d14" }
187 func (*DsliteGetAftrAddr) GetMessageType() api.MessageType {
188         return api.RequestMessage
189 }
190
191 func (m *DsliteGetAftrAddr) Size() int {
192         if m == nil {
193                 return 0
194         }
195         var size int
196         return size
197 }
198 func (m *DsliteGetAftrAddr) Marshal(b []byte) ([]byte, error) {
199         var buf *codec.Buffer
200         if b == nil {
201                 buf = codec.NewBuffer(make([]byte, m.Size()))
202         } else {
203                 buf = codec.NewBuffer(b)
204         }
205         return buf.Bytes(), nil
206 }
207 func (m *DsliteGetAftrAddr) Unmarshal(b []byte) error {
208         return nil
209 }
210
211 // DsliteGetAftrAddrReply defines message 'dslite_get_aftr_addr_reply'.
212 type DsliteGetAftrAddrReply struct {
213         Retval  int32               `binapi:"i32,name=retval" json:"retval,omitempty"`
214         IP4Addr ip_types.IP4Address `binapi:"ip4_address,name=ip4_addr" json:"ip4_addr,omitempty"`
215         IP6Addr ip_types.IP6Address `binapi:"ip6_address,name=ip6_addr" json:"ip6_addr,omitempty"`
216 }
217
218 func (m *DsliteGetAftrAddrReply) Reset()               { *m = DsliteGetAftrAddrReply{} }
219 func (*DsliteGetAftrAddrReply) GetMessageName() string { return "dslite_get_aftr_addr_reply" }
220 func (*DsliteGetAftrAddrReply) GetCrcString() string   { return "38e30db1" }
221 func (*DsliteGetAftrAddrReply) GetMessageType() api.MessageType {
222         return api.ReplyMessage
223 }
224
225 func (m *DsliteGetAftrAddrReply) Size() int {
226         if m == nil {
227                 return 0
228         }
229         var size int
230         size += 4      // m.Retval
231         size += 1 * 4  // m.IP4Addr
232         size += 1 * 16 // m.IP6Addr
233         return size
234 }
235 func (m *DsliteGetAftrAddrReply) Marshal(b []byte) ([]byte, error) {
236         var buf *codec.Buffer
237         if b == nil {
238                 buf = codec.NewBuffer(make([]byte, m.Size()))
239         } else {
240                 buf = codec.NewBuffer(b)
241         }
242         buf.EncodeUint32(uint32(m.Retval))
243         buf.EncodeBytes(m.IP4Addr[:], 4)
244         buf.EncodeBytes(m.IP6Addr[:], 16)
245         return buf.Bytes(), nil
246 }
247 func (m *DsliteGetAftrAddrReply) Unmarshal(b []byte) error {
248         buf := codec.NewBuffer(b)
249         m.Retval = int32(buf.DecodeUint32())
250         copy(m.IP4Addr[:], buf.DecodeBytes(4))
251         copy(m.IP6Addr[:], buf.DecodeBytes(16))
252         return nil
253 }
254
255 // DsliteGetB4Addr defines message 'dslite_get_b4_addr'.
256 type DsliteGetB4Addr struct{}
257
258 func (m *DsliteGetB4Addr) Reset()               { *m = DsliteGetB4Addr{} }
259 func (*DsliteGetB4Addr) GetMessageName() string { return "dslite_get_b4_addr" }
260 func (*DsliteGetB4Addr) GetCrcString() string   { return "51077d14" }
261 func (*DsliteGetB4Addr) GetMessageType() api.MessageType {
262         return api.RequestMessage
263 }
264
265 func (m *DsliteGetB4Addr) Size() int {
266         if m == nil {
267                 return 0
268         }
269         var size int
270         return size
271 }
272 func (m *DsliteGetB4Addr) Marshal(b []byte) ([]byte, error) {
273         var buf *codec.Buffer
274         if b == nil {
275                 buf = codec.NewBuffer(make([]byte, m.Size()))
276         } else {
277                 buf = codec.NewBuffer(b)
278         }
279         return buf.Bytes(), nil
280 }
281 func (m *DsliteGetB4Addr) Unmarshal(b []byte) error {
282         return nil
283 }
284
285 // DsliteGetB4AddrReply defines message 'dslite_get_b4_addr_reply'.
286 type DsliteGetB4AddrReply struct {
287         Retval  int32               `binapi:"i32,name=retval" json:"retval,omitempty"`
288         IP4Addr ip_types.IP4Address `binapi:"ip4_address,name=ip4_addr" json:"ip4_addr,omitempty"`
289         IP6Addr ip_types.IP6Address `binapi:"ip6_address,name=ip6_addr" json:"ip6_addr,omitempty"`
290 }
291
292 func (m *DsliteGetB4AddrReply) Reset()               { *m = DsliteGetB4AddrReply{} }
293 func (*DsliteGetB4AddrReply) GetMessageName() string { return "dslite_get_b4_addr_reply" }
294 func (*DsliteGetB4AddrReply) GetCrcString() string   { return "38e30db1" }
295 func (*DsliteGetB4AddrReply) GetMessageType() api.MessageType {
296         return api.ReplyMessage
297 }
298
299 func (m *DsliteGetB4AddrReply) Size() int {
300         if m == nil {
301                 return 0
302         }
303         var size int
304         size += 4      // m.Retval
305         size += 1 * 4  // m.IP4Addr
306         size += 1 * 16 // m.IP6Addr
307         return size
308 }
309 func (m *DsliteGetB4AddrReply) Marshal(b []byte) ([]byte, error) {
310         var buf *codec.Buffer
311         if b == nil {
312                 buf = codec.NewBuffer(make([]byte, m.Size()))
313         } else {
314                 buf = codec.NewBuffer(b)
315         }
316         buf.EncodeUint32(uint32(m.Retval))
317         buf.EncodeBytes(m.IP4Addr[:], 4)
318         buf.EncodeBytes(m.IP6Addr[:], 16)
319         return buf.Bytes(), nil
320 }
321 func (m *DsliteGetB4AddrReply) Unmarshal(b []byte) error {
322         buf := codec.NewBuffer(b)
323         m.Retval = int32(buf.DecodeUint32())
324         copy(m.IP4Addr[:], buf.DecodeBytes(4))
325         copy(m.IP6Addr[:], buf.DecodeBytes(16))
326         return nil
327 }
328
329 // DsliteSetAftrAddr defines message 'dslite_set_aftr_addr'.
330 type DsliteSetAftrAddr struct {
331         IP4Addr ip_types.IP4Address `binapi:"ip4_address,name=ip4_addr" json:"ip4_addr,omitempty"`
332         IP6Addr ip_types.IP6Address `binapi:"ip6_address,name=ip6_addr" json:"ip6_addr,omitempty"`
333 }
334
335 func (m *DsliteSetAftrAddr) Reset()               { *m = DsliteSetAftrAddr{} }
336 func (*DsliteSetAftrAddr) GetMessageName() string { return "dslite_set_aftr_addr" }
337 func (*DsliteSetAftrAddr) GetCrcString() string   { return "1e955f8d" }
338 func (*DsliteSetAftrAddr) GetMessageType() api.MessageType {
339         return api.RequestMessage
340 }
341
342 func (m *DsliteSetAftrAddr) Size() int {
343         if m == nil {
344                 return 0
345         }
346         var size int
347         size += 1 * 4  // m.IP4Addr
348         size += 1 * 16 // m.IP6Addr
349         return size
350 }
351 func (m *DsliteSetAftrAddr) Marshal(b []byte) ([]byte, error) {
352         var buf *codec.Buffer
353         if b == nil {
354                 buf = codec.NewBuffer(make([]byte, m.Size()))
355         } else {
356                 buf = codec.NewBuffer(b)
357         }
358         buf.EncodeBytes(m.IP4Addr[:], 4)
359         buf.EncodeBytes(m.IP6Addr[:], 16)
360         return buf.Bytes(), nil
361 }
362 func (m *DsliteSetAftrAddr) Unmarshal(b []byte) error {
363         buf := codec.NewBuffer(b)
364         copy(m.IP4Addr[:], buf.DecodeBytes(4))
365         copy(m.IP6Addr[:], buf.DecodeBytes(16))
366         return nil
367 }
368
369 // DsliteSetAftrAddrReply defines message 'dslite_set_aftr_addr_reply'.
370 type DsliteSetAftrAddrReply struct {
371         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
372 }
373
374 func (m *DsliteSetAftrAddrReply) Reset()               { *m = DsliteSetAftrAddrReply{} }
375 func (*DsliteSetAftrAddrReply) GetMessageName() string { return "dslite_set_aftr_addr_reply" }
376 func (*DsliteSetAftrAddrReply) GetCrcString() string   { return "e8d4e804" }
377 func (*DsliteSetAftrAddrReply) GetMessageType() api.MessageType {
378         return api.ReplyMessage
379 }
380
381 func (m *DsliteSetAftrAddrReply) Size() int {
382         if m == nil {
383                 return 0
384         }
385         var size int
386         size += 4 // m.Retval
387         return size
388 }
389 func (m *DsliteSetAftrAddrReply) Marshal(b []byte) ([]byte, error) {
390         var buf *codec.Buffer
391         if b == nil {
392                 buf = codec.NewBuffer(make([]byte, m.Size()))
393         } else {
394                 buf = codec.NewBuffer(b)
395         }
396         buf.EncodeUint32(uint32(m.Retval))
397         return buf.Bytes(), nil
398 }
399 func (m *DsliteSetAftrAddrReply) Unmarshal(b []byte) error {
400         buf := codec.NewBuffer(b)
401         m.Retval = int32(buf.DecodeUint32())
402         return nil
403 }
404
405 // DsliteSetB4Addr defines message 'dslite_set_b4_addr'.
406 type DsliteSetB4Addr struct {
407         IP4Addr ip_types.IP4Address `binapi:"ip4_address,name=ip4_addr" json:"ip4_addr,omitempty"`
408         IP6Addr ip_types.IP6Address `binapi:"ip6_address,name=ip6_addr" json:"ip6_addr,omitempty"`
409 }
410
411 func (m *DsliteSetB4Addr) Reset()               { *m = DsliteSetB4Addr{} }
412 func (*DsliteSetB4Addr) GetMessageName() string { return "dslite_set_b4_addr" }
413 func (*DsliteSetB4Addr) GetCrcString() string   { return "1e955f8d" }
414 func (*DsliteSetB4Addr) GetMessageType() api.MessageType {
415         return api.RequestMessage
416 }
417
418 func (m *DsliteSetB4Addr) Size() int {
419         if m == nil {
420                 return 0
421         }
422         var size int
423         size += 1 * 4  // m.IP4Addr
424         size += 1 * 16 // m.IP6Addr
425         return size
426 }
427 func (m *DsliteSetB4Addr) Marshal(b []byte) ([]byte, error) {
428         var buf *codec.Buffer
429         if b == nil {
430                 buf = codec.NewBuffer(make([]byte, m.Size()))
431         } else {
432                 buf = codec.NewBuffer(b)
433         }
434         buf.EncodeBytes(m.IP4Addr[:], 4)
435         buf.EncodeBytes(m.IP6Addr[:], 16)
436         return buf.Bytes(), nil
437 }
438 func (m *DsliteSetB4Addr) Unmarshal(b []byte) error {
439         buf := codec.NewBuffer(b)
440         copy(m.IP4Addr[:], buf.DecodeBytes(4))
441         copy(m.IP6Addr[:], buf.DecodeBytes(16))
442         return nil
443 }
444
445 // DsliteSetB4AddrReply defines message 'dslite_set_b4_addr_reply'.
446 type DsliteSetB4AddrReply struct {
447         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
448 }
449
450 func (m *DsliteSetB4AddrReply) Reset()               { *m = DsliteSetB4AddrReply{} }
451 func (*DsliteSetB4AddrReply) GetMessageName() string { return "dslite_set_b4_addr_reply" }
452 func (*DsliteSetB4AddrReply) GetCrcString() string   { return "e8d4e804" }
453 func (*DsliteSetB4AddrReply) GetMessageType() api.MessageType {
454         return api.ReplyMessage
455 }
456
457 func (m *DsliteSetB4AddrReply) Size() int {
458         if m == nil {
459                 return 0
460         }
461         var size int
462         size += 4 // m.Retval
463         return size
464 }
465 func (m *DsliteSetB4AddrReply) Marshal(b []byte) ([]byte, error) {
466         var buf *codec.Buffer
467         if b == nil {
468                 buf = codec.NewBuffer(make([]byte, m.Size()))
469         } else {
470                 buf = codec.NewBuffer(b)
471         }
472         buf.EncodeUint32(uint32(m.Retval))
473         return buf.Bytes(), nil
474 }
475 func (m *DsliteSetB4AddrReply) Unmarshal(b []byte) error {
476         buf := codec.NewBuffer(b)
477         m.Retval = int32(buf.DecodeUint32())
478         return nil
479 }
480
481 func init() { file_dslite_binapi_init() }
482 func file_dslite_binapi_init() {
483         api.RegisterMessage((*DsliteAddDelPoolAddrRange)(nil), "dslite_add_del_pool_addr_range_c448457a")
484         api.RegisterMessage((*DsliteAddDelPoolAddrRangeReply)(nil), "dslite_add_del_pool_addr_range_reply_e8d4e804")
485         api.RegisterMessage((*DsliteAddressDetails)(nil), "dslite_address_details_ec26d648")
486         api.RegisterMessage((*DsliteAddressDump)(nil), "dslite_address_dump_51077d14")
487         api.RegisterMessage((*DsliteGetAftrAddr)(nil), "dslite_get_aftr_addr_51077d14")
488         api.RegisterMessage((*DsliteGetAftrAddrReply)(nil), "dslite_get_aftr_addr_reply_38e30db1")
489         api.RegisterMessage((*DsliteGetB4Addr)(nil), "dslite_get_b4_addr_51077d14")
490         api.RegisterMessage((*DsliteGetB4AddrReply)(nil), "dslite_get_b4_addr_reply_38e30db1")
491         api.RegisterMessage((*DsliteSetAftrAddr)(nil), "dslite_set_aftr_addr_1e955f8d")
492         api.RegisterMessage((*DsliteSetAftrAddrReply)(nil), "dslite_set_aftr_addr_reply_e8d4e804")
493         api.RegisterMessage((*DsliteSetB4Addr)(nil), "dslite_set_b4_addr_1e955f8d")
494         api.RegisterMessage((*DsliteSetB4AddrReply)(nil), "dslite_set_b4_addr_reply_e8d4e804")
495 }
496
497 // Messages returns list of all messages in this module.
498 func AllMessages() []api.Message {
499         return []api.Message{
500                 (*DsliteAddDelPoolAddrRange)(nil),
501                 (*DsliteAddDelPoolAddrRangeReply)(nil),
502                 (*DsliteAddressDetails)(nil),
503                 (*DsliteAddressDump)(nil),
504                 (*DsliteGetAftrAddr)(nil),
505                 (*DsliteGetAftrAddrReply)(nil),
506                 (*DsliteGetB4Addr)(nil),
507                 (*DsliteGetB4AddrReply)(nil),
508                 (*DsliteSetAftrAddr)(nil),
509                 (*DsliteSetAftrAddrReply)(nil),
510                 (*DsliteSetB4Addr)(nil),
511                 (*DsliteSetB4AddrReply)(nil),
512         }
513 }