1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: .vppapi/plugins/gbp.api.json
7 // Package gbp contains generated bindings for API file gbp.api.
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
36 VersionCrc = 0xa891d6ff
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 // GbpBridgeDomainFlags defines enum 'gbp_bridge_domain_flags'.
67 type GbpBridgeDomainFlags uint32
70 GBP_BD_API_FLAG_NONE GbpBridgeDomainFlags = 0
71 GBP_BD_API_FLAG_DO_NOT_LEARN GbpBridgeDomainFlags = 1
72 GBP_BD_API_FLAG_UU_FWD_DROP GbpBridgeDomainFlags = 2
73 GBP_BD_API_FLAG_MCAST_DROP GbpBridgeDomainFlags = 4
74 GBP_BD_API_FLAG_UCAST_ARP GbpBridgeDomainFlags = 8
78 GbpBridgeDomainFlags_name = map[uint32]string{
79 0: "GBP_BD_API_FLAG_NONE",
80 1: "GBP_BD_API_FLAG_DO_NOT_LEARN",
81 2: "GBP_BD_API_FLAG_UU_FWD_DROP",
82 4: "GBP_BD_API_FLAG_MCAST_DROP",
83 8: "GBP_BD_API_FLAG_UCAST_ARP",
85 GbpBridgeDomainFlags_value = map[string]uint32{
86 "GBP_BD_API_FLAG_NONE": 0,
87 "GBP_BD_API_FLAG_DO_NOT_LEARN": 1,
88 "GBP_BD_API_FLAG_UU_FWD_DROP": 2,
89 "GBP_BD_API_FLAG_MCAST_DROP": 4,
90 "GBP_BD_API_FLAG_UCAST_ARP": 8,
94 func (x GbpBridgeDomainFlags) String() string {
95 s, ok := GbpBridgeDomainFlags_name[uint32(x)]
99 str := func(n uint32) string {
100 s, ok := GbpBridgeDomainFlags_name[uint32(n)]
104 return "GbpBridgeDomainFlags(" + strconv.Itoa(int(n)) + ")"
106 for i := uint32(0); i <= 32; i++ {
116 return str(uint32(x))
121 // GbpEndpointFlags defines enum 'gbp_endpoint_flags'.
122 type GbpEndpointFlags uint32
125 GBP_API_ENDPOINT_FLAG_NONE GbpEndpointFlags = 0
126 GBP_API_ENDPOINT_FLAG_BOUNCE GbpEndpointFlags = 1
127 GBP_API_ENDPOINT_FLAG_REMOTE GbpEndpointFlags = 2
128 GBP_API_ENDPOINT_FLAG_LEARNT GbpEndpointFlags = 4
129 GBP_API_ENDPOINT_FLAG_EXTERNAL GbpEndpointFlags = 8
133 GbpEndpointFlags_name = map[uint32]string{
134 0: "GBP_API_ENDPOINT_FLAG_NONE",
135 1: "GBP_API_ENDPOINT_FLAG_BOUNCE",
136 2: "GBP_API_ENDPOINT_FLAG_REMOTE",
137 4: "GBP_API_ENDPOINT_FLAG_LEARNT",
138 8: "GBP_API_ENDPOINT_FLAG_EXTERNAL",
140 GbpEndpointFlags_value = map[string]uint32{
141 "GBP_API_ENDPOINT_FLAG_NONE": 0,
142 "GBP_API_ENDPOINT_FLAG_BOUNCE": 1,
143 "GBP_API_ENDPOINT_FLAG_REMOTE": 2,
144 "GBP_API_ENDPOINT_FLAG_LEARNT": 4,
145 "GBP_API_ENDPOINT_FLAG_EXTERNAL": 8,
149 func (x GbpEndpointFlags) String() string {
150 s, ok := GbpEndpointFlags_name[uint32(x)]
154 str := func(n uint32) string {
155 s, ok := GbpEndpointFlags_name[uint32(n)]
159 return "GbpEndpointFlags(" + strconv.Itoa(int(n)) + ")"
161 for i := uint32(0); i <= 32; i++ {
171 return str(uint32(x))
176 // GbpExtItfFlags defines enum 'gbp_ext_itf_flags'.
177 type GbpExtItfFlags uint32
180 GBP_API_EXT_ITF_F_NONE GbpExtItfFlags = 0
181 GBP_API_EXT_ITF_F_ANON GbpExtItfFlags = 1
185 GbpExtItfFlags_name = map[uint32]string{
186 0: "GBP_API_EXT_ITF_F_NONE",
187 1: "GBP_API_EXT_ITF_F_ANON",
189 GbpExtItfFlags_value = map[string]uint32{
190 "GBP_API_EXT_ITF_F_NONE": 0,
191 "GBP_API_EXT_ITF_F_ANON": 1,
195 func (x GbpExtItfFlags) String() string {
196 s, ok := GbpExtItfFlags_name[uint32(x)]
200 str := func(n uint32) string {
201 s, ok := GbpExtItfFlags_name[uint32(n)]
205 return "GbpExtItfFlags(" + strconv.Itoa(int(n)) + ")"
207 for i := uint32(0); i <= 32; i++ {
217 return str(uint32(x))
222 // GbpHashMode defines enum 'gbp_hash_mode'.
223 type GbpHashMode uint32
226 GBP_API_HASH_MODE_SRC_IP GbpHashMode = 1
227 GBP_API_HASH_MODE_DST_IP GbpHashMode = 2
228 GBP_API_HASH_MODE_SYMMETRIC GbpHashMode = 3
232 GbpHashMode_name = map[uint32]string{
233 1: "GBP_API_HASH_MODE_SRC_IP",
234 2: "GBP_API_HASH_MODE_DST_IP",
235 3: "GBP_API_HASH_MODE_SYMMETRIC",
237 GbpHashMode_value = map[string]uint32{
238 "GBP_API_HASH_MODE_SRC_IP": 1,
239 "GBP_API_HASH_MODE_DST_IP": 2,
240 "GBP_API_HASH_MODE_SYMMETRIC": 3,
244 func (x GbpHashMode) String() string {
245 s, ok := GbpHashMode_name[uint32(x)]
249 return "GbpHashMode(" + strconv.Itoa(int(x)) + ")"
252 // GbpRuleAction defines enum 'gbp_rule_action'.
253 type GbpRuleAction uint32
256 GBP_API_RULE_PERMIT GbpRuleAction = 1
257 GBP_API_RULE_DENY GbpRuleAction = 2
258 GBP_API_RULE_REDIRECT GbpRuleAction = 3
262 GbpRuleAction_name = map[uint32]string{
263 1: "GBP_API_RULE_PERMIT",
264 2: "GBP_API_RULE_DENY",
265 3: "GBP_API_RULE_REDIRECT",
267 GbpRuleAction_value = map[string]uint32{
268 "GBP_API_RULE_PERMIT": 1,
269 "GBP_API_RULE_DENY": 2,
270 "GBP_API_RULE_REDIRECT": 3,
274 func (x GbpRuleAction) String() string {
275 s, ok := GbpRuleAction_name[uint32(x)]
279 return "GbpRuleAction(" + strconv.Itoa(int(x)) + ")"
282 // GbpSubnetType defines enum 'gbp_subnet_type'.
283 type GbpSubnetType uint32
286 GBP_API_SUBNET_TRANSPORT GbpSubnetType = 1
287 GBP_API_SUBNET_STITCHED_INTERNAL GbpSubnetType = 2
288 GBP_API_SUBNET_STITCHED_EXTERNAL GbpSubnetType = 3
289 GBP_API_SUBNET_L3_OUT GbpSubnetType = 4
290 GBP_API_SUBNET_ANON_L3_OUT GbpSubnetType = 5
294 GbpSubnetType_name = map[uint32]string{
295 1: "GBP_API_SUBNET_TRANSPORT",
296 2: "GBP_API_SUBNET_STITCHED_INTERNAL",
297 3: "GBP_API_SUBNET_STITCHED_EXTERNAL",
298 4: "GBP_API_SUBNET_L3_OUT",
299 5: "GBP_API_SUBNET_ANON_L3_OUT",
301 GbpSubnetType_value = map[string]uint32{
302 "GBP_API_SUBNET_TRANSPORT": 1,
303 "GBP_API_SUBNET_STITCHED_INTERNAL": 2,
304 "GBP_API_SUBNET_STITCHED_EXTERNAL": 3,
305 "GBP_API_SUBNET_L3_OUT": 4,
306 "GBP_API_SUBNET_ANON_L3_OUT": 5,
310 func (x GbpSubnetType) String() string {
311 s, ok := GbpSubnetType_name[uint32(x)]
315 return "GbpSubnetType(" + strconv.Itoa(int(x)) + ")"
318 // GbpVxlanTunnelMode defines enum 'gbp_vxlan_tunnel_mode'.
319 type GbpVxlanTunnelMode uint32
322 GBP_VXLAN_TUNNEL_MODE_L2 GbpVxlanTunnelMode = 1
323 GBP_VXLAN_TUNNEL_MODE_L3 GbpVxlanTunnelMode = 2
327 GbpVxlanTunnelMode_name = map[uint32]string{
328 1: "GBP_VXLAN_TUNNEL_MODE_L2",
329 2: "GBP_VXLAN_TUNNEL_MODE_L3",
331 GbpVxlanTunnelMode_value = map[string]uint32{
332 "GBP_VXLAN_TUNNEL_MODE_L2": 1,
333 "GBP_VXLAN_TUNNEL_MODE_L3": 2,
337 func (x GbpVxlanTunnelMode) String() string {
338 s, ok := GbpVxlanTunnelMode_name[uint32(x)]
342 return "GbpVxlanTunnelMode(" + strconv.Itoa(int(x)) + ")"
345 // IfStatusFlags defines enum 'if_status_flags'.
346 type IfStatusFlags uint32
349 IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
350 IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
354 IfStatusFlags_name = map[uint32]string{
355 1: "IF_STATUS_API_FLAG_ADMIN_UP",
356 2: "IF_STATUS_API_FLAG_LINK_UP",
358 IfStatusFlags_value = map[string]uint32{
359 "IF_STATUS_API_FLAG_ADMIN_UP": 1,
360 "IF_STATUS_API_FLAG_LINK_UP": 2,
364 func (x IfStatusFlags) String() string {
365 s, ok := IfStatusFlags_name[uint32(x)]
369 str := func(n uint32) string {
370 s, ok := IfStatusFlags_name[uint32(n)]
374 return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
376 for i := uint32(0); i <= 32; i++ {
386 return str(uint32(x))
391 // IfType defines enum 'if_type'.
395 IF_API_TYPE_HARDWARE IfType = 1
396 IF_API_TYPE_SUB IfType = 2
397 IF_API_TYPE_P2P IfType = 3
398 IF_API_TYPE_PIPE IfType = 4
402 IfType_name = map[uint32]string{
403 1: "IF_API_TYPE_HARDWARE",
404 2: "IF_API_TYPE_SUB",
405 3: "IF_API_TYPE_P2P",
406 4: "IF_API_TYPE_PIPE",
408 IfType_value = map[string]uint32{
409 "IF_API_TYPE_HARDWARE": 1,
410 "IF_API_TYPE_SUB": 2,
411 "IF_API_TYPE_P2P": 3,
412 "IF_API_TYPE_PIPE": 4,
416 func (x IfType) String() string {
417 s, ok := IfType_name[uint32(x)]
421 return "IfType(" + strconv.Itoa(int(x)) + ")"
424 // IPDscp defines enum 'ip_dscp'.
428 IP_API_DSCP_CS0 IPDscp = 0
429 IP_API_DSCP_CS1 IPDscp = 8
430 IP_API_DSCP_AF11 IPDscp = 10
431 IP_API_DSCP_AF12 IPDscp = 12
432 IP_API_DSCP_AF13 IPDscp = 14
433 IP_API_DSCP_CS2 IPDscp = 16
434 IP_API_DSCP_AF21 IPDscp = 18
435 IP_API_DSCP_AF22 IPDscp = 20
436 IP_API_DSCP_AF23 IPDscp = 22
437 IP_API_DSCP_CS3 IPDscp = 24
438 IP_API_DSCP_AF31 IPDscp = 26
439 IP_API_DSCP_AF32 IPDscp = 28
440 IP_API_DSCP_AF33 IPDscp = 30
441 IP_API_DSCP_CS4 IPDscp = 32
442 IP_API_DSCP_AF41 IPDscp = 34
443 IP_API_DSCP_AF42 IPDscp = 36
444 IP_API_DSCP_AF43 IPDscp = 38
445 IP_API_DSCP_CS5 IPDscp = 40
446 IP_API_DSCP_EF IPDscp = 46
447 IP_API_DSCP_CS6 IPDscp = 48
448 IP_API_DSCP_CS7 IPDscp = 50
452 IPDscp_name = map[uint8]string{
453 0: "IP_API_DSCP_CS0",
454 8: "IP_API_DSCP_CS1",
455 10: "IP_API_DSCP_AF11",
456 12: "IP_API_DSCP_AF12",
457 14: "IP_API_DSCP_AF13",
458 16: "IP_API_DSCP_CS2",
459 18: "IP_API_DSCP_AF21",
460 20: "IP_API_DSCP_AF22",
461 22: "IP_API_DSCP_AF23",
462 24: "IP_API_DSCP_CS3",
463 26: "IP_API_DSCP_AF31",
464 28: "IP_API_DSCP_AF32",
465 30: "IP_API_DSCP_AF33",
466 32: "IP_API_DSCP_CS4",
467 34: "IP_API_DSCP_AF41",
468 36: "IP_API_DSCP_AF42",
469 38: "IP_API_DSCP_AF43",
470 40: "IP_API_DSCP_CS5",
471 46: "IP_API_DSCP_EF",
472 48: "IP_API_DSCP_CS6",
473 50: "IP_API_DSCP_CS7",
475 IPDscp_value = map[string]uint8{
476 "IP_API_DSCP_CS0": 0,
477 "IP_API_DSCP_CS1": 8,
478 "IP_API_DSCP_AF11": 10,
479 "IP_API_DSCP_AF12": 12,
480 "IP_API_DSCP_AF13": 14,
481 "IP_API_DSCP_CS2": 16,
482 "IP_API_DSCP_AF21": 18,
483 "IP_API_DSCP_AF22": 20,
484 "IP_API_DSCP_AF23": 22,
485 "IP_API_DSCP_CS3": 24,
486 "IP_API_DSCP_AF31": 26,
487 "IP_API_DSCP_AF32": 28,
488 "IP_API_DSCP_AF33": 30,
489 "IP_API_DSCP_CS4": 32,
490 "IP_API_DSCP_AF41": 34,
491 "IP_API_DSCP_AF42": 36,
492 "IP_API_DSCP_AF43": 38,
493 "IP_API_DSCP_CS5": 40,
494 "IP_API_DSCP_EF": 46,
495 "IP_API_DSCP_CS6": 48,
496 "IP_API_DSCP_CS7": 50,
500 func (x IPDscp) String() string {
501 s, ok := IPDscp_name[uint8(x)]
505 return "IPDscp(" + strconv.Itoa(int(x)) + ")"
508 // IPEcn defines enum 'ip_ecn'.
512 IP_API_ECN_NONE IPEcn = 0
513 IP_API_ECN_ECT0 IPEcn = 1
514 IP_API_ECN_ECT1 IPEcn = 2
515 IP_API_ECN_CE IPEcn = 3
519 IPEcn_name = map[uint8]string{
520 0: "IP_API_ECN_NONE",
521 1: "IP_API_ECN_ECT0",
522 2: "IP_API_ECN_ECT1",
525 IPEcn_value = map[string]uint8{
526 "IP_API_ECN_NONE": 0,
527 "IP_API_ECN_ECT0": 1,
528 "IP_API_ECN_ECT1": 2,
533 func (x IPEcn) String() string {
534 s, ok := IPEcn_name[uint8(x)]
538 return "IPEcn(" + strconv.Itoa(int(x)) + ")"
541 // IPProto defines enum 'ip_proto'.
545 IP_API_PROTO_HOPOPT IPProto = 0
546 IP_API_PROTO_ICMP IPProto = 1
547 IP_API_PROTO_IGMP IPProto = 2
548 IP_API_PROTO_TCP IPProto = 6
549 IP_API_PROTO_UDP IPProto = 17
550 IP_API_PROTO_GRE IPProto = 47
551 IP_API_PROTO_AH IPProto = 50
552 IP_API_PROTO_ESP IPProto = 51
553 IP_API_PROTO_EIGRP IPProto = 88
554 IP_API_PROTO_OSPF IPProto = 89
555 IP_API_PROTO_SCTP IPProto = 132
556 IP_API_PROTO_RESERVED IPProto = 255
560 IPProto_name = map[uint32]string{
561 0: "IP_API_PROTO_HOPOPT",
562 1: "IP_API_PROTO_ICMP",
563 2: "IP_API_PROTO_IGMP",
564 6: "IP_API_PROTO_TCP",
565 17: "IP_API_PROTO_UDP",
566 47: "IP_API_PROTO_GRE",
567 50: "IP_API_PROTO_AH",
568 51: "IP_API_PROTO_ESP",
569 88: "IP_API_PROTO_EIGRP",
570 89: "IP_API_PROTO_OSPF",
571 132: "IP_API_PROTO_SCTP",
572 255: "IP_API_PROTO_RESERVED",
574 IPProto_value = map[string]uint32{
575 "IP_API_PROTO_HOPOPT": 0,
576 "IP_API_PROTO_ICMP": 1,
577 "IP_API_PROTO_IGMP": 2,
578 "IP_API_PROTO_TCP": 6,
579 "IP_API_PROTO_UDP": 17,
580 "IP_API_PROTO_GRE": 47,
581 "IP_API_PROTO_AH": 50,
582 "IP_API_PROTO_ESP": 51,
583 "IP_API_PROTO_EIGRP": 88,
584 "IP_API_PROTO_OSPF": 89,
585 "IP_API_PROTO_SCTP": 132,
586 "IP_API_PROTO_RESERVED": 255,
590 func (x IPProto) String() string {
591 s, ok := IPProto_name[uint32(x)]
595 return "IPProto(" + strconv.Itoa(int(x)) + ")"
598 // LinkDuplex defines enum 'link_duplex'.
599 type LinkDuplex uint32
602 LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
603 LINK_DUPLEX_API_HALF LinkDuplex = 1
604 LINK_DUPLEX_API_FULL LinkDuplex = 2
608 LinkDuplex_name = map[uint32]string{
609 0: "LINK_DUPLEX_API_UNKNOWN",
610 1: "LINK_DUPLEX_API_HALF",
611 2: "LINK_DUPLEX_API_FULL",
613 LinkDuplex_value = map[string]uint32{
614 "LINK_DUPLEX_API_UNKNOWN": 0,
615 "LINK_DUPLEX_API_HALF": 1,
616 "LINK_DUPLEX_API_FULL": 2,
620 func (x LinkDuplex) String() string {
621 s, ok := LinkDuplex_name[uint32(x)]
625 return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
628 // MtuProto defines enum 'mtu_proto'.
632 MTU_PROTO_API_L3 MtuProto = 1
633 MTU_PROTO_API_IP4 MtuProto = 2
634 MTU_PROTO_API_IP6 MtuProto = 3
635 MTU_PROTO_API_MPLS MtuProto = 4
636 MTU_PROTO_API_N MtuProto = 5
640 MtuProto_name = map[uint32]string{
641 1: "MTU_PROTO_API_L3",
642 2: "MTU_PROTO_API_IP4",
643 3: "MTU_PROTO_API_IP6",
644 4: "MTU_PROTO_API_MPLS",
645 5: "MTU_PROTO_API_N",
647 MtuProto_value = map[string]uint32{
648 "MTU_PROTO_API_L3": 1,
649 "MTU_PROTO_API_IP4": 2,
650 "MTU_PROTO_API_IP6": 3,
651 "MTU_PROTO_API_MPLS": 4,
652 "MTU_PROTO_API_N": 5,
656 func (x MtuProto) String() string {
657 s, ok := MtuProto_name[uint32(x)]
661 return "MtuProto(" + strconv.Itoa(int(x)) + ")"
664 // RxMode defines enum 'rx_mode'.
668 RX_MODE_API_UNKNOWN RxMode = 0
669 RX_MODE_API_POLLING RxMode = 1
670 RX_MODE_API_INTERRUPT RxMode = 2
671 RX_MODE_API_ADAPTIVE RxMode = 3
672 RX_MODE_API_DEFAULT RxMode = 4
676 RxMode_name = map[uint32]string{
677 0: "RX_MODE_API_UNKNOWN",
678 1: "RX_MODE_API_POLLING",
679 2: "RX_MODE_API_INTERRUPT",
680 3: "RX_MODE_API_ADAPTIVE",
681 4: "RX_MODE_API_DEFAULT",
683 RxMode_value = map[string]uint32{
684 "RX_MODE_API_UNKNOWN": 0,
685 "RX_MODE_API_POLLING": 1,
686 "RX_MODE_API_INTERRUPT": 2,
687 "RX_MODE_API_ADAPTIVE": 3,
688 "RX_MODE_API_DEFAULT": 4,
692 func (x RxMode) String() string {
693 s, ok := RxMode_name[uint32(x)]
697 return "RxMode(" + strconv.Itoa(int(x)) + ")"
700 // SubIfFlags defines enum 'sub_if_flags'.
701 type SubIfFlags uint32
704 SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
705 SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
706 SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
707 SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
708 SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
709 SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
710 SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
711 SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
712 SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
713 SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
717 SubIfFlags_name = map[uint32]string{
718 1: "SUB_IF_API_FLAG_NO_TAGS",
719 2: "SUB_IF_API_FLAG_ONE_TAG",
720 4: "SUB_IF_API_FLAG_TWO_TAGS",
721 8: "SUB_IF_API_FLAG_DOT1AD",
722 16: "SUB_IF_API_FLAG_EXACT_MATCH",
723 32: "SUB_IF_API_FLAG_DEFAULT",
724 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
725 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
726 254: "SUB_IF_API_FLAG_MASK_VNET",
727 256: "SUB_IF_API_FLAG_DOT1AH",
729 SubIfFlags_value = map[string]uint32{
730 "SUB_IF_API_FLAG_NO_TAGS": 1,
731 "SUB_IF_API_FLAG_ONE_TAG": 2,
732 "SUB_IF_API_FLAG_TWO_TAGS": 4,
733 "SUB_IF_API_FLAG_DOT1AD": 8,
734 "SUB_IF_API_FLAG_EXACT_MATCH": 16,
735 "SUB_IF_API_FLAG_DEFAULT": 32,
736 "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
737 "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
738 "SUB_IF_API_FLAG_MASK_VNET": 254,
739 "SUB_IF_API_FLAG_DOT1AH": 256,
743 func (x SubIfFlags) String() string {
744 s, ok := SubIfFlags_name[uint32(x)]
748 str := func(n uint32) string {
749 s, ok := SubIfFlags_name[uint32(n)]
753 return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
755 for i := uint32(0); i <= 32; i++ {
765 return str(uint32(x))
770 // AddressWithPrefix defines alias 'address_with_prefix'.
771 type AddressWithPrefix Prefix
773 func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
774 prefix, err := ParsePrefix(s)
776 return AddressWithPrefix{}, err
778 return AddressWithPrefix(prefix), nil
780 func (x AddressWithPrefix) String() string {
781 return Prefix(x).String()
783 func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
784 return []byte(x.String()), nil
786 func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
787 prefix, err := ParseAddressWithPrefix(string(text))
795 // GbpScope defines alias 'gbp_scope'.
798 // InterfaceIndex defines alias 'interface_index'.
799 type InterfaceIndex uint32
801 // IP4Address defines alias 'ip4_address'.
802 type IP4Address [4]uint8
804 func ParseIP4Address(s string) (IP4Address, error) {
805 ip := net.ParseIP(s).To4()
807 return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
809 var ipaddr IP4Address
810 copy(ipaddr[:], ip.To4())
814 func (x IP4Address) ToIP() net.IP {
815 return net.IP(x[:]).To4()
817 func (x IP4Address) String() string {
818 return x.ToIP().String()
820 func (x *IP4Address) MarshalText() ([]byte, error) {
821 return []byte(x.String()), nil
823 func (x *IP4Address) UnmarshalText(text []byte) error {
824 ipaddr, err := ParseIP4Address(string(text))
832 // IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
833 type IP4AddressWithPrefix IP4Prefix
835 // IP6Address defines alias 'ip6_address'.
836 type IP6Address [16]uint8
838 func ParseIP6Address(s string) (IP6Address, error) {
839 ip := net.ParseIP(s).To16()
841 return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
843 var ipaddr IP6Address
844 copy(ipaddr[:], ip.To16())
848 func (x IP6Address) ToIP() net.IP {
849 return net.IP(x[:]).To16()
851 func (x IP6Address) String() string {
852 return x.ToIP().String()
854 func (x *IP6Address) MarshalText() ([]byte, error) {
855 return []byte(x.String()), nil
857 func (x *IP6Address) UnmarshalText(text []byte) error {
858 ipaddr, err := ParseIP6Address(string(text))
866 // IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
867 type IP6AddressWithPrefix IP6Prefix
869 // MacAddress defines alias 'mac_address'.
870 type MacAddress [6]uint8
872 func ParseMacAddress(s string) (MacAddress, error) {
873 var macaddr MacAddress
874 mac, err := net.ParseMAC(s)
878 copy(macaddr[:], mac[:])
881 func (x MacAddress) ToMAC() net.HardwareAddr {
882 return net.HardwareAddr(x[:])
884 func (x MacAddress) String() string {
885 return x.ToMAC().String()
887 func (x *MacAddress) MarshalText() ([]byte, error) {
888 return []byte(x.String()), nil
890 func (x *MacAddress) UnmarshalText(text []byte) error {
891 mac, err := ParseMacAddress(string(text))
899 // Address defines type 'address'.
900 type Address struct {
901 Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
902 Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
905 func ParseAddress(s string) (Address, error) {
908 return Address{}, fmt.Errorf("invalid address: %s", s)
912 addr.Af = ADDRESS_IP6
914 copy(ip6[:], ip.To16())
917 addr.Af = ADDRESS_IP4
919 copy(ip4[:], ip.To4())
924 func (x Address) ToIP() net.IP {
925 if x.Af == ADDRESS_IP6 {
927 return net.IP(ip6[:]).To16()
930 return net.IP(ip4[:]).To4()
933 func (x Address) String() string {
934 return x.ToIP().String()
936 func (x *Address) MarshalText() ([]byte, error) {
937 return []byte(x.String()), nil
939 func (x *Address) UnmarshalText(text []byte) error {
940 addr, err := ParseAddress(string(text))
948 // GbpBridgeDomain defines type 'gbp_bridge_domain'.
949 type GbpBridgeDomain struct {
950 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
951 RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
952 Flags GbpBridgeDomainFlags `binapi:"gbp_bridge_domain_flags,name=flags" json:"flags,omitempty"`
953 BviSwIfIndex InterfaceIndex `binapi:"interface_index,name=bvi_sw_if_index" json:"bvi_sw_if_index,omitempty"`
954 UuFwdSwIfIndex InterfaceIndex `binapi:"interface_index,name=uu_fwd_sw_if_index" json:"uu_fwd_sw_if_index,omitempty"`
955 BmFloodSwIfIndex InterfaceIndex `binapi:"interface_index,name=bm_flood_sw_if_index" json:"bm_flood_sw_if_index,omitempty"`
958 // GbpContract defines type 'gbp_contract'.
959 type GbpContract struct {
960 Scope GbpScope `binapi:"gbp_scope,name=scope" json:"scope,omitempty"`
961 Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
962 Dclass uint16 `binapi:"u16,name=dclass" json:"dclass,omitempty"`
963 ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
964 NEtherTypes uint8 `binapi:"u8,name=n_ether_types" json:"n_ether_types,omitempty"`
965 AllowedEthertypes []uint16 `binapi:"u16[16],name=allowed_ethertypes" json:"allowed_ethertypes,omitempty"`
966 NRules uint8 `binapi:"u8,name=n_rules" json:"-"`
967 Rules []GbpRule `binapi:"gbp_rule[n_rules],name=rules" json:"rules,omitempty"`
970 // GbpEndpoint defines type 'gbp_endpoint'.
971 type GbpEndpoint struct {
972 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
973 Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
974 Flags GbpEndpointFlags `binapi:"gbp_endpoint_flags,name=flags" json:"flags,omitempty"`
975 Mac MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"`
976 Tun GbpEndpointTun `binapi:"gbp_endpoint_tun,name=tun" json:"tun,omitempty"`
977 NIps uint8 `binapi:"u8,name=n_ips" json:"-"`
978 Ips []Address `binapi:"address[n_ips],name=ips" json:"ips,omitempty"`
981 // GbpEndpointGroup defines type 'gbp_endpoint_group'.
982 type GbpEndpointGroup struct {
983 Vnid uint32 `binapi:"u32,name=vnid" json:"vnid,omitempty"`
984 Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
985 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
986 RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
987 UplinkSwIfIndex InterfaceIndex `binapi:"interface_index,name=uplink_sw_if_index" json:"uplink_sw_if_index,omitempty"`
988 Retention GbpEndpointRetention `binapi:"gbp_endpoint_retention,name=retention" json:"retention,omitempty"`
991 // GbpEndpointRetention defines type 'gbp_endpoint_retention'.
992 type GbpEndpointRetention struct {
993 RemoteEpTimeout uint32 `binapi:"u32,name=remote_ep_timeout" json:"remote_ep_timeout,omitempty"`
996 // GbpEndpointTun defines type 'gbp_endpoint_tun'.
997 type GbpEndpointTun struct {
998 Src Address `binapi:"address,name=src" json:"src,omitempty"`
999 Dst Address `binapi:"address,name=dst" json:"dst,omitempty"`
1002 // GbpExtItf defines type 'gbp_ext_itf'.
1003 type GbpExtItf struct {
1004 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1005 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
1006 RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
1007 Flags GbpExtItfFlags `binapi:"gbp_ext_itf_flags,name=flags" json:"flags,omitempty"`
1010 // GbpNextHop defines type 'gbp_next_hop'.
1011 type GbpNextHop struct {
1012 IP Address `binapi:"address,name=ip" json:"ip,omitempty"`
1013 Mac MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"`
1014 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
1015 RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
1018 // GbpNextHopSet defines type 'gbp_next_hop_set'.
1019 type GbpNextHopSet struct {
1020 HashMode GbpHashMode `binapi:"gbp_hash_mode,name=hash_mode" json:"hash_mode,omitempty"`
1021 NNhs uint8 `binapi:"u8,name=n_nhs" json:"n_nhs,omitempty"`
1022 Nhs [8]GbpNextHop `binapi:"gbp_next_hop[8],name=nhs" json:"nhs,omitempty"`
1025 // GbpRecirc defines type 'gbp_recirc'.
1026 type GbpRecirc struct {
1027 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1028 Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
1029 IsExt bool `binapi:"bool,name=is_ext" json:"is_ext,omitempty"`
1032 // GbpRouteDomain defines type 'gbp_route_domain'.
1033 type GbpRouteDomain struct {
1034 RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
1035 IP4TableID uint32 `binapi:"u32,name=ip4_table_id" json:"ip4_table_id,omitempty"`
1036 IP6TableID uint32 `binapi:"u32,name=ip6_table_id" json:"ip6_table_id,omitempty"`
1037 IP4UuSwIfIndex InterfaceIndex `binapi:"interface_index,name=ip4_uu_sw_if_index" json:"ip4_uu_sw_if_index,omitempty"`
1038 IP6UuSwIfIndex InterfaceIndex `binapi:"interface_index,name=ip6_uu_sw_if_index" json:"ip6_uu_sw_if_index,omitempty"`
1039 Scope GbpScope `binapi:"gbp_scope,name=scope" json:"scope,omitempty"`
1042 // GbpRule defines type 'gbp_rule'.
1043 type GbpRule struct {
1044 Action GbpRuleAction `binapi:"gbp_rule_action,name=action" json:"action,omitempty"`
1045 NhSet GbpNextHopSet `binapi:"gbp_next_hop_set,name=nh_set" json:"nh_set,omitempty"`
1048 // GbpSubnet defines type 'gbp_subnet'.
1049 type GbpSubnet struct {
1050 RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
1051 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1052 Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
1053 Type GbpSubnetType `binapi:"gbp_subnet_type,name=type" json:"type,omitempty"`
1054 Prefix Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
1057 // GbpVxlanTunnel defines type 'gbp_vxlan_tunnel'.
1058 type GbpVxlanTunnel struct {
1059 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
1060 Mode GbpVxlanTunnelMode `binapi:"gbp_vxlan_tunnel_mode,name=mode" json:"mode,omitempty"`
1061 BdRdID uint32 `binapi:"u32,name=bd_rd_id" json:"bd_rd_id,omitempty"`
1062 Src IP4Address `binapi:"ip4_address,name=src" json:"src,omitempty"`
1065 // IP4Prefix defines type 'ip4_prefix'.
1066 type IP4Prefix struct {
1067 Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
1068 Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
1071 func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
1072 hasPrefix := strings.Contains(s, "/")
1074 ip, network, err := net.ParseCIDR(s)
1076 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
1078 maskSize, _ := network.Mask.Size()
1079 prefix.Len = byte(maskSize)
1080 prefix.Address, err = ParseIP4Address(ip.String())
1082 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
1085 ip := net.ParseIP(s)
1086 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
1087 if ip.To4() == nil {
1088 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
1090 prefix.Len = byte(defaultMaskSize)
1091 prefix.Address, err = ParseIP4Address(ip.String())
1093 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
1098 func (x IP4Prefix) ToIPNet() *net.IPNet {
1099 mask := net.CIDRMask(int(x.Len), 32)
1100 ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
1103 func (x IP4Prefix) String() string {
1104 ip := x.Address.String()
1105 return ip + "/" + strconv.Itoa(int(x.Len))
1107 func (x *IP4Prefix) MarshalText() ([]byte, error) {
1108 return []byte(x.String()), nil
1110 func (x *IP4Prefix) UnmarshalText(text []byte) error {
1111 prefix, err := ParseIP4Prefix(string(text))
1119 // IP6Prefix defines type 'ip6_prefix'.
1120 type IP6Prefix struct {
1121 Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
1122 Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
1125 func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
1126 hasPrefix := strings.Contains(s, "/")
1128 ip, network, err := net.ParseCIDR(s)
1130 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
1132 maskSize, _ := network.Mask.Size()
1133 prefix.Len = byte(maskSize)
1134 prefix.Address, err = ParseIP6Address(ip.String())
1136 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
1139 ip := net.ParseIP(s)
1140 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
1141 if ip.To4() == nil {
1142 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
1144 prefix.Len = byte(defaultMaskSize)
1145 prefix.Address, err = ParseIP6Address(ip.String())
1147 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
1152 func (x IP6Prefix) ToIPNet() *net.IPNet {
1153 mask := net.CIDRMask(int(x.Len), 128)
1154 ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
1157 func (x IP6Prefix) String() string {
1158 ip := x.Address.String()
1159 return ip + "/" + strconv.Itoa(int(x.Len))
1161 func (x *IP6Prefix) MarshalText() ([]byte, error) {
1162 return []byte(x.String()), nil
1164 func (x *IP6Prefix) UnmarshalText(text []byte) error {
1165 prefix, err := ParseIP6Prefix(string(text))
1173 // Mprefix defines type 'mprefix'.
1174 type Mprefix struct {
1175 Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
1176 GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
1177 GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
1178 SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
1181 // Prefix defines type 'prefix'.
1182 type Prefix struct {
1183 Address Address `binapi:"address,name=address" json:"address,omitempty"`
1184 Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
1187 func ParsePrefix(ip string) (prefix Prefix, err error) {
1188 hasPrefix := strings.Contains(ip, "/")
1190 netIP, network, err := net.ParseCIDR(ip)
1192 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
1194 maskSize, _ := network.Mask.Size()
1195 prefix.Len = byte(maskSize)
1196 prefix.Address, err = ParseAddress(netIP.String())
1198 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
1201 netIP := net.ParseIP(ip)
1202 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
1203 if netIP.To4() == nil {
1204 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
1206 prefix.Len = byte(defaultMaskSize)
1207 prefix.Address, err = ParseAddress(netIP.String())
1209 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
1214 func (x Prefix) ToIPNet() *net.IPNet {
1216 if x.Address.Af == ADDRESS_IP4 {
1217 mask = net.CIDRMask(int(x.Len), 32)
1219 mask = net.CIDRMask(int(x.Len), 128)
1221 ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
1224 func (x Prefix) String() string {
1225 ip := x.Address.String()
1226 return ip + "/" + strconv.Itoa(int(x.Len))
1228 func (x *Prefix) MarshalText() ([]byte, error) {
1229 return []byte(x.String()), nil
1231 func (x *Prefix) UnmarshalText(text []byte) error {
1232 prefix, err := ParsePrefix(string(text))
1240 // PrefixMatcher defines type 'prefix_matcher'.
1241 type PrefixMatcher struct {
1242 Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
1243 Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
1246 // AddressUnion defines union 'address_union'.
1247 type AddressUnion struct {
1250 XXX_UnionData [16]byte
1253 func AddressUnionIP4(a IP4Address) (u AddressUnion) {
1257 func (u *AddressUnion) SetIP4(a IP4Address) {
1258 buf := codec.NewBuffer(u.XXX_UnionData[:])
1259 buf.EncodeBytes(a[:], 4)
1261 func (u *AddressUnion) GetIP4() (a IP4Address) {
1262 buf := codec.NewBuffer(u.XXX_UnionData[:])
1263 copy(a[:], buf.DecodeBytes(4))
1267 func AddressUnionIP6(a IP6Address) (u AddressUnion) {
1271 func (u *AddressUnion) SetIP6(a IP6Address) {
1272 buf := codec.NewBuffer(u.XXX_UnionData[:])
1273 buf.EncodeBytes(a[:], 16)
1275 func (u *AddressUnion) GetIP6() (a IP6Address) {
1276 buf := codec.NewBuffer(u.XXX_UnionData[:])
1277 copy(a[:], buf.DecodeBytes(16))
1281 // GbpBridgeDomainAdd defines message 'gbp_bridge_domain_add'.
1282 type GbpBridgeDomainAdd struct {
1283 Bd GbpBridgeDomain `binapi:"gbp_bridge_domain,name=bd" json:"bd,omitempty"`
1286 func (m *GbpBridgeDomainAdd) Reset() { *m = GbpBridgeDomainAdd{} }
1287 func (*GbpBridgeDomainAdd) GetMessageName() string { return "gbp_bridge_domain_add" }
1288 func (*GbpBridgeDomainAdd) GetCrcString() string { return "8454bfdf" }
1289 func (*GbpBridgeDomainAdd) GetMessageType() api.MessageType {
1290 return api.RequestMessage
1293 func (m *GbpBridgeDomainAdd) Size() (size int) {
1297 size += 4 // m.Bd.BdID
1298 size += 4 // m.Bd.RdID
1299 size += 4 // m.Bd.Flags
1300 size += 4 // m.Bd.BviSwIfIndex
1301 size += 4 // m.Bd.UuFwdSwIfIndex
1302 size += 4 // m.Bd.BmFloodSwIfIndex
1305 func (m *GbpBridgeDomainAdd) Marshal(b []byte) ([]byte, error) {
1307 b = make([]byte, m.Size())
1309 buf := codec.NewBuffer(b)
1310 buf.EncodeUint32(m.Bd.BdID)
1311 buf.EncodeUint32(m.Bd.RdID)
1312 buf.EncodeUint32(uint32(m.Bd.Flags))
1313 buf.EncodeUint32(uint32(m.Bd.BviSwIfIndex))
1314 buf.EncodeUint32(uint32(m.Bd.UuFwdSwIfIndex))
1315 buf.EncodeUint32(uint32(m.Bd.BmFloodSwIfIndex))
1316 return buf.Bytes(), nil
1318 func (m *GbpBridgeDomainAdd) Unmarshal(b []byte) error {
1319 buf := codec.NewBuffer(b)
1320 m.Bd.BdID = buf.DecodeUint32()
1321 m.Bd.RdID = buf.DecodeUint32()
1322 m.Bd.Flags = GbpBridgeDomainFlags(buf.DecodeUint32())
1323 m.Bd.BviSwIfIndex = InterfaceIndex(buf.DecodeUint32())
1324 m.Bd.UuFwdSwIfIndex = InterfaceIndex(buf.DecodeUint32())
1325 m.Bd.BmFloodSwIfIndex = InterfaceIndex(buf.DecodeUint32())
1329 // GbpBridgeDomainAddReply defines message 'gbp_bridge_domain_add_reply'.
1330 type GbpBridgeDomainAddReply struct {
1331 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1334 func (m *GbpBridgeDomainAddReply) Reset() { *m = GbpBridgeDomainAddReply{} }
1335 func (*GbpBridgeDomainAddReply) GetMessageName() string { return "gbp_bridge_domain_add_reply" }
1336 func (*GbpBridgeDomainAddReply) GetCrcString() string { return "e8d4e804" }
1337 func (*GbpBridgeDomainAddReply) GetMessageType() api.MessageType {
1338 return api.ReplyMessage
1341 func (m *GbpBridgeDomainAddReply) Size() (size int) {
1345 size += 4 // m.Retval
1348 func (m *GbpBridgeDomainAddReply) Marshal(b []byte) ([]byte, error) {
1350 b = make([]byte, m.Size())
1352 buf := codec.NewBuffer(b)
1353 buf.EncodeInt32(m.Retval)
1354 return buf.Bytes(), nil
1356 func (m *GbpBridgeDomainAddReply) Unmarshal(b []byte) error {
1357 buf := codec.NewBuffer(b)
1358 m.Retval = buf.DecodeInt32()
1362 // GbpBridgeDomainDel defines message 'gbp_bridge_domain_del'.
1363 type GbpBridgeDomainDel struct {
1364 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
1367 func (m *GbpBridgeDomainDel) Reset() { *m = GbpBridgeDomainDel{} }
1368 func (*GbpBridgeDomainDel) GetMessageName() string { return "gbp_bridge_domain_del" }
1369 func (*GbpBridgeDomainDel) GetCrcString() string { return "c25fdce6" }
1370 func (*GbpBridgeDomainDel) GetMessageType() api.MessageType {
1371 return api.RequestMessage
1374 func (m *GbpBridgeDomainDel) Size() (size int) {
1381 func (m *GbpBridgeDomainDel) Marshal(b []byte) ([]byte, error) {
1383 b = make([]byte, m.Size())
1385 buf := codec.NewBuffer(b)
1386 buf.EncodeUint32(m.BdID)
1387 return buf.Bytes(), nil
1389 func (m *GbpBridgeDomainDel) Unmarshal(b []byte) error {
1390 buf := codec.NewBuffer(b)
1391 m.BdID = buf.DecodeUint32()
1395 // GbpBridgeDomainDelReply defines message 'gbp_bridge_domain_del_reply'.
1396 type GbpBridgeDomainDelReply struct {
1397 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1400 func (m *GbpBridgeDomainDelReply) Reset() { *m = GbpBridgeDomainDelReply{} }
1401 func (*GbpBridgeDomainDelReply) GetMessageName() string { return "gbp_bridge_domain_del_reply" }
1402 func (*GbpBridgeDomainDelReply) GetCrcString() string { return "e8d4e804" }
1403 func (*GbpBridgeDomainDelReply) GetMessageType() api.MessageType {
1404 return api.ReplyMessage
1407 func (m *GbpBridgeDomainDelReply) Size() (size int) {
1411 size += 4 // m.Retval
1414 func (m *GbpBridgeDomainDelReply) Marshal(b []byte) ([]byte, error) {
1416 b = make([]byte, m.Size())
1418 buf := codec.NewBuffer(b)
1419 buf.EncodeInt32(m.Retval)
1420 return buf.Bytes(), nil
1422 func (m *GbpBridgeDomainDelReply) Unmarshal(b []byte) error {
1423 buf := codec.NewBuffer(b)
1424 m.Retval = buf.DecodeInt32()
1428 // GbpBridgeDomainDetails defines message 'gbp_bridge_domain_details'.
1429 type GbpBridgeDomainDetails struct {
1430 Bd GbpBridgeDomain `binapi:"gbp_bridge_domain,name=bd" json:"bd,omitempty"`
1433 func (m *GbpBridgeDomainDetails) Reset() { *m = GbpBridgeDomainDetails{} }
1434 func (*GbpBridgeDomainDetails) GetMessageName() string { return "gbp_bridge_domain_details" }
1435 func (*GbpBridgeDomainDetails) GetCrcString() string { return "2acd15f9" }
1436 func (*GbpBridgeDomainDetails) GetMessageType() api.MessageType {
1437 return api.ReplyMessage
1440 func (m *GbpBridgeDomainDetails) Size() (size int) {
1444 size += 4 // m.Bd.BdID
1445 size += 4 // m.Bd.RdID
1446 size += 4 // m.Bd.Flags
1447 size += 4 // m.Bd.BviSwIfIndex
1448 size += 4 // m.Bd.UuFwdSwIfIndex
1449 size += 4 // m.Bd.BmFloodSwIfIndex
1452 func (m *GbpBridgeDomainDetails) Marshal(b []byte) ([]byte, error) {
1454 b = make([]byte, m.Size())
1456 buf := codec.NewBuffer(b)
1457 buf.EncodeUint32(m.Bd.BdID)
1458 buf.EncodeUint32(m.Bd.RdID)
1459 buf.EncodeUint32(uint32(m.Bd.Flags))
1460 buf.EncodeUint32(uint32(m.Bd.BviSwIfIndex))
1461 buf.EncodeUint32(uint32(m.Bd.UuFwdSwIfIndex))
1462 buf.EncodeUint32(uint32(m.Bd.BmFloodSwIfIndex))
1463 return buf.Bytes(), nil
1465 func (m *GbpBridgeDomainDetails) Unmarshal(b []byte) error {
1466 buf := codec.NewBuffer(b)
1467 m.Bd.BdID = buf.DecodeUint32()
1468 m.Bd.RdID = buf.DecodeUint32()
1469 m.Bd.Flags = GbpBridgeDomainFlags(buf.DecodeUint32())
1470 m.Bd.BviSwIfIndex = InterfaceIndex(buf.DecodeUint32())
1471 m.Bd.UuFwdSwIfIndex = InterfaceIndex(buf.DecodeUint32())
1472 m.Bd.BmFloodSwIfIndex = InterfaceIndex(buf.DecodeUint32())
1476 // GbpBridgeDomainDump defines message 'gbp_bridge_domain_dump'.
1477 type GbpBridgeDomainDump struct{}
1479 func (m *GbpBridgeDomainDump) Reset() { *m = GbpBridgeDomainDump{} }
1480 func (*GbpBridgeDomainDump) GetMessageName() string { return "gbp_bridge_domain_dump" }
1481 func (*GbpBridgeDomainDump) GetCrcString() string { return "51077d14" }
1482 func (*GbpBridgeDomainDump) GetMessageType() api.MessageType {
1483 return api.RequestMessage
1486 func (m *GbpBridgeDomainDump) Size() (size int) {
1492 func (m *GbpBridgeDomainDump) Marshal(b []byte) ([]byte, error) {
1494 b = make([]byte, m.Size())
1496 buf := codec.NewBuffer(b)
1497 return buf.Bytes(), nil
1499 func (m *GbpBridgeDomainDump) Unmarshal(b []byte) error {
1503 // GbpBridgeDomainDumpReply defines message 'gbp_bridge_domain_dump_reply'.
1504 type GbpBridgeDomainDumpReply struct {
1505 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1508 func (m *GbpBridgeDomainDumpReply) Reset() { *m = GbpBridgeDomainDumpReply{} }
1509 func (*GbpBridgeDomainDumpReply) GetMessageName() string { return "gbp_bridge_domain_dump_reply" }
1510 func (*GbpBridgeDomainDumpReply) GetCrcString() string { return "e8d4e804" }
1511 func (*GbpBridgeDomainDumpReply) GetMessageType() api.MessageType {
1512 return api.ReplyMessage
1515 func (m *GbpBridgeDomainDumpReply) Size() (size int) {
1519 size += 4 // m.Retval
1522 func (m *GbpBridgeDomainDumpReply) Marshal(b []byte) ([]byte, error) {
1524 b = make([]byte, m.Size())
1526 buf := codec.NewBuffer(b)
1527 buf.EncodeInt32(m.Retval)
1528 return buf.Bytes(), nil
1530 func (m *GbpBridgeDomainDumpReply) Unmarshal(b []byte) error {
1531 buf := codec.NewBuffer(b)
1532 m.Retval = buf.DecodeInt32()
1536 // GbpContractAddDel defines message 'gbp_contract_add_del'.
1537 type GbpContractAddDel struct {
1538 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1539 Contract GbpContract `binapi:"gbp_contract,name=contract" json:"contract,omitempty"`
1542 func (m *GbpContractAddDel) Reset() { *m = GbpContractAddDel{} }
1543 func (*GbpContractAddDel) GetMessageName() string { return "gbp_contract_add_del" }
1544 func (*GbpContractAddDel) GetCrcString() string { return "553e275b" }
1545 func (*GbpContractAddDel) GetMessageType() api.MessageType {
1546 return api.RequestMessage
1549 func (m *GbpContractAddDel) Size() (size int) {
1553 size += 1 // m.IsAdd
1554 size += 2 // m.Contract.Scope
1555 size += 2 // m.Contract.Sclass
1556 size += 2 // m.Contract.Dclass
1557 size += 4 // m.Contract.ACLIndex
1558 size += 1 // m.Contract.NEtherTypes
1559 size += 2 * 16 // m.Contract.AllowedEthertypes
1560 size += 1 // m.Contract.NRules
1561 for j2 := 0; j2 < len(m.Contract.Rules); j2++ {
1564 if j2 < len(m.Contract.Rules) {
1565 s2 = m.Contract.Rules[j2]
1567 size += 4 // s2.Action
1568 size += 4 // s2.NhSet.HashMode
1569 size += 1 // s2.NhSet.NNhs
1570 for j4 := 0; j4 < 8; j4++ {
1571 size += 4 // s2.NhSet.Nhs[j4].IP.Af
1572 size += 1 * 16 // s2.NhSet.Nhs[j4].IP.Un
1573 size += 1 * 6 // s2.NhSet.Nhs[j4].Mac
1574 size += 4 // s2.NhSet.Nhs[j4].BdID
1575 size += 4 // s2.NhSet.Nhs[j4].RdID
1580 func (m *GbpContractAddDel) Marshal(b []byte) ([]byte, error) {
1582 b = make([]byte, m.Size())
1584 buf := codec.NewBuffer(b)
1585 buf.EncodeBool(m.IsAdd)
1586 buf.EncodeUint16(uint16(m.Contract.Scope))
1587 buf.EncodeUint16(m.Contract.Sclass)
1588 buf.EncodeUint16(m.Contract.Dclass)
1589 buf.EncodeUint32(m.Contract.ACLIndex)
1590 buf.EncodeUint8(m.Contract.NEtherTypes)
1591 for i := 0; i < 16; i++ {
1593 if i < len(m.Contract.AllowedEthertypes) {
1594 x = uint16(m.Contract.AllowedEthertypes[i])
1598 buf.EncodeUint8(uint8(len(m.Contract.Rules)))
1599 for j1 := 0; j1 < len(m.Contract.Rules); j1++ {
1600 var v1 GbpRule // Rules
1601 if j1 < len(m.Contract.Rules) {
1602 v1 = m.Contract.Rules[j1]
1604 buf.EncodeUint32(uint32(v1.Action))
1605 buf.EncodeUint32(uint32(v1.NhSet.HashMode))
1606 buf.EncodeUint8(v1.NhSet.NNhs)
1607 for j3 := 0; j3 < 8; j3++ {
1608 buf.EncodeUint32(uint32(v1.NhSet.Nhs[j3].IP.Af))
1609 buf.EncodeBytes(v1.NhSet.Nhs[j3].IP.Un.XXX_UnionData[:], 16)
1610 buf.EncodeBytes(v1.NhSet.Nhs[j3].Mac[:], 6)
1611 buf.EncodeUint32(v1.NhSet.Nhs[j3].BdID)
1612 buf.EncodeUint32(v1.NhSet.Nhs[j3].RdID)
1615 return buf.Bytes(), nil
1617 func (m *GbpContractAddDel) Unmarshal(b []byte) error {
1618 buf := codec.NewBuffer(b)
1619 m.IsAdd = buf.DecodeBool()
1620 m.Contract.Scope = GbpScope(buf.DecodeUint16())
1621 m.Contract.Sclass = buf.DecodeUint16()
1622 m.Contract.Dclass = buf.DecodeUint16()
1623 m.Contract.ACLIndex = buf.DecodeUint32()
1624 m.Contract.NEtherTypes = buf.DecodeUint8()
1625 m.Contract.AllowedEthertypes = make([]uint16, 16)
1626 for i := 0; i < len(m.Contract.AllowedEthertypes); i++ {
1627 m.Contract.AllowedEthertypes[i] = buf.DecodeUint16()
1629 m.Contract.NRules = buf.DecodeUint8()
1630 m.Contract.Rules = make([]GbpRule, m.Contract.NRules)
1631 for j1 := 0; j1 < len(m.Contract.Rules); j1++ {
1632 m.Contract.Rules[j1].Action = GbpRuleAction(buf.DecodeUint32())
1633 m.Contract.Rules[j1].NhSet.HashMode = GbpHashMode(buf.DecodeUint32())
1634 m.Contract.Rules[j1].NhSet.NNhs = buf.DecodeUint8()
1635 for j3 := 0; j3 < 8; j3++ {
1636 m.Contract.Rules[j1].NhSet.Nhs[j3].IP.Af = AddressFamily(buf.DecodeUint32())
1637 copy(m.Contract.Rules[j1].NhSet.Nhs[j3].IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1638 copy(m.Contract.Rules[j1].NhSet.Nhs[j3].Mac[:], buf.DecodeBytes(6))
1639 m.Contract.Rules[j1].NhSet.Nhs[j3].BdID = buf.DecodeUint32()
1640 m.Contract.Rules[j1].NhSet.Nhs[j3].RdID = buf.DecodeUint32()
1646 // GbpContractAddDelReply defines message 'gbp_contract_add_del_reply'.
1647 type GbpContractAddDelReply struct {
1648 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1649 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
1652 func (m *GbpContractAddDelReply) Reset() { *m = GbpContractAddDelReply{} }
1653 func (*GbpContractAddDelReply) GetMessageName() string { return "gbp_contract_add_del_reply" }
1654 func (*GbpContractAddDelReply) GetCrcString() string { return "1992deab" }
1655 func (*GbpContractAddDelReply) GetMessageType() api.MessageType {
1656 return api.ReplyMessage
1659 func (m *GbpContractAddDelReply) Size() (size int) {
1663 size += 4 // m.Retval
1664 size += 4 // m.StatsIndex
1667 func (m *GbpContractAddDelReply) Marshal(b []byte) ([]byte, error) {
1669 b = make([]byte, m.Size())
1671 buf := codec.NewBuffer(b)
1672 buf.EncodeInt32(m.Retval)
1673 buf.EncodeUint32(m.StatsIndex)
1674 return buf.Bytes(), nil
1676 func (m *GbpContractAddDelReply) Unmarshal(b []byte) error {
1677 buf := codec.NewBuffer(b)
1678 m.Retval = buf.DecodeInt32()
1679 m.StatsIndex = buf.DecodeUint32()
1683 // GbpContractDetails defines message 'gbp_contract_details'.
1684 type GbpContractDetails struct {
1685 Contract GbpContract `binapi:"gbp_contract,name=contract" json:"contract,omitempty"`
1688 func (m *GbpContractDetails) Reset() { *m = GbpContractDetails{} }
1689 func (*GbpContractDetails) GetMessageName() string { return "gbp_contract_details" }
1690 func (*GbpContractDetails) GetCrcString() string { return "2a18db6e" }
1691 func (*GbpContractDetails) GetMessageType() api.MessageType {
1692 return api.ReplyMessage
1695 func (m *GbpContractDetails) Size() (size int) {
1699 size += 2 // m.Contract.Scope
1700 size += 2 // m.Contract.Sclass
1701 size += 2 // m.Contract.Dclass
1702 size += 4 // m.Contract.ACLIndex
1703 size += 1 // m.Contract.NEtherTypes
1704 size += 2 * 16 // m.Contract.AllowedEthertypes
1705 size += 1 // m.Contract.NRules
1706 for j2 := 0; j2 < len(m.Contract.Rules); j2++ {
1709 if j2 < len(m.Contract.Rules) {
1710 s2 = m.Contract.Rules[j2]
1712 size += 4 // s2.Action
1713 size += 4 // s2.NhSet.HashMode
1714 size += 1 // s2.NhSet.NNhs
1715 for j4 := 0; j4 < 8; j4++ {
1716 size += 4 // s2.NhSet.Nhs[j4].IP.Af
1717 size += 1 * 16 // s2.NhSet.Nhs[j4].IP.Un
1718 size += 1 * 6 // s2.NhSet.Nhs[j4].Mac
1719 size += 4 // s2.NhSet.Nhs[j4].BdID
1720 size += 4 // s2.NhSet.Nhs[j4].RdID
1725 func (m *GbpContractDetails) Marshal(b []byte) ([]byte, error) {
1727 b = make([]byte, m.Size())
1729 buf := codec.NewBuffer(b)
1730 buf.EncodeUint16(uint16(m.Contract.Scope))
1731 buf.EncodeUint16(m.Contract.Sclass)
1732 buf.EncodeUint16(m.Contract.Dclass)
1733 buf.EncodeUint32(m.Contract.ACLIndex)
1734 buf.EncodeUint8(m.Contract.NEtherTypes)
1735 for i := 0; i < 16; i++ {
1737 if i < len(m.Contract.AllowedEthertypes) {
1738 x = uint16(m.Contract.AllowedEthertypes[i])
1742 buf.EncodeUint8(uint8(len(m.Contract.Rules)))
1743 for j1 := 0; j1 < len(m.Contract.Rules); j1++ {
1744 var v1 GbpRule // Rules
1745 if j1 < len(m.Contract.Rules) {
1746 v1 = m.Contract.Rules[j1]
1748 buf.EncodeUint32(uint32(v1.Action))
1749 buf.EncodeUint32(uint32(v1.NhSet.HashMode))
1750 buf.EncodeUint8(v1.NhSet.NNhs)
1751 for j3 := 0; j3 < 8; j3++ {
1752 buf.EncodeUint32(uint32(v1.NhSet.Nhs[j3].IP.Af))
1753 buf.EncodeBytes(v1.NhSet.Nhs[j3].IP.Un.XXX_UnionData[:], 16)
1754 buf.EncodeBytes(v1.NhSet.Nhs[j3].Mac[:], 6)
1755 buf.EncodeUint32(v1.NhSet.Nhs[j3].BdID)
1756 buf.EncodeUint32(v1.NhSet.Nhs[j3].RdID)
1759 return buf.Bytes(), nil
1761 func (m *GbpContractDetails) Unmarshal(b []byte) error {
1762 buf := codec.NewBuffer(b)
1763 m.Contract.Scope = GbpScope(buf.DecodeUint16())
1764 m.Contract.Sclass = buf.DecodeUint16()
1765 m.Contract.Dclass = buf.DecodeUint16()
1766 m.Contract.ACLIndex = buf.DecodeUint32()
1767 m.Contract.NEtherTypes = buf.DecodeUint8()
1768 m.Contract.AllowedEthertypes = make([]uint16, 16)
1769 for i := 0; i < len(m.Contract.AllowedEthertypes); i++ {
1770 m.Contract.AllowedEthertypes[i] = buf.DecodeUint16()
1772 m.Contract.NRules = buf.DecodeUint8()
1773 m.Contract.Rules = make([]GbpRule, m.Contract.NRules)
1774 for j1 := 0; j1 < len(m.Contract.Rules); j1++ {
1775 m.Contract.Rules[j1].Action = GbpRuleAction(buf.DecodeUint32())
1776 m.Contract.Rules[j1].NhSet.HashMode = GbpHashMode(buf.DecodeUint32())
1777 m.Contract.Rules[j1].NhSet.NNhs = buf.DecodeUint8()
1778 for j3 := 0; j3 < 8; j3++ {
1779 m.Contract.Rules[j1].NhSet.Nhs[j3].IP.Af = AddressFamily(buf.DecodeUint32())
1780 copy(m.Contract.Rules[j1].NhSet.Nhs[j3].IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1781 copy(m.Contract.Rules[j1].NhSet.Nhs[j3].Mac[:], buf.DecodeBytes(6))
1782 m.Contract.Rules[j1].NhSet.Nhs[j3].BdID = buf.DecodeUint32()
1783 m.Contract.Rules[j1].NhSet.Nhs[j3].RdID = buf.DecodeUint32()
1789 // GbpContractDump defines message 'gbp_contract_dump'.
1790 type GbpContractDump struct{}
1792 func (m *GbpContractDump) Reset() { *m = GbpContractDump{} }
1793 func (*GbpContractDump) GetMessageName() string { return "gbp_contract_dump" }
1794 func (*GbpContractDump) GetCrcString() string { return "51077d14" }
1795 func (*GbpContractDump) GetMessageType() api.MessageType {
1796 return api.RequestMessage
1799 func (m *GbpContractDump) Size() (size int) {
1805 func (m *GbpContractDump) Marshal(b []byte) ([]byte, error) {
1807 b = make([]byte, m.Size())
1809 buf := codec.NewBuffer(b)
1810 return buf.Bytes(), nil
1812 func (m *GbpContractDump) Unmarshal(b []byte) error {
1816 // GbpEndpointAdd defines message 'gbp_endpoint_add'.
1817 type GbpEndpointAdd struct {
1818 Endpoint GbpEndpoint `binapi:"gbp_endpoint,name=endpoint" json:"endpoint,omitempty"`
1821 func (m *GbpEndpointAdd) Reset() { *m = GbpEndpointAdd{} }
1822 func (*GbpEndpointAdd) GetMessageName() string { return "gbp_endpoint_add" }
1823 func (*GbpEndpointAdd) GetCrcString() string { return "9ce16d5a" }
1824 func (*GbpEndpointAdd) GetMessageType() api.MessageType {
1825 return api.RequestMessage
1828 func (m *GbpEndpointAdd) Size() (size int) {
1832 size += 4 // m.Endpoint.SwIfIndex
1833 size += 2 // m.Endpoint.Sclass
1834 size += 4 // m.Endpoint.Flags
1835 size += 1 * 6 // m.Endpoint.Mac
1836 size += 4 // m.Endpoint.Tun.Src.Af
1837 size += 1 * 16 // m.Endpoint.Tun.Src.Un
1838 size += 4 // m.Endpoint.Tun.Dst.Af
1839 size += 1 * 16 // m.Endpoint.Tun.Dst.Un
1840 size += 1 // m.Endpoint.NIps
1841 for j2 := 0; j2 < len(m.Endpoint.Ips); j2++ {
1844 if j2 < len(m.Endpoint.Ips) {
1845 s2 = m.Endpoint.Ips[j2]
1848 size += 1 * 16 // s2.Un
1852 func (m *GbpEndpointAdd) Marshal(b []byte) ([]byte, error) {
1854 b = make([]byte, m.Size())
1856 buf := codec.NewBuffer(b)
1857 buf.EncodeUint32(uint32(m.Endpoint.SwIfIndex))
1858 buf.EncodeUint16(m.Endpoint.Sclass)
1859 buf.EncodeUint32(uint32(m.Endpoint.Flags))
1860 buf.EncodeBytes(m.Endpoint.Mac[:], 6)
1861 buf.EncodeUint32(uint32(m.Endpoint.Tun.Src.Af))
1862 buf.EncodeBytes(m.Endpoint.Tun.Src.Un.XXX_UnionData[:], 16)
1863 buf.EncodeUint32(uint32(m.Endpoint.Tun.Dst.Af))
1864 buf.EncodeBytes(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], 16)
1865 buf.EncodeUint8(uint8(len(m.Endpoint.Ips)))
1866 for j1 := 0; j1 < len(m.Endpoint.Ips); j1++ {
1867 var v1 Address // Ips
1868 if j1 < len(m.Endpoint.Ips) {
1869 v1 = m.Endpoint.Ips[j1]
1871 buf.EncodeUint32(uint32(v1.Af))
1872 buf.EncodeBytes(v1.Un.XXX_UnionData[:], 16)
1874 return buf.Bytes(), nil
1876 func (m *GbpEndpointAdd) Unmarshal(b []byte) error {
1877 buf := codec.NewBuffer(b)
1878 m.Endpoint.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1879 m.Endpoint.Sclass = buf.DecodeUint16()
1880 m.Endpoint.Flags = GbpEndpointFlags(buf.DecodeUint32())
1881 copy(m.Endpoint.Mac[:], buf.DecodeBytes(6))
1882 m.Endpoint.Tun.Src.Af = AddressFamily(buf.DecodeUint32())
1883 copy(m.Endpoint.Tun.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1884 m.Endpoint.Tun.Dst.Af = AddressFamily(buf.DecodeUint32())
1885 copy(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1886 m.Endpoint.NIps = buf.DecodeUint8()
1887 m.Endpoint.Ips = make([]Address, m.Endpoint.NIps)
1888 for j1 := 0; j1 < len(m.Endpoint.Ips); j1++ {
1889 m.Endpoint.Ips[j1].Af = AddressFamily(buf.DecodeUint32())
1890 copy(m.Endpoint.Ips[j1].Un.XXX_UnionData[:], buf.DecodeBytes(16))
1895 // GbpEndpointAddReply defines message 'gbp_endpoint_add_reply'.
1896 type GbpEndpointAddReply struct {
1897 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1898 Handle uint32 `binapi:"u32,name=handle" json:"handle,omitempty"`
1901 func (m *GbpEndpointAddReply) Reset() { *m = GbpEndpointAddReply{} }
1902 func (*GbpEndpointAddReply) GetMessageName() string { return "gbp_endpoint_add_reply" }
1903 func (*GbpEndpointAddReply) GetCrcString() string { return "1dd3ff3e" }
1904 func (*GbpEndpointAddReply) GetMessageType() api.MessageType {
1905 return api.ReplyMessage
1908 func (m *GbpEndpointAddReply) Size() (size int) {
1912 size += 4 // m.Retval
1913 size += 4 // m.Handle
1916 func (m *GbpEndpointAddReply) Marshal(b []byte) ([]byte, error) {
1918 b = make([]byte, m.Size())
1920 buf := codec.NewBuffer(b)
1921 buf.EncodeInt32(m.Retval)
1922 buf.EncodeUint32(m.Handle)
1923 return buf.Bytes(), nil
1925 func (m *GbpEndpointAddReply) Unmarshal(b []byte) error {
1926 buf := codec.NewBuffer(b)
1927 m.Retval = buf.DecodeInt32()
1928 m.Handle = buf.DecodeUint32()
1932 // GbpEndpointDel defines message 'gbp_endpoint_del'.
1933 type GbpEndpointDel struct {
1934 Handle uint32 `binapi:"u32,name=handle" json:"handle,omitempty"`
1937 func (m *GbpEndpointDel) Reset() { *m = GbpEndpointDel{} }
1938 func (*GbpEndpointDel) GetMessageName() string { return "gbp_endpoint_del" }
1939 func (*GbpEndpointDel) GetCrcString() string { return "b93cd566" }
1940 func (*GbpEndpointDel) GetMessageType() api.MessageType {
1941 return api.RequestMessage
1944 func (m *GbpEndpointDel) Size() (size int) {
1948 size += 4 // m.Handle
1951 func (m *GbpEndpointDel) Marshal(b []byte) ([]byte, error) {
1953 b = make([]byte, m.Size())
1955 buf := codec.NewBuffer(b)
1956 buf.EncodeUint32(m.Handle)
1957 return buf.Bytes(), nil
1959 func (m *GbpEndpointDel) Unmarshal(b []byte) error {
1960 buf := codec.NewBuffer(b)
1961 m.Handle = buf.DecodeUint32()
1965 // GbpEndpointDelReply defines message 'gbp_endpoint_del_reply'.
1966 type GbpEndpointDelReply struct {
1967 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1970 func (m *GbpEndpointDelReply) Reset() { *m = GbpEndpointDelReply{} }
1971 func (*GbpEndpointDelReply) GetMessageName() string { return "gbp_endpoint_del_reply" }
1972 func (*GbpEndpointDelReply) GetCrcString() string { return "e8d4e804" }
1973 func (*GbpEndpointDelReply) GetMessageType() api.MessageType {
1974 return api.ReplyMessage
1977 func (m *GbpEndpointDelReply) Size() (size int) {
1981 size += 4 // m.Retval
1984 func (m *GbpEndpointDelReply) Marshal(b []byte) ([]byte, error) {
1986 b = make([]byte, m.Size())
1988 buf := codec.NewBuffer(b)
1989 buf.EncodeInt32(m.Retval)
1990 return buf.Bytes(), nil
1992 func (m *GbpEndpointDelReply) Unmarshal(b []byte) error {
1993 buf := codec.NewBuffer(b)
1994 m.Retval = buf.DecodeInt32()
1998 // GbpEndpointDetails defines message 'gbp_endpoint_details'.
1999 type GbpEndpointDetails struct {
2000 Age float64 `binapi:"f64,name=age" json:"age,omitempty"`
2001 Handle uint32 `binapi:"u32,name=handle" json:"handle,omitempty"`
2002 Endpoint GbpEndpoint `binapi:"gbp_endpoint,name=endpoint" json:"endpoint,omitempty"`
2005 func (m *GbpEndpointDetails) Reset() { *m = GbpEndpointDetails{} }
2006 func (*GbpEndpointDetails) GetMessageName() string { return "gbp_endpoint_details" }
2007 func (*GbpEndpointDetails) GetCrcString() string { return "08aecb60" }
2008 func (*GbpEndpointDetails) GetMessageType() api.MessageType {
2009 return api.ReplyMessage
2012 func (m *GbpEndpointDetails) Size() (size int) {
2017 size += 4 // m.Handle
2018 size += 4 // m.Endpoint.SwIfIndex
2019 size += 2 // m.Endpoint.Sclass
2020 size += 4 // m.Endpoint.Flags
2021 size += 1 * 6 // m.Endpoint.Mac
2022 size += 4 // m.Endpoint.Tun.Src.Af
2023 size += 1 * 16 // m.Endpoint.Tun.Src.Un
2024 size += 4 // m.Endpoint.Tun.Dst.Af
2025 size += 1 * 16 // m.Endpoint.Tun.Dst.Un
2026 size += 1 // m.Endpoint.NIps
2027 for j2 := 0; j2 < len(m.Endpoint.Ips); j2++ {
2030 if j2 < len(m.Endpoint.Ips) {
2031 s2 = m.Endpoint.Ips[j2]
2034 size += 1 * 16 // s2.Un
2038 func (m *GbpEndpointDetails) Marshal(b []byte) ([]byte, error) {
2040 b = make([]byte, m.Size())
2042 buf := codec.NewBuffer(b)
2043 buf.EncodeFloat64(m.Age)
2044 buf.EncodeUint32(m.Handle)
2045 buf.EncodeUint32(uint32(m.Endpoint.SwIfIndex))
2046 buf.EncodeUint16(m.Endpoint.Sclass)
2047 buf.EncodeUint32(uint32(m.Endpoint.Flags))
2048 buf.EncodeBytes(m.Endpoint.Mac[:], 6)
2049 buf.EncodeUint32(uint32(m.Endpoint.Tun.Src.Af))
2050 buf.EncodeBytes(m.Endpoint.Tun.Src.Un.XXX_UnionData[:], 16)
2051 buf.EncodeUint32(uint32(m.Endpoint.Tun.Dst.Af))
2052 buf.EncodeBytes(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], 16)
2053 buf.EncodeUint8(uint8(len(m.Endpoint.Ips)))
2054 for j1 := 0; j1 < len(m.Endpoint.Ips); j1++ {
2055 var v1 Address // Ips
2056 if j1 < len(m.Endpoint.Ips) {
2057 v1 = m.Endpoint.Ips[j1]
2059 buf.EncodeUint32(uint32(v1.Af))
2060 buf.EncodeBytes(v1.Un.XXX_UnionData[:], 16)
2062 return buf.Bytes(), nil
2064 func (m *GbpEndpointDetails) Unmarshal(b []byte) error {
2065 buf := codec.NewBuffer(b)
2066 m.Age = buf.DecodeFloat64()
2067 m.Handle = buf.DecodeUint32()
2068 m.Endpoint.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2069 m.Endpoint.Sclass = buf.DecodeUint16()
2070 m.Endpoint.Flags = GbpEndpointFlags(buf.DecodeUint32())
2071 copy(m.Endpoint.Mac[:], buf.DecodeBytes(6))
2072 m.Endpoint.Tun.Src.Af = AddressFamily(buf.DecodeUint32())
2073 copy(m.Endpoint.Tun.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2074 m.Endpoint.Tun.Dst.Af = AddressFamily(buf.DecodeUint32())
2075 copy(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2076 m.Endpoint.NIps = buf.DecodeUint8()
2077 m.Endpoint.Ips = make([]Address, m.Endpoint.NIps)
2078 for j1 := 0; j1 < len(m.Endpoint.Ips); j1++ {
2079 m.Endpoint.Ips[j1].Af = AddressFamily(buf.DecodeUint32())
2080 copy(m.Endpoint.Ips[j1].Un.XXX_UnionData[:], buf.DecodeBytes(16))
2085 // GbpEndpointDump defines message 'gbp_endpoint_dump'.
2086 type GbpEndpointDump struct{}
2088 func (m *GbpEndpointDump) Reset() { *m = GbpEndpointDump{} }
2089 func (*GbpEndpointDump) GetMessageName() string { return "gbp_endpoint_dump" }
2090 func (*GbpEndpointDump) GetCrcString() string { return "51077d14" }
2091 func (*GbpEndpointDump) GetMessageType() api.MessageType {
2092 return api.RequestMessage
2095 func (m *GbpEndpointDump) Size() (size int) {
2101 func (m *GbpEndpointDump) Marshal(b []byte) ([]byte, error) {
2103 b = make([]byte, m.Size())
2105 buf := codec.NewBuffer(b)
2106 return buf.Bytes(), nil
2108 func (m *GbpEndpointDump) Unmarshal(b []byte) error {
2112 // GbpEndpointGroupAdd defines message 'gbp_endpoint_group_add'.
2113 type GbpEndpointGroupAdd struct {
2114 Epg GbpEndpointGroup `binapi:"gbp_endpoint_group,name=epg" json:"epg,omitempty"`
2117 func (m *GbpEndpointGroupAdd) Reset() { *m = GbpEndpointGroupAdd{} }
2118 func (*GbpEndpointGroupAdd) GetMessageName() string { return "gbp_endpoint_group_add" }
2119 func (*GbpEndpointGroupAdd) GetCrcString() string { return "8e0f4054" }
2120 func (*GbpEndpointGroupAdd) GetMessageType() api.MessageType {
2121 return api.RequestMessage
2124 func (m *GbpEndpointGroupAdd) Size() (size int) {
2128 size += 4 // m.Epg.Vnid
2129 size += 2 // m.Epg.Sclass
2130 size += 4 // m.Epg.BdID
2131 size += 4 // m.Epg.RdID
2132 size += 4 // m.Epg.UplinkSwIfIndex
2133 size += 4 // m.Epg.Retention.RemoteEpTimeout
2136 func (m *GbpEndpointGroupAdd) Marshal(b []byte) ([]byte, error) {
2138 b = make([]byte, m.Size())
2140 buf := codec.NewBuffer(b)
2141 buf.EncodeUint32(m.Epg.Vnid)
2142 buf.EncodeUint16(m.Epg.Sclass)
2143 buf.EncodeUint32(m.Epg.BdID)
2144 buf.EncodeUint32(m.Epg.RdID)
2145 buf.EncodeUint32(uint32(m.Epg.UplinkSwIfIndex))
2146 buf.EncodeUint32(m.Epg.Retention.RemoteEpTimeout)
2147 return buf.Bytes(), nil
2149 func (m *GbpEndpointGroupAdd) Unmarshal(b []byte) error {
2150 buf := codec.NewBuffer(b)
2151 m.Epg.Vnid = buf.DecodeUint32()
2152 m.Epg.Sclass = buf.DecodeUint16()
2153 m.Epg.BdID = buf.DecodeUint32()
2154 m.Epg.RdID = buf.DecodeUint32()
2155 m.Epg.UplinkSwIfIndex = InterfaceIndex(buf.DecodeUint32())
2156 m.Epg.Retention.RemoteEpTimeout = buf.DecodeUint32()
2160 // GbpEndpointGroupAddReply defines message 'gbp_endpoint_group_add_reply'.
2161 type GbpEndpointGroupAddReply struct {
2162 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2165 func (m *GbpEndpointGroupAddReply) Reset() { *m = GbpEndpointGroupAddReply{} }
2166 func (*GbpEndpointGroupAddReply) GetMessageName() string { return "gbp_endpoint_group_add_reply" }
2167 func (*GbpEndpointGroupAddReply) GetCrcString() string { return "e8d4e804" }
2168 func (*GbpEndpointGroupAddReply) GetMessageType() api.MessageType {
2169 return api.ReplyMessage
2172 func (m *GbpEndpointGroupAddReply) Size() (size int) {
2176 size += 4 // m.Retval
2179 func (m *GbpEndpointGroupAddReply) Marshal(b []byte) ([]byte, error) {
2181 b = make([]byte, m.Size())
2183 buf := codec.NewBuffer(b)
2184 buf.EncodeInt32(m.Retval)
2185 return buf.Bytes(), nil
2187 func (m *GbpEndpointGroupAddReply) Unmarshal(b []byte) error {
2188 buf := codec.NewBuffer(b)
2189 m.Retval = buf.DecodeInt32()
2193 // GbpEndpointGroupDel defines message 'gbp_endpoint_group_del'.
2194 type GbpEndpointGroupDel struct {
2195 Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
2198 func (m *GbpEndpointGroupDel) Reset() { *m = GbpEndpointGroupDel{} }
2199 func (*GbpEndpointGroupDel) GetMessageName() string { return "gbp_endpoint_group_del" }
2200 func (*GbpEndpointGroupDel) GetCrcString() string { return "3436b8b7" }
2201 func (*GbpEndpointGroupDel) GetMessageType() api.MessageType {
2202 return api.RequestMessage
2205 func (m *GbpEndpointGroupDel) Size() (size int) {
2209 size += 2 // m.Sclass
2212 func (m *GbpEndpointGroupDel) Marshal(b []byte) ([]byte, error) {
2214 b = make([]byte, m.Size())
2216 buf := codec.NewBuffer(b)
2217 buf.EncodeUint16(m.Sclass)
2218 return buf.Bytes(), nil
2220 func (m *GbpEndpointGroupDel) Unmarshal(b []byte) error {
2221 buf := codec.NewBuffer(b)
2222 m.Sclass = buf.DecodeUint16()
2226 // GbpEndpointGroupDelReply defines message 'gbp_endpoint_group_del_reply'.
2227 type GbpEndpointGroupDelReply struct {
2228 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2231 func (m *GbpEndpointGroupDelReply) Reset() { *m = GbpEndpointGroupDelReply{} }
2232 func (*GbpEndpointGroupDelReply) GetMessageName() string { return "gbp_endpoint_group_del_reply" }
2233 func (*GbpEndpointGroupDelReply) GetCrcString() string { return "e8d4e804" }
2234 func (*GbpEndpointGroupDelReply) GetMessageType() api.MessageType {
2235 return api.ReplyMessage
2238 func (m *GbpEndpointGroupDelReply) Size() (size int) {
2242 size += 4 // m.Retval
2245 func (m *GbpEndpointGroupDelReply) Marshal(b []byte) ([]byte, error) {
2247 b = make([]byte, m.Size())
2249 buf := codec.NewBuffer(b)
2250 buf.EncodeInt32(m.Retval)
2251 return buf.Bytes(), nil
2253 func (m *GbpEndpointGroupDelReply) Unmarshal(b []byte) error {
2254 buf := codec.NewBuffer(b)
2255 m.Retval = buf.DecodeInt32()
2259 // GbpEndpointGroupDetails defines message 'gbp_endpoint_group_details'.
2260 type GbpEndpointGroupDetails struct {
2261 Epg GbpEndpointGroup `binapi:"gbp_endpoint_group,name=epg" json:"epg,omitempty"`
2264 func (m *GbpEndpointGroupDetails) Reset() { *m = GbpEndpointGroupDetails{} }
2265 func (*GbpEndpointGroupDetails) GetMessageName() string { return "gbp_endpoint_group_details" }
2266 func (*GbpEndpointGroupDetails) GetCrcString() string { return "8f38292c" }
2267 func (*GbpEndpointGroupDetails) GetMessageType() api.MessageType {
2268 return api.ReplyMessage
2271 func (m *GbpEndpointGroupDetails) Size() (size int) {
2275 size += 4 // m.Epg.Vnid
2276 size += 2 // m.Epg.Sclass
2277 size += 4 // m.Epg.BdID
2278 size += 4 // m.Epg.RdID
2279 size += 4 // m.Epg.UplinkSwIfIndex
2280 size += 4 // m.Epg.Retention.RemoteEpTimeout
2283 func (m *GbpEndpointGroupDetails) Marshal(b []byte) ([]byte, error) {
2285 b = make([]byte, m.Size())
2287 buf := codec.NewBuffer(b)
2288 buf.EncodeUint32(m.Epg.Vnid)
2289 buf.EncodeUint16(m.Epg.Sclass)
2290 buf.EncodeUint32(m.Epg.BdID)
2291 buf.EncodeUint32(m.Epg.RdID)
2292 buf.EncodeUint32(uint32(m.Epg.UplinkSwIfIndex))
2293 buf.EncodeUint32(m.Epg.Retention.RemoteEpTimeout)
2294 return buf.Bytes(), nil
2296 func (m *GbpEndpointGroupDetails) Unmarshal(b []byte) error {
2297 buf := codec.NewBuffer(b)
2298 m.Epg.Vnid = buf.DecodeUint32()
2299 m.Epg.Sclass = buf.DecodeUint16()
2300 m.Epg.BdID = buf.DecodeUint32()
2301 m.Epg.RdID = buf.DecodeUint32()
2302 m.Epg.UplinkSwIfIndex = InterfaceIndex(buf.DecodeUint32())
2303 m.Epg.Retention.RemoteEpTimeout = buf.DecodeUint32()
2307 // GbpEndpointGroupDump defines message 'gbp_endpoint_group_dump'.
2308 type GbpEndpointGroupDump struct{}
2310 func (m *GbpEndpointGroupDump) Reset() { *m = GbpEndpointGroupDump{} }
2311 func (*GbpEndpointGroupDump) GetMessageName() string { return "gbp_endpoint_group_dump" }
2312 func (*GbpEndpointGroupDump) GetCrcString() string { return "51077d14" }
2313 func (*GbpEndpointGroupDump) GetMessageType() api.MessageType {
2314 return api.RequestMessage
2317 func (m *GbpEndpointGroupDump) Size() (size int) {
2323 func (m *GbpEndpointGroupDump) Marshal(b []byte) ([]byte, error) {
2325 b = make([]byte, m.Size())
2327 buf := codec.NewBuffer(b)
2328 return buf.Bytes(), nil
2330 func (m *GbpEndpointGroupDump) Unmarshal(b []byte) error {
2334 // GbpExtItfAddDel defines message 'gbp_ext_itf_add_del'.
2335 type GbpExtItfAddDel struct {
2336 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
2337 ExtItf GbpExtItf `binapi:"gbp_ext_itf,name=ext_itf" json:"ext_itf,omitempty"`
2340 func (m *GbpExtItfAddDel) Reset() { *m = GbpExtItfAddDel{} }
2341 func (*GbpExtItfAddDel) GetMessageName() string { return "gbp_ext_itf_add_del" }
2342 func (*GbpExtItfAddDel) GetCrcString() string { return "12ed5700" }
2343 func (*GbpExtItfAddDel) GetMessageType() api.MessageType {
2344 return api.RequestMessage
2347 func (m *GbpExtItfAddDel) Size() (size int) {
2351 size += 1 // m.IsAdd
2352 size += 4 // m.ExtItf.SwIfIndex
2353 size += 4 // m.ExtItf.BdID
2354 size += 4 // m.ExtItf.RdID
2355 size += 4 // m.ExtItf.Flags
2358 func (m *GbpExtItfAddDel) Marshal(b []byte) ([]byte, error) {
2360 b = make([]byte, m.Size())
2362 buf := codec.NewBuffer(b)
2363 buf.EncodeBool(m.IsAdd)
2364 buf.EncodeUint32(uint32(m.ExtItf.SwIfIndex))
2365 buf.EncodeUint32(m.ExtItf.BdID)
2366 buf.EncodeUint32(m.ExtItf.RdID)
2367 buf.EncodeUint32(uint32(m.ExtItf.Flags))
2368 return buf.Bytes(), nil
2370 func (m *GbpExtItfAddDel) Unmarshal(b []byte) error {
2371 buf := codec.NewBuffer(b)
2372 m.IsAdd = buf.DecodeBool()
2373 m.ExtItf.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2374 m.ExtItf.BdID = buf.DecodeUint32()
2375 m.ExtItf.RdID = buf.DecodeUint32()
2376 m.ExtItf.Flags = GbpExtItfFlags(buf.DecodeUint32())
2380 // GbpExtItfAddDelReply defines message 'gbp_ext_itf_add_del_reply'.
2381 type GbpExtItfAddDelReply struct {
2382 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2385 func (m *GbpExtItfAddDelReply) Reset() { *m = GbpExtItfAddDelReply{} }
2386 func (*GbpExtItfAddDelReply) GetMessageName() string { return "gbp_ext_itf_add_del_reply" }
2387 func (*GbpExtItfAddDelReply) GetCrcString() string { return "e8d4e804" }
2388 func (*GbpExtItfAddDelReply) GetMessageType() api.MessageType {
2389 return api.ReplyMessage
2392 func (m *GbpExtItfAddDelReply) Size() (size int) {
2396 size += 4 // m.Retval
2399 func (m *GbpExtItfAddDelReply) Marshal(b []byte) ([]byte, error) {
2401 b = make([]byte, m.Size())
2403 buf := codec.NewBuffer(b)
2404 buf.EncodeInt32(m.Retval)
2405 return buf.Bytes(), nil
2407 func (m *GbpExtItfAddDelReply) Unmarshal(b []byte) error {
2408 buf := codec.NewBuffer(b)
2409 m.Retval = buf.DecodeInt32()
2413 // GbpExtItfDetails defines message 'gbp_ext_itf_details'.
2414 type GbpExtItfDetails struct {
2415 ExtItf GbpExtItf `binapi:"gbp_ext_itf,name=ext_itf" json:"ext_itf,omitempty"`
2418 func (m *GbpExtItfDetails) Reset() { *m = GbpExtItfDetails{} }
2419 func (*GbpExtItfDetails) GetMessageName() string { return "gbp_ext_itf_details" }
2420 func (*GbpExtItfDetails) GetCrcString() string { return "408a45c0" }
2421 func (*GbpExtItfDetails) GetMessageType() api.MessageType {
2422 return api.ReplyMessage
2425 func (m *GbpExtItfDetails) Size() (size int) {
2429 size += 4 // m.ExtItf.SwIfIndex
2430 size += 4 // m.ExtItf.BdID
2431 size += 4 // m.ExtItf.RdID
2432 size += 4 // m.ExtItf.Flags
2435 func (m *GbpExtItfDetails) Marshal(b []byte) ([]byte, error) {
2437 b = make([]byte, m.Size())
2439 buf := codec.NewBuffer(b)
2440 buf.EncodeUint32(uint32(m.ExtItf.SwIfIndex))
2441 buf.EncodeUint32(m.ExtItf.BdID)
2442 buf.EncodeUint32(m.ExtItf.RdID)
2443 buf.EncodeUint32(uint32(m.ExtItf.Flags))
2444 return buf.Bytes(), nil
2446 func (m *GbpExtItfDetails) Unmarshal(b []byte) error {
2447 buf := codec.NewBuffer(b)
2448 m.ExtItf.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2449 m.ExtItf.BdID = buf.DecodeUint32()
2450 m.ExtItf.RdID = buf.DecodeUint32()
2451 m.ExtItf.Flags = GbpExtItfFlags(buf.DecodeUint32())
2455 // GbpExtItfDump defines message 'gbp_ext_itf_dump'.
2456 type GbpExtItfDump struct{}
2458 func (m *GbpExtItfDump) Reset() { *m = GbpExtItfDump{} }
2459 func (*GbpExtItfDump) GetMessageName() string { return "gbp_ext_itf_dump" }
2460 func (*GbpExtItfDump) GetCrcString() string { return "51077d14" }
2461 func (*GbpExtItfDump) GetMessageType() api.MessageType {
2462 return api.RequestMessage
2465 func (m *GbpExtItfDump) Size() (size int) {
2471 func (m *GbpExtItfDump) Marshal(b []byte) ([]byte, error) {
2473 b = make([]byte, m.Size())
2475 buf := codec.NewBuffer(b)
2476 return buf.Bytes(), nil
2478 func (m *GbpExtItfDump) Unmarshal(b []byte) error {
2482 // GbpRecircAddDel defines message 'gbp_recirc_add_del'.
2483 type GbpRecircAddDel struct {
2484 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
2485 Recirc GbpRecirc `binapi:"gbp_recirc,name=recirc" json:"recirc,omitempty"`
2488 func (m *GbpRecircAddDel) Reset() { *m = GbpRecircAddDel{} }
2489 func (*GbpRecircAddDel) GetMessageName() string { return "gbp_recirc_add_del" }
2490 func (*GbpRecircAddDel) GetCrcString() string { return "718c69c3" }
2491 func (*GbpRecircAddDel) GetMessageType() api.MessageType {
2492 return api.RequestMessage
2495 func (m *GbpRecircAddDel) Size() (size int) {
2499 size += 1 // m.IsAdd
2500 size += 4 // m.Recirc.SwIfIndex
2501 size += 2 // m.Recirc.Sclass
2502 size += 1 // m.Recirc.IsExt
2505 func (m *GbpRecircAddDel) Marshal(b []byte) ([]byte, error) {
2507 b = make([]byte, m.Size())
2509 buf := codec.NewBuffer(b)
2510 buf.EncodeBool(m.IsAdd)
2511 buf.EncodeUint32(uint32(m.Recirc.SwIfIndex))
2512 buf.EncodeUint16(m.Recirc.Sclass)
2513 buf.EncodeBool(m.Recirc.IsExt)
2514 return buf.Bytes(), nil
2516 func (m *GbpRecircAddDel) Unmarshal(b []byte) error {
2517 buf := codec.NewBuffer(b)
2518 m.IsAdd = buf.DecodeBool()
2519 m.Recirc.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2520 m.Recirc.Sclass = buf.DecodeUint16()
2521 m.Recirc.IsExt = buf.DecodeBool()
2525 // GbpRecircAddDelReply defines message 'gbp_recirc_add_del_reply'.
2526 type GbpRecircAddDelReply struct {
2527 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2530 func (m *GbpRecircAddDelReply) Reset() { *m = GbpRecircAddDelReply{} }
2531 func (*GbpRecircAddDelReply) GetMessageName() string { return "gbp_recirc_add_del_reply" }
2532 func (*GbpRecircAddDelReply) GetCrcString() string { return "e8d4e804" }
2533 func (*GbpRecircAddDelReply) GetMessageType() api.MessageType {
2534 return api.ReplyMessage
2537 func (m *GbpRecircAddDelReply) Size() (size int) {
2541 size += 4 // m.Retval
2544 func (m *GbpRecircAddDelReply) Marshal(b []byte) ([]byte, error) {
2546 b = make([]byte, m.Size())
2548 buf := codec.NewBuffer(b)
2549 buf.EncodeInt32(m.Retval)
2550 return buf.Bytes(), nil
2552 func (m *GbpRecircAddDelReply) Unmarshal(b []byte) error {
2553 buf := codec.NewBuffer(b)
2554 m.Retval = buf.DecodeInt32()
2558 // GbpRecircDetails defines message 'gbp_recirc_details'.
2559 type GbpRecircDetails struct {
2560 Recirc GbpRecirc `binapi:"gbp_recirc,name=recirc" json:"recirc,omitempty"`
2563 func (m *GbpRecircDetails) Reset() { *m = GbpRecircDetails{} }
2564 func (*GbpRecircDetails) GetMessageName() string { return "gbp_recirc_details" }
2565 func (*GbpRecircDetails) GetCrcString() string { return "66ecc42e" }
2566 func (*GbpRecircDetails) GetMessageType() api.MessageType {
2567 return api.ReplyMessage
2570 func (m *GbpRecircDetails) Size() (size int) {
2574 size += 4 // m.Recirc.SwIfIndex
2575 size += 2 // m.Recirc.Sclass
2576 size += 1 // m.Recirc.IsExt
2579 func (m *GbpRecircDetails) Marshal(b []byte) ([]byte, error) {
2581 b = make([]byte, m.Size())
2583 buf := codec.NewBuffer(b)
2584 buf.EncodeUint32(uint32(m.Recirc.SwIfIndex))
2585 buf.EncodeUint16(m.Recirc.Sclass)
2586 buf.EncodeBool(m.Recirc.IsExt)
2587 return buf.Bytes(), nil
2589 func (m *GbpRecircDetails) Unmarshal(b []byte) error {
2590 buf := codec.NewBuffer(b)
2591 m.Recirc.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2592 m.Recirc.Sclass = buf.DecodeUint16()
2593 m.Recirc.IsExt = buf.DecodeBool()
2597 // GbpRecircDump defines message 'gbp_recirc_dump'.
2598 type GbpRecircDump struct{}
2600 func (m *GbpRecircDump) Reset() { *m = GbpRecircDump{} }
2601 func (*GbpRecircDump) GetMessageName() string { return "gbp_recirc_dump" }
2602 func (*GbpRecircDump) GetCrcString() string { return "51077d14" }
2603 func (*GbpRecircDump) GetMessageType() api.MessageType {
2604 return api.RequestMessage
2607 func (m *GbpRecircDump) Size() (size int) {
2613 func (m *GbpRecircDump) Marshal(b []byte) ([]byte, error) {
2615 b = make([]byte, m.Size())
2617 buf := codec.NewBuffer(b)
2618 return buf.Bytes(), nil
2620 func (m *GbpRecircDump) Unmarshal(b []byte) error {
2624 // GbpRouteDomainAdd defines message 'gbp_route_domain_add'.
2625 type GbpRouteDomainAdd struct {
2626 Rd GbpRouteDomain `binapi:"gbp_route_domain,name=rd" json:"rd,omitempty"`
2629 func (m *GbpRouteDomainAdd) Reset() { *m = GbpRouteDomainAdd{} }
2630 func (*GbpRouteDomainAdd) GetMessageName() string { return "gbp_route_domain_add" }
2631 func (*GbpRouteDomainAdd) GetCrcString() string { return "2d0afe38" }
2632 func (*GbpRouteDomainAdd) GetMessageType() api.MessageType {
2633 return api.RequestMessage
2636 func (m *GbpRouteDomainAdd) Size() (size int) {
2640 size += 4 // m.Rd.RdID
2641 size += 4 // m.Rd.IP4TableID
2642 size += 4 // m.Rd.IP6TableID
2643 size += 4 // m.Rd.IP4UuSwIfIndex
2644 size += 4 // m.Rd.IP6UuSwIfIndex
2645 size += 2 // m.Rd.Scope
2648 func (m *GbpRouteDomainAdd) Marshal(b []byte) ([]byte, error) {
2650 b = make([]byte, m.Size())
2652 buf := codec.NewBuffer(b)
2653 buf.EncodeUint32(m.Rd.RdID)
2654 buf.EncodeUint32(m.Rd.IP4TableID)
2655 buf.EncodeUint32(m.Rd.IP6TableID)
2656 buf.EncodeUint32(uint32(m.Rd.IP4UuSwIfIndex))
2657 buf.EncodeUint32(uint32(m.Rd.IP6UuSwIfIndex))
2658 buf.EncodeUint16(uint16(m.Rd.Scope))
2659 return buf.Bytes(), nil
2661 func (m *GbpRouteDomainAdd) Unmarshal(b []byte) error {
2662 buf := codec.NewBuffer(b)
2663 m.Rd.RdID = buf.DecodeUint32()
2664 m.Rd.IP4TableID = buf.DecodeUint32()
2665 m.Rd.IP6TableID = buf.DecodeUint32()
2666 m.Rd.IP4UuSwIfIndex = InterfaceIndex(buf.DecodeUint32())
2667 m.Rd.IP6UuSwIfIndex = InterfaceIndex(buf.DecodeUint32())
2668 m.Rd.Scope = GbpScope(buf.DecodeUint16())
2672 // GbpRouteDomainAddReply defines message 'gbp_route_domain_add_reply'.
2673 type GbpRouteDomainAddReply struct {
2674 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2677 func (m *GbpRouteDomainAddReply) Reset() { *m = GbpRouteDomainAddReply{} }
2678 func (*GbpRouteDomainAddReply) GetMessageName() string { return "gbp_route_domain_add_reply" }
2679 func (*GbpRouteDomainAddReply) GetCrcString() string { return "e8d4e804" }
2680 func (*GbpRouteDomainAddReply) GetMessageType() api.MessageType {
2681 return api.ReplyMessage
2684 func (m *GbpRouteDomainAddReply) Size() (size int) {
2688 size += 4 // m.Retval
2691 func (m *GbpRouteDomainAddReply) Marshal(b []byte) ([]byte, error) {
2693 b = make([]byte, m.Size())
2695 buf := codec.NewBuffer(b)
2696 buf.EncodeInt32(m.Retval)
2697 return buf.Bytes(), nil
2699 func (m *GbpRouteDomainAddReply) Unmarshal(b []byte) error {
2700 buf := codec.NewBuffer(b)
2701 m.Retval = buf.DecodeInt32()
2705 // GbpRouteDomainDel defines message 'gbp_route_domain_del'.
2706 type GbpRouteDomainDel struct {
2707 RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
2710 func (m *GbpRouteDomainDel) Reset() { *m = GbpRouteDomainDel{} }
2711 func (*GbpRouteDomainDel) GetMessageName() string { return "gbp_route_domain_del" }
2712 func (*GbpRouteDomainDel) GetCrcString() string { return "bee4edcd" }
2713 func (*GbpRouteDomainDel) GetMessageType() api.MessageType {
2714 return api.RequestMessage
2717 func (m *GbpRouteDomainDel) Size() (size int) {
2724 func (m *GbpRouteDomainDel) Marshal(b []byte) ([]byte, error) {
2726 b = make([]byte, m.Size())
2728 buf := codec.NewBuffer(b)
2729 buf.EncodeUint32(m.RdID)
2730 return buf.Bytes(), nil
2732 func (m *GbpRouteDomainDel) Unmarshal(b []byte) error {
2733 buf := codec.NewBuffer(b)
2734 m.RdID = buf.DecodeUint32()
2738 // GbpRouteDomainDelReply defines message 'gbp_route_domain_del_reply'.
2739 type GbpRouteDomainDelReply struct {
2740 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2743 func (m *GbpRouteDomainDelReply) Reset() { *m = GbpRouteDomainDelReply{} }
2744 func (*GbpRouteDomainDelReply) GetMessageName() string { return "gbp_route_domain_del_reply" }
2745 func (*GbpRouteDomainDelReply) GetCrcString() string { return "e8d4e804" }
2746 func (*GbpRouteDomainDelReply) GetMessageType() api.MessageType {
2747 return api.ReplyMessage
2750 func (m *GbpRouteDomainDelReply) Size() (size int) {
2754 size += 4 // m.Retval
2757 func (m *GbpRouteDomainDelReply) Marshal(b []byte) ([]byte, error) {
2759 b = make([]byte, m.Size())
2761 buf := codec.NewBuffer(b)
2762 buf.EncodeInt32(m.Retval)
2763 return buf.Bytes(), nil
2765 func (m *GbpRouteDomainDelReply) Unmarshal(b []byte) error {
2766 buf := codec.NewBuffer(b)
2767 m.Retval = buf.DecodeInt32()
2771 // GbpRouteDomainDetails defines message 'gbp_route_domain_details'.
2772 type GbpRouteDomainDetails struct {
2773 Rd GbpRouteDomain `binapi:"gbp_route_domain,name=rd" json:"rd,omitempty"`
2776 func (m *GbpRouteDomainDetails) Reset() { *m = GbpRouteDomainDetails{} }
2777 func (*GbpRouteDomainDetails) GetMessageName() string { return "gbp_route_domain_details" }
2778 func (*GbpRouteDomainDetails) GetCrcString() string { return "8ab11375" }
2779 func (*GbpRouteDomainDetails) GetMessageType() api.MessageType {
2780 return api.ReplyMessage
2783 func (m *GbpRouteDomainDetails) Size() (size int) {
2787 size += 4 // m.Rd.RdID
2788 size += 4 // m.Rd.IP4TableID
2789 size += 4 // m.Rd.IP6TableID
2790 size += 4 // m.Rd.IP4UuSwIfIndex
2791 size += 4 // m.Rd.IP6UuSwIfIndex
2792 size += 2 // m.Rd.Scope
2795 func (m *GbpRouteDomainDetails) Marshal(b []byte) ([]byte, error) {
2797 b = make([]byte, m.Size())
2799 buf := codec.NewBuffer(b)
2800 buf.EncodeUint32(m.Rd.RdID)
2801 buf.EncodeUint32(m.Rd.IP4TableID)
2802 buf.EncodeUint32(m.Rd.IP6TableID)
2803 buf.EncodeUint32(uint32(m.Rd.IP4UuSwIfIndex))
2804 buf.EncodeUint32(uint32(m.Rd.IP6UuSwIfIndex))
2805 buf.EncodeUint16(uint16(m.Rd.Scope))
2806 return buf.Bytes(), nil
2808 func (m *GbpRouteDomainDetails) Unmarshal(b []byte) error {
2809 buf := codec.NewBuffer(b)
2810 m.Rd.RdID = buf.DecodeUint32()
2811 m.Rd.IP4TableID = buf.DecodeUint32()
2812 m.Rd.IP6TableID = buf.DecodeUint32()
2813 m.Rd.IP4UuSwIfIndex = InterfaceIndex(buf.DecodeUint32())
2814 m.Rd.IP6UuSwIfIndex = InterfaceIndex(buf.DecodeUint32())
2815 m.Rd.Scope = GbpScope(buf.DecodeUint16())
2819 // GbpRouteDomainDump defines message 'gbp_route_domain_dump'.
2820 type GbpRouteDomainDump struct{}
2822 func (m *GbpRouteDomainDump) Reset() { *m = GbpRouteDomainDump{} }
2823 func (*GbpRouteDomainDump) GetMessageName() string { return "gbp_route_domain_dump" }
2824 func (*GbpRouteDomainDump) GetCrcString() string { return "51077d14" }
2825 func (*GbpRouteDomainDump) GetMessageType() api.MessageType {
2826 return api.RequestMessage
2829 func (m *GbpRouteDomainDump) Size() (size int) {
2835 func (m *GbpRouteDomainDump) Marshal(b []byte) ([]byte, error) {
2837 b = make([]byte, m.Size())
2839 buf := codec.NewBuffer(b)
2840 return buf.Bytes(), nil
2842 func (m *GbpRouteDomainDump) Unmarshal(b []byte) error {
2846 // GbpRouteDomainDumpReply defines message 'gbp_route_domain_dump_reply'.
2847 type GbpRouteDomainDumpReply struct {
2848 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2851 func (m *GbpRouteDomainDumpReply) Reset() { *m = GbpRouteDomainDumpReply{} }
2852 func (*GbpRouteDomainDumpReply) GetMessageName() string { return "gbp_route_domain_dump_reply" }
2853 func (*GbpRouteDomainDumpReply) GetCrcString() string { return "e8d4e804" }
2854 func (*GbpRouteDomainDumpReply) GetMessageType() api.MessageType {
2855 return api.ReplyMessage
2858 func (m *GbpRouteDomainDumpReply) Size() (size int) {
2862 size += 4 // m.Retval
2865 func (m *GbpRouteDomainDumpReply) Marshal(b []byte) ([]byte, error) {
2867 b = make([]byte, m.Size())
2869 buf := codec.NewBuffer(b)
2870 buf.EncodeInt32(m.Retval)
2871 return buf.Bytes(), nil
2873 func (m *GbpRouteDomainDumpReply) Unmarshal(b []byte) error {
2874 buf := codec.NewBuffer(b)
2875 m.Retval = buf.DecodeInt32()
2879 // GbpSubnetAddDel defines message 'gbp_subnet_add_del'.
2880 type GbpSubnetAddDel struct {
2881 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
2882 Subnet GbpSubnet `binapi:"gbp_subnet,name=subnet" json:"subnet,omitempty"`
2885 func (m *GbpSubnetAddDel) Reset() { *m = GbpSubnetAddDel{} }
2886 func (*GbpSubnetAddDel) GetMessageName() string { return "gbp_subnet_add_del" }
2887 func (*GbpSubnetAddDel) GetCrcString() string { return "888aca35" }
2888 func (*GbpSubnetAddDel) GetMessageType() api.MessageType {
2889 return api.RequestMessage
2892 func (m *GbpSubnetAddDel) Size() (size int) {
2896 size += 1 // m.IsAdd
2897 size += 4 // m.Subnet.RdID
2898 size += 4 // m.Subnet.SwIfIndex
2899 size += 2 // m.Subnet.Sclass
2900 size += 4 // m.Subnet.Type
2901 size += 4 // m.Subnet.Prefix.Address.Af
2902 size += 1 * 16 // m.Subnet.Prefix.Address.Un
2903 size += 1 // m.Subnet.Prefix.Len
2906 func (m *GbpSubnetAddDel) Marshal(b []byte) ([]byte, error) {
2908 b = make([]byte, m.Size())
2910 buf := codec.NewBuffer(b)
2911 buf.EncodeBool(m.IsAdd)
2912 buf.EncodeUint32(m.Subnet.RdID)
2913 buf.EncodeUint32(uint32(m.Subnet.SwIfIndex))
2914 buf.EncodeUint16(m.Subnet.Sclass)
2915 buf.EncodeUint32(uint32(m.Subnet.Type))
2916 buf.EncodeUint32(uint32(m.Subnet.Prefix.Address.Af))
2917 buf.EncodeBytes(m.Subnet.Prefix.Address.Un.XXX_UnionData[:], 16)
2918 buf.EncodeUint8(m.Subnet.Prefix.Len)
2919 return buf.Bytes(), nil
2921 func (m *GbpSubnetAddDel) Unmarshal(b []byte) error {
2922 buf := codec.NewBuffer(b)
2923 m.IsAdd = buf.DecodeBool()
2924 m.Subnet.RdID = buf.DecodeUint32()
2925 m.Subnet.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2926 m.Subnet.Sclass = buf.DecodeUint16()
2927 m.Subnet.Type = GbpSubnetType(buf.DecodeUint32())
2928 m.Subnet.Prefix.Address.Af = AddressFamily(buf.DecodeUint32())
2929 copy(m.Subnet.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2930 m.Subnet.Prefix.Len = buf.DecodeUint8()
2934 // GbpSubnetAddDelReply defines message 'gbp_subnet_add_del_reply'.
2935 type GbpSubnetAddDelReply struct {
2936 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2939 func (m *GbpSubnetAddDelReply) Reset() { *m = GbpSubnetAddDelReply{} }
2940 func (*GbpSubnetAddDelReply) GetMessageName() string { return "gbp_subnet_add_del_reply" }
2941 func (*GbpSubnetAddDelReply) GetCrcString() string { return "e8d4e804" }
2942 func (*GbpSubnetAddDelReply) GetMessageType() api.MessageType {
2943 return api.ReplyMessage
2946 func (m *GbpSubnetAddDelReply) Size() (size int) {
2950 size += 4 // m.Retval
2953 func (m *GbpSubnetAddDelReply) Marshal(b []byte) ([]byte, error) {
2955 b = make([]byte, m.Size())
2957 buf := codec.NewBuffer(b)
2958 buf.EncodeInt32(m.Retval)
2959 return buf.Bytes(), nil
2961 func (m *GbpSubnetAddDelReply) Unmarshal(b []byte) error {
2962 buf := codec.NewBuffer(b)
2963 m.Retval = buf.DecodeInt32()
2967 // GbpSubnetDetails defines message 'gbp_subnet_details'.
2968 type GbpSubnetDetails struct {
2969 Subnet GbpSubnet `binapi:"gbp_subnet,name=subnet" json:"subnet,omitempty"`
2972 func (m *GbpSubnetDetails) Reset() { *m = GbpSubnetDetails{} }
2973 func (*GbpSubnetDetails) GetMessageName() string { return "gbp_subnet_details" }
2974 func (*GbpSubnetDetails) GetCrcString() string { return "4ed84156" }
2975 func (*GbpSubnetDetails) GetMessageType() api.MessageType {
2976 return api.ReplyMessage
2979 func (m *GbpSubnetDetails) Size() (size int) {
2983 size += 4 // m.Subnet.RdID
2984 size += 4 // m.Subnet.SwIfIndex
2985 size += 2 // m.Subnet.Sclass
2986 size += 4 // m.Subnet.Type
2987 size += 4 // m.Subnet.Prefix.Address.Af
2988 size += 1 * 16 // m.Subnet.Prefix.Address.Un
2989 size += 1 // m.Subnet.Prefix.Len
2992 func (m *GbpSubnetDetails) Marshal(b []byte) ([]byte, error) {
2994 b = make([]byte, m.Size())
2996 buf := codec.NewBuffer(b)
2997 buf.EncodeUint32(m.Subnet.RdID)
2998 buf.EncodeUint32(uint32(m.Subnet.SwIfIndex))
2999 buf.EncodeUint16(m.Subnet.Sclass)
3000 buf.EncodeUint32(uint32(m.Subnet.Type))
3001 buf.EncodeUint32(uint32(m.Subnet.Prefix.Address.Af))
3002 buf.EncodeBytes(m.Subnet.Prefix.Address.Un.XXX_UnionData[:], 16)
3003 buf.EncodeUint8(m.Subnet.Prefix.Len)
3004 return buf.Bytes(), nil
3006 func (m *GbpSubnetDetails) Unmarshal(b []byte) error {
3007 buf := codec.NewBuffer(b)
3008 m.Subnet.RdID = buf.DecodeUint32()
3009 m.Subnet.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
3010 m.Subnet.Sclass = buf.DecodeUint16()
3011 m.Subnet.Type = GbpSubnetType(buf.DecodeUint32())
3012 m.Subnet.Prefix.Address.Af = AddressFamily(buf.DecodeUint32())
3013 copy(m.Subnet.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
3014 m.Subnet.Prefix.Len = buf.DecodeUint8()
3018 // GbpSubnetDump defines message 'gbp_subnet_dump'.
3019 type GbpSubnetDump struct{}
3021 func (m *GbpSubnetDump) Reset() { *m = GbpSubnetDump{} }
3022 func (*GbpSubnetDump) GetMessageName() string { return "gbp_subnet_dump" }
3023 func (*GbpSubnetDump) GetCrcString() string { return "51077d14" }
3024 func (*GbpSubnetDump) GetMessageType() api.MessageType {
3025 return api.RequestMessage
3028 func (m *GbpSubnetDump) Size() (size int) {
3034 func (m *GbpSubnetDump) Marshal(b []byte) ([]byte, error) {
3036 b = make([]byte, m.Size())
3038 buf := codec.NewBuffer(b)
3039 return buf.Bytes(), nil
3041 func (m *GbpSubnetDump) Unmarshal(b []byte) error {
3045 // GbpVxlanTunnelAdd defines message 'gbp_vxlan_tunnel_add'.
3046 type GbpVxlanTunnelAdd struct {
3047 Tunnel GbpVxlanTunnel `binapi:"gbp_vxlan_tunnel,name=tunnel" json:"tunnel,omitempty"`
3050 func (m *GbpVxlanTunnelAdd) Reset() { *m = GbpVxlanTunnelAdd{} }
3051 func (*GbpVxlanTunnelAdd) GetMessageName() string { return "gbp_vxlan_tunnel_add" }
3052 func (*GbpVxlanTunnelAdd) GetCrcString() string { return "3e070b35" }
3053 func (*GbpVxlanTunnelAdd) GetMessageType() api.MessageType {
3054 return api.RequestMessage
3057 func (m *GbpVxlanTunnelAdd) Size() (size int) {
3061 size += 4 // m.Tunnel.Vni
3062 size += 4 // m.Tunnel.Mode
3063 size += 4 // m.Tunnel.BdRdID
3064 size += 1 * 4 // m.Tunnel.Src
3067 func (m *GbpVxlanTunnelAdd) Marshal(b []byte) ([]byte, error) {
3069 b = make([]byte, m.Size())
3071 buf := codec.NewBuffer(b)
3072 buf.EncodeUint32(m.Tunnel.Vni)
3073 buf.EncodeUint32(uint32(m.Tunnel.Mode))
3074 buf.EncodeUint32(m.Tunnel.BdRdID)
3075 buf.EncodeBytes(m.Tunnel.Src[:], 4)
3076 return buf.Bytes(), nil
3078 func (m *GbpVxlanTunnelAdd) Unmarshal(b []byte) error {
3079 buf := codec.NewBuffer(b)
3080 m.Tunnel.Vni = buf.DecodeUint32()
3081 m.Tunnel.Mode = GbpVxlanTunnelMode(buf.DecodeUint32())
3082 m.Tunnel.BdRdID = buf.DecodeUint32()
3083 copy(m.Tunnel.Src[:], buf.DecodeBytes(4))
3087 // GbpVxlanTunnelAddReply defines message 'gbp_vxlan_tunnel_add_reply'.
3088 type GbpVxlanTunnelAddReply struct {
3089 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3090 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
3093 func (m *GbpVxlanTunnelAddReply) Reset() { *m = GbpVxlanTunnelAddReply{} }
3094 func (*GbpVxlanTunnelAddReply) GetMessageName() string { return "gbp_vxlan_tunnel_add_reply" }
3095 func (*GbpVxlanTunnelAddReply) GetCrcString() string { return "5383d31f" }
3096 func (*GbpVxlanTunnelAddReply) GetMessageType() api.MessageType {
3097 return api.ReplyMessage
3100 func (m *GbpVxlanTunnelAddReply) Size() (size int) {
3104 size += 4 // m.Retval
3105 size += 4 // m.SwIfIndex
3108 func (m *GbpVxlanTunnelAddReply) Marshal(b []byte) ([]byte, error) {
3110 b = make([]byte, m.Size())
3112 buf := codec.NewBuffer(b)
3113 buf.EncodeInt32(m.Retval)
3114 buf.EncodeUint32(uint32(m.SwIfIndex))
3115 return buf.Bytes(), nil
3117 func (m *GbpVxlanTunnelAddReply) Unmarshal(b []byte) error {
3118 buf := codec.NewBuffer(b)
3119 m.Retval = buf.DecodeInt32()
3120 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
3124 // GbpVxlanTunnelDel defines message 'gbp_vxlan_tunnel_del'.
3125 type GbpVxlanTunnelDel struct {
3126 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
3129 func (m *GbpVxlanTunnelDel) Reset() { *m = GbpVxlanTunnelDel{} }
3130 func (*GbpVxlanTunnelDel) GetMessageName() string { return "gbp_vxlan_tunnel_del" }
3131 func (*GbpVxlanTunnelDel) GetCrcString() string { return "8d1f2fe9" }
3132 func (*GbpVxlanTunnelDel) GetMessageType() api.MessageType {
3133 return api.RequestMessage
3136 func (m *GbpVxlanTunnelDel) Size() (size int) {
3143 func (m *GbpVxlanTunnelDel) Marshal(b []byte) ([]byte, error) {
3145 b = make([]byte, m.Size())
3147 buf := codec.NewBuffer(b)
3148 buf.EncodeUint32(m.Vni)
3149 return buf.Bytes(), nil
3151 func (m *GbpVxlanTunnelDel) Unmarshal(b []byte) error {
3152 buf := codec.NewBuffer(b)
3153 m.Vni = buf.DecodeUint32()
3157 // GbpVxlanTunnelDelReply defines message 'gbp_vxlan_tunnel_del_reply'.
3158 type GbpVxlanTunnelDelReply struct {
3159 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3162 func (m *GbpVxlanTunnelDelReply) Reset() { *m = GbpVxlanTunnelDelReply{} }
3163 func (*GbpVxlanTunnelDelReply) GetMessageName() string { return "gbp_vxlan_tunnel_del_reply" }
3164 func (*GbpVxlanTunnelDelReply) GetCrcString() string { return "e8d4e804" }
3165 func (*GbpVxlanTunnelDelReply) GetMessageType() api.MessageType {
3166 return api.ReplyMessage
3169 func (m *GbpVxlanTunnelDelReply) Size() (size int) {
3173 size += 4 // m.Retval
3176 func (m *GbpVxlanTunnelDelReply) Marshal(b []byte) ([]byte, error) {
3178 b = make([]byte, m.Size())
3180 buf := codec.NewBuffer(b)
3181 buf.EncodeInt32(m.Retval)
3182 return buf.Bytes(), nil
3184 func (m *GbpVxlanTunnelDelReply) Unmarshal(b []byte) error {
3185 buf := codec.NewBuffer(b)
3186 m.Retval = buf.DecodeInt32()
3190 // GbpVxlanTunnelDetails defines message 'gbp_vxlan_tunnel_details'.
3191 type GbpVxlanTunnelDetails struct {
3192 Tunnel GbpVxlanTunnel `binapi:"gbp_vxlan_tunnel,name=tunnel" json:"tunnel,omitempty"`
3195 func (m *GbpVxlanTunnelDetails) Reset() { *m = GbpVxlanTunnelDetails{} }
3196 func (*GbpVxlanTunnelDetails) GetMessageName() string { return "gbp_vxlan_tunnel_details" }
3197 func (*GbpVxlanTunnelDetails) GetCrcString() string { return "65c6c818" }
3198 func (*GbpVxlanTunnelDetails) GetMessageType() api.MessageType {
3199 return api.ReplyMessage
3202 func (m *GbpVxlanTunnelDetails) Size() (size int) {
3206 size += 4 // m.Tunnel.Vni
3207 size += 4 // m.Tunnel.Mode
3208 size += 4 // m.Tunnel.BdRdID
3209 size += 1 * 4 // m.Tunnel.Src
3212 func (m *GbpVxlanTunnelDetails) Marshal(b []byte) ([]byte, error) {
3214 b = make([]byte, m.Size())
3216 buf := codec.NewBuffer(b)
3217 buf.EncodeUint32(m.Tunnel.Vni)
3218 buf.EncodeUint32(uint32(m.Tunnel.Mode))
3219 buf.EncodeUint32(m.Tunnel.BdRdID)
3220 buf.EncodeBytes(m.Tunnel.Src[:], 4)
3221 return buf.Bytes(), nil
3223 func (m *GbpVxlanTunnelDetails) Unmarshal(b []byte) error {
3224 buf := codec.NewBuffer(b)
3225 m.Tunnel.Vni = buf.DecodeUint32()
3226 m.Tunnel.Mode = GbpVxlanTunnelMode(buf.DecodeUint32())
3227 m.Tunnel.BdRdID = buf.DecodeUint32()
3228 copy(m.Tunnel.Src[:], buf.DecodeBytes(4))
3232 // GbpVxlanTunnelDump defines message 'gbp_vxlan_tunnel_dump'.
3233 type GbpVxlanTunnelDump struct{}
3235 func (m *GbpVxlanTunnelDump) Reset() { *m = GbpVxlanTunnelDump{} }
3236 func (*GbpVxlanTunnelDump) GetMessageName() string { return "gbp_vxlan_tunnel_dump" }
3237 func (*GbpVxlanTunnelDump) GetCrcString() string { return "51077d14" }
3238 func (*GbpVxlanTunnelDump) GetMessageType() api.MessageType {
3239 return api.RequestMessage
3242 func (m *GbpVxlanTunnelDump) Size() (size int) {
3248 func (m *GbpVxlanTunnelDump) Marshal(b []byte) ([]byte, error) {
3250 b = make([]byte, m.Size())
3252 buf := codec.NewBuffer(b)
3253 return buf.Bytes(), nil
3255 func (m *GbpVxlanTunnelDump) Unmarshal(b []byte) error {
3259 func init() { file_gbp_binapi_init() }
3260 func file_gbp_binapi_init() {
3261 api.RegisterMessage((*GbpBridgeDomainAdd)(nil), "gbp_bridge_domain_add_8454bfdf")
3262 api.RegisterMessage((*GbpBridgeDomainAddReply)(nil), "gbp_bridge_domain_add_reply_e8d4e804")
3263 api.RegisterMessage((*GbpBridgeDomainDel)(nil), "gbp_bridge_domain_del_c25fdce6")
3264 api.RegisterMessage((*GbpBridgeDomainDelReply)(nil), "gbp_bridge_domain_del_reply_e8d4e804")
3265 api.RegisterMessage((*GbpBridgeDomainDetails)(nil), "gbp_bridge_domain_details_2acd15f9")
3266 api.RegisterMessage((*GbpBridgeDomainDump)(nil), "gbp_bridge_domain_dump_51077d14")
3267 api.RegisterMessage((*GbpBridgeDomainDumpReply)(nil), "gbp_bridge_domain_dump_reply_e8d4e804")
3268 api.RegisterMessage((*GbpContractAddDel)(nil), "gbp_contract_add_del_553e275b")
3269 api.RegisterMessage((*GbpContractAddDelReply)(nil), "gbp_contract_add_del_reply_1992deab")
3270 api.RegisterMessage((*GbpContractDetails)(nil), "gbp_contract_details_2a18db6e")
3271 api.RegisterMessage((*GbpContractDump)(nil), "gbp_contract_dump_51077d14")
3272 api.RegisterMessage((*GbpEndpointAdd)(nil), "gbp_endpoint_add_9ce16d5a")
3273 api.RegisterMessage((*GbpEndpointAddReply)(nil), "gbp_endpoint_add_reply_1dd3ff3e")
3274 api.RegisterMessage((*GbpEndpointDel)(nil), "gbp_endpoint_del_b93cd566")
3275 api.RegisterMessage((*GbpEndpointDelReply)(nil), "gbp_endpoint_del_reply_e8d4e804")
3276 api.RegisterMessage((*GbpEndpointDetails)(nil), "gbp_endpoint_details_08aecb60")
3277 api.RegisterMessage((*GbpEndpointDump)(nil), "gbp_endpoint_dump_51077d14")
3278 api.RegisterMessage((*GbpEndpointGroupAdd)(nil), "gbp_endpoint_group_add_8e0f4054")
3279 api.RegisterMessage((*GbpEndpointGroupAddReply)(nil), "gbp_endpoint_group_add_reply_e8d4e804")
3280 api.RegisterMessage((*GbpEndpointGroupDel)(nil), "gbp_endpoint_group_del_3436b8b7")
3281 api.RegisterMessage((*GbpEndpointGroupDelReply)(nil), "gbp_endpoint_group_del_reply_e8d4e804")
3282 api.RegisterMessage((*GbpEndpointGroupDetails)(nil), "gbp_endpoint_group_details_8f38292c")
3283 api.RegisterMessage((*GbpEndpointGroupDump)(nil), "gbp_endpoint_group_dump_51077d14")
3284 api.RegisterMessage((*GbpExtItfAddDel)(nil), "gbp_ext_itf_add_del_12ed5700")
3285 api.RegisterMessage((*GbpExtItfAddDelReply)(nil), "gbp_ext_itf_add_del_reply_e8d4e804")
3286 api.RegisterMessage((*GbpExtItfDetails)(nil), "gbp_ext_itf_details_408a45c0")
3287 api.RegisterMessage((*GbpExtItfDump)(nil), "gbp_ext_itf_dump_51077d14")
3288 api.RegisterMessage((*GbpRecircAddDel)(nil), "gbp_recirc_add_del_718c69c3")
3289 api.RegisterMessage((*GbpRecircAddDelReply)(nil), "gbp_recirc_add_del_reply_e8d4e804")
3290 api.RegisterMessage((*GbpRecircDetails)(nil), "gbp_recirc_details_66ecc42e")
3291 api.RegisterMessage((*GbpRecircDump)(nil), "gbp_recirc_dump_51077d14")
3292 api.RegisterMessage((*GbpRouteDomainAdd)(nil), "gbp_route_domain_add_2d0afe38")
3293 api.RegisterMessage((*GbpRouteDomainAddReply)(nil), "gbp_route_domain_add_reply_e8d4e804")
3294 api.RegisterMessage((*GbpRouteDomainDel)(nil), "gbp_route_domain_del_bee4edcd")
3295 api.RegisterMessage((*GbpRouteDomainDelReply)(nil), "gbp_route_domain_del_reply_e8d4e804")
3296 api.RegisterMessage((*GbpRouteDomainDetails)(nil), "gbp_route_domain_details_8ab11375")
3297 api.RegisterMessage((*GbpRouteDomainDump)(nil), "gbp_route_domain_dump_51077d14")
3298 api.RegisterMessage((*GbpRouteDomainDumpReply)(nil), "gbp_route_domain_dump_reply_e8d4e804")
3299 api.RegisterMessage((*GbpSubnetAddDel)(nil), "gbp_subnet_add_del_888aca35")
3300 api.RegisterMessage((*GbpSubnetAddDelReply)(nil), "gbp_subnet_add_del_reply_e8d4e804")
3301 api.RegisterMessage((*GbpSubnetDetails)(nil), "gbp_subnet_details_4ed84156")
3302 api.RegisterMessage((*GbpSubnetDump)(nil), "gbp_subnet_dump_51077d14")
3303 api.RegisterMessage((*GbpVxlanTunnelAdd)(nil), "gbp_vxlan_tunnel_add_3e070b35")
3304 api.RegisterMessage((*GbpVxlanTunnelAddReply)(nil), "gbp_vxlan_tunnel_add_reply_5383d31f")
3305 api.RegisterMessage((*GbpVxlanTunnelDel)(nil), "gbp_vxlan_tunnel_del_8d1f2fe9")
3306 api.RegisterMessage((*GbpVxlanTunnelDelReply)(nil), "gbp_vxlan_tunnel_del_reply_e8d4e804")
3307 api.RegisterMessage((*GbpVxlanTunnelDetails)(nil), "gbp_vxlan_tunnel_details_65c6c818")
3308 api.RegisterMessage((*GbpVxlanTunnelDump)(nil), "gbp_vxlan_tunnel_dump_51077d14")
3311 // Messages returns list of all messages in this module.
3312 func AllMessages() []api.Message {
3313 return []api.Message{
3314 (*GbpBridgeDomainAdd)(nil),
3315 (*GbpBridgeDomainAddReply)(nil),
3316 (*GbpBridgeDomainDel)(nil),
3317 (*GbpBridgeDomainDelReply)(nil),
3318 (*GbpBridgeDomainDetails)(nil),
3319 (*GbpBridgeDomainDump)(nil),
3320 (*GbpBridgeDomainDumpReply)(nil),
3321 (*GbpContractAddDel)(nil),
3322 (*GbpContractAddDelReply)(nil),
3323 (*GbpContractDetails)(nil),
3324 (*GbpContractDump)(nil),
3325 (*GbpEndpointAdd)(nil),
3326 (*GbpEndpointAddReply)(nil),
3327 (*GbpEndpointDel)(nil),
3328 (*GbpEndpointDelReply)(nil),
3329 (*GbpEndpointDetails)(nil),
3330 (*GbpEndpointDump)(nil),
3331 (*GbpEndpointGroupAdd)(nil),
3332 (*GbpEndpointGroupAddReply)(nil),
3333 (*GbpEndpointGroupDel)(nil),
3334 (*GbpEndpointGroupDelReply)(nil),
3335 (*GbpEndpointGroupDetails)(nil),
3336 (*GbpEndpointGroupDump)(nil),
3337 (*GbpExtItfAddDel)(nil),
3338 (*GbpExtItfAddDelReply)(nil),
3339 (*GbpExtItfDetails)(nil),
3340 (*GbpExtItfDump)(nil),
3341 (*GbpRecircAddDel)(nil),
3342 (*GbpRecircAddDelReply)(nil),
3343 (*GbpRecircDetails)(nil),
3344 (*GbpRecircDump)(nil),
3345 (*GbpRouteDomainAdd)(nil),
3346 (*GbpRouteDomainAddReply)(nil),
3347 (*GbpRouteDomainDel)(nil),
3348 (*GbpRouteDomainDelReply)(nil),
3349 (*GbpRouteDomainDetails)(nil),
3350 (*GbpRouteDomainDump)(nil),
3351 (*GbpRouteDomainDumpReply)(nil),
3352 (*GbpSubnetAddDel)(nil),
3353 (*GbpSubnetAddDelReply)(nil),
3354 (*GbpSubnetDetails)(nil),
3355 (*GbpSubnetDump)(nil),
3356 (*GbpVxlanTunnelAdd)(nil),
3357 (*GbpVxlanTunnelAddReply)(nil),
3358 (*GbpVxlanTunnelDel)(nil),
3359 (*GbpVxlanTunnelDelReply)(nil),
3360 (*GbpVxlanTunnelDetails)(nil),
3361 (*GbpVxlanTunnelDump)(nil),