Update generated binapi to v22.02 & makefile changes
[govpp.git] / internal / testbinapi / binapi2001 / ioam_vxlan_gpe / ioam_vxlan_gpe.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2 // versions:
3 //  binapi-generator: v0.5.0-dev
4 //  VPP:              20.01
5 // source: .vppapi/plugins/ioam_vxlan_gpe.api.json
6
7 // Package ioam_vxlan_gpe contains generated bindings for API file ioam_vxlan_gpe.api.
8 //
9 // Contents:
10 //   5 aliases
11 //   4 enums
12 //   6 structs
13 //   1 union
14 //  12 messages
15 //
16 package ioam_vxlan_gpe
17
18 import (
19         "fmt"
20         "net"
21         "strconv"
22         "strings"
23
24         api "git.fd.io/govpp.git/api"
25         codec "git.fd.io/govpp.git/codec"
26 )
27
28 // This is a compile-time assertion to ensure that this generated file
29 // is compatible with the GoVPP api package it is being compiled against.
30 // A compilation error at this line likely means your copy of the
31 // GoVPP api package needs to be updated.
32 const _ = api.GoVppAPIPackageIsVersion2
33
34 const (
35         APIFile    = "ioam_vxlan_gpe"
36         APIVersion = "1.0.0"
37         VersionCrc = 0xf80eb923
38 )
39
40 // AddressFamily defines enum 'address_family'.
41 type AddressFamily uint32
42
43 const (
44         ADDRESS_IP4 AddressFamily = 0
45         ADDRESS_IP6 AddressFamily = 1
46 )
47
48 var (
49         AddressFamily_name = map[uint32]string{
50                 0: "ADDRESS_IP4",
51                 1: "ADDRESS_IP6",
52         }
53         AddressFamily_value = map[string]uint32{
54                 "ADDRESS_IP4": 0,
55                 "ADDRESS_IP6": 1,
56         }
57 )
58
59 func (x AddressFamily) String() string {
60         s, ok := AddressFamily_name[uint32(x)]
61         if ok {
62                 return s
63         }
64         return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
65 }
66
67 // IPDscp defines enum 'ip_dscp'.
68 type IPDscp uint8
69
70 const (
71         IP_API_DSCP_CS0  IPDscp = 0
72         IP_API_DSCP_CS1  IPDscp = 8
73         IP_API_DSCP_AF11 IPDscp = 10
74         IP_API_DSCP_AF12 IPDscp = 12
75         IP_API_DSCP_AF13 IPDscp = 14
76         IP_API_DSCP_CS2  IPDscp = 16
77         IP_API_DSCP_AF21 IPDscp = 18
78         IP_API_DSCP_AF22 IPDscp = 20
79         IP_API_DSCP_AF23 IPDscp = 22
80         IP_API_DSCP_CS3  IPDscp = 24
81         IP_API_DSCP_AF31 IPDscp = 26
82         IP_API_DSCP_AF32 IPDscp = 28
83         IP_API_DSCP_AF33 IPDscp = 30
84         IP_API_DSCP_CS4  IPDscp = 32
85         IP_API_DSCP_AF41 IPDscp = 34
86         IP_API_DSCP_AF42 IPDscp = 36
87         IP_API_DSCP_AF43 IPDscp = 38
88         IP_API_DSCP_CS5  IPDscp = 40
89         IP_API_DSCP_EF   IPDscp = 46
90         IP_API_DSCP_CS6  IPDscp = 48
91         IP_API_DSCP_CS7  IPDscp = 50
92 )
93
94 var (
95         IPDscp_name = map[uint8]string{
96                 0:  "IP_API_DSCP_CS0",
97                 8:  "IP_API_DSCP_CS1",
98                 10: "IP_API_DSCP_AF11",
99                 12: "IP_API_DSCP_AF12",
100                 14: "IP_API_DSCP_AF13",
101                 16: "IP_API_DSCP_CS2",
102                 18: "IP_API_DSCP_AF21",
103                 20: "IP_API_DSCP_AF22",
104                 22: "IP_API_DSCP_AF23",
105                 24: "IP_API_DSCP_CS3",
106                 26: "IP_API_DSCP_AF31",
107                 28: "IP_API_DSCP_AF32",
108                 30: "IP_API_DSCP_AF33",
109                 32: "IP_API_DSCP_CS4",
110                 34: "IP_API_DSCP_AF41",
111                 36: "IP_API_DSCP_AF42",
112                 38: "IP_API_DSCP_AF43",
113                 40: "IP_API_DSCP_CS5",
114                 46: "IP_API_DSCP_EF",
115                 48: "IP_API_DSCP_CS6",
116                 50: "IP_API_DSCP_CS7",
117         }
118         IPDscp_value = map[string]uint8{
119                 "IP_API_DSCP_CS0":  0,
120                 "IP_API_DSCP_CS1":  8,
121                 "IP_API_DSCP_AF11": 10,
122                 "IP_API_DSCP_AF12": 12,
123                 "IP_API_DSCP_AF13": 14,
124                 "IP_API_DSCP_CS2":  16,
125                 "IP_API_DSCP_AF21": 18,
126                 "IP_API_DSCP_AF22": 20,
127                 "IP_API_DSCP_AF23": 22,
128                 "IP_API_DSCP_CS3":  24,
129                 "IP_API_DSCP_AF31": 26,
130                 "IP_API_DSCP_AF32": 28,
131                 "IP_API_DSCP_AF33": 30,
132                 "IP_API_DSCP_CS4":  32,
133                 "IP_API_DSCP_AF41": 34,
134                 "IP_API_DSCP_AF42": 36,
135                 "IP_API_DSCP_AF43": 38,
136                 "IP_API_DSCP_CS5":  40,
137                 "IP_API_DSCP_EF":   46,
138                 "IP_API_DSCP_CS6":  48,
139                 "IP_API_DSCP_CS7":  50,
140         }
141 )
142
143 func (x IPDscp) String() string {
144         s, ok := IPDscp_name[uint8(x)]
145         if ok {
146                 return s
147         }
148         return "IPDscp(" + strconv.Itoa(int(x)) + ")"
149 }
150
151 // IPEcn defines enum 'ip_ecn'.
152 type IPEcn uint8
153
154 const (
155         IP_API_ECN_NONE IPEcn = 0
156         IP_API_ECN_ECT0 IPEcn = 1
157         IP_API_ECN_ECT1 IPEcn = 2
158         IP_API_ECN_CE   IPEcn = 3
159 )
160
161 var (
162         IPEcn_name = map[uint8]string{
163                 0: "IP_API_ECN_NONE",
164                 1: "IP_API_ECN_ECT0",
165                 2: "IP_API_ECN_ECT1",
166                 3: "IP_API_ECN_CE",
167         }
168         IPEcn_value = map[string]uint8{
169                 "IP_API_ECN_NONE": 0,
170                 "IP_API_ECN_ECT0": 1,
171                 "IP_API_ECN_ECT1": 2,
172                 "IP_API_ECN_CE":   3,
173         }
174 )
175
176 func (x IPEcn) String() string {
177         s, ok := IPEcn_name[uint8(x)]
178         if ok {
179                 return s
180         }
181         return "IPEcn(" + strconv.Itoa(int(x)) + ")"
182 }
183
184 // IPProto defines enum 'ip_proto'.
185 type IPProto uint32
186
187 const (
188         IP_API_PROTO_HOPOPT   IPProto = 0
189         IP_API_PROTO_ICMP     IPProto = 1
190         IP_API_PROTO_IGMP     IPProto = 2
191         IP_API_PROTO_TCP      IPProto = 6
192         IP_API_PROTO_UDP      IPProto = 17
193         IP_API_PROTO_GRE      IPProto = 47
194         IP_API_PROTO_AH       IPProto = 50
195         IP_API_PROTO_ESP      IPProto = 51
196         IP_API_PROTO_EIGRP    IPProto = 88
197         IP_API_PROTO_OSPF     IPProto = 89
198         IP_API_PROTO_SCTP     IPProto = 132
199         IP_API_PROTO_RESERVED IPProto = 255
200 )
201
202 var (
203         IPProto_name = map[uint32]string{
204                 0:   "IP_API_PROTO_HOPOPT",
205                 1:   "IP_API_PROTO_ICMP",
206                 2:   "IP_API_PROTO_IGMP",
207                 6:   "IP_API_PROTO_TCP",
208                 17:  "IP_API_PROTO_UDP",
209                 47:  "IP_API_PROTO_GRE",
210                 50:  "IP_API_PROTO_AH",
211                 51:  "IP_API_PROTO_ESP",
212                 88:  "IP_API_PROTO_EIGRP",
213                 89:  "IP_API_PROTO_OSPF",
214                 132: "IP_API_PROTO_SCTP",
215                 255: "IP_API_PROTO_RESERVED",
216         }
217         IPProto_value = map[string]uint32{
218                 "IP_API_PROTO_HOPOPT":   0,
219                 "IP_API_PROTO_ICMP":     1,
220                 "IP_API_PROTO_IGMP":     2,
221                 "IP_API_PROTO_TCP":      6,
222                 "IP_API_PROTO_UDP":      17,
223                 "IP_API_PROTO_GRE":      47,
224                 "IP_API_PROTO_AH":       50,
225                 "IP_API_PROTO_ESP":      51,
226                 "IP_API_PROTO_EIGRP":    88,
227                 "IP_API_PROTO_OSPF":     89,
228                 "IP_API_PROTO_SCTP":     132,
229                 "IP_API_PROTO_RESERVED": 255,
230         }
231 )
232
233 func (x IPProto) String() string {
234         s, ok := IPProto_name[uint32(x)]
235         if ok {
236                 return s
237         }
238         return "IPProto(" + strconv.Itoa(int(x)) + ")"
239 }
240
241 // AddressWithPrefix defines alias 'address_with_prefix'.
242 type AddressWithPrefix Prefix
243
244 func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
245         prefix, err := ParsePrefix(s)
246         if err != nil {
247                 return AddressWithPrefix{}, err
248         }
249         return AddressWithPrefix(prefix), nil
250 }
251
252 func (x AddressWithPrefix) String() string {
253         return Prefix(x).String()
254 }
255
256 func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
257         return []byte(x.String()), nil
258 }
259
260 func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
261         prefix, err := ParseAddressWithPrefix(string(text))
262         if err != nil {
263                 return err
264         }
265         *x = prefix
266         return nil
267 }
268
269 // IP4Address defines alias 'ip4_address'.
270 type IP4Address [4]uint8
271
272 func ParseIP4Address(s string) (IP4Address, error) {
273         ip := net.ParseIP(s).To4()
274         if ip == nil {
275                 return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
276         }
277         var ipaddr IP4Address
278         copy(ipaddr[:], ip.To4())
279         return ipaddr, nil
280 }
281
282 func (x IP4Address) ToIP() net.IP {
283         return net.IP(x[:]).To4()
284 }
285
286 func (x IP4Address) String() string {
287         return x.ToIP().String()
288 }
289
290 func (x *IP4Address) MarshalText() ([]byte, error) {
291         return []byte(x.String()), nil
292 }
293
294 func (x *IP4Address) UnmarshalText(text []byte) error {
295         ipaddr, err := ParseIP4Address(string(text))
296         if err != nil {
297                 return err
298         }
299         *x = ipaddr
300         return nil
301 }
302
303 // IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
304 type IP4AddressWithPrefix IP4Prefix
305
306 // IP6Address defines alias 'ip6_address'.
307 type IP6Address [16]uint8
308
309 func ParseIP6Address(s string) (IP6Address, error) {
310         ip := net.ParseIP(s).To16()
311         if ip == nil {
312                 return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
313         }
314         var ipaddr IP6Address
315         copy(ipaddr[:], ip.To16())
316         return ipaddr, nil
317 }
318
319 func (x IP6Address) ToIP() net.IP {
320         return net.IP(x[:]).To16()
321 }
322
323 func (x IP6Address) String() string {
324         return x.ToIP().String()
325 }
326
327 func (x *IP6Address) MarshalText() ([]byte, error) {
328         return []byte(x.String()), nil
329 }
330
331 func (x *IP6Address) UnmarshalText(text []byte) error {
332         ipaddr, err := ParseIP6Address(string(text))
333         if err != nil {
334                 return err
335         }
336         *x = ipaddr
337         return nil
338 }
339
340 // IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
341 type IP6AddressWithPrefix IP6Prefix
342
343 // Address defines type 'address'.
344 type Address struct {
345         Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
346         Un AddressUnion  `binapi:"address_union,name=un" json:"un,omitempty"`
347 }
348
349 func ParseAddress(s string) (Address, error) {
350         ip := net.ParseIP(s)
351         if ip == nil {
352                 return Address{}, fmt.Errorf("invalid address: %s", s)
353         }
354         return AddressFromIP(ip), nil
355 }
356
357 func AddressFromIP(ip net.IP) Address {
358         var addr Address
359         if ip.To4() == nil {
360                 addr.Af = ADDRESS_IP6
361                 var ip6 IP6Address
362                 copy(ip6[:], ip.To16())
363                 addr.Un.SetIP6(ip6)
364         } else {
365                 addr.Af = ADDRESS_IP4
366                 var ip4 IP4Address
367                 copy(ip4[:], ip.To4())
368                 addr.Un.SetIP4(ip4)
369         }
370         return addr
371 }
372
373 func (x Address) ToIP() net.IP {
374         if x.Af == ADDRESS_IP6 {
375                 ip6 := x.Un.GetIP6()
376                 return net.IP(ip6[:]).To16()
377         } else {
378                 ip4 := x.Un.GetIP4()
379                 return net.IP(ip4[:]).To4()
380         }
381 }
382
383 func (x Address) String() string {
384         return x.ToIP().String()
385 }
386
387 func (x *Address) MarshalText() ([]byte, error) {
388         return []byte(x.String()), nil
389 }
390
391 func (x *Address) UnmarshalText(text []byte) error {
392         addr, err := ParseAddress(string(text))
393         if err != nil {
394                 return err
395         }
396         *x = addr
397         return nil
398 }
399
400 // IP4Prefix defines type 'ip4_prefix'.
401 type IP4Prefix struct {
402         Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
403         Len     uint8      `binapi:"u8,name=len" json:"len,omitempty"`
404 }
405
406 func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
407         hasPrefix := strings.Contains(s, "/")
408         if hasPrefix {
409                 ip, network, err := net.ParseCIDR(s)
410                 if err != nil {
411                         return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
412                 }
413                 maskSize, _ := network.Mask.Size()
414                 prefix.Len = byte(maskSize)
415                 prefix.Address, err = ParseIP4Address(ip.String())
416                 if err != nil {
417                         return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
418                 }
419         } else {
420                 ip := net.ParseIP(s)
421                 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
422                 if ip.To4() == nil {
423                         defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
424                 }
425                 prefix.Len = byte(defaultMaskSize)
426                 prefix.Address, err = ParseIP4Address(ip.String())
427                 if err != nil {
428                         return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
429                 }
430         }
431         return prefix, nil
432 }
433
434 func (x IP4Prefix) ToIPNet() *net.IPNet {
435         mask := net.CIDRMask(int(x.Len), 32)
436         ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
437         return ipnet
438 }
439
440 func (x IP4Prefix) String() string {
441         ip := x.Address.String()
442         return ip + "/" + strconv.Itoa(int(x.Len))
443 }
444
445 func (x *IP4Prefix) MarshalText() ([]byte, error) {
446         return []byte(x.String()), nil
447 }
448
449 func (x *IP4Prefix) UnmarshalText(text []byte) error {
450         prefix, err := ParseIP4Prefix(string(text))
451         if err != nil {
452                 return err
453         }
454         *x = prefix
455         return nil
456 }
457
458 // IP6Prefix defines type 'ip6_prefix'.
459 type IP6Prefix struct {
460         Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
461         Len     uint8      `binapi:"u8,name=len" json:"len,omitempty"`
462 }
463
464 func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
465         hasPrefix := strings.Contains(s, "/")
466         if hasPrefix {
467                 ip, network, err := net.ParseCIDR(s)
468                 if err != nil {
469                         return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
470                 }
471                 maskSize, _ := network.Mask.Size()
472                 prefix.Len = byte(maskSize)
473                 prefix.Address, err = ParseIP6Address(ip.String())
474                 if err != nil {
475                         return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
476                 }
477         } else {
478                 ip := net.ParseIP(s)
479                 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
480                 if ip.To4() == nil {
481                         defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
482                 }
483                 prefix.Len = byte(defaultMaskSize)
484                 prefix.Address, err = ParseIP6Address(ip.String())
485                 if err != nil {
486                         return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
487                 }
488         }
489         return prefix, nil
490 }
491
492 func (x IP6Prefix) ToIPNet() *net.IPNet {
493         mask := net.CIDRMask(int(x.Len), 128)
494         ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
495         return ipnet
496 }
497
498 func (x IP6Prefix) String() string {
499         ip := x.Address.String()
500         return ip + "/" + strconv.Itoa(int(x.Len))
501 }
502
503 func (x *IP6Prefix) MarshalText() ([]byte, error) {
504         return []byte(x.String()), nil
505 }
506
507 func (x *IP6Prefix) UnmarshalText(text []byte) error {
508         prefix, err := ParseIP6Prefix(string(text))
509         if err != nil {
510                 return err
511         }
512         *x = prefix
513         return nil
514 }
515
516 // Mprefix defines type 'mprefix'.
517 type Mprefix struct {
518         Af               AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
519         GrpAddressLength uint16        `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
520         GrpAddress       AddressUnion  `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
521         SrcAddress       AddressUnion  `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
522 }
523
524 // Prefix defines type 'prefix'.
525 type Prefix struct {
526         Address Address `binapi:"address,name=address" json:"address,omitempty"`
527         Len     uint8   `binapi:"u8,name=len" json:"len,omitempty"`
528 }
529
530 func ParsePrefix(ip string) (prefix Prefix, err error) {
531         hasPrefix := strings.Contains(ip, "/")
532         if hasPrefix {
533                 netIP, network, err := net.ParseCIDR(ip)
534                 if err != nil {
535                         return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
536                 }
537                 maskSize, _ := network.Mask.Size()
538                 prefix.Len = byte(maskSize)
539                 prefix.Address, err = ParseAddress(netIP.String())
540                 if err != nil {
541                         return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
542                 }
543         } else {
544                 netIP := net.ParseIP(ip)
545                 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
546                 if netIP.To4() == nil {
547                         defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
548                 }
549                 prefix.Len = byte(defaultMaskSize)
550                 prefix.Address, err = ParseAddress(netIP.String())
551                 if err != nil {
552                         return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
553                 }
554         }
555         return prefix, nil
556 }
557
558 func (x Prefix) ToIPNet() *net.IPNet {
559         var mask net.IPMask
560         if x.Address.Af == ADDRESS_IP4 {
561                 mask = net.CIDRMask(int(x.Len), 32)
562         } else {
563                 mask = net.CIDRMask(int(x.Len), 128)
564         }
565         ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
566         return ipnet
567 }
568
569 func (x Prefix) String() string {
570         ip := x.Address.String()
571         return ip + "/" + strconv.Itoa(int(x.Len))
572 }
573
574 func (x *Prefix) MarshalText() ([]byte, error) {
575         return []byte(x.String()), nil
576 }
577
578 func (x *Prefix) UnmarshalText(text []byte) error {
579         prefix, err := ParsePrefix(string(text))
580         if err != nil {
581                 return err
582         }
583         *x = prefix
584         return nil
585 }
586
587 // PrefixMatcher defines type 'prefix_matcher'.
588 type PrefixMatcher struct {
589         Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
590         Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
591 }
592
593 // AddressUnion defines union 'address_union'.
594 type AddressUnion struct {
595         // AddressUnion can be one of:
596         // - IP4 *IP4Address
597         // - IP6 *IP6Address
598         XXX_UnionData [16]byte
599 }
600
601 func AddressUnionIP4(a IP4Address) (u AddressUnion) {
602         u.SetIP4(a)
603         return
604 }
605 func (u *AddressUnion) SetIP4(a IP4Address) {
606         buf := codec.NewBuffer(u.XXX_UnionData[:])
607         buf.EncodeBytes(a[:], 4)
608 }
609 func (u *AddressUnion) GetIP4() (a IP4Address) {
610         buf := codec.NewBuffer(u.XXX_UnionData[:])
611         copy(a[:], buf.DecodeBytes(4))
612         return
613 }
614
615 func AddressUnionIP6(a IP6Address) (u AddressUnion) {
616         u.SetIP6(a)
617         return
618 }
619 func (u *AddressUnion) SetIP6(a IP6Address) {
620         buf := codec.NewBuffer(u.XXX_UnionData[:])
621         buf.EncodeBytes(a[:], 16)
622 }
623 func (u *AddressUnion) GetIP6() (a IP6Address) {
624         buf := codec.NewBuffer(u.XXX_UnionData[:])
625         copy(a[:], buf.DecodeBytes(16))
626         return
627 }
628
629 // VxlanGpeIoamDisable defines message 'vxlan_gpe_ioam_disable'.
630 type VxlanGpeIoamDisable struct {
631         ID uint16 `binapi:"u16,name=id" json:"id,omitempty"`
632 }
633
634 func (m *VxlanGpeIoamDisable) Reset()               { *m = VxlanGpeIoamDisable{} }
635 func (*VxlanGpeIoamDisable) GetMessageName() string { return "vxlan_gpe_ioam_disable" }
636 func (*VxlanGpeIoamDisable) GetCrcString() string   { return "6b16a45e" }
637 func (*VxlanGpeIoamDisable) GetMessageType() api.MessageType {
638         return api.RequestMessage
639 }
640
641 func (m *VxlanGpeIoamDisable) Size() (size int) {
642         if m == nil {
643                 return 0
644         }
645         size += 2 // m.ID
646         return size
647 }
648 func (m *VxlanGpeIoamDisable) Marshal(b []byte) ([]byte, error) {
649         if b == nil {
650                 b = make([]byte, m.Size())
651         }
652         buf := codec.NewBuffer(b)
653         buf.EncodeUint16(m.ID)
654         return buf.Bytes(), nil
655 }
656 func (m *VxlanGpeIoamDisable) Unmarshal(b []byte) error {
657         buf := codec.NewBuffer(b)
658         m.ID = buf.DecodeUint16()
659         return nil
660 }
661
662 // VxlanGpeIoamDisableReply defines message 'vxlan_gpe_ioam_disable_reply'.
663 type VxlanGpeIoamDisableReply struct {
664         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
665 }
666
667 func (m *VxlanGpeIoamDisableReply) Reset()               { *m = VxlanGpeIoamDisableReply{} }
668 func (*VxlanGpeIoamDisableReply) GetMessageName() string { return "vxlan_gpe_ioam_disable_reply" }
669 func (*VxlanGpeIoamDisableReply) GetCrcString() string   { return "e8d4e804" }
670 func (*VxlanGpeIoamDisableReply) GetMessageType() api.MessageType {
671         return api.ReplyMessage
672 }
673
674 func (m *VxlanGpeIoamDisableReply) Size() (size int) {
675         if m == nil {
676                 return 0
677         }
678         size += 4 // m.Retval
679         return size
680 }
681 func (m *VxlanGpeIoamDisableReply) Marshal(b []byte) ([]byte, error) {
682         if b == nil {
683                 b = make([]byte, m.Size())
684         }
685         buf := codec.NewBuffer(b)
686         buf.EncodeInt32(m.Retval)
687         return buf.Bytes(), nil
688 }
689 func (m *VxlanGpeIoamDisableReply) Unmarshal(b []byte) error {
690         buf := codec.NewBuffer(b)
691         m.Retval = buf.DecodeInt32()
692         return nil
693 }
694
695 // VxlanGpeIoamEnable defines message 'vxlan_gpe_ioam_enable'.
696 type VxlanGpeIoamEnable struct {
697         ID          uint16 `binapi:"u16,name=id" json:"id,omitempty"`
698         TracePpc    uint8  `binapi:"u8,name=trace_ppc" json:"trace_ppc,omitempty"`
699         PowEnable   bool   `binapi:"bool,name=pow_enable" json:"pow_enable,omitempty"`
700         TraceEnable bool   `binapi:"bool,name=trace_enable" json:"trace_enable,omitempty"`
701 }
702
703 func (m *VxlanGpeIoamEnable) Reset()               { *m = VxlanGpeIoamEnable{} }
704 func (*VxlanGpeIoamEnable) GetMessageName() string { return "vxlan_gpe_ioam_enable" }
705 func (*VxlanGpeIoamEnable) GetCrcString() string   { return "2481bef7" }
706 func (*VxlanGpeIoamEnable) GetMessageType() api.MessageType {
707         return api.RequestMessage
708 }
709
710 func (m *VxlanGpeIoamEnable) Size() (size int) {
711         if m == nil {
712                 return 0
713         }
714         size += 2 // m.ID
715         size += 1 // m.TracePpc
716         size += 1 // m.PowEnable
717         size += 1 // m.TraceEnable
718         return size
719 }
720 func (m *VxlanGpeIoamEnable) Marshal(b []byte) ([]byte, error) {
721         if b == nil {
722                 b = make([]byte, m.Size())
723         }
724         buf := codec.NewBuffer(b)
725         buf.EncodeUint16(m.ID)
726         buf.EncodeUint8(m.TracePpc)
727         buf.EncodeBool(m.PowEnable)
728         buf.EncodeBool(m.TraceEnable)
729         return buf.Bytes(), nil
730 }
731 func (m *VxlanGpeIoamEnable) Unmarshal(b []byte) error {
732         buf := codec.NewBuffer(b)
733         m.ID = buf.DecodeUint16()
734         m.TracePpc = buf.DecodeUint8()
735         m.PowEnable = buf.DecodeBool()
736         m.TraceEnable = buf.DecodeBool()
737         return nil
738 }
739
740 // VxlanGpeIoamEnableReply defines message 'vxlan_gpe_ioam_enable_reply'.
741 type VxlanGpeIoamEnableReply struct {
742         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
743 }
744
745 func (m *VxlanGpeIoamEnableReply) Reset()               { *m = VxlanGpeIoamEnableReply{} }
746 func (*VxlanGpeIoamEnableReply) GetMessageName() string { return "vxlan_gpe_ioam_enable_reply" }
747 func (*VxlanGpeIoamEnableReply) GetCrcString() string   { return "e8d4e804" }
748 func (*VxlanGpeIoamEnableReply) GetMessageType() api.MessageType {
749         return api.ReplyMessage
750 }
751
752 func (m *VxlanGpeIoamEnableReply) Size() (size int) {
753         if m == nil {
754                 return 0
755         }
756         size += 4 // m.Retval
757         return size
758 }
759 func (m *VxlanGpeIoamEnableReply) Marshal(b []byte) ([]byte, error) {
760         if b == nil {
761                 b = make([]byte, m.Size())
762         }
763         buf := codec.NewBuffer(b)
764         buf.EncodeInt32(m.Retval)
765         return buf.Bytes(), nil
766 }
767 func (m *VxlanGpeIoamEnableReply) Unmarshal(b []byte) error {
768         buf := codec.NewBuffer(b)
769         m.Retval = buf.DecodeInt32()
770         return nil
771 }
772
773 // VxlanGpeIoamTransitDisable defines message 'vxlan_gpe_ioam_transit_disable'.
774 type VxlanGpeIoamTransitDisable struct {
775         OuterFibIndex uint32  `binapi:"u32,name=outer_fib_index" json:"outer_fib_index,omitempty"`
776         DstAddr       Address `binapi:"address,name=dst_addr" json:"dst_addr,omitempty"`
777 }
778
779 func (m *VxlanGpeIoamTransitDisable) Reset()               { *m = VxlanGpeIoamTransitDisable{} }
780 func (*VxlanGpeIoamTransitDisable) GetMessageName() string { return "vxlan_gpe_ioam_transit_disable" }
781 func (*VxlanGpeIoamTransitDisable) GetCrcString() string   { return "553f5b7b" }
782 func (*VxlanGpeIoamTransitDisable) GetMessageType() api.MessageType {
783         return api.RequestMessage
784 }
785
786 func (m *VxlanGpeIoamTransitDisable) Size() (size int) {
787         if m == nil {
788                 return 0
789         }
790         size += 4      // m.OuterFibIndex
791         size += 4      // m.DstAddr.Af
792         size += 1 * 16 // m.DstAddr.Un
793         return size
794 }
795 func (m *VxlanGpeIoamTransitDisable) Marshal(b []byte) ([]byte, error) {
796         if b == nil {
797                 b = make([]byte, m.Size())
798         }
799         buf := codec.NewBuffer(b)
800         buf.EncodeUint32(m.OuterFibIndex)
801         buf.EncodeUint32(uint32(m.DstAddr.Af))
802         buf.EncodeBytes(m.DstAddr.Un.XXX_UnionData[:], 16)
803         return buf.Bytes(), nil
804 }
805 func (m *VxlanGpeIoamTransitDisable) Unmarshal(b []byte) error {
806         buf := codec.NewBuffer(b)
807         m.OuterFibIndex = buf.DecodeUint32()
808         m.DstAddr.Af = AddressFamily(buf.DecodeUint32())
809         copy(m.DstAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
810         return nil
811 }
812
813 // VxlanGpeIoamTransitDisableReply defines message 'vxlan_gpe_ioam_transit_disable_reply'.
814 type VxlanGpeIoamTransitDisableReply struct {
815         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
816 }
817
818 func (m *VxlanGpeIoamTransitDisableReply) Reset() { *m = VxlanGpeIoamTransitDisableReply{} }
819 func (*VxlanGpeIoamTransitDisableReply) GetMessageName() string {
820         return "vxlan_gpe_ioam_transit_disable_reply"
821 }
822 func (*VxlanGpeIoamTransitDisableReply) GetCrcString() string { return "e8d4e804" }
823 func (*VxlanGpeIoamTransitDisableReply) GetMessageType() api.MessageType {
824         return api.ReplyMessage
825 }
826
827 func (m *VxlanGpeIoamTransitDisableReply) Size() (size int) {
828         if m == nil {
829                 return 0
830         }
831         size += 4 // m.Retval
832         return size
833 }
834 func (m *VxlanGpeIoamTransitDisableReply) Marshal(b []byte) ([]byte, error) {
835         if b == nil {
836                 b = make([]byte, m.Size())
837         }
838         buf := codec.NewBuffer(b)
839         buf.EncodeInt32(m.Retval)
840         return buf.Bytes(), nil
841 }
842 func (m *VxlanGpeIoamTransitDisableReply) Unmarshal(b []byte) error {
843         buf := codec.NewBuffer(b)
844         m.Retval = buf.DecodeInt32()
845         return nil
846 }
847
848 // VxlanGpeIoamTransitEnable defines message 'vxlan_gpe_ioam_transit_enable'.
849 type VxlanGpeIoamTransitEnable struct {
850         OuterFibIndex uint32  `binapi:"u32,name=outer_fib_index" json:"outer_fib_index,omitempty"`
851         DstAddr       Address `binapi:"address,name=dst_addr" json:"dst_addr,omitempty"`
852 }
853
854 func (m *VxlanGpeIoamTransitEnable) Reset()               { *m = VxlanGpeIoamTransitEnable{} }
855 func (*VxlanGpeIoamTransitEnable) GetMessageName() string { return "vxlan_gpe_ioam_transit_enable" }
856 func (*VxlanGpeIoamTransitEnable) GetCrcString() string   { return "553f5b7b" }
857 func (*VxlanGpeIoamTransitEnable) GetMessageType() api.MessageType {
858         return api.RequestMessage
859 }
860
861 func (m *VxlanGpeIoamTransitEnable) Size() (size int) {
862         if m == nil {
863                 return 0
864         }
865         size += 4      // m.OuterFibIndex
866         size += 4      // m.DstAddr.Af
867         size += 1 * 16 // m.DstAddr.Un
868         return size
869 }
870 func (m *VxlanGpeIoamTransitEnable) Marshal(b []byte) ([]byte, error) {
871         if b == nil {
872                 b = make([]byte, m.Size())
873         }
874         buf := codec.NewBuffer(b)
875         buf.EncodeUint32(m.OuterFibIndex)
876         buf.EncodeUint32(uint32(m.DstAddr.Af))
877         buf.EncodeBytes(m.DstAddr.Un.XXX_UnionData[:], 16)
878         return buf.Bytes(), nil
879 }
880 func (m *VxlanGpeIoamTransitEnable) Unmarshal(b []byte) error {
881         buf := codec.NewBuffer(b)
882         m.OuterFibIndex = buf.DecodeUint32()
883         m.DstAddr.Af = AddressFamily(buf.DecodeUint32())
884         copy(m.DstAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
885         return nil
886 }
887
888 // VxlanGpeIoamTransitEnableReply defines message 'vxlan_gpe_ioam_transit_enable_reply'.
889 type VxlanGpeIoamTransitEnableReply struct {
890         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
891 }
892
893 func (m *VxlanGpeIoamTransitEnableReply) Reset() { *m = VxlanGpeIoamTransitEnableReply{} }
894 func (*VxlanGpeIoamTransitEnableReply) GetMessageName() string {
895         return "vxlan_gpe_ioam_transit_enable_reply"
896 }
897 func (*VxlanGpeIoamTransitEnableReply) GetCrcString() string { return "e8d4e804" }
898 func (*VxlanGpeIoamTransitEnableReply) GetMessageType() api.MessageType {
899         return api.ReplyMessage
900 }
901
902 func (m *VxlanGpeIoamTransitEnableReply) Size() (size int) {
903         if m == nil {
904                 return 0
905         }
906         size += 4 // m.Retval
907         return size
908 }
909 func (m *VxlanGpeIoamTransitEnableReply) Marshal(b []byte) ([]byte, error) {
910         if b == nil {
911                 b = make([]byte, m.Size())
912         }
913         buf := codec.NewBuffer(b)
914         buf.EncodeInt32(m.Retval)
915         return buf.Bytes(), nil
916 }
917 func (m *VxlanGpeIoamTransitEnableReply) Unmarshal(b []byte) error {
918         buf := codec.NewBuffer(b)
919         m.Retval = buf.DecodeInt32()
920         return nil
921 }
922
923 // VxlanGpeIoamVniDisable defines message 'vxlan_gpe_ioam_vni_disable'.
924 type VxlanGpeIoamVniDisable struct {
925         Vni    uint32  `binapi:"u32,name=vni" json:"vni,omitempty"`
926         Local  Address `binapi:"address,name=local" json:"local,omitempty"`
927         Remote Address `binapi:"address,name=remote" json:"remote,omitempty"`
928 }
929
930 func (m *VxlanGpeIoamVniDisable) Reset()               { *m = VxlanGpeIoamVniDisable{} }
931 func (*VxlanGpeIoamVniDisable) GetMessageName() string { return "vxlan_gpe_ioam_vni_disable" }
932 func (*VxlanGpeIoamVniDisable) GetCrcString() string   { return "997161fb" }
933 func (*VxlanGpeIoamVniDisable) GetMessageType() api.MessageType {
934         return api.RequestMessage
935 }
936
937 func (m *VxlanGpeIoamVniDisable) Size() (size int) {
938         if m == nil {
939                 return 0
940         }
941         size += 4      // m.Vni
942         size += 4      // m.Local.Af
943         size += 1 * 16 // m.Local.Un
944         size += 4      // m.Remote.Af
945         size += 1 * 16 // m.Remote.Un
946         return size
947 }
948 func (m *VxlanGpeIoamVniDisable) Marshal(b []byte) ([]byte, error) {
949         if b == nil {
950                 b = make([]byte, m.Size())
951         }
952         buf := codec.NewBuffer(b)
953         buf.EncodeUint32(m.Vni)
954         buf.EncodeUint32(uint32(m.Local.Af))
955         buf.EncodeBytes(m.Local.Un.XXX_UnionData[:], 16)
956         buf.EncodeUint32(uint32(m.Remote.Af))
957         buf.EncodeBytes(m.Remote.Un.XXX_UnionData[:], 16)
958         return buf.Bytes(), nil
959 }
960 func (m *VxlanGpeIoamVniDisable) Unmarshal(b []byte) error {
961         buf := codec.NewBuffer(b)
962         m.Vni = buf.DecodeUint32()
963         m.Local.Af = AddressFamily(buf.DecodeUint32())
964         copy(m.Local.Un.XXX_UnionData[:], buf.DecodeBytes(16))
965         m.Remote.Af = AddressFamily(buf.DecodeUint32())
966         copy(m.Remote.Un.XXX_UnionData[:], buf.DecodeBytes(16))
967         return nil
968 }
969
970 // VxlanGpeIoamVniDisableReply defines message 'vxlan_gpe_ioam_vni_disable_reply'.
971 type VxlanGpeIoamVniDisableReply struct {
972         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
973 }
974
975 func (m *VxlanGpeIoamVniDisableReply) Reset() { *m = VxlanGpeIoamVniDisableReply{} }
976 func (*VxlanGpeIoamVniDisableReply) GetMessageName() string {
977         return "vxlan_gpe_ioam_vni_disable_reply"
978 }
979 func (*VxlanGpeIoamVniDisableReply) GetCrcString() string { return "e8d4e804" }
980 func (*VxlanGpeIoamVniDisableReply) GetMessageType() api.MessageType {
981         return api.ReplyMessage
982 }
983
984 func (m *VxlanGpeIoamVniDisableReply) Size() (size int) {
985         if m == nil {
986                 return 0
987         }
988         size += 4 // m.Retval
989         return size
990 }
991 func (m *VxlanGpeIoamVniDisableReply) Marshal(b []byte) ([]byte, error) {
992         if b == nil {
993                 b = make([]byte, m.Size())
994         }
995         buf := codec.NewBuffer(b)
996         buf.EncodeInt32(m.Retval)
997         return buf.Bytes(), nil
998 }
999 func (m *VxlanGpeIoamVniDisableReply) Unmarshal(b []byte) error {
1000         buf := codec.NewBuffer(b)
1001         m.Retval = buf.DecodeInt32()
1002         return nil
1003 }
1004
1005 // VxlanGpeIoamVniEnable defines message 'vxlan_gpe_ioam_vni_enable'.
1006 type VxlanGpeIoamVniEnable struct {
1007         Vni    uint32  `binapi:"u32,name=vni" json:"vni,omitempty"`
1008         Local  Address `binapi:"address,name=local" json:"local,omitempty"`
1009         Remote Address `binapi:"address,name=remote" json:"remote,omitempty"`
1010 }
1011
1012 func (m *VxlanGpeIoamVniEnable) Reset()               { *m = VxlanGpeIoamVniEnable{} }
1013 func (*VxlanGpeIoamVniEnable) GetMessageName() string { return "vxlan_gpe_ioam_vni_enable" }
1014 func (*VxlanGpeIoamVniEnable) GetCrcString() string   { return "997161fb" }
1015 func (*VxlanGpeIoamVniEnable) GetMessageType() api.MessageType {
1016         return api.RequestMessage
1017 }
1018
1019 func (m *VxlanGpeIoamVniEnable) Size() (size int) {
1020         if m == nil {
1021                 return 0
1022         }
1023         size += 4      // m.Vni
1024         size += 4      // m.Local.Af
1025         size += 1 * 16 // m.Local.Un
1026         size += 4      // m.Remote.Af
1027         size += 1 * 16 // m.Remote.Un
1028         return size
1029 }
1030 func (m *VxlanGpeIoamVniEnable) Marshal(b []byte) ([]byte, error) {
1031         if b == nil {
1032                 b = make([]byte, m.Size())
1033         }
1034         buf := codec.NewBuffer(b)
1035         buf.EncodeUint32(m.Vni)
1036         buf.EncodeUint32(uint32(m.Local.Af))
1037         buf.EncodeBytes(m.Local.Un.XXX_UnionData[:], 16)
1038         buf.EncodeUint32(uint32(m.Remote.Af))
1039         buf.EncodeBytes(m.Remote.Un.XXX_UnionData[:], 16)
1040         return buf.Bytes(), nil
1041 }
1042 func (m *VxlanGpeIoamVniEnable) Unmarshal(b []byte) error {
1043         buf := codec.NewBuffer(b)
1044         m.Vni = buf.DecodeUint32()
1045         m.Local.Af = AddressFamily(buf.DecodeUint32())
1046         copy(m.Local.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1047         m.Remote.Af = AddressFamily(buf.DecodeUint32())
1048         copy(m.Remote.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1049         return nil
1050 }
1051
1052 // VxlanGpeIoamVniEnableReply defines message 'vxlan_gpe_ioam_vni_enable_reply'.
1053 type VxlanGpeIoamVniEnableReply struct {
1054         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1055 }
1056
1057 func (m *VxlanGpeIoamVniEnableReply) Reset()               { *m = VxlanGpeIoamVniEnableReply{} }
1058 func (*VxlanGpeIoamVniEnableReply) GetMessageName() string { return "vxlan_gpe_ioam_vni_enable_reply" }
1059 func (*VxlanGpeIoamVniEnableReply) GetCrcString() string   { return "e8d4e804" }
1060 func (*VxlanGpeIoamVniEnableReply) GetMessageType() api.MessageType {
1061         return api.ReplyMessage
1062 }
1063
1064 func (m *VxlanGpeIoamVniEnableReply) Size() (size int) {
1065         if m == nil {
1066                 return 0
1067         }
1068         size += 4 // m.Retval
1069         return size
1070 }
1071 func (m *VxlanGpeIoamVniEnableReply) Marshal(b []byte) ([]byte, error) {
1072         if b == nil {
1073                 b = make([]byte, m.Size())
1074         }
1075         buf := codec.NewBuffer(b)
1076         buf.EncodeInt32(m.Retval)
1077         return buf.Bytes(), nil
1078 }
1079 func (m *VxlanGpeIoamVniEnableReply) Unmarshal(b []byte) error {
1080         buf := codec.NewBuffer(b)
1081         m.Retval = buf.DecodeInt32()
1082         return nil
1083 }
1084
1085 func init() { file_ioam_vxlan_gpe_binapi_init() }
1086 func file_ioam_vxlan_gpe_binapi_init() {
1087         api.RegisterMessage((*VxlanGpeIoamDisable)(nil), "vxlan_gpe_ioam_disable_6b16a45e")
1088         api.RegisterMessage((*VxlanGpeIoamDisableReply)(nil), "vxlan_gpe_ioam_disable_reply_e8d4e804")
1089         api.RegisterMessage((*VxlanGpeIoamEnable)(nil), "vxlan_gpe_ioam_enable_2481bef7")
1090         api.RegisterMessage((*VxlanGpeIoamEnableReply)(nil), "vxlan_gpe_ioam_enable_reply_e8d4e804")
1091         api.RegisterMessage((*VxlanGpeIoamTransitDisable)(nil), "vxlan_gpe_ioam_transit_disable_553f5b7b")
1092         api.RegisterMessage((*VxlanGpeIoamTransitDisableReply)(nil), "vxlan_gpe_ioam_transit_disable_reply_e8d4e804")
1093         api.RegisterMessage((*VxlanGpeIoamTransitEnable)(nil), "vxlan_gpe_ioam_transit_enable_553f5b7b")
1094         api.RegisterMessage((*VxlanGpeIoamTransitEnableReply)(nil), "vxlan_gpe_ioam_transit_enable_reply_e8d4e804")
1095         api.RegisterMessage((*VxlanGpeIoamVniDisable)(nil), "vxlan_gpe_ioam_vni_disable_997161fb")
1096         api.RegisterMessage((*VxlanGpeIoamVniDisableReply)(nil), "vxlan_gpe_ioam_vni_disable_reply_e8d4e804")
1097         api.RegisterMessage((*VxlanGpeIoamVniEnable)(nil), "vxlan_gpe_ioam_vni_enable_997161fb")
1098         api.RegisterMessage((*VxlanGpeIoamVniEnableReply)(nil), "vxlan_gpe_ioam_vni_enable_reply_e8d4e804")
1099 }
1100
1101 // Messages returns list of all messages in this module.
1102 func AllMessages() []api.Message {
1103         return []api.Message{
1104                 (*VxlanGpeIoamDisable)(nil),
1105                 (*VxlanGpeIoamDisableReply)(nil),
1106                 (*VxlanGpeIoamEnable)(nil),
1107                 (*VxlanGpeIoamEnableReply)(nil),
1108                 (*VxlanGpeIoamTransitDisable)(nil),
1109                 (*VxlanGpeIoamTransitDisableReply)(nil),
1110                 (*VxlanGpeIoamTransitEnable)(nil),
1111                 (*VxlanGpeIoamTransitEnableReply)(nil),
1112                 (*VxlanGpeIoamVniDisable)(nil),
1113                 (*VxlanGpeIoamVniDisableReply)(nil),
1114                 (*VxlanGpeIoamVniEnable)(nil),
1115                 (*VxlanGpeIoamVniEnableReply)(nil),
1116         }
1117 }