1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.0-dev
5 // source: .vppapi/plugins/ioam_vxlan_gpe.api.json
7 // Package ioam_vxlan_gpe contains generated bindings for API file ioam_vxlan_gpe.api.
16 package ioam_vxlan_gpe
24 api "git.fd.io/govpp.git/api"
25 codec "git.fd.io/govpp.git/codec"
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
35 APIFile = "ioam_vxlan_gpe"
37 VersionCrc = 0xf80eb923
40 // AddressFamily defines enum 'address_family'.
41 type AddressFamily uint32
44 ADDRESS_IP4 AddressFamily = 0
45 ADDRESS_IP6 AddressFamily = 1
49 AddressFamily_name = map[uint32]string{
53 AddressFamily_value = map[string]uint32{
59 func (x AddressFamily) String() string {
60 s, ok := AddressFamily_name[uint32(x)]
64 return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
67 // IPDscp defines enum 'ip_dscp'.
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
95 IPDscp_name = map[uint8]string{
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",
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,
143 func (x IPDscp) String() string {
144 s, ok := IPDscp_name[uint8(x)]
148 return "IPDscp(" + strconv.Itoa(int(x)) + ")"
151 // IPEcn defines enum 'ip_ecn'.
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
162 IPEcn_name = map[uint8]string{
163 0: "IP_API_ECN_NONE",
164 1: "IP_API_ECN_ECT0",
165 2: "IP_API_ECN_ECT1",
168 IPEcn_value = map[string]uint8{
169 "IP_API_ECN_NONE": 0,
170 "IP_API_ECN_ECT0": 1,
171 "IP_API_ECN_ECT1": 2,
176 func (x IPEcn) String() string {
177 s, ok := IPEcn_name[uint8(x)]
181 return "IPEcn(" + strconv.Itoa(int(x)) + ")"
184 // IPProto defines enum 'ip_proto'.
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
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",
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,
233 func (x IPProto) String() string {
234 s, ok := IPProto_name[uint32(x)]
238 return "IPProto(" + strconv.Itoa(int(x)) + ")"
241 // AddressWithPrefix defines alias 'address_with_prefix'.
242 type AddressWithPrefix Prefix
244 func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
245 prefix, err := ParsePrefix(s)
247 return AddressWithPrefix{}, err
249 return AddressWithPrefix(prefix), nil
252 func (x AddressWithPrefix) String() string {
253 return Prefix(x).String()
256 func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
257 return []byte(x.String()), nil
260 func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
261 prefix, err := ParseAddressWithPrefix(string(text))
269 // IP4Address defines alias 'ip4_address'.
270 type IP4Address [4]uint8
272 func ParseIP4Address(s string) (IP4Address, error) {
273 ip := net.ParseIP(s).To4()
275 return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
277 var ipaddr IP4Address
278 copy(ipaddr[:], ip.To4())
282 func (x IP4Address) ToIP() net.IP {
283 return net.IP(x[:]).To4()
286 func (x IP4Address) String() string {
287 return x.ToIP().String()
290 func (x *IP4Address) MarshalText() ([]byte, error) {
291 return []byte(x.String()), nil
294 func (x *IP4Address) UnmarshalText(text []byte) error {
295 ipaddr, err := ParseIP4Address(string(text))
303 // IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
304 type IP4AddressWithPrefix IP4Prefix
306 // IP6Address defines alias 'ip6_address'.
307 type IP6Address [16]uint8
309 func ParseIP6Address(s string) (IP6Address, error) {
310 ip := net.ParseIP(s).To16()
312 return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
314 var ipaddr IP6Address
315 copy(ipaddr[:], ip.To16())
319 func (x IP6Address) ToIP() net.IP {
320 return net.IP(x[:]).To16()
323 func (x IP6Address) String() string {
324 return x.ToIP().String()
327 func (x *IP6Address) MarshalText() ([]byte, error) {
328 return []byte(x.String()), nil
331 func (x *IP6Address) UnmarshalText(text []byte) error {
332 ipaddr, err := ParseIP6Address(string(text))
340 // IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
341 type IP6AddressWithPrefix IP6Prefix
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"`
349 func ParseAddress(s string) (Address, error) {
352 return Address{}, fmt.Errorf("invalid address: %s", s)
354 return AddressFromIP(ip), nil
357 func AddressFromIP(ip net.IP) Address {
360 addr.Af = ADDRESS_IP6
362 copy(ip6[:], ip.To16())
365 addr.Af = ADDRESS_IP4
367 copy(ip4[:], ip.To4())
373 func (x Address) ToIP() net.IP {
374 if x.Af == ADDRESS_IP6 {
376 return net.IP(ip6[:]).To16()
379 return net.IP(ip4[:]).To4()
383 func (x Address) String() string {
384 return x.ToIP().String()
387 func (x *Address) MarshalText() ([]byte, error) {
388 return []byte(x.String()), nil
391 func (x *Address) UnmarshalText(text []byte) error {
392 addr, err := ParseAddress(string(text))
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"`
406 func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
407 hasPrefix := strings.Contains(s, "/")
409 ip, network, err := net.ParseCIDR(s)
411 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
413 maskSize, _ := network.Mask.Size()
414 prefix.Len = byte(maskSize)
415 prefix.Address, err = ParseIP4Address(ip.String())
417 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
421 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
423 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
425 prefix.Len = byte(defaultMaskSize)
426 prefix.Address, err = ParseIP4Address(ip.String())
428 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
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}
440 func (x IP4Prefix) String() string {
441 ip := x.Address.String()
442 return ip + "/" + strconv.Itoa(int(x.Len))
445 func (x *IP4Prefix) MarshalText() ([]byte, error) {
446 return []byte(x.String()), nil
449 func (x *IP4Prefix) UnmarshalText(text []byte) error {
450 prefix, err := ParseIP4Prefix(string(text))
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"`
464 func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
465 hasPrefix := strings.Contains(s, "/")
467 ip, network, err := net.ParseCIDR(s)
469 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
471 maskSize, _ := network.Mask.Size()
472 prefix.Len = byte(maskSize)
473 prefix.Address, err = ParseIP6Address(ip.String())
475 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
479 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
481 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
483 prefix.Len = byte(defaultMaskSize)
484 prefix.Address, err = ParseIP6Address(ip.String())
486 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
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}
498 func (x IP6Prefix) String() string {
499 ip := x.Address.String()
500 return ip + "/" + strconv.Itoa(int(x.Len))
503 func (x *IP6Prefix) MarshalText() ([]byte, error) {
504 return []byte(x.String()), nil
507 func (x *IP6Prefix) UnmarshalText(text []byte) error {
508 prefix, err := ParseIP6Prefix(string(text))
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"`
524 // Prefix defines type 'prefix'.
526 Address Address `binapi:"address,name=address" json:"address,omitempty"`
527 Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
530 func ParsePrefix(ip string) (prefix Prefix, err error) {
531 hasPrefix := strings.Contains(ip, "/")
533 netIP, network, err := net.ParseCIDR(ip)
535 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
537 maskSize, _ := network.Mask.Size()
538 prefix.Len = byte(maskSize)
539 prefix.Address, err = ParseAddress(netIP.String())
541 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
544 netIP := net.ParseIP(ip)
545 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
546 if netIP.To4() == nil {
547 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
549 prefix.Len = byte(defaultMaskSize)
550 prefix.Address, err = ParseAddress(netIP.String())
552 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
558 func (x Prefix) ToIPNet() *net.IPNet {
560 if x.Address.Af == ADDRESS_IP4 {
561 mask = net.CIDRMask(int(x.Len), 32)
563 mask = net.CIDRMask(int(x.Len), 128)
565 ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
569 func (x Prefix) String() string {
570 ip := x.Address.String()
571 return ip + "/" + strconv.Itoa(int(x.Len))
574 func (x *Prefix) MarshalText() ([]byte, error) {
575 return []byte(x.String()), nil
578 func (x *Prefix) UnmarshalText(text []byte) error {
579 prefix, err := ParsePrefix(string(text))
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"`
593 // AddressUnion defines union 'address_union'.
594 type AddressUnion struct {
595 // AddressUnion can be one of:
598 XXX_UnionData [16]byte
601 func AddressUnionIP4(a IP4Address) (u AddressUnion) {
605 func (u *AddressUnion) SetIP4(a IP4Address) {
606 buf := codec.NewBuffer(u.XXX_UnionData[:])
607 buf.EncodeBytes(a[:], 4)
609 func (u *AddressUnion) GetIP4() (a IP4Address) {
610 buf := codec.NewBuffer(u.XXX_UnionData[:])
611 copy(a[:], buf.DecodeBytes(4))
615 func AddressUnionIP6(a IP6Address) (u AddressUnion) {
619 func (u *AddressUnion) SetIP6(a IP6Address) {
620 buf := codec.NewBuffer(u.XXX_UnionData[:])
621 buf.EncodeBytes(a[:], 16)
623 func (u *AddressUnion) GetIP6() (a IP6Address) {
624 buf := codec.NewBuffer(u.XXX_UnionData[:])
625 copy(a[:], buf.DecodeBytes(16))
629 // VxlanGpeIoamDisable defines message 'vxlan_gpe_ioam_disable'.
630 type VxlanGpeIoamDisable struct {
631 ID uint16 `binapi:"u16,name=id" json:"id,omitempty"`
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
641 func (m *VxlanGpeIoamDisable) Size() (size int) {
648 func (m *VxlanGpeIoamDisable) Marshal(b []byte) ([]byte, error) {
650 b = make([]byte, m.Size())
652 buf := codec.NewBuffer(b)
653 buf.EncodeUint16(m.ID)
654 return buf.Bytes(), nil
656 func (m *VxlanGpeIoamDisable) Unmarshal(b []byte) error {
657 buf := codec.NewBuffer(b)
658 m.ID = buf.DecodeUint16()
662 // VxlanGpeIoamDisableReply defines message 'vxlan_gpe_ioam_disable_reply'.
663 type VxlanGpeIoamDisableReply struct {
664 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
674 func (m *VxlanGpeIoamDisableReply) Size() (size int) {
678 size += 4 // m.Retval
681 func (m *VxlanGpeIoamDisableReply) Marshal(b []byte) ([]byte, error) {
683 b = make([]byte, m.Size())
685 buf := codec.NewBuffer(b)
686 buf.EncodeInt32(m.Retval)
687 return buf.Bytes(), nil
689 func (m *VxlanGpeIoamDisableReply) Unmarshal(b []byte) error {
690 buf := codec.NewBuffer(b)
691 m.Retval = buf.DecodeInt32()
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"`
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
710 func (m *VxlanGpeIoamEnable) Size() (size int) {
715 size += 1 // m.TracePpc
716 size += 1 // m.PowEnable
717 size += 1 // m.TraceEnable
720 func (m *VxlanGpeIoamEnable) Marshal(b []byte) ([]byte, error) {
722 b = make([]byte, m.Size())
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
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()
740 // VxlanGpeIoamEnableReply defines message 'vxlan_gpe_ioam_enable_reply'.
741 type VxlanGpeIoamEnableReply struct {
742 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
752 func (m *VxlanGpeIoamEnableReply) Size() (size int) {
756 size += 4 // m.Retval
759 func (m *VxlanGpeIoamEnableReply) Marshal(b []byte) ([]byte, error) {
761 b = make([]byte, m.Size())
763 buf := codec.NewBuffer(b)
764 buf.EncodeInt32(m.Retval)
765 return buf.Bytes(), nil
767 func (m *VxlanGpeIoamEnableReply) Unmarshal(b []byte) error {
768 buf := codec.NewBuffer(b)
769 m.Retval = buf.DecodeInt32()
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"`
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
786 func (m *VxlanGpeIoamTransitDisable) Size() (size int) {
790 size += 4 // m.OuterFibIndex
791 size += 4 // m.DstAddr.Af
792 size += 1 * 16 // m.DstAddr.Un
795 func (m *VxlanGpeIoamTransitDisable) Marshal(b []byte) ([]byte, error) {
797 b = make([]byte, m.Size())
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
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))
813 // VxlanGpeIoamTransitDisableReply defines message 'vxlan_gpe_ioam_transit_disable_reply'.
814 type VxlanGpeIoamTransitDisableReply struct {
815 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
818 func (m *VxlanGpeIoamTransitDisableReply) Reset() { *m = VxlanGpeIoamTransitDisableReply{} }
819 func (*VxlanGpeIoamTransitDisableReply) GetMessageName() string {
820 return "vxlan_gpe_ioam_transit_disable_reply"
822 func (*VxlanGpeIoamTransitDisableReply) GetCrcString() string { return "e8d4e804" }
823 func (*VxlanGpeIoamTransitDisableReply) GetMessageType() api.MessageType {
824 return api.ReplyMessage
827 func (m *VxlanGpeIoamTransitDisableReply) Size() (size int) {
831 size += 4 // m.Retval
834 func (m *VxlanGpeIoamTransitDisableReply) Marshal(b []byte) ([]byte, error) {
836 b = make([]byte, m.Size())
838 buf := codec.NewBuffer(b)
839 buf.EncodeInt32(m.Retval)
840 return buf.Bytes(), nil
842 func (m *VxlanGpeIoamTransitDisableReply) Unmarshal(b []byte) error {
843 buf := codec.NewBuffer(b)
844 m.Retval = buf.DecodeInt32()
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"`
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
861 func (m *VxlanGpeIoamTransitEnable) Size() (size int) {
865 size += 4 // m.OuterFibIndex
866 size += 4 // m.DstAddr.Af
867 size += 1 * 16 // m.DstAddr.Un
870 func (m *VxlanGpeIoamTransitEnable) Marshal(b []byte) ([]byte, error) {
872 b = make([]byte, m.Size())
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
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))
888 // VxlanGpeIoamTransitEnableReply defines message 'vxlan_gpe_ioam_transit_enable_reply'.
889 type VxlanGpeIoamTransitEnableReply struct {
890 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
893 func (m *VxlanGpeIoamTransitEnableReply) Reset() { *m = VxlanGpeIoamTransitEnableReply{} }
894 func (*VxlanGpeIoamTransitEnableReply) GetMessageName() string {
895 return "vxlan_gpe_ioam_transit_enable_reply"
897 func (*VxlanGpeIoamTransitEnableReply) GetCrcString() string { return "e8d4e804" }
898 func (*VxlanGpeIoamTransitEnableReply) GetMessageType() api.MessageType {
899 return api.ReplyMessage
902 func (m *VxlanGpeIoamTransitEnableReply) Size() (size int) {
906 size += 4 // m.Retval
909 func (m *VxlanGpeIoamTransitEnableReply) Marshal(b []byte) ([]byte, error) {
911 b = make([]byte, m.Size())
913 buf := codec.NewBuffer(b)
914 buf.EncodeInt32(m.Retval)
915 return buf.Bytes(), nil
917 func (m *VxlanGpeIoamTransitEnableReply) Unmarshal(b []byte) error {
918 buf := codec.NewBuffer(b)
919 m.Retval = buf.DecodeInt32()
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"`
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
937 func (m *VxlanGpeIoamVniDisable) Size() (size int) {
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
948 func (m *VxlanGpeIoamVniDisable) Marshal(b []byte) ([]byte, error) {
950 b = make([]byte, m.Size())
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
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))
970 // VxlanGpeIoamVniDisableReply defines message 'vxlan_gpe_ioam_vni_disable_reply'.
971 type VxlanGpeIoamVniDisableReply struct {
972 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
975 func (m *VxlanGpeIoamVniDisableReply) Reset() { *m = VxlanGpeIoamVniDisableReply{} }
976 func (*VxlanGpeIoamVniDisableReply) GetMessageName() string {
977 return "vxlan_gpe_ioam_vni_disable_reply"
979 func (*VxlanGpeIoamVniDisableReply) GetCrcString() string { return "e8d4e804" }
980 func (*VxlanGpeIoamVniDisableReply) GetMessageType() api.MessageType {
981 return api.ReplyMessage
984 func (m *VxlanGpeIoamVniDisableReply) Size() (size int) {
988 size += 4 // m.Retval
991 func (m *VxlanGpeIoamVniDisableReply) Marshal(b []byte) ([]byte, error) {
993 b = make([]byte, m.Size())
995 buf := codec.NewBuffer(b)
996 buf.EncodeInt32(m.Retval)
997 return buf.Bytes(), nil
999 func (m *VxlanGpeIoamVniDisableReply) Unmarshal(b []byte) error {
1000 buf := codec.NewBuffer(b)
1001 m.Retval = buf.DecodeInt32()
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"`
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
1019 func (m *VxlanGpeIoamVniEnable) Size() (size int) {
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
1030 func (m *VxlanGpeIoamVniEnable) Marshal(b []byte) ([]byte, error) {
1032 b = make([]byte, m.Size())
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
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))
1052 // VxlanGpeIoamVniEnableReply defines message 'vxlan_gpe_ioam_vni_enable_reply'.
1053 type VxlanGpeIoamVniEnableReply struct {
1054 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
1064 func (m *VxlanGpeIoamVniEnableReply) Size() (size int) {
1068 size += 4 // m.Retval
1071 func (m *VxlanGpeIoamVniEnableReply) Marshal(b []byte) ([]byte, error) {
1073 b = make([]byte, m.Size())
1075 buf := codec.NewBuffer(b)
1076 buf.EncodeInt32(m.Retval)
1077 return buf.Bytes(), nil
1079 func (m *VxlanGpeIoamVniEnableReply) Unmarshal(b []byte) error {
1080 buf := codec.NewBuffer(b)
1081 m.Retval = buf.DecodeInt32()
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")
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),