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