1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.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
20 api "git.fd.io/govpp.git/api"
21 codec "git.fd.io/govpp.git/codec"
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
34 APIFile = "ioam_vxlan_gpe"
36 VersionCrc = 0xf80eb923
39 // AddressFamily defines enum 'address_family'.
40 type AddressFamily uint32
43 ADDRESS_IP4 AddressFamily = 0
44 ADDRESS_IP6 AddressFamily = 1
48 AddressFamily_name = map[uint32]string{
52 AddressFamily_value = map[string]uint32{
58 func (x AddressFamily) String() string {
59 s, ok := AddressFamily_name[uint32(x)]
63 return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
66 // IPDscp defines enum 'ip_dscp'.
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
94 IPDscp_name = map[uint8]string{
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",
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,
142 func (x IPDscp) String() string {
143 s, ok := IPDscp_name[uint8(x)]
147 return "IPDscp(" + strconv.Itoa(int(x)) + ")"
150 // IPEcn defines enum 'ip_ecn'.
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
161 IPEcn_name = map[uint8]string{
162 0: "IP_API_ECN_NONE",
163 1: "IP_API_ECN_ECT0",
164 2: "IP_API_ECN_ECT1",
167 IPEcn_value = map[string]uint8{
168 "IP_API_ECN_NONE": 0,
169 "IP_API_ECN_ECT0": 1,
170 "IP_API_ECN_ECT1": 2,
175 func (x IPEcn) String() string {
176 s, ok := IPEcn_name[uint8(x)]
180 return "IPEcn(" + strconv.Itoa(int(x)) + ")"
183 // IPProto defines enum 'ip_proto'.
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
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",
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,
232 func (x IPProto) String() string {
233 s, ok := IPProto_name[uint32(x)]
237 return "IPProto(" + strconv.Itoa(int(x)) + ")"
240 // AddressWithPrefix defines alias 'address_with_prefix'.
241 type AddressWithPrefix Prefix
243 func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
244 prefix, err := ParsePrefix(s)
246 return AddressWithPrefix{}, err
248 return AddressWithPrefix(prefix), nil
250 func (x AddressWithPrefix) String() string {
251 return Prefix(x).String()
253 func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
254 return []byte(x.String()), nil
256 func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
257 prefix, err := ParseAddressWithPrefix(string(text))
265 // IP4Address defines alias 'ip4_address'.
266 type IP4Address [4]uint8
268 func ParseIP4Address(s string) (IP4Address, error) {
269 ip := net.ParseIP(s).To4()
271 return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
273 var ipaddr IP4Address
274 copy(ipaddr[:], ip.To4())
278 func (x IP4Address) ToIP() net.IP {
279 return net.IP(x[:]).To4()
281 func (x IP4Address) String() string {
282 return x.ToIP().String()
284 func (x *IP4Address) MarshalText() ([]byte, error) {
285 return []byte(x.String()), nil
287 func (x *IP4Address) UnmarshalText(text []byte) error {
288 ipaddr, err := ParseIP4Address(string(text))
296 // IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
297 type IP4AddressWithPrefix IP4Prefix
299 // IP6Address defines alias 'ip6_address'.
300 type IP6Address [16]uint8
302 func ParseIP6Address(s string) (IP6Address, error) {
303 ip := net.ParseIP(s).To16()
305 return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
307 var ipaddr IP6Address
308 copy(ipaddr[:], ip.To16())
312 func (x IP6Address) ToIP() net.IP {
313 return net.IP(x[:]).To16()
315 func (x IP6Address) String() string {
316 return x.ToIP().String()
318 func (x *IP6Address) MarshalText() ([]byte, error) {
319 return []byte(x.String()), nil
321 func (x *IP6Address) UnmarshalText(text []byte) error {
322 ipaddr, err := ParseIP6Address(string(text))
330 // IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
331 type IP6AddressWithPrefix IP6Prefix
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"`
339 func ParseAddress(s string) (Address, error) {
342 return Address{}, fmt.Errorf("invalid address: %s", s)
346 addr.Af = ADDRESS_IP6
348 copy(ip6[:], ip.To16())
351 addr.Af = ADDRESS_IP4
353 copy(ip4[:], ip.To4())
358 func (x Address) ToIP() net.IP {
359 if x.Af == ADDRESS_IP6 {
361 return net.IP(ip6[:]).To16()
364 return net.IP(ip4[:]).To4()
367 func (x Address) String() string {
368 return x.ToIP().String()
370 func (x *Address) MarshalText() ([]byte, error) {
371 return []byte(x.String()), nil
373 func (x *Address) UnmarshalText(text []byte) error {
374 addr, err := ParseAddress(string(text))
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"`
388 func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
389 hasPrefix := strings.Contains(s, "/")
391 ip, network, err := net.ParseCIDR(s)
393 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
395 maskSize, _ := network.Mask.Size()
396 prefix.Len = byte(maskSize)
397 prefix.Address, err = ParseIP4Address(ip.String())
399 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
403 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
405 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
407 prefix.Len = byte(defaultMaskSize)
408 prefix.Address, err = ParseIP4Address(ip.String())
410 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
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}
420 func (x IP4Prefix) String() string {
421 ip := x.Address.String()
422 return ip + "/" + strconv.Itoa(int(x.Len))
424 func (x *IP4Prefix) MarshalText() ([]byte, error) {
425 return []byte(x.String()), nil
427 func (x *IP4Prefix) UnmarshalText(text []byte) error {
428 prefix, err := ParseIP4Prefix(string(text))
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"`
442 func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
443 hasPrefix := strings.Contains(s, "/")
445 ip, network, err := net.ParseCIDR(s)
447 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
449 maskSize, _ := network.Mask.Size()
450 prefix.Len = byte(maskSize)
451 prefix.Address, err = ParseIP6Address(ip.String())
453 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
457 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
459 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
461 prefix.Len = byte(defaultMaskSize)
462 prefix.Address, err = ParseIP6Address(ip.String())
464 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
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}
474 func (x IP6Prefix) String() string {
475 ip := x.Address.String()
476 return ip + "/" + strconv.Itoa(int(x.Len))
478 func (x *IP6Prefix) MarshalText() ([]byte, error) {
479 return []byte(x.String()), nil
481 func (x *IP6Prefix) UnmarshalText(text []byte) error {
482 prefix, err := ParseIP6Prefix(string(text))
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"`
498 // Prefix defines type 'prefix'.
500 Address Address `binapi:"address,name=address" json:"address,omitempty"`
501 Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
504 func ParsePrefix(ip string) (prefix Prefix, err error) {
505 hasPrefix := strings.Contains(ip, "/")
507 netIP, network, err := net.ParseCIDR(ip)
509 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
511 maskSize, _ := network.Mask.Size()
512 prefix.Len = byte(maskSize)
513 prefix.Address, err = ParseAddress(netIP.String())
515 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
518 netIP := net.ParseIP(ip)
519 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
520 if netIP.To4() == nil {
521 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
523 prefix.Len = byte(defaultMaskSize)
524 prefix.Address, err = ParseAddress(netIP.String())
526 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
531 func (x Prefix) ToIPNet() *net.IPNet {
533 if x.Address.Af == ADDRESS_IP4 {
534 mask = net.CIDRMask(int(x.Len), 32)
536 mask = net.CIDRMask(int(x.Len), 128)
538 ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
541 func (x Prefix) String() string {
542 ip := x.Address.String()
543 return ip + "/" + strconv.Itoa(int(x.Len))
545 func (x *Prefix) MarshalText() ([]byte, error) {
546 return []byte(x.String()), nil
548 func (x *Prefix) UnmarshalText(text []byte) error {
549 prefix, err := ParsePrefix(string(text))
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"`
563 // AddressUnion defines union 'address_union'.
564 type AddressUnion struct {
567 XXX_UnionData [16]byte
570 func AddressUnionIP4(a IP4Address) (u AddressUnion) {
574 func (u *AddressUnion) SetIP4(a IP4Address) {
575 buf := codec.NewBuffer(u.XXX_UnionData[:])
576 buf.EncodeBytes(a[:], 4)
578 func (u *AddressUnion) GetIP4() (a IP4Address) {
579 buf := codec.NewBuffer(u.XXX_UnionData[:])
580 copy(a[:], buf.DecodeBytes(4))
584 func AddressUnionIP6(a IP6Address) (u AddressUnion) {
588 func (u *AddressUnion) SetIP6(a IP6Address) {
589 buf := codec.NewBuffer(u.XXX_UnionData[:])
590 buf.EncodeBytes(a[:], 16)
592 func (u *AddressUnion) GetIP6() (a IP6Address) {
593 buf := codec.NewBuffer(u.XXX_UnionData[:])
594 copy(a[:], buf.DecodeBytes(16))
598 // VxlanGpeIoamDisable defines message 'vxlan_gpe_ioam_disable'.
599 type VxlanGpeIoamDisable struct {
600 ID uint16 `binapi:"u16,name=id" json:"id,omitempty"`
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
610 func (m *VxlanGpeIoamDisable) Size() (size int) {
617 func (m *VxlanGpeIoamDisable) Marshal(b []byte) ([]byte, error) {
619 b = make([]byte, m.Size())
621 buf := codec.NewBuffer(b)
622 buf.EncodeUint16(m.ID)
623 return buf.Bytes(), nil
625 func (m *VxlanGpeIoamDisable) Unmarshal(b []byte) error {
626 buf := codec.NewBuffer(b)
627 m.ID = buf.DecodeUint16()
631 // VxlanGpeIoamDisableReply defines message 'vxlan_gpe_ioam_disable_reply'.
632 type VxlanGpeIoamDisableReply struct {
633 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
643 func (m *VxlanGpeIoamDisableReply) Size() (size int) {
647 size += 4 // m.Retval
650 func (m *VxlanGpeIoamDisableReply) Marshal(b []byte) ([]byte, error) {
652 b = make([]byte, m.Size())
654 buf := codec.NewBuffer(b)
655 buf.EncodeInt32(m.Retval)
656 return buf.Bytes(), nil
658 func (m *VxlanGpeIoamDisableReply) Unmarshal(b []byte) error {
659 buf := codec.NewBuffer(b)
660 m.Retval = buf.DecodeInt32()
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"`
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
679 func (m *VxlanGpeIoamEnable) Size() (size int) {
684 size += 1 // m.TracePpc
685 size += 1 // m.PowEnable
686 size += 1 // m.TraceEnable
689 func (m *VxlanGpeIoamEnable) Marshal(b []byte) ([]byte, error) {
691 b = make([]byte, m.Size())
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
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()
709 // VxlanGpeIoamEnableReply defines message 'vxlan_gpe_ioam_enable_reply'.
710 type VxlanGpeIoamEnableReply struct {
711 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
721 func (m *VxlanGpeIoamEnableReply) Size() (size int) {
725 size += 4 // m.Retval
728 func (m *VxlanGpeIoamEnableReply) Marshal(b []byte) ([]byte, error) {
730 b = make([]byte, m.Size())
732 buf := codec.NewBuffer(b)
733 buf.EncodeInt32(m.Retval)
734 return buf.Bytes(), nil
736 func (m *VxlanGpeIoamEnableReply) Unmarshal(b []byte) error {
737 buf := codec.NewBuffer(b)
738 m.Retval = buf.DecodeInt32()
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"`
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
755 func (m *VxlanGpeIoamTransitDisable) Size() (size int) {
759 size += 4 // m.OuterFibIndex
760 size += 4 // m.DstAddr.Af
761 size += 1 * 16 // m.DstAddr.Un
764 func (m *VxlanGpeIoamTransitDisable) Marshal(b []byte) ([]byte, error) {
766 b = make([]byte, m.Size())
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
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))
782 // VxlanGpeIoamTransitDisableReply defines message 'vxlan_gpe_ioam_transit_disable_reply'.
783 type VxlanGpeIoamTransitDisableReply struct {
784 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
787 func (m *VxlanGpeIoamTransitDisableReply) Reset() { *m = VxlanGpeIoamTransitDisableReply{} }
788 func (*VxlanGpeIoamTransitDisableReply) GetMessageName() string {
789 return "vxlan_gpe_ioam_transit_disable_reply"
791 func (*VxlanGpeIoamTransitDisableReply) GetCrcString() string { return "e8d4e804" }
792 func (*VxlanGpeIoamTransitDisableReply) GetMessageType() api.MessageType {
793 return api.ReplyMessage
796 func (m *VxlanGpeIoamTransitDisableReply) Size() (size int) {
800 size += 4 // m.Retval
803 func (m *VxlanGpeIoamTransitDisableReply) Marshal(b []byte) ([]byte, error) {
805 b = make([]byte, m.Size())
807 buf := codec.NewBuffer(b)
808 buf.EncodeInt32(m.Retval)
809 return buf.Bytes(), nil
811 func (m *VxlanGpeIoamTransitDisableReply) Unmarshal(b []byte) error {
812 buf := codec.NewBuffer(b)
813 m.Retval = buf.DecodeInt32()
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"`
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
830 func (m *VxlanGpeIoamTransitEnable) Size() (size int) {
834 size += 4 // m.OuterFibIndex
835 size += 4 // m.DstAddr.Af
836 size += 1 * 16 // m.DstAddr.Un
839 func (m *VxlanGpeIoamTransitEnable) Marshal(b []byte) ([]byte, error) {
841 b = make([]byte, m.Size())
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
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))
857 // VxlanGpeIoamTransitEnableReply defines message 'vxlan_gpe_ioam_transit_enable_reply'.
858 type VxlanGpeIoamTransitEnableReply struct {
859 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
862 func (m *VxlanGpeIoamTransitEnableReply) Reset() { *m = VxlanGpeIoamTransitEnableReply{} }
863 func (*VxlanGpeIoamTransitEnableReply) GetMessageName() string {
864 return "vxlan_gpe_ioam_transit_enable_reply"
866 func (*VxlanGpeIoamTransitEnableReply) GetCrcString() string { return "e8d4e804" }
867 func (*VxlanGpeIoamTransitEnableReply) GetMessageType() api.MessageType {
868 return api.ReplyMessage
871 func (m *VxlanGpeIoamTransitEnableReply) Size() (size int) {
875 size += 4 // m.Retval
878 func (m *VxlanGpeIoamTransitEnableReply) Marshal(b []byte) ([]byte, error) {
880 b = make([]byte, m.Size())
882 buf := codec.NewBuffer(b)
883 buf.EncodeInt32(m.Retval)
884 return buf.Bytes(), nil
886 func (m *VxlanGpeIoamTransitEnableReply) Unmarshal(b []byte) error {
887 buf := codec.NewBuffer(b)
888 m.Retval = buf.DecodeInt32()
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"`
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
906 func (m *VxlanGpeIoamVniDisable) Size() (size int) {
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
917 func (m *VxlanGpeIoamVniDisable) Marshal(b []byte) ([]byte, error) {
919 b = make([]byte, m.Size())
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
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))
939 // VxlanGpeIoamVniDisableReply defines message 'vxlan_gpe_ioam_vni_disable_reply'.
940 type VxlanGpeIoamVniDisableReply struct {
941 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
944 func (m *VxlanGpeIoamVniDisableReply) Reset() { *m = VxlanGpeIoamVniDisableReply{} }
945 func (*VxlanGpeIoamVniDisableReply) GetMessageName() string {
946 return "vxlan_gpe_ioam_vni_disable_reply"
948 func (*VxlanGpeIoamVniDisableReply) GetCrcString() string { return "e8d4e804" }
949 func (*VxlanGpeIoamVniDisableReply) GetMessageType() api.MessageType {
950 return api.ReplyMessage
953 func (m *VxlanGpeIoamVniDisableReply) Size() (size int) {
957 size += 4 // m.Retval
960 func (m *VxlanGpeIoamVniDisableReply) Marshal(b []byte) ([]byte, error) {
962 b = make([]byte, m.Size())
964 buf := codec.NewBuffer(b)
965 buf.EncodeInt32(m.Retval)
966 return buf.Bytes(), nil
968 func (m *VxlanGpeIoamVniDisableReply) Unmarshal(b []byte) error {
969 buf := codec.NewBuffer(b)
970 m.Retval = buf.DecodeInt32()
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"`
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
988 func (m *VxlanGpeIoamVniEnable) Size() (size int) {
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
999 func (m *VxlanGpeIoamVniEnable) Marshal(b []byte) ([]byte, error) {
1001 b = make([]byte, m.Size())
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
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))
1021 // VxlanGpeIoamVniEnableReply defines message 'vxlan_gpe_ioam_vni_enable_reply'.
1022 type VxlanGpeIoamVniEnableReply struct {
1023 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
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
1033 func (m *VxlanGpeIoamVniEnableReply) Size() (size int) {
1037 size += 4 // m.Retval
1040 func (m *VxlanGpeIoamVniEnableReply) Marshal(b []byte) ([]byte, error) {
1042 b = make([]byte, m.Size())
1044 buf := codec.NewBuffer(b)
1045 buf.EncodeInt32(m.Retval)
1046 return buf.Bytes(), nil
1048 func (m *VxlanGpeIoamVniEnableReply) Unmarshal(b []byte) error {
1049 buf := codec.NewBuffer(b)
1050 m.Retval = buf.DecodeInt32()
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")
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),