1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.0-dev
5 // source: .vppapi/plugins/gbp.api.json
7 // Package gbp contains generated bindings for API file gbp.api.
24 api "git.fd.io/govpp.git/api"
25 codec "git.fd.io/govpp.git/codec"
28 // This is a compile-time assertion to ensure that this generated file
29 // is compatible with the GoVPP api package it is being compiled against.
30 // A compilation error at this line likely means your copy of the
31 // GoVPP api package needs to be updated.
32 const _ = api.GoVppAPIPackageIsVersion2
37 VersionCrc = 0xa891d6ff
40 // AddressFamily defines enum 'address_family'.
41 type AddressFamily uint32
44 ADDRESS_IP4 AddressFamily = 0
45 ADDRESS_IP6 AddressFamily = 1
49 AddressFamily_name = map[uint32]string{
53 AddressFamily_value = map[string]uint32{
59 func (x AddressFamily) String() string {
60 s, ok := AddressFamily_name[uint32(x)]
64 return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
67 // GbpBridgeDomainFlags defines enum 'gbp_bridge_domain_flags'.
68 type GbpBridgeDomainFlags uint32
71 GBP_BD_API_FLAG_NONE GbpBridgeDomainFlags = 0
72 GBP_BD_API_FLAG_DO_NOT_LEARN GbpBridgeDomainFlags = 1
73 GBP_BD_API_FLAG_UU_FWD_DROP GbpBridgeDomainFlags = 2
74 GBP_BD_API_FLAG_MCAST_DROP GbpBridgeDomainFlags = 4
75 GBP_BD_API_FLAG_UCAST_ARP GbpBridgeDomainFlags = 8
79 GbpBridgeDomainFlags_name = map[uint32]string{
80 0: "GBP_BD_API_FLAG_NONE",
81 1: "GBP_BD_API_FLAG_DO_NOT_LEARN",
82 2: "GBP_BD_API_FLAG_UU_FWD_DROP",
83 4: "GBP_BD_API_FLAG_MCAST_DROP",
84 8: "GBP_BD_API_FLAG_UCAST_ARP",
86 GbpBridgeDomainFlags_value = map[string]uint32{
87 "GBP_BD_API_FLAG_NONE": 0,
88 "GBP_BD_API_FLAG_DO_NOT_LEARN": 1,
89 "GBP_BD_API_FLAG_UU_FWD_DROP": 2,
90 "GBP_BD_API_FLAG_MCAST_DROP": 4,
91 "GBP_BD_API_FLAG_UCAST_ARP": 8,
95 func (x GbpBridgeDomainFlags) String() string {
96 s, ok := GbpBridgeDomainFlags_name[uint32(x)]
100 str := func(n uint32) string {
101 s, ok := GbpBridgeDomainFlags_name[uint32(n)]
105 return "GbpBridgeDomainFlags(" + strconv.Itoa(int(n)) + ")"
107 for i := uint32(0); i <= 32; i++ {
117 return str(uint32(x))
122 // GbpEndpointFlags defines enum 'gbp_endpoint_flags'.
123 type GbpEndpointFlags uint32
126 GBP_API_ENDPOINT_FLAG_NONE GbpEndpointFlags = 0
127 GBP_API_ENDPOINT_FLAG_BOUNCE GbpEndpointFlags = 1
128 GBP_API_ENDPOINT_FLAG_REMOTE GbpEndpointFlags = 2
129 GBP_API_ENDPOINT_FLAG_LEARNT GbpEndpointFlags = 4
130 GBP_API_ENDPOINT_FLAG_EXTERNAL GbpEndpointFlags = 8
134 GbpEndpointFlags_name = map[uint32]string{
135 0: "GBP_API_ENDPOINT_FLAG_NONE",
136 1: "GBP_API_ENDPOINT_FLAG_BOUNCE",
137 2: "GBP_API_ENDPOINT_FLAG_REMOTE",
138 4: "GBP_API_ENDPOINT_FLAG_LEARNT",
139 8: "GBP_API_ENDPOINT_FLAG_EXTERNAL",
141 GbpEndpointFlags_value = map[string]uint32{
142 "GBP_API_ENDPOINT_FLAG_NONE": 0,
143 "GBP_API_ENDPOINT_FLAG_BOUNCE": 1,
144 "GBP_API_ENDPOINT_FLAG_REMOTE": 2,
145 "GBP_API_ENDPOINT_FLAG_LEARNT": 4,
146 "GBP_API_ENDPOINT_FLAG_EXTERNAL": 8,
150 func (x GbpEndpointFlags) String() string {
151 s, ok := GbpEndpointFlags_name[uint32(x)]
155 str := func(n uint32) string {
156 s, ok := GbpEndpointFlags_name[uint32(n)]
160 return "GbpEndpointFlags(" + strconv.Itoa(int(n)) + ")"
162 for i := uint32(0); i <= 32; i++ {
172 return str(uint32(x))
177 // GbpExtItfFlags defines enum 'gbp_ext_itf_flags'.
178 type GbpExtItfFlags uint32
181 GBP_API_EXT_ITF_F_NONE GbpExtItfFlags = 0
182 GBP_API_EXT_ITF_F_ANON GbpExtItfFlags = 1
186 GbpExtItfFlags_name = map[uint32]string{
187 0: "GBP_API_EXT_ITF_F_NONE",
188 1: "GBP_API_EXT_ITF_F_ANON",
190 GbpExtItfFlags_value = map[string]uint32{
191 "GBP_API_EXT_ITF_F_NONE": 0,
192 "GBP_API_EXT_ITF_F_ANON": 1,
196 func (x GbpExtItfFlags) String() string {
197 s, ok := GbpExtItfFlags_name[uint32(x)]
201 str := func(n uint32) string {
202 s, ok := GbpExtItfFlags_name[uint32(n)]
206 return "GbpExtItfFlags(" + strconv.Itoa(int(n)) + ")"
208 for i := uint32(0); i <= 32; i++ {
218 return str(uint32(x))
223 // GbpHashMode defines enum 'gbp_hash_mode'.
224 type GbpHashMode uint32
227 GBP_API_HASH_MODE_SRC_IP GbpHashMode = 1
228 GBP_API_HASH_MODE_DST_IP GbpHashMode = 2
229 GBP_API_HASH_MODE_SYMMETRIC GbpHashMode = 3
233 GbpHashMode_name = map[uint32]string{
234 1: "GBP_API_HASH_MODE_SRC_IP",
235 2: "GBP_API_HASH_MODE_DST_IP",
236 3: "GBP_API_HASH_MODE_SYMMETRIC",
238 GbpHashMode_value = map[string]uint32{
239 "GBP_API_HASH_MODE_SRC_IP": 1,
240 "GBP_API_HASH_MODE_DST_IP": 2,
241 "GBP_API_HASH_MODE_SYMMETRIC": 3,
245 func (x GbpHashMode) String() string {
246 s, ok := GbpHashMode_name[uint32(x)]
250 return "GbpHashMode(" + strconv.Itoa(int(x)) + ")"
253 // GbpRuleAction defines enum 'gbp_rule_action'.
254 type GbpRuleAction uint32
257 GBP_API_RULE_PERMIT GbpRuleAction = 1
258 GBP_API_RULE_DENY GbpRuleAction = 2
259 GBP_API_RULE_REDIRECT GbpRuleAction = 3
263 GbpRuleAction_name = map[uint32]string{
264 1: "GBP_API_RULE_PERMIT",
265 2: "GBP_API_RULE_DENY",
266 3: "GBP_API_RULE_REDIRECT",
268 GbpRuleAction_value = map[string]uint32{
269 "GBP_API_RULE_PERMIT": 1,
270 "GBP_API_RULE_DENY": 2,
271 "GBP_API_RULE_REDIRECT": 3,
275 func (x GbpRuleAction) String() string {
276 s, ok := GbpRuleAction_name[uint32(x)]
280 return "GbpRuleAction(" + strconv.Itoa(int(x)) + ")"
283 // GbpSubnetType defines enum 'gbp_subnet_type'.
284 type GbpSubnetType uint32
287 GBP_API_SUBNET_TRANSPORT GbpSubnetType = 1
288 GBP_API_SUBNET_STITCHED_INTERNAL GbpSubnetType = 2
289 GBP_API_SUBNET_STITCHED_EXTERNAL GbpSubnetType = 3
290 GBP_API_SUBNET_L3_OUT GbpSubnetType = 4
291 GBP_API_SUBNET_ANON_L3_OUT GbpSubnetType = 5
295 GbpSubnetType_name = map[uint32]string{
296 1: "GBP_API_SUBNET_TRANSPORT",
297 2: "GBP_API_SUBNET_STITCHED_INTERNAL",
298 3: "GBP_API_SUBNET_STITCHED_EXTERNAL",
299 4: "GBP_API_SUBNET_L3_OUT",
300 5: "GBP_API_SUBNET_ANON_L3_OUT",
302 GbpSubnetType_value = map[string]uint32{
303 "GBP_API_SUBNET_TRANSPORT": 1,
304 "GBP_API_SUBNET_STITCHED_INTERNAL": 2,
305 "GBP_API_SUBNET_STITCHED_EXTERNAL": 3,
306 "GBP_API_SUBNET_L3_OUT": 4,
307 "GBP_API_SUBNET_ANON_L3_OUT": 5,
311 func (x GbpSubnetType) String() string {
312 s, ok := GbpSubnetType_name[uint32(x)]
316 return "GbpSubnetType(" + strconv.Itoa(int(x)) + ")"
319 // GbpVxlanTunnelMode defines enum 'gbp_vxlan_tunnel_mode'.
320 type GbpVxlanTunnelMode uint32
323 GBP_VXLAN_TUNNEL_MODE_L2 GbpVxlanTunnelMode = 1
324 GBP_VXLAN_TUNNEL_MODE_L3 GbpVxlanTunnelMode = 2
328 GbpVxlanTunnelMode_name = map[uint32]string{
329 1: "GBP_VXLAN_TUNNEL_MODE_L2",
330 2: "GBP_VXLAN_TUNNEL_MODE_L3",
332 GbpVxlanTunnelMode_value = map[string]uint32{
333 "GBP_VXLAN_TUNNEL_MODE_L2": 1,
334 "GBP_VXLAN_TUNNEL_MODE_L3": 2,
338 func (x GbpVxlanTunnelMode) String() string {
339 s, ok := GbpVxlanTunnelMode_name[uint32(x)]
343 return "GbpVxlanTunnelMode(" + strconv.Itoa(int(x)) + ")"
346 // IfStatusFlags defines enum 'if_status_flags'.
347 type IfStatusFlags uint32
350 IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
351 IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
355 IfStatusFlags_name = map[uint32]string{
356 1: "IF_STATUS_API_FLAG_ADMIN_UP",
357 2: "IF_STATUS_API_FLAG_LINK_UP",
359 IfStatusFlags_value = map[string]uint32{
360 "IF_STATUS_API_FLAG_ADMIN_UP": 1,
361 "IF_STATUS_API_FLAG_LINK_UP": 2,
365 func (x IfStatusFlags) String() string {
366 s, ok := IfStatusFlags_name[uint32(x)]
370 str := func(n uint32) string {
371 s, ok := IfStatusFlags_name[uint32(n)]
375 return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
377 for i := uint32(0); i <= 32; i++ {
387 return str(uint32(x))
392 // IfType defines enum 'if_type'.
396 IF_API_TYPE_HARDWARE IfType = 1
397 IF_API_TYPE_SUB IfType = 2
398 IF_API_TYPE_P2P IfType = 3
399 IF_API_TYPE_PIPE IfType = 4
403 IfType_name = map[uint32]string{
404 1: "IF_API_TYPE_HARDWARE",
405 2: "IF_API_TYPE_SUB",
406 3: "IF_API_TYPE_P2P",
407 4: "IF_API_TYPE_PIPE",
409 IfType_value = map[string]uint32{
410 "IF_API_TYPE_HARDWARE": 1,
411 "IF_API_TYPE_SUB": 2,
412 "IF_API_TYPE_P2P": 3,
413 "IF_API_TYPE_PIPE": 4,
417 func (x IfType) String() string {
418 s, ok := IfType_name[uint32(x)]
422 return "IfType(" + strconv.Itoa(int(x)) + ")"
425 // IPDscp defines enum 'ip_dscp'.
429 IP_API_DSCP_CS0 IPDscp = 0
430 IP_API_DSCP_CS1 IPDscp = 8
431 IP_API_DSCP_AF11 IPDscp = 10
432 IP_API_DSCP_AF12 IPDscp = 12
433 IP_API_DSCP_AF13 IPDscp = 14
434 IP_API_DSCP_CS2 IPDscp = 16
435 IP_API_DSCP_AF21 IPDscp = 18
436 IP_API_DSCP_AF22 IPDscp = 20
437 IP_API_DSCP_AF23 IPDscp = 22
438 IP_API_DSCP_CS3 IPDscp = 24
439 IP_API_DSCP_AF31 IPDscp = 26
440 IP_API_DSCP_AF32 IPDscp = 28
441 IP_API_DSCP_AF33 IPDscp = 30
442 IP_API_DSCP_CS4 IPDscp = 32
443 IP_API_DSCP_AF41 IPDscp = 34
444 IP_API_DSCP_AF42 IPDscp = 36
445 IP_API_DSCP_AF43 IPDscp = 38
446 IP_API_DSCP_CS5 IPDscp = 40
447 IP_API_DSCP_EF IPDscp = 46
448 IP_API_DSCP_CS6 IPDscp = 48
449 IP_API_DSCP_CS7 IPDscp = 50
453 IPDscp_name = map[uint8]string{
454 0: "IP_API_DSCP_CS0",
455 8: "IP_API_DSCP_CS1",
456 10: "IP_API_DSCP_AF11",
457 12: "IP_API_DSCP_AF12",
458 14: "IP_API_DSCP_AF13",
459 16: "IP_API_DSCP_CS2",
460 18: "IP_API_DSCP_AF21",
461 20: "IP_API_DSCP_AF22",
462 22: "IP_API_DSCP_AF23",
463 24: "IP_API_DSCP_CS3",
464 26: "IP_API_DSCP_AF31",
465 28: "IP_API_DSCP_AF32",
466 30: "IP_API_DSCP_AF33",
467 32: "IP_API_DSCP_CS4",
468 34: "IP_API_DSCP_AF41",
469 36: "IP_API_DSCP_AF42",
470 38: "IP_API_DSCP_AF43",
471 40: "IP_API_DSCP_CS5",
472 46: "IP_API_DSCP_EF",
473 48: "IP_API_DSCP_CS6",
474 50: "IP_API_DSCP_CS7",
476 IPDscp_value = map[string]uint8{
477 "IP_API_DSCP_CS0": 0,
478 "IP_API_DSCP_CS1": 8,
479 "IP_API_DSCP_AF11": 10,
480 "IP_API_DSCP_AF12": 12,
481 "IP_API_DSCP_AF13": 14,
482 "IP_API_DSCP_CS2": 16,
483 "IP_API_DSCP_AF21": 18,
484 "IP_API_DSCP_AF22": 20,
485 "IP_API_DSCP_AF23": 22,
486 "IP_API_DSCP_CS3": 24,
487 "IP_API_DSCP_AF31": 26,
488 "IP_API_DSCP_AF32": 28,
489 "IP_API_DSCP_AF33": 30,
490 "IP_API_DSCP_CS4": 32,
491 "IP_API_DSCP_AF41": 34,
492 "IP_API_DSCP_AF42": 36,
493 "IP_API_DSCP_AF43": 38,
494 "IP_API_DSCP_CS5": 40,
495 "IP_API_DSCP_EF": 46,
496 "IP_API_DSCP_CS6": 48,
497 "IP_API_DSCP_CS7": 50,
501 func (x IPDscp) String() string {
502 s, ok := IPDscp_name[uint8(x)]
506 return "IPDscp(" + strconv.Itoa(int(x)) + ")"
509 // IPEcn defines enum 'ip_ecn'.
513 IP_API_ECN_NONE IPEcn = 0
514 IP_API_ECN_ECT0 IPEcn = 1
515 IP_API_ECN_ECT1 IPEcn = 2
516 IP_API_ECN_CE IPEcn = 3
520 IPEcn_name = map[uint8]string{
521 0: "IP_API_ECN_NONE",
522 1: "IP_API_ECN_ECT0",
523 2: "IP_API_ECN_ECT1",
526 IPEcn_value = map[string]uint8{
527 "IP_API_ECN_NONE": 0,
528 "IP_API_ECN_ECT0": 1,
529 "IP_API_ECN_ECT1": 2,
534 func (x IPEcn) String() string {
535 s, ok := IPEcn_name[uint8(x)]
539 return "IPEcn(" + strconv.Itoa(int(x)) + ")"
542 // IPProto defines enum 'ip_proto'.
546 IP_API_PROTO_HOPOPT IPProto = 0
547 IP_API_PROTO_ICMP IPProto = 1
548 IP_API_PROTO_IGMP IPProto = 2
549 IP_API_PROTO_TCP IPProto = 6
550 IP_API_PROTO_UDP IPProto = 17
551 IP_API_PROTO_GRE IPProto = 47
552 IP_API_PROTO_AH IPProto = 50
553 IP_API_PROTO_ESP IPProto = 51
554 IP_API_PROTO_EIGRP IPProto = 88
555 IP_API_PROTO_OSPF IPProto = 89
556 IP_API_PROTO_SCTP IPProto = 132
557 IP_API_PROTO_RESERVED IPProto = 255
561 IPProto_name = map[uint32]string{
562 0: "IP_API_PROTO_HOPOPT",
563 1: "IP_API_PROTO_ICMP",
564 2: "IP_API_PROTO_IGMP",
565 6: "IP_API_PROTO_TCP",
566 17: "IP_API_PROTO_UDP",
567 47: "IP_API_PROTO_GRE",
568 50: "IP_API_PROTO_AH",
569 51: "IP_API_PROTO_ESP",
570 88: "IP_API_PROTO_EIGRP",
571 89: "IP_API_PROTO_OSPF",
572 132: "IP_API_PROTO_SCTP",
573 255: "IP_API_PROTO_RESERVED",
575 IPProto_value = map[string]uint32{
576 "IP_API_PROTO_HOPOPT": 0,
577 "IP_API_PROTO_ICMP": 1,
578 "IP_API_PROTO_IGMP": 2,
579 "IP_API_PROTO_TCP": 6,
580 "IP_API_PROTO_UDP": 17,
581 "IP_API_PROTO_GRE": 47,
582 "IP_API_PROTO_AH": 50,
583 "IP_API_PROTO_ESP": 51,
584 "IP_API_PROTO_EIGRP": 88,
585 "IP_API_PROTO_OSPF": 89,
586 "IP_API_PROTO_SCTP": 132,
587 "IP_API_PROTO_RESERVED": 255,
591 func (x IPProto) String() string {
592 s, ok := IPProto_name[uint32(x)]
596 return "IPProto(" + strconv.Itoa(int(x)) + ")"
599 // LinkDuplex defines enum 'link_duplex'.
600 type LinkDuplex uint32
603 LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
604 LINK_DUPLEX_API_HALF LinkDuplex = 1
605 LINK_DUPLEX_API_FULL LinkDuplex = 2
609 LinkDuplex_name = map[uint32]string{
610 0: "LINK_DUPLEX_API_UNKNOWN",
611 1: "LINK_DUPLEX_API_HALF",
612 2: "LINK_DUPLEX_API_FULL",
614 LinkDuplex_value = map[string]uint32{
615 "LINK_DUPLEX_API_UNKNOWN": 0,
616 "LINK_DUPLEX_API_HALF": 1,
617 "LINK_DUPLEX_API_FULL": 2,
621 func (x LinkDuplex) String() string {
622 s, ok := LinkDuplex_name[uint32(x)]
626 return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
629 // MtuProto defines enum 'mtu_proto'.
633 MTU_PROTO_API_L3 MtuProto = 1
634 MTU_PROTO_API_IP4 MtuProto = 2
635 MTU_PROTO_API_IP6 MtuProto = 3
636 MTU_PROTO_API_MPLS MtuProto = 4
637 MTU_PROTO_API_N MtuProto = 5
641 MtuProto_name = map[uint32]string{
642 1: "MTU_PROTO_API_L3",
643 2: "MTU_PROTO_API_IP4",
644 3: "MTU_PROTO_API_IP6",
645 4: "MTU_PROTO_API_MPLS",
646 5: "MTU_PROTO_API_N",
648 MtuProto_value = map[string]uint32{
649 "MTU_PROTO_API_L3": 1,
650 "MTU_PROTO_API_IP4": 2,
651 "MTU_PROTO_API_IP6": 3,
652 "MTU_PROTO_API_MPLS": 4,
653 "MTU_PROTO_API_N": 5,
657 func (x MtuProto) String() string {
658 s, ok := MtuProto_name[uint32(x)]
662 return "MtuProto(" + strconv.Itoa(int(x)) + ")"
665 // RxMode defines enum 'rx_mode'.
669 RX_MODE_API_UNKNOWN RxMode = 0
670 RX_MODE_API_POLLING RxMode = 1
671 RX_MODE_API_INTERRUPT RxMode = 2
672 RX_MODE_API_ADAPTIVE RxMode = 3
673 RX_MODE_API_DEFAULT RxMode = 4
677 RxMode_name = map[uint32]string{
678 0: "RX_MODE_API_UNKNOWN",
679 1: "RX_MODE_API_POLLING",
680 2: "RX_MODE_API_INTERRUPT",
681 3: "RX_MODE_API_ADAPTIVE",
682 4: "RX_MODE_API_DEFAULT",
684 RxMode_value = map[string]uint32{
685 "RX_MODE_API_UNKNOWN": 0,
686 "RX_MODE_API_POLLING": 1,
687 "RX_MODE_API_INTERRUPT": 2,
688 "RX_MODE_API_ADAPTIVE": 3,
689 "RX_MODE_API_DEFAULT": 4,
693 func (x RxMode) String() string {
694 s, ok := RxMode_name[uint32(x)]
698 return "RxMode(" + strconv.Itoa(int(x)) + ")"
701 // SubIfFlags defines enum 'sub_if_flags'.
702 type SubIfFlags uint32
705 SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
706 SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
707 SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
708 SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
709 SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
710 SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
711 SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
712 SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
713 SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
714 SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
718 SubIfFlags_name = map[uint32]string{
719 1: "SUB_IF_API_FLAG_NO_TAGS",
720 2: "SUB_IF_API_FLAG_ONE_TAG",
721 4: "SUB_IF_API_FLAG_TWO_TAGS",
722 8: "SUB_IF_API_FLAG_DOT1AD",
723 16: "SUB_IF_API_FLAG_EXACT_MATCH",
724 32: "SUB_IF_API_FLAG_DEFAULT",
725 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
726 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
727 254: "SUB_IF_API_FLAG_MASK_VNET",
728 256: "SUB_IF_API_FLAG_DOT1AH",
730 SubIfFlags_value = map[string]uint32{
731 "SUB_IF_API_FLAG_NO_TAGS": 1,
732 "SUB_IF_API_FLAG_ONE_TAG": 2,
733 "SUB_IF_API_FLAG_TWO_TAGS": 4,
734 "SUB_IF_API_FLAG_DOT1AD": 8,
735 "SUB_IF_API_FLAG_EXACT_MATCH": 16,
736 "SUB_IF_API_FLAG_DEFAULT": 32,
737 "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
738 "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
739 "SUB_IF_API_FLAG_MASK_VNET": 254,
740 "SUB_IF_API_FLAG_DOT1AH": 256,
744 func (x SubIfFlags) String() string {
745 s, ok := SubIfFlags_name[uint32(x)]
749 str := func(n uint32) string {
750 s, ok := SubIfFlags_name[uint32(n)]
754 return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
756 for i := uint32(0); i <= 32; i++ {
766 return str(uint32(x))
771 // AddressWithPrefix defines alias 'address_with_prefix'.
772 type AddressWithPrefix Prefix
774 func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
775 prefix, err := ParsePrefix(s)
777 return AddressWithPrefix{}, err
779 return AddressWithPrefix(prefix), nil
782 func (x AddressWithPrefix) String() string {
783 return Prefix(x).String()
786 func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
787 return []byte(x.String()), nil
790 func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
791 prefix, err := ParseAddressWithPrefix(string(text))
799 // GbpScope defines alias 'gbp_scope'.
802 // InterfaceIndex defines alias 'interface_index'.
803 type InterfaceIndex uint32
805 // IP4Address defines alias 'ip4_address'.
806 type IP4Address [4]uint8
808 func ParseIP4Address(s string) (IP4Address, error) {
809 ip := net.ParseIP(s).To4()
811 return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
813 var ipaddr IP4Address
814 copy(ipaddr[:], ip.To4())
818 func (x IP4Address) ToIP() net.IP {
819 return net.IP(x[:]).To4()
822 func (x IP4Address) String() string {
823 return x.ToIP().String()
826 func (x *IP4Address) MarshalText() ([]byte, error) {
827 return []byte(x.String()), nil
830 func (x *IP4Address) UnmarshalText(text []byte) error {
831 ipaddr, err := ParseIP4Address(string(text))
839 // IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
840 type IP4AddressWithPrefix IP4Prefix
842 // IP6Address defines alias 'ip6_address'.
843 type IP6Address [16]uint8
845 func ParseIP6Address(s string) (IP6Address, error) {
846 ip := net.ParseIP(s).To16()
848 return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
850 var ipaddr IP6Address
851 copy(ipaddr[:], ip.To16())
855 func (x IP6Address) ToIP() net.IP {
856 return net.IP(x[:]).To16()
859 func (x IP6Address) String() string {
860 return x.ToIP().String()
863 func (x *IP6Address) MarshalText() ([]byte, error) {
864 return []byte(x.String()), nil
867 func (x *IP6Address) UnmarshalText(text []byte) error {
868 ipaddr, err := ParseIP6Address(string(text))
876 // IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
877 type IP6AddressWithPrefix IP6Prefix
879 // MacAddress defines alias 'mac_address'.
880 type MacAddress [6]uint8
882 func ParseMacAddress(s string) (MacAddress, error) {
883 var macaddr MacAddress
884 mac, err := net.ParseMAC(s)
888 copy(macaddr[:], mac[:])
892 func (x MacAddress) ToMAC() net.HardwareAddr {
893 return net.HardwareAddr(x[:])
896 func (x MacAddress) String() string {
897 return x.ToMAC().String()
900 func (x *MacAddress) MarshalText() ([]byte, error) {
901 return []byte(x.String()), nil
904 func (x *MacAddress) UnmarshalText(text []byte) error {
905 mac, err := ParseMacAddress(string(text))
913 // Address defines type 'address'.
914 type Address struct {
915 Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
916 Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
919 func ParseAddress(s string) (Address, error) {
922 return Address{}, fmt.Errorf("invalid address: %s", s)
924 return AddressFromIP(ip), nil
927 func AddressFromIP(ip net.IP) Address {
930 addr.Af = ADDRESS_IP6
932 copy(ip6[:], ip.To16())
935 addr.Af = ADDRESS_IP4
937 copy(ip4[:], ip.To4())
943 func (x Address) ToIP() net.IP {
944 if x.Af == ADDRESS_IP6 {
946 return net.IP(ip6[:]).To16()
949 return net.IP(ip4[:]).To4()
953 func (x Address) String() string {
954 return x.ToIP().String()
957 func (x *Address) MarshalText() ([]byte, error) {
958 return []byte(x.String()), nil
961 func (x *Address) UnmarshalText(text []byte) error {
962 addr, err := ParseAddress(string(text))
970 // GbpBridgeDomain defines type 'gbp_bridge_domain'.
971 type GbpBridgeDomain struct {
972 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
973 RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
974 Flags GbpBridgeDomainFlags `binapi:"gbp_bridge_domain_flags,name=flags" json:"flags,omitempty"`
975 BviSwIfIndex InterfaceIndex `binapi:"interface_index,name=bvi_sw_if_index" json:"bvi_sw_if_index,omitempty"`
976 UuFwdSwIfIndex InterfaceIndex `binapi:"interface_index,name=uu_fwd_sw_if_index" json:"uu_fwd_sw_if_index,omitempty"`
977 BmFloodSwIfIndex InterfaceIndex `binapi:"interface_index,name=bm_flood_sw_if_index" json:"bm_flood_sw_if_index,omitempty"`
980 // GbpContract defines type 'gbp_contract'.
981 type GbpContract struct {
982 Scope GbpScope `binapi:"gbp_scope,name=scope" json:"scope,omitempty"`
983 Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
984 Dclass uint16 `binapi:"u16,name=dclass" json:"dclass,omitempty"`
985 ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
986 NEtherTypes uint8 `binapi:"u8,name=n_ether_types" json:"n_ether_types,omitempty"`
987 AllowedEthertypes []uint16 `binapi:"u16[16],name=allowed_ethertypes" json:"allowed_ethertypes,omitempty"`
988 NRules uint8 `binapi:"u8,name=n_rules" json:"-"`
989 Rules []GbpRule `binapi:"gbp_rule[n_rules],name=rules" json:"rules,omitempty"`
992 // GbpEndpoint defines type 'gbp_endpoint'.
993 type GbpEndpoint struct {
994 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
995 Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
996 Flags GbpEndpointFlags `binapi:"gbp_endpoint_flags,name=flags" json:"flags,omitempty"`
997 Mac MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"`
998 Tun GbpEndpointTun `binapi:"gbp_endpoint_tun,name=tun" json:"tun,omitempty"`
999 NIps uint8 `binapi:"u8,name=n_ips" json:"-"`
1000 Ips []Address `binapi:"address[n_ips],name=ips" json:"ips,omitempty"`
1003 // GbpEndpointGroup defines type 'gbp_endpoint_group'.
1004 type GbpEndpointGroup struct {
1005 Vnid uint32 `binapi:"u32,name=vnid" json:"vnid,omitempty"`
1006 Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
1007 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
1008 RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
1009 UplinkSwIfIndex InterfaceIndex `binapi:"interface_index,name=uplink_sw_if_index" json:"uplink_sw_if_index,omitempty"`
1010 Retention GbpEndpointRetention `binapi:"gbp_endpoint_retention,name=retention" json:"retention,omitempty"`
1013 // GbpEndpointRetention defines type 'gbp_endpoint_retention'.
1014 type GbpEndpointRetention struct {
1015 RemoteEpTimeout uint32 `binapi:"u32,name=remote_ep_timeout" json:"remote_ep_timeout,omitempty"`
1018 // GbpEndpointTun defines type 'gbp_endpoint_tun'.
1019 type GbpEndpointTun struct {
1020 Src Address `binapi:"address,name=src" json:"src,omitempty"`
1021 Dst Address `binapi:"address,name=dst" json:"dst,omitempty"`
1024 // GbpExtItf defines type 'gbp_ext_itf'.
1025 type GbpExtItf struct {
1026 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1027 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
1028 RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
1029 Flags GbpExtItfFlags `binapi:"gbp_ext_itf_flags,name=flags" json:"flags,omitempty"`
1032 // GbpNextHop defines type 'gbp_next_hop'.
1033 type GbpNextHop struct {
1034 IP Address `binapi:"address,name=ip" json:"ip,omitempty"`
1035 Mac MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"`
1036 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
1037 RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
1040 // GbpNextHopSet defines type 'gbp_next_hop_set'.
1041 type GbpNextHopSet struct {
1042 HashMode GbpHashMode `binapi:"gbp_hash_mode,name=hash_mode" json:"hash_mode,omitempty"`
1043 NNhs uint8 `binapi:"u8,name=n_nhs" json:"n_nhs,omitempty"`
1044 Nhs [8]GbpNextHop `binapi:"gbp_next_hop[8],name=nhs" json:"nhs,omitempty"`
1047 // GbpRecirc defines type 'gbp_recirc'.
1048 type GbpRecirc struct {
1049 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1050 Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
1051 IsExt bool `binapi:"bool,name=is_ext" json:"is_ext,omitempty"`
1054 // GbpRouteDomain defines type 'gbp_route_domain'.
1055 type GbpRouteDomain struct {
1056 RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
1057 IP4TableID uint32 `binapi:"u32,name=ip4_table_id" json:"ip4_table_id,omitempty"`
1058 IP6TableID uint32 `binapi:"u32,name=ip6_table_id" json:"ip6_table_id,omitempty"`
1059 IP4UuSwIfIndex InterfaceIndex `binapi:"interface_index,name=ip4_uu_sw_if_index" json:"ip4_uu_sw_if_index,omitempty"`
1060 IP6UuSwIfIndex InterfaceIndex `binapi:"interface_index,name=ip6_uu_sw_if_index" json:"ip6_uu_sw_if_index,omitempty"`
1061 Scope GbpScope `binapi:"gbp_scope,name=scope" json:"scope,omitempty"`
1064 // GbpRule defines type 'gbp_rule'.
1065 type GbpRule struct {
1066 Action GbpRuleAction `binapi:"gbp_rule_action,name=action" json:"action,omitempty"`
1067 NhSet GbpNextHopSet `binapi:"gbp_next_hop_set,name=nh_set" json:"nh_set,omitempty"`
1070 // GbpSubnet defines type 'gbp_subnet'.
1071 type GbpSubnet struct {
1072 RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
1073 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1074 Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
1075 Type GbpSubnetType `binapi:"gbp_subnet_type,name=type" json:"type,omitempty"`
1076 Prefix Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
1079 // GbpVxlanTunnel defines type 'gbp_vxlan_tunnel'.
1080 type GbpVxlanTunnel struct {
1081 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
1082 Mode GbpVxlanTunnelMode `binapi:"gbp_vxlan_tunnel_mode,name=mode" json:"mode,omitempty"`
1083 BdRdID uint32 `binapi:"u32,name=bd_rd_id" json:"bd_rd_id,omitempty"`
1084 Src IP4Address `binapi:"ip4_address,name=src" json:"src,omitempty"`
1087 // IP4Prefix defines type 'ip4_prefix'.
1088 type IP4Prefix struct {
1089 Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
1090 Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
1093 func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
1094 hasPrefix := strings.Contains(s, "/")
1096 ip, network, err := net.ParseCIDR(s)
1098 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
1100 maskSize, _ := network.Mask.Size()
1101 prefix.Len = byte(maskSize)
1102 prefix.Address, err = ParseIP4Address(ip.String())
1104 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
1107 ip := net.ParseIP(s)
1108 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
1109 if ip.To4() == nil {
1110 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
1112 prefix.Len = byte(defaultMaskSize)
1113 prefix.Address, err = ParseIP4Address(ip.String())
1115 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
1121 func (x IP4Prefix) ToIPNet() *net.IPNet {
1122 mask := net.CIDRMask(int(x.Len), 32)
1123 ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
1127 func (x IP4Prefix) String() string {
1128 ip := x.Address.String()
1129 return ip + "/" + strconv.Itoa(int(x.Len))
1132 func (x *IP4Prefix) MarshalText() ([]byte, error) {
1133 return []byte(x.String()), nil
1136 func (x *IP4Prefix) UnmarshalText(text []byte) error {
1137 prefix, err := ParseIP4Prefix(string(text))
1145 // IP6Prefix defines type 'ip6_prefix'.
1146 type IP6Prefix struct {
1147 Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
1148 Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
1151 func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
1152 hasPrefix := strings.Contains(s, "/")
1154 ip, network, err := net.ParseCIDR(s)
1156 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
1158 maskSize, _ := network.Mask.Size()
1159 prefix.Len = byte(maskSize)
1160 prefix.Address, err = ParseIP6Address(ip.String())
1162 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
1165 ip := net.ParseIP(s)
1166 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
1167 if ip.To4() == nil {
1168 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
1170 prefix.Len = byte(defaultMaskSize)
1171 prefix.Address, err = ParseIP6Address(ip.String())
1173 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
1179 func (x IP6Prefix) ToIPNet() *net.IPNet {
1180 mask := net.CIDRMask(int(x.Len), 128)
1181 ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
1185 func (x IP6Prefix) String() string {
1186 ip := x.Address.String()
1187 return ip + "/" + strconv.Itoa(int(x.Len))
1190 func (x *IP6Prefix) MarshalText() ([]byte, error) {
1191 return []byte(x.String()), nil
1194 func (x *IP6Prefix) UnmarshalText(text []byte) error {
1195 prefix, err := ParseIP6Prefix(string(text))
1203 // Mprefix defines type 'mprefix'.
1204 type Mprefix struct {
1205 Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
1206 GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
1207 GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
1208 SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
1211 // Prefix defines type 'prefix'.
1212 type Prefix struct {
1213 Address Address `binapi:"address,name=address" json:"address,omitempty"`
1214 Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
1217 func ParsePrefix(ip string) (prefix Prefix, err error) {
1218 hasPrefix := strings.Contains(ip, "/")
1220 netIP, network, err := net.ParseCIDR(ip)
1222 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
1224 maskSize, _ := network.Mask.Size()
1225 prefix.Len = byte(maskSize)
1226 prefix.Address, err = ParseAddress(netIP.String())
1228 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
1231 netIP := net.ParseIP(ip)
1232 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
1233 if netIP.To4() == nil {
1234 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
1236 prefix.Len = byte(defaultMaskSize)
1237 prefix.Address, err = ParseAddress(netIP.String())
1239 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
1245 func (x Prefix) ToIPNet() *net.IPNet {
1247 if x.Address.Af == ADDRESS_IP4 {
1248 mask = net.CIDRMask(int(x.Len), 32)
1250 mask = net.CIDRMask(int(x.Len), 128)
1252 ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
1256 func (x Prefix) String() string {
1257 ip := x.Address.String()
1258 return ip + "/" + strconv.Itoa(int(x.Len))
1261 func (x *Prefix) MarshalText() ([]byte, error) {
1262 return []byte(x.String()), nil
1265 func (x *Prefix) UnmarshalText(text []byte) error {
1266 prefix, err := ParsePrefix(string(text))
1274 // PrefixMatcher defines type 'prefix_matcher'.
1275 type PrefixMatcher struct {
1276 Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
1277 Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
1280 // AddressUnion defines union 'address_union'.
1281 type AddressUnion struct {
1282 // AddressUnion can be one of:
1283 // - IP4 *IP4Address
1284 // - IP6 *IP6Address
1285 XXX_UnionData [16]byte
1288 func AddressUnionIP4(a IP4Address) (u AddressUnion) {
1292 func (u *AddressUnion) SetIP4(a IP4Address) {
1293 buf := codec.NewBuffer(u.XXX_UnionData[:])
1294 buf.EncodeBytes(a[:], 4)
1296 func (u *AddressUnion) GetIP4() (a IP4Address) {
1297 buf := codec.NewBuffer(u.XXX_UnionData[:])
1298 copy(a[:], buf.DecodeBytes(4))
1302 func AddressUnionIP6(a IP6Address) (u AddressUnion) {
1306 func (u *AddressUnion) SetIP6(a IP6Address) {
1307 buf := codec.NewBuffer(u.XXX_UnionData[:])
1308 buf.EncodeBytes(a[:], 16)
1310 func (u *AddressUnion) GetIP6() (a IP6Address) {
1311 buf := codec.NewBuffer(u.XXX_UnionData[:])
1312 copy(a[:], buf.DecodeBytes(16))
1316 // GbpBridgeDomainAdd defines message 'gbp_bridge_domain_add'.
1317 type GbpBridgeDomainAdd struct {
1318 Bd GbpBridgeDomain `binapi:"gbp_bridge_domain,name=bd" json:"bd,omitempty"`
1321 func (m *GbpBridgeDomainAdd) Reset() { *m = GbpBridgeDomainAdd{} }
1322 func (*GbpBridgeDomainAdd) GetMessageName() string { return "gbp_bridge_domain_add" }
1323 func (*GbpBridgeDomainAdd) GetCrcString() string { return "8454bfdf" }
1324 func (*GbpBridgeDomainAdd) GetMessageType() api.MessageType {
1325 return api.RequestMessage
1328 func (m *GbpBridgeDomainAdd) Size() (size int) {
1332 size += 4 // m.Bd.BdID
1333 size += 4 // m.Bd.RdID
1334 size += 4 // m.Bd.Flags
1335 size += 4 // m.Bd.BviSwIfIndex
1336 size += 4 // m.Bd.UuFwdSwIfIndex
1337 size += 4 // m.Bd.BmFloodSwIfIndex
1340 func (m *GbpBridgeDomainAdd) Marshal(b []byte) ([]byte, error) {
1342 b = make([]byte, m.Size())
1344 buf := codec.NewBuffer(b)
1345 buf.EncodeUint32(m.Bd.BdID)
1346 buf.EncodeUint32(m.Bd.RdID)
1347 buf.EncodeUint32(uint32(m.Bd.Flags))
1348 buf.EncodeUint32(uint32(m.Bd.BviSwIfIndex))
1349 buf.EncodeUint32(uint32(m.Bd.UuFwdSwIfIndex))
1350 buf.EncodeUint32(uint32(m.Bd.BmFloodSwIfIndex))
1351 return buf.Bytes(), nil
1353 func (m *GbpBridgeDomainAdd) Unmarshal(b []byte) error {
1354 buf := codec.NewBuffer(b)
1355 m.Bd.BdID = buf.DecodeUint32()
1356 m.Bd.RdID = buf.DecodeUint32()
1357 m.Bd.Flags = GbpBridgeDomainFlags(buf.DecodeUint32())
1358 m.Bd.BviSwIfIndex = InterfaceIndex(buf.DecodeUint32())
1359 m.Bd.UuFwdSwIfIndex = InterfaceIndex(buf.DecodeUint32())
1360 m.Bd.BmFloodSwIfIndex = InterfaceIndex(buf.DecodeUint32())
1364 // GbpBridgeDomainAddReply defines message 'gbp_bridge_domain_add_reply'.
1365 type GbpBridgeDomainAddReply struct {
1366 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1369 func (m *GbpBridgeDomainAddReply) Reset() { *m = GbpBridgeDomainAddReply{} }
1370 func (*GbpBridgeDomainAddReply) GetMessageName() string { return "gbp_bridge_domain_add_reply" }
1371 func (*GbpBridgeDomainAddReply) GetCrcString() string { return "e8d4e804" }
1372 func (*GbpBridgeDomainAddReply) GetMessageType() api.MessageType {
1373 return api.ReplyMessage
1376 func (m *GbpBridgeDomainAddReply) Size() (size int) {
1380 size += 4 // m.Retval
1383 func (m *GbpBridgeDomainAddReply) Marshal(b []byte) ([]byte, error) {
1385 b = make([]byte, m.Size())
1387 buf := codec.NewBuffer(b)
1388 buf.EncodeInt32(m.Retval)
1389 return buf.Bytes(), nil
1391 func (m *GbpBridgeDomainAddReply) Unmarshal(b []byte) error {
1392 buf := codec.NewBuffer(b)
1393 m.Retval = buf.DecodeInt32()
1397 // GbpBridgeDomainDel defines message 'gbp_bridge_domain_del'.
1398 type GbpBridgeDomainDel struct {
1399 BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
1402 func (m *GbpBridgeDomainDel) Reset() { *m = GbpBridgeDomainDel{} }
1403 func (*GbpBridgeDomainDel) GetMessageName() string { return "gbp_bridge_domain_del" }
1404 func (*GbpBridgeDomainDel) GetCrcString() string { return "c25fdce6" }
1405 func (*GbpBridgeDomainDel) GetMessageType() api.MessageType {
1406 return api.RequestMessage
1409 func (m *GbpBridgeDomainDel) Size() (size int) {
1416 func (m *GbpBridgeDomainDel) Marshal(b []byte) ([]byte, error) {
1418 b = make([]byte, m.Size())
1420 buf := codec.NewBuffer(b)
1421 buf.EncodeUint32(m.BdID)
1422 return buf.Bytes(), nil
1424 func (m *GbpBridgeDomainDel) Unmarshal(b []byte) error {
1425 buf := codec.NewBuffer(b)
1426 m.BdID = buf.DecodeUint32()
1430 // GbpBridgeDomainDelReply defines message 'gbp_bridge_domain_del_reply'.
1431 type GbpBridgeDomainDelReply struct {
1432 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1435 func (m *GbpBridgeDomainDelReply) Reset() { *m = GbpBridgeDomainDelReply{} }
1436 func (*GbpBridgeDomainDelReply) GetMessageName() string { return "gbp_bridge_domain_del_reply" }
1437 func (*GbpBridgeDomainDelReply) GetCrcString() string { return "e8d4e804" }
1438 func (*GbpBridgeDomainDelReply) GetMessageType() api.MessageType {
1439 return api.ReplyMessage
1442 func (m *GbpBridgeDomainDelReply) Size() (size int) {
1446 size += 4 // m.Retval
1449 func (m *GbpBridgeDomainDelReply) Marshal(b []byte) ([]byte, error) {
1451 b = make([]byte, m.Size())
1453 buf := codec.NewBuffer(b)
1454 buf.EncodeInt32(m.Retval)
1455 return buf.Bytes(), nil
1457 func (m *GbpBridgeDomainDelReply) Unmarshal(b []byte) error {
1458 buf := codec.NewBuffer(b)
1459 m.Retval = buf.DecodeInt32()
1463 // GbpBridgeDomainDetails defines message 'gbp_bridge_domain_details'.
1464 type GbpBridgeDomainDetails struct {
1465 Bd GbpBridgeDomain `binapi:"gbp_bridge_domain,name=bd" json:"bd,omitempty"`
1468 func (m *GbpBridgeDomainDetails) Reset() { *m = GbpBridgeDomainDetails{} }
1469 func (*GbpBridgeDomainDetails) GetMessageName() string { return "gbp_bridge_domain_details" }
1470 func (*GbpBridgeDomainDetails) GetCrcString() string { return "2acd15f9" }
1471 func (*GbpBridgeDomainDetails) GetMessageType() api.MessageType {
1472 return api.ReplyMessage
1475 func (m *GbpBridgeDomainDetails) Size() (size int) {
1479 size += 4 // m.Bd.BdID
1480 size += 4 // m.Bd.RdID
1481 size += 4 // m.Bd.Flags
1482 size += 4 // m.Bd.BviSwIfIndex
1483 size += 4 // m.Bd.UuFwdSwIfIndex
1484 size += 4 // m.Bd.BmFloodSwIfIndex
1487 func (m *GbpBridgeDomainDetails) Marshal(b []byte) ([]byte, error) {
1489 b = make([]byte, m.Size())
1491 buf := codec.NewBuffer(b)
1492 buf.EncodeUint32(m.Bd.BdID)
1493 buf.EncodeUint32(m.Bd.RdID)
1494 buf.EncodeUint32(uint32(m.Bd.Flags))
1495 buf.EncodeUint32(uint32(m.Bd.BviSwIfIndex))
1496 buf.EncodeUint32(uint32(m.Bd.UuFwdSwIfIndex))
1497 buf.EncodeUint32(uint32(m.Bd.BmFloodSwIfIndex))
1498 return buf.Bytes(), nil
1500 func (m *GbpBridgeDomainDetails) Unmarshal(b []byte) error {
1501 buf := codec.NewBuffer(b)
1502 m.Bd.BdID = buf.DecodeUint32()
1503 m.Bd.RdID = buf.DecodeUint32()
1504 m.Bd.Flags = GbpBridgeDomainFlags(buf.DecodeUint32())
1505 m.Bd.BviSwIfIndex = InterfaceIndex(buf.DecodeUint32())
1506 m.Bd.UuFwdSwIfIndex = InterfaceIndex(buf.DecodeUint32())
1507 m.Bd.BmFloodSwIfIndex = InterfaceIndex(buf.DecodeUint32())
1511 // GbpBridgeDomainDump defines message 'gbp_bridge_domain_dump'.
1512 type GbpBridgeDomainDump struct{}
1514 func (m *GbpBridgeDomainDump) Reset() { *m = GbpBridgeDomainDump{} }
1515 func (*GbpBridgeDomainDump) GetMessageName() string { return "gbp_bridge_domain_dump" }
1516 func (*GbpBridgeDomainDump) GetCrcString() string { return "51077d14" }
1517 func (*GbpBridgeDomainDump) GetMessageType() api.MessageType {
1518 return api.RequestMessage
1521 func (m *GbpBridgeDomainDump) Size() (size int) {
1527 func (m *GbpBridgeDomainDump) Marshal(b []byte) ([]byte, error) {
1529 b = make([]byte, m.Size())
1531 buf := codec.NewBuffer(b)
1532 return buf.Bytes(), nil
1534 func (m *GbpBridgeDomainDump) Unmarshal(b []byte) error {
1538 // GbpBridgeDomainDumpReply defines message 'gbp_bridge_domain_dump_reply'.
1539 type GbpBridgeDomainDumpReply struct {
1540 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1543 func (m *GbpBridgeDomainDumpReply) Reset() { *m = GbpBridgeDomainDumpReply{} }
1544 func (*GbpBridgeDomainDumpReply) GetMessageName() string { return "gbp_bridge_domain_dump_reply" }
1545 func (*GbpBridgeDomainDumpReply) GetCrcString() string { return "e8d4e804" }
1546 func (*GbpBridgeDomainDumpReply) GetMessageType() api.MessageType {
1547 return api.ReplyMessage
1550 func (m *GbpBridgeDomainDumpReply) Size() (size int) {
1554 size += 4 // m.Retval
1557 func (m *GbpBridgeDomainDumpReply) Marshal(b []byte) ([]byte, error) {
1559 b = make([]byte, m.Size())
1561 buf := codec.NewBuffer(b)
1562 buf.EncodeInt32(m.Retval)
1563 return buf.Bytes(), nil
1565 func (m *GbpBridgeDomainDumpReply) Unmarshal(b []byte) error {
1566 buf := codec.NewBuffer(b)
1567 m.Retval = buf.DecodeInt32()
1571 // GbpContractAddDel defines message 'gbp_contract_add_del'.
1572 type GbpContractAddDel struct {
1573 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1574 Contract GbpContract `binapi:"gbp_contract,name=contract" json:"contract,omitempty"`
1577 func (m *GbpContractAddDel) Reset() { *m = GbpContractAddDel{} }
1578 func (*GbpContractAddDel) GetMessageName() string { return "gbp_contract_add_del" }
1579 func (*GbpContractAddDel) GetCrcString() string { return "553e275b" }
1580 func (*GbpContractAddDel) GetMessageType() api.MessageType {
1581 return api.RequestMessage
1584 func (m *GbpContractAddDel) Size() (size int) {
1588 size += 1 // m.IsAdd
1589 size += 2 // m.Contract.Scope
1590 size += 2 // m.Contract.Sclass
1591 size += 2 // m.Contract.Dclass
1592 size += 4 // m.Contract.ACLIndex
1593 size += 1 // m.Contract.NEtherTypes
1594 size += 2 * 16 // m.Contract.AllowedEthertypes
1595 size += 1 // m.Contract.NRules
1596 for j2 := 0; j2 < len(m.Contract.Rules); j2++ {
1599 if j2 < len(m.Contract.Rules) {
1600 s2 = m.Contract.Rules[j2]
1602 size += 4 // s2.Action
1603 size += 4 // s2.NhSet.HashMode
1604 size += 1 // s2.NhSet.NNhs
1605 for j4 := 0; j4 < 8; j4++ {
1606 size += 4 // s2.NhSet.Nhs[j4].IP.Af
1607 size += 1 * 16 // s2.NhSet.Nhs[j4].IP.Un
1608 size += 1 * 6 // s2.NhSet.Nhs[j4].Mac
1609 size += 4 // s2.NhSet.Nhs[j4].BdID
1610 size += 4 // s2.NhSet.Nhs[j4].RdID
1615 func (m *GbpContractAddDel) Marshal(b []byte) ([]byte, error) {
1617 b = make([]byte, m.Size())
1619 buf := codec.NewBuffer(b)
1620 buf.EncodeBool(m.IsAdd)
1621 buf.EncodeUint16(uint16(m.Contract.Scope))
1622 buf.EncodeUint16(m.Contract.Sclass)
1623 buf.EncodeUint16(m.Contract.Dclass)
1624 buf.EncodeUint32(m.Contract.ACLIndex)
1625 buf.EncodeUint8(m.Contract.NEtherTypes)
1626 for i := 0; i < 16; i++ {
1628 if i < len(m.Contract.AllowedEthertypes) {
1629 x = uint16(m.Contract.AllowedEthertypes[i])
1633 buf.EncodeUint8(uint8(len(m.Contract.Rules)))
1634 for j1 := 0; j1 < len(m.Contract.Rules); j1++ {
1635 var v1 GbpRule // Rules
1636 if j1 < len(m.Contract.Rules) {
1637 v1 = m.Contract.Rules[j1]
1639 buf.EncodeUint32(uint32(v1.Action))
1640 buf.EncodeUint32(uint32(v1.NhSet.HashMode))
1641 buf.EncodeUint8(v1.NhSet.NNhs)
1642 for j3 := 0; j3 < 8; j3++ {
1643 buf.EncodeUint32(uint32(v1.NhSet.Nhs[j3].IP.Af))
1644 buf.EncodeBytes(v1.NhSet.Nhs[j3].IP.Un.XXX_UnionData[:], 16)
1645 buf.EncodeBytes(v1.NhSet.Nhs[j3].Mac[:], 6)
1646 buf.EncodeUint32(v1.NhSet.Nhs[j3].BdID)
1647 buf.EncodeUint32(v1.NhSet.Nhs[j3].RdID)
1650 return buf.Bytes(), nil
1652 func (m *GbpContractAddDel) Unmarshal(b []byte) error {
1653 buf := codec.NewBuffer(b)
1654 m.IsAdd = buf.DecodeBool()
1655 m.Contract.Scope = GbpScope(buf.DecodeUint16())
1656 m.Contract.Sclass = buf.DecodeUint16()
1657 m.Contract.Dclass = buf.DecodeUint16()
1658 m.Contract.ACLIndex = buf.DecodeUint32()
1659 m.Contract.NEtherTypes = buf.DecodeUint8()
1660 m.Contract.AllowedEthertypes = make([]uint16, 16)
1661 for i := 0; i < len(m.Contract.AllowedEthertypes); i++ {
1662 m.Contract.AllowedEthertypes[i] = buf.DecodeUint16()
1664 m.Contract.NRules = buf.DecodeUint8()
1665 m.Contract.Rules = make([]GbpRule, m.Contract.NRules)
1666 for j1 := 0; j1 < len(m.Contract.Rules); j1++ {
1667 m.Contract.Rules[j1].Action = GbpRuleAction(buf.DecodeUint32())
1668 m.Contract.Rules[j1].NhSet.HashMode = GbpHashMode(buf.DecodeUint32())
1669 m.Contract.Rules[j1].NhSet.NNhs = buf.DecodeUint8()
1670 for j3 := 0; j3 < 8; j3++ {
1671 m.Contract.Rules[j1].NhSet.Nhs[j3].IP.Af = AddressFamily(buf.DecodeUint32())
1672 copy(m.Contract.Rules[j1].NhSet.Nhs[j3].IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1673 copy(m.Contract.Rules[j1].NhSet.Nhs[j3].Mac[:], buf.DecodeBytes(6))
1674 m.Contract.Rules[j1].NhSet.Nhs[j3].BdID = buf.DecodeUint32()
1675 m.Contract.Rules[j1].NhSet.Nhs[j3].RdID = buf.DecodeUint32()
1681 // GbpContractAddDelReply defines message 'gbp_contract_add_del_reply'.
1682 type GbpContractAddDelReply struct {
1683 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1684 StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
1687 func (m *GbpContractAddDelReply) Reset() { *m = GbpContractAddDelReply{} }
1688 func (*GbpContractAddDelReply) GetMessageName() string { return "gbp_contract_add_del_reply" }
1689 func (*GbpContractAddDelReply) GetCrcString() string { return "1992deab" }
1690 func (*GbpContractAddDelReply) GetMessageType() api.MessageType {
1691 return api.ReplyMessage
1694 func (m *GbpContractAddDelReply) Size() (size int) {
1698 size += 4 // m.Retval
1699 size += 4 // m.StatsIndex
1702 func (m *GbpContractAddDelReply) Marshal(b []byte) ([]byte, error) {
1704 b = make([]byte, m.Size())
1706 buf := codec.NewBuffer(b)
1707 buf.EncodeInt32(m.Retval)
1708 buf.EncodeUint32(m.StatsIndex)
1709 return buf.Bytes(), nil
1711 func (m *GbpContractAddDelReply) Unmarshal(b []byte) error {
1712 buf := codec.NewBuffer(b)
1713 m.Retval = buf.DecodeInt32()
1714 m.StatsIndex = buf.DecodeUint32()
1718 // GbpContractDetails defines message 'gbp_contract_details'.
1719 type GbpContractDetails struct {
1720 Contract GbpContract `binapi:"gbp_contract,name=contract" json:"contract,omitempty"`
1723 func (m *GbpContractDetails) Reset() { *m = GbpContractDetails{} }
1724 func (*GbpContractDetails) GetMessageName() string { return "gbp_contract_details" }
1725 func (*GbpContractDetails) GetCrcString() string { return "2a18db6e" }
1726 func (*GbpContractDetails) GetMessageType() api.MessageType {
1727 return api.ReplyMessage
1730 func (m *GbpContractDetails) Size() (size int) {
1734 size += 2 // m.Contract.Scope
1735 size += 2 // m.Contract.Sclass
1736 size += 2 // m.Contract.Dclass
1737 size += 4 // m.Contract.ACLIndex
1738 size += 1 // m.Contract.NEtherTypes
1739 size += 2 * 16 // m.Contract.AllowedEthertypes
1740 size += 1 // m.Contract.NRules
1741 for j2 := 0; j2 < len(m.Contract.Rules); j2++ {
1744 if j2 < len(m.Contract.Rules) {
1745 s2 = m.Contract.Rules[j2]
1747 size += 4 // s2.Action
1748 size += 4 // s2.NhSet.HashMode
1749 size += 1 // s2.NhSet.NNhs
1750 for j4 := 0; j4 < 8; j4++ {
1751 size += 4 // s2.NhSet.Nhs[j4].IP.Af
1752 size += 1 * 16 // s2.NhSet.Nhs[j4].IP.Un
1753 size += 1 * 6 // s2.NhSet.Nhs[j4].Mac
1754 size += 4 // s2.NhSet.Nhs[j4].BdID
1755 size += 4 // s2.NhSet.Nhs[j4].RdID
1760 func (m *GbpContractDetails) Marshal(b []byte) ([]byte, error) {
1762 b = make([]byte, m.Size())
1764 buf := codec.NewBuffer(b)
1765 buf.EncodeUint16(uint16(m.Contract.Scope))
1766 buf.EncodeUint16(m.Contract.Sclass)
1767 buf.EncodeUint16(m.Contract.Dclass)
1768 buf.EncodeUint32(m.Contract.ACLIndex)
1769 buf.EncodeUint8(m.Contract.NEtherTypes)
1770 for i := 0; i < 16; i++ {
1772 if i < len(m.Contract.AllowedEthertypes) {
1773 x = uint16(m.Contract.AllowedEthertypes[i])
1777 buf.EncodeUint8(uint8(len(m.Contract.Rules)))
1778 for j1 := 0; j1 < len(m.Contract.Rules); j1++ {
1779 var v1 GbpRule // Rules
1780 if j1 < len(m.Contract.Rules) {
1781 v1 = m.Contract.Rules[j1]
1783 buf.EncodeUint32(uint32(v1.Action))
1784 buf.EncodeUint32(uint32(v1.NhSet.HashMode))
1785 buf.EncodeUint8(v1.NhSet.NNhs)
1786 for j3 := 0; j3 < 8; j3++ {
1787 buf.EncodeUint32(uint32(v1.NhSet.Nhs[j3].IP.Af))
1788 buf.EncodeBytes(v1.NhSet.Nhs[j3].IP.Un.XXX_UnionData[:], 16)
1789 buf.EncodeBytes(v1.NhSet.Nhs[j3].Mac[:], 6)
1790 buf.EncodeUint32(v1.NhSet.Nhs[j3].BdID)
1791 buf.EncodeUint32(v1.NhSet.Nhs[j3].RdID)
1794 return buf.Bytes(), nil
1796 func (m *GbpContractDetails) Unmarshal(b []byte) error {
1797 buf := codec.NewBuffer(b)
1798 m.Contract.Scope = GbpScope(buf.DecodeUint16())
1799 m.Contract.Sclass = buf.DecodeUint16()
1800 m.Contract.Dclass = buf.DecodeUint16()
1801 m.Contract.ACLIndex = buf.DecodeUint32()
1802 m.Contract.NEtherTypes = buf.DecodeUint8()
1803 m.Contract.AllowedEthertypes = make([]uint16, 16)
1804 for i := 0; i < len(m.Contract.AllowedEthertypes); i++ {
1805 m.Contract.AllowedEthertypes[i] = buf.DecodeUint16()
1807 m.Contract.NRules = buf.DecodeUint8()
1808 m.Contract.Rules = make([]GbpRule, m.Contract.NRules)
1809 for j1 := 0; j1 < len(m.Contract.Rules); j1++ {
1810 m.Contract.Rules[j1].Action = GbpRuleAction(buf.DecodeUint32())
1811 m.Contract.Rules[j1].NhSet.HashMode = GbpHashMode(buf.DecodeUint32())
1812 m.Contract.Rules[j1].NhSet.NNhs = buf.DecodeUint8()
1813 for j3 := 0; j3 < 8; j3++ {
1814 m.Contract.Rules[j1].NhSet.Nhs[j3].IP.Af = AddressFamily(buf.DecodeUint32())
1815 copy(m.Contract.Rules[j1].NhSet.Nhs[j3].IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1816 copy(m.Contract.Rules[j1].NhSet.Nhs[j3].Mac[:], buf.DecodeBytes(6))
1817 m.Contract.Rules[j1].NhSet.Nhs[j3].BdID = buf.DecodeUint32()
1818 m.Contract.Rules[j1].NhSet.Nhs[j3].RdID = buf.DecodeUint32()
1824 // GbpContractDump defines message 'gbp_contract_dump'.
1825 type GbpContractDump struct{}
1827 func (m *GbpContractDump) Reset() { *m = GbpContractDump{} }
1828 func (*GbpContractDump) GetMessageName() string { return "gbp_contract_dump" }
1829 func (*GbpContractDump) GetCrcString() string { return "51077d14" }
1830 func (*GbpContractDump) GetMessageType() api.MessageType {
1831 return api.RequestMessage
1834 func (m *GbpContractDump) Size() (size int) {
1840 func (m *GbpContractDump) Marshal(b []byte) ([]byte, error) {
1842 b = make([]byte, m.Size())
1844 buf := codec.NewBuffer(b)
1845 return buf.Bytes(), nil
1847 func (m *GbpContractDump) Unmarshal(b []byte) error {
1851 // GbpEndpointAdd defines message 'gbp_endpoint_add'.
1852 type GbpEndpointAdd struct {
1853 Endpoint GbpEndpoint `binapi:"gbp_endpoint,name=endpoint" json:"endpoint,omitempty"`
1856 func (m *GbpEndpointAdd) Reset() { *m = GbpEndpointAdd{} }
1857 func (*GbpEndpointAdd) GetMessageName() string { return "gbp_endpoint_add" }
1858 func (*GbpEndpointAdd) GetCrcString() string { return "9ce16d5a" }
1859 func (*GbpEndpointAdd) GetMessageType() api.MessageType {
1860 return api.RequestMessage
1863 func (m *GbpEndpointAdd) Size() (size int) {
1867 size += 4 // m.Endpoint.SwIfIndex
1868 size += 2 // m.Endpoint.Sclass
1869 size += 4 // m.Endpoint.Flags
1870 size += 1 * 6 // m.Endpoint.Mac
1871 size += 4 // m.Endpoint.Tun.Src.Af
1872 size += 1 * 16 // m.Endpoint.Tun.Src.Un
1873 size += 4 // m.Endpoint.Tun.Dst.Af
1874 size += 1 * 16 // m.Endpoint.Tun.Dst.Un
1875 size += 1 // m.Endpoint.NIps
1876 for j2 := 0; j2 < len(m.Endpoint.Ips); j2++ {
1879 if j2 < len(m.Endpoint.Ips) {
1880 s2 = m.Endpoint.Ips[j2]
1883 size += 1 * 16 // s2.Un
1887 func (m *GbpEndpointAdd) Marshal(b []byte) ([]byte, error) {
1889 b = make([]byte, m.Size())
1891 buf := codec.NewBuffer(b)
1892 buf.EncodeUint32(uint32(m.Endpoint.SwIfIndex))
1893 buf.EncodeUint16(m.Endpoint.Sclass)
1894 buf.EncodeUint32(uint32(m.Endpoint.Flags))
1895 buf.EncodeBytes(m.Endpoint.Mac[:], 6)
1896 buf.EncodeUint32(uint32(m.Endpoint.Tun.Src.Af))
1897 buf.EncodeBytes(m.Endpoint.Tun.Src.Un.XXX_UnionData[:], 16)
1898 buf.EncodeUint32(uint32(m.Endpoint.Tun.Dst.Af))
1899 buf.EncodeBytes(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], 16)
1900 buf.EncodeUint8(uint8(len(m.Endpoint.Ips)))
1901 for j1 := 0; j1 < len(m.Endpoint.Ips); j1++ {
1902 var v1 Address // Ips
1903 if j1 < len(m.Endpoint.Ips) {
1904 v1 = m.Endpoint.Ips[j1]
1906 buf.EncodeUint32(uint32(v1.Af))
1907 buf.EncodeBytes(v1.Un.XXX_UnionData[:], 16)
1909 return buf.Bytes(), nil
1911 func (m *GbpEndpointAdd) Unmarshal(b []byte) error {
1912 buf := codec.NewBuffer(b)
1913 m.Endpoint.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1914 m.Endpoint.Sclass = buf.DecodeUint16()
1915 m.Endpoint.Flags = GbpEndpointFlags(buf.DecodeUint32())
1916 copy(m.Endpoint.Mac[:], buf.DecodeBytes(6))
1917 m.Endpoint.Tun.Src.Af = AddressFamily(buf.DecodeUint32())
1918 copy(m.Endpoint.Tun.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1919 m.Endpoint.Tun.Dst.Af = AddressFamily(buf.DecodeUint32())
1920 copy(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1921 m.Endpoint.NIps = buf.DecodeUint8()
1922 m.Endpoint.Ips = make([]Address, m.Endpoint.NIps)
1923 for j1 := 0; j1 < len(m.Endpoint.Ips); j1++ {
1924 m.Endpoint.Ips[j1].Af = AddressFamily(buf.DecodeUint32())
1925 copy(m.Endpoint.Ips[j1].Un.XXX_UnionData[:], buf.DecodeBytes(16))
1930 // GbpEndpointAddReply defines message 'gbp_endpoint_add_reply'.
1931 type GbpEndpointAddReply struct {
1932 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1933 Handle uint32 `binapi:"u32,name=handle" json:"handle,omitempty"`
1936 func (m *GbpEndpointAddReply) Reset() { *m = GbpEndpointAddReply{} }
1937 func (*GbpEndpointAddReply) GetMessageName() string { return "gbp_endpoint_add_reply" }
1938 func (*GbpEndpointAddReply) GetCrcString() string { return "1dd3ff3e" }
1939 func (*GbpEndpointAddReply) GetMessageType() api.MessageType {
1940 return api.ReplyMessage
1943 func (m *GbpEndpointAddReply) Size() (size int) {
1947 size += 4 // m.Retval
1948 size += 4 // m.Handle
1951 func (m *GbpEndpointAddReply) Marshal(b []byte) ([]byte, error) {
1953 b = make([]byte, m.Size())
1955 buf := codec.NewBuffer(b)
1956 buf.EncodeInt32(m.Retval)
1957 buf.EncodeUint32(m.Handle)
1958 return buf.Bytes(), nil
1960 func (m *GbpEndpointAddReply) Unmarshal(b []byte) error {
1961 buf := codec.NewBuffer(b)
1962 m.Retval = buf.DecodeInt32()
1963 m.Handle = buf.DecodeUint32()
1967 // GbpEndpointDel defines message 'gbp_endpoint_del'.
1968 type GbpEndpointDel struct {
1969 Handle uint32 `binapi:"u32,name=handle" json:"handle,omitempty"`
1972 func (m *GbpEndpointDel) Reset() { *m = GbpEndpointDel{} }
1973 func (*GbpEndpointDel) GetMessageName() string { return "gbp_endpoint_del" }
1974 func (*GbpEndpointDel) GetCrcString() string { return "b93cd566" }
1975 func (*GbpEndpointDel) GetMessageType() api.MessageType {
1976 return api.RequestMessage
1979 func (m *GbpEndpointDel) Size() (size int) {
1983 size += 4 // m.Handle
1986 func (m *GbpEndpointDel) Marshal(b []byte) ([]byte, error) {
1988 b = make([]byte, m.Size())
1990 buf := codec.NewBuffer(b)
1991 buf.EncodeUint32(m.Handle)
1992 return buf.Bytes(), nil
1994 func (m *GbpEndpointDel) Unmarshal(b []byte) error {
1995 buf := codec.NewBuffer(b)
1996 m.Handle = buf.DecodeUint32()
2000 // GbpEndpointDelReply defines message 'gbp_endpoint_del_reply'.
2001 type GbpEndpointDelReply struct {
2002 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2005 func (m *GbpEndpointDelReply) Reset() { *m = GbpEndpointDelReply{} }
2006 func (*GbpEndpointDelReply) GetMessageName() string { return "gbp_endpoint_del_reply" }
2007 func (*GbpEndpointDelReply) GetCrcString() string { return "e8d4e804" }
2008 func (*GbpEndpointDelReply) GetMessageType() api.MessageType {
2009 return api.ReplyMessage
2012 func (m *GbpEndpointDelReply) Size() (size int) {
2016 size += 4 // m.Retval
2019 func (m *GbpEndpointDelReply) Marshal(b []byte) ([]byte, error) {
2021 b = make([]byte, m.Size())
2023 buf := codec.NewBuffer(b)
2024 buf.EncodeInt32(m.Retval)
2025 return buf.Bytes(), nil
2027 func (m *GbpEndpointDelReply) Unmarshal(b []byte) error {
2028 buf := codec.NewBuffer(b)
2029 m.Retval = buf.DecodeInt32()
2033 // GbpEndpointDetails defines message 'gbp_endpoint_details'.
2034 type GbpEndpointDetails struct {
2035 Age float64 `binapi:"f64,name=age" json:"age,omitempty"`
2036 Handle uint32 `binapi:"u32,name=handle" json:"handle,omitempty"`
2037 Endpoint GbpEndpoint `binapi:"gbp_endpoint,name=endpoint" json:"endpoint,omitempty"`
2040 func (m *GbpEndpointDetails) Reset() { *m = GbpEndpointDetails{} }
2041 func (*GbpEndpointDetails) GetMessageName() string { return "gbp_endpoint_details" }
2042 func (*GbpEndpointDetails) GetCrcString() string { return "08aecb60" }
2043 func (*GbpEndpointDetails) GetMessageType() api.MessageType {
2044 return api.ReplyMessage
2047 func (m *GbpEndpointDetails) Size() (size int) {
2052 size += 4 // m.Handle
2053 size += 4 // m.Endpoint.SwIfIndex
2054 size += 2 // m.Endpoint.Sclass
2055 size += 4 // m.Endpoint.Flags
2056 size += 1 * 6 // m.Endpoint.Mac
2057 size += 4 // m.Endpoint.Tun.Src.Af
2058 size += 1 * 16 // m.Endpoint.Tun.Src.Un
2059 size += 4 // m.Endpoint.Tun.Dst.Af
2060 size += 1 * 16 // m.Endpoint.Tun.Dst.Un
2061 size += 1 // m.Endpoint.NIps
2062 for j2 := 0; j2 < len(m.Endpoint.Ips); j2++ {
2065 if j2 < len(m.Endpoint.Ips) {
2066 s2 = m.Endpoint.Ips[j2]
2069 size += 1 * 16 // s2.Un
2073 func (m *GbpEndpointDetails) Marshal(b []byte) ([]byte, error) {
2075 b = make([]byte, m.Size())
2077 buf := codec.NewBuffer(b)
2078 buf.EncodeFloat64(m.Age)
2079 buf.EncodeUint32(m.Handle)
2080 buf.EncodeUint32(uint32(m.Endpoint.SwIfIndex))
2081 buf.EncodeUint16(m.Endpoint.Sclass)
2082 buf.EncodeUint32(uint32(m.Endpoint.Flags))
2083 buf.EncodeBytes(m.Endpoint.Mac[:], 6)
2084 buf.EncodeUint32(uint32(m.Endpoint.Tun.Src.Af))
2085 buf.EncodeBytes(m.Endpoint.Tun.Src.Un.XXX_UnionData[:], 16)
2086 buf.EncodeUint32(uint32(m.Endpoint.Tun.Dst.Af))
2087 buf.EncodeBytes(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], 16)
2088 buf.EncodeUint8(uint8(len(m.Endpoint.Ips)))
2089 for j1 := 0; j1 < len(m.Endpoint.Ips); j1++ {
2090 var v1 Address // Ips
2091 if j1 < len(m.Endpoint.Ips) {
2092 v1 = m.Endpoint.Ips[j1]
2094 buf.EncodeUint32(uint32(v1.Af))
2095 buf.EncodeBytes(v1.Un.XXX_UnionData[:], 16)
2097 return buf.Bytes(), nil
2099 func (m *GbpEndpointDetails) Unmarshal(b []byte) error {
2100 buf := codec.NewBuffer(b)
2101 m.Age = buf.DecodeFloat64()
2102 m.Handle = buf.DecodeUint32()
2103 m.Endpoint.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2104 m.Endpoint.Sclass = buf.DecodeUint16()
2105 m.Endpoint.Flags = GbpEndpointFlags(buf.DecodeUint32())
2106 copy(m.Endpoint.Mac[:], buf.DecodeBytes(6))
2107 m.Endpoint.Tun.Src.Af = AddressFamily(buf.DecodeUint32())
2108 copy(m.Endpoint.Tun.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2109 m.Endpoint.Tun.Dst.Af = AddressFamily(buf.DecodeUint32())
2110 copy(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2111 m.Endpoint.NIps = buf.DecodeUint8()
2112 m.Endpoint.Ips = make([]Address, m.Endpoint.NIps)
2113 for j1 := 0; j1 < len(m.Endpoint.Ips); j1++ {
2114 m.Endpoint.Ips[j1].Af = AddressFamily(buf.DecodeUint32())
2115 copy(m.Endpoint.Ips[j1].Un.XXX_UnionData[:], buf.DecodeBytes(16))
2120 // GbpEndpointDump defines message 'gbp_endpoint_dump'.
2121 type GbpEndpointDump struct{}
2123 func (m *GbpEndpointDump) Reset() { *m = GbpEndpointDump{} }
2124 func (*GbpEndpointDump) GetMessageName() string { return "gbp_endpoint_dump" }
2125 func (*GbpEndpointDump) GetCrcString() string { return "51077d14" }
2126 func (*GbpEndpointDump) GetMessageType() api.MessageType {
2127 return api.RequestMessage
2130 func (m *GbpEndpointDump) Size() (size int) {
2136 func (m *GbpEndpointDump) Marshal(b []byte) ([]byte, error) {
2138 b = make([]byte, m.Size())
2140 buf := codec.NewBuffer(b)
2141 return buf.Bytes(), nil
2143 func (m *GbpEndpointDump) Unmarshal(b []byte) error {
2147 // GbpEndpointGroupAdd defines message 'gbp_endpoint_group_add'.
2148 type GbpEndpointGroupAdd struct {
2149 Epg GbpEndpointGroup `binapi:"gbp_endpoint_group,name=epg" json:"epg,omitempty"`
2152 func (m *GbpEndpointGroupAdd) Reset() { *m = GbpEndpointGroupAdd{} }
2153 func (*GbpEndpointGroupAdd) GetMessageName() string { return "gbp_endpoint_group_add" }
2154 func (*GbpEndpointGroupAdd) GetCrcString() string { return "8e0f4054" }
2155 func (*GbpEndpointGroupAdd) GetMessageType() api.MessageType {
2156 return api.RequestMessage
2159 func (m *GbpEndpointGroupAdd) Size() (size int) {
2163 size += 4 // m.Epg.Vnid
2164 size += 2 // m.Epg.Sclass
2165 size += 4 // m.Epg.BdID
2166 size += 4 // m.Epg.RdID
2167 size += 4 // m.Epg.UplinkSwIfIndex
2168 size += 4 // m.Epg.Retention.RemoteEpTimeout
2171 func (m *GbpEndpointGroupAdd) Marshal(b []byte) ([]byte, error) {
2173 b = make([]byte, m.Size())
2175 buf := codec.NewBuffer(b)
2176 buf.EncodeUint32(m.Epg.Vnid)
2177 buf.EncodeUint16(m.Epg.Sclass)
2178 buf.EncodeUint32(m.Epg.BdID)
2179 buf.EncodeUint32(m.Epg.RdID)
2180 buf.EncodeUint32(uint32(m.Epg.UplinkSwIfIndex))
2181 buf.EncodeUint32(m.Epg.Retention.RemoteEpTimeout)
2182 return buf.Bytes(), nil
2184 func (m *GbpEndpointGroupAdd) Unmarshal(b []byte) error {
2185 buf := codec.NewBuffer(b)
2186 m.Epg.Vnid = buf.DecodeUint32()
2187 m.Epg.Sclass = buf.DecodeUint16()
2188 m.Epg.BdID = buf.DecodeUint32()
2189 m.Epg.RdID = buf.DecodeUint32()
2190 m.Epg.UplinkSwIfIndex = InterfaceIndex(buf.DecodeUint32())
2191 m.Epg.Retention.RemoteEpTimeout = buf.DecodeUint32()
2195 // GbpEndpointGroupAddReply defines message 'gbp_endpoint_group_add_reply'.
2196 type GbpEndpointGroupAddReply struct {
2197 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2200 func (m *GbpEndpointGroupAddReply) Reset() { *m = GbpEndpointGroupAddReply{} }
2201 func (*GbpEndpointGroupAddReply) GetMessageName() string { return "gbp_endpoint_group_add_reply" }
2202 func (*GbpEndpointGroupAddReply) GetCrcString() string { return "e8d4e804" }
2203 func (*GbpEndpointGroupAddReply) GetMessageType() api.MessageType {
2204 return api.ReplyMessage
2207 func (m *GbpEndpointGroupAddReply) Size() (size int) {
2211 size += 4 // m.Retval
2214 func (m *GbpEndpointGroupAddReply) Marshal(b []byte) ([]byte, error) {
2216 b = make([]byte, m.Size())
2218 buf := codec.NewBuffer(b)
2219 buf.EncodeInt32(m.Retval)
2220 return buf.Bytes(), nil
2222 func (m *GbpEndpointGroupAddReply) Unmarshal(b []byte) error {
2223 buf := codec.NewBuffer(b)
2224 m.Retval = buf.DecodeInt32()
2228 // GbpEndpointGroupDel defines message 'gbp_endpoint_group_del'.
2229 type GbpEndpointGroupDel struct {
2230 Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
2233 func (m *GbpEndpointGroupDel) Reset() { *m = GbpEndpointGroupDel{} }
2234 func (*GbpEndpointGroupDel) GetMessageName() string { return "gbp_endpoint_group_del" }
2235 func (*GbpEndpointGroupDel) GetCrcString() string { return "3436b8b7" }
2236 func (*GbpEndpointGroupDel) GetMessageType() api.MessageType {
2237 return api.RequestMessage
2240 func (m *GbpEndpointGroupDel) Size() (size int) {
2244 size += 2 // m.Sclass
2247 func (m *GbpEndpointGroupDel) Marshal(b []byte) ([]byte, error) {
2249 b = make([]byte, m.Size())
2251 buf := codec.NewBuffer(b)
2252 buf.EncodeUint16(m.Sclass)
2253 return buf.Bytes(), nil
2255 func (m *GbpEndpointGroupDel) Unmarshal(b []byte) error {
2256 buf := codec.NewBuffer(b)
2257 m.Sclass = buf.DecodeUint16()
2261 // GbpEndpointGroupDelReply defines message 'gbp_endpoint_group_del_reply'.
2262 type GbpEndpointGroupDelReply struct {
2263 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2266 func (m *GbpEndpointGroupDelReply) Reset() { *m = GbpEndpointGroupDelReply{} }
2267 func (*GbpEndpointGroupDelReply) GetMessageName() string { return "gbp_endpoint_group_del_reply" }
2268 func (*GbpEndpointGroupDelReply) GetCrcString() string { return "e8d4e804" }
2269 func (*GbpEndpointGroupDelReply) GetMessageType() api.MessageType {
2270 return api.ReplyMessage
2273 func (m *GbpEndpointGroupDelReply) Size() (size int) {
2277 size += 4 // m.Retval
2280 func (m *GbpEndpointGroupDelReply) Marshal(b []byte) ([]byte, error) {
2282 b = make([]byte, m.Size())
2284 buf := codec.NewBuffer(b)
2285 buf.EncodeInt32(m.Retval)
2286 return buf.Bytes(), nil
2288 func (m *GbpEndpointGroupDelReply) Unmarshal(b []byte) error {
2289 buf := codec.NewBuffer(b)
2290 m.Retval = buf.DecodeInt32()
2294 // GbpEndpointGroupDetails defines message 'gbp_endpoint_group_details'.
2295 type GbpEndpointGroupDetails struct {
2296 Epg GbpEndpointGroup `binapi:"gbp_endpoint_group,name=epg" json:"epg,omitempty"`
2299 func (m *GbpEndpointGroupDetails) Reset() { *m = GbpEndpointGroupDetails{} }
2300 func (*GbpEndpointGroupDetails) GetMessageName() string { return "gbp_endpoint_group_details" }
2301 func (*GbpEndpointGroupDetails) GetCrcString() string { return "8f38292c" }
2302 func (*GbpEndpointGroupDetails) GetMessageType() api.MessageType {
2303 return api.ReplyMessage
2306 func (m *GbpEndpointGroupDetails) Size() (size int) {
2310 size += 4 // m.Epg.Vnid
2311 size += 2 // m.Epg.Sclass
2312 size += 4 // m.Epg.BdID
2313 size += 4 // m.Epg.RdID
2314 size += 4 // m.Epg.UplinkSwIfIndex
2315 size += 4 // m.Epg.Retention.RemoteEpTimeout
2318 func (m *GbpEndpointGroupDetails) Marshal(b []byte) ([]byte, error) {
2320 b = make([]byte, m.Size())
2322 buf := codec.NewBuffer(b)
2323 buf.EncodeUint32(m.Epg.Vnid)
2324 buf.EncodeUint16(m.Epg.Sclass)
2325 buf.EncodeUint32(m.Epg.BdID)
2326 buf.EncodeUint32(m.Epg.RdID)
2327 buf.EncodeUint32(uint32(m.Epg.UplinkSwIfIndex))
2328 buf.EncodeUint32(m.Epg.Retention.RemoteEpTimeout)
2329 return buf.Bytes(), nil
2331 func (m *GbpEndpointGroupDetails) Unmarshal(b []byte) error {
2332 buf := codec.NewBuffer(b)
2333 m.Epg.Vnid = buf.DecodeUint32()
2334 m.Epg.Sclass = buf.DecodeUint16()
2335 m.Epg.BdID = buf.DecodeUint32()
2336 m.Epg.RdID = buf.DecodeUint32()
2337 m.Epg.UplinkSwIfIndex = InterfaceIndex(buf.DecodeUint32())
2338 m.Epg.Retention.RemoteEpTimeout = buf.DecodeUint32()
2342 // GbpEndpointGroupDump defines message 'gbp_endpoint_group_dump'.
2343 type GbpEndpointGroupDump struct{}
2345 func (m *GbpEndpointGroupDump) Reset() { *m = GbpEndpointGroupDump{} }
2346 func (*GbpEndpointGroupDump) GetMessageName() string { return "gbp_endpoint_group_dump" }
2347 func (*GbpEndpointGroupDump) GetCrcString() string { return "51077d14" }
2348 func (*GbpEndpointGroupDump) GetMessageType() api.MessageType {
2349 return api.RequestMessage
2352 func (m *GbpEndpointGroupDump) Size() (size int) {
2358 func (m *GbpEndpointGroupDump) Marshal(b []byte) ([]byte, error) {
2360 b = make([]byte, m.Size())
2362 buf := codec.NewBuffer(b)
2363 return buf.Bytes(), nil
2365 func (m *GbpEndpointGroupDump) Unmarshal(b []byte) error {
2369 // GbpExtItfAddDel defines message 'gbp_ext_itf_add_del'.
2370 type GbpExtItfAddDel struct {
2371 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
2372 ExtItf GbpExtItf `binapi:"gbp_ext_itf,name=ext_itf" json:"ext_itf,omitempty"`
2375 func (m *GbpExtItfAddDel) Reset() { *m = GbpExtItfAddDel{} }
2376 func (*GbpExtItfAddDel) GetMessageName() string { return "gbp_ext_itf_add_del" }
2377 func (*GbpExtItfAddDel) GetCrcString() string { return "12ed5700" }
2378 func (*GbpExtItfAddDel) GetMessageType() api.MessageType {
2379 return api.RequestMessage
2382 func (m *GbpExtItfAddDel) Size() (size int) {
2386 size += 1 // m.IsAdd
2387 size += 4 // m.ExtItf.SwIfIndex
2388 size += 4 // m.ExtItf.BdID
2389 size += 4 // m.ExtItf.RdID
2390 size += 4 // m.ExtItf.Flags
2393 func (m *GbpExtItfAddDel) Marshal(b []byte) ([]byte, error) {
2395 b = make([]byte, m.Size())
2397 buf := codec.NewBuffer(b)
2398 buf.EncodeBool(m.IsAdd)
2399 buf.EncodeUint32(uint32(m.ExtItf.SwIfIndex))
2400 buf.EncodeUint32(m.ExtItf.BdID)
2401 buf.EncodeUint32(m.ExtItf.RdID)
2402 buf.EncodeUint32(uint32(m.ExtItf.Flags))
2403 return buf.Bytes(), nil
2405 func (m *GbpExtItfAddDel) Unmarshal(b []byte) error {
2406 buf := codec.NewBuffer(b)
2407 m.IsAdd = buf.DecodeBool()
2408 m.ExtItf.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2409 m.ExtItf.BdID = buf.DecodeUint32()
2410 m.ExtItf.RdID = buf.DecodeUint32()
2411 m.ExtItf.Flags = GbpExtItfFlags(buf.DecodeUint32())
2415 // GbpExtItfAddDelReply defines message 'gbp_ext_itf_add_del_reply'.
2416 type GbpExtItfAddDelReply struct {
2417 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2420 func (m *GbpExtItfAddDelReply) Reset() { *m = GbpExtItfAddDelReply{} }
2421 func (*GbpExtItfAddDelReply) GetMessageName() string { return "gbp_ext_itf_add_del_reply" }
2422 func (*GbpExtItfAddDelReply) GetCrcString() string { return "e8d4e804" }
2423 func (*GbpExtItfAddDelReply) GetMessageType() api.MessageType {
2424 return api.ReplyMessage
2427 func (m *GbpExtItfAddDelReply) Size() (size int) {
2431 size += 4 // m.Retval
2434 func (m *GbpExtItfAddDelReply) Marshal(b []byte) ([]byte, error) {
2436 b = make([]byte, m.Size())
2438 buf := codec.NewBuffer(b)
2439 buf.EncodeInt32(m.Retval)
2440 return buf.Bytes(), nil
2442 func (m *GbpExtItfAddDelReply) Unmarshal(b []byte) error {
2443 buf := codec.NewBuffer(b)
2444 m.Retval = buf.DecodeInt32()
2448 // GbpExtItfDetails defines message 'gbp_ext_itf_details'.
2449 type GbpExtItfDetails struct {
2450 ExtItf GbpExtItf `binapi:"gbp_ext_itf,name=ext_itf" json:"ext_itf,omitempty"`
2453 func (m *GbpExtItfDetails) Reset() { *m = GbpExtItfDetails{} }
2454 func (*GbpExtItfDetails) GetMessageName() string { return "gbp_ext_itf_details" }
2455 func (*GbpExtItfDetails) GetCrcString() string { return "408a45c0" }
2456 func (*GbpExtItfDetails) GetMessageType() api.MessageType {
2457 return api.ReplyMessage
2460 func (m *GbpExtItfDetails) Size() (size int) {
2464 size += 4 // m.ExtItf.SwIfIndex
2465 size += 4 // m.ExtItf.BdID
2466 size += 4 // m.ExtItf.RdID
2467 size += 4 // m.ExtItf.Flags
2470 func (m *GbpExtItfDetails) Marshal(b []byte) ([]byte, error) {
2472 b = make([]byte, m.Size())
2474 buf := codec.NewBuffer(b)
2475 buf.EncodeUint32(uint32(m.ExtItf.SwIfIndex))
2476 buf.EncodeUint32(m.ExtItf.BdID)
2477 buf.EncodeUint32(m.ExtItf.RdID)
2478 buf.EncodeUint32(uint32(m.ExtItf.Flags))
2479 return buf.Bytes(), nil
2481 func (m *GbpExtItfDetails) Unmarshal(b []byte) error {
2482 buf := codec.NewBuffer(b)
2483 m.ExtItf.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2484 m.ExtItf.BdID = buf.DecodeUint32()
2485 m.ExtItf.RdID = buf.DecodeUint32()
2486 m.ExtItf.Flags = GbpExtItfFlags(buf.DecodeUint32())
2490 // GbpExtItfDump defines message 'gbp_ext_itf_dump'.
2491 type GbpExtItfDump struct{}
2493 func (m *GbpExtItfDump) Reset() { *m = GbpExtItfDump{} }
2494 func (*GbpExtItfDump) GetMessageName() string { return "gbp_ext_itf_dump" }
2495 func (*GbpExtItfDump) GetCrcString() string { return "51077d14" }
2496 func (*GbpExtItfDump) GetMessageType() api.MessageType {
2497 return api.RequestMessage
2500 func (m *GbpExtItfDump) Size() (size int) {
2506 func (m *GbpExtItfDump) Marshal(b []byte) ([]byte, error) {
2508 b = make([]byte, m.Size())
2510 buf := codec.NewBuffer(b)
2511 return buf.Bytes(), nil
2513 func (m *GbpExtItfDump) Unmarshal(b []byte) error {
2517 // GbpRecircAddDel defines message 'gbp_recirc_add_del'.
2518 type GbpRecircAddDel struct {
2519 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
2520 Recirc GbpRecirc `binapi:"gbp_recirc,name=recirc" json:"recirc,omitempty"`
2523 func (m *GbpRecircAddDel) Reset() { *m = GbpRecircAddDel{} }
2524 func (*GbpRecircAddDel) GetMessageName() string { return "gbp_recirc_add_del" }
2525 func (*GbpRecircAddDel) GetCrcString() string { return "718c69c3" }
2526 func (*GbpRecircAddDel) GetMessageType() api.MessageType {
2527 return api.RequestMessage
2530 func (m *GbpRecircAddDel) Size() (size int) {
2534 size += 1 // m.IsAdd
2535 size += 4 // m.Recirc.SwIfIndex
2536 size += 2 // m.Recirc.Sclass
2537 size += 1 // m.Recirc.IsExt
2540 func (m *GbpRecircAddDel) Marshal(b []byte) ([]byte, error) {
2542 b = make([]byte, m.Size())
2544 buf := codec.NewBuffer(b)
2545 buf.EncodeBool(m.IsAdd)
2546 buf.EncodeUint32(uint32(m.Recirc.SwIfIndex))
2547 buf.EncodeUint16(m.Recirc.Sclass)
2548 buf.EncodeBool(m.Recirc.IsExt)
2549 return buf.Bytes(), nil
2551 func (m *GbpRecircAddDel) Unmarshal(b []byte) error {
2552 buf := codec.NewBuffer(b)
2553 m.IsAdd = buf.DecodeBool()
2554 m.Recirc.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2555 m.Recirc.Sclass = buf.DecodeUint16()
2556 m.Recirc.IsExt = buf.DecodeBool()
2560 // GbpRecircAddDelReply defines message 'gbp_recirc_add_del_reply'.
2561 type GbpRecircAddDelReply struct {
2562 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2565 func (m *GbpRecircAddDelReply) Reset() { *m = GbpRecircAddDelReply{} }
2566 func (*GbpRecircAddDelReply) GetMessageName() string { return "gbp_recirc_add_del_reply" }
2567 func (*GbpRecircAddDelReply) GetCrcString() string { return "e8d4e804" }
2568 func (*GbpRecircAddDelReply) GetMessageType() api.MessageType {
2569 return api.ReplyMessage
2572 func (m *GbpRecircAddDelReply) Size() (size int) {
2576 size += 4 // m.Retval
2579 func (m *GbpRecircAddDelReply) Marshal(b []byte) ([]byte, error) {
2581 b = make([]byte, m.Size())
2583 buf := codec.NewBuffer(b)
2584 buf.EncodeInt32(m.Retval)
2585 return buf.Bytes(), nil
2587 func (m *GbpRecircAddDelReply) Unmarshal(b []byte) error {
2588 buf := codec.NewBuffer(b)
2589 m.Retval = buf.DecodeInt32()
2593 // GbpRecircDetails defines message 'gbp_recirc_details'.
2594 type GbpRecircDetails struct {
2595 Recirc GbpRecirc `binapi:"gbp_recirc,name=recirc" json:"recirc,omitempty"`
2598 func (m *GbpRecircDetails) Reset() { *m = GbpRecircDetails{} }
2599 func (*GbpRecircDetails) GetMessageName() string { return "gbp_recirc_details" }
2600 func (*GbpRecircDetails) GetCrcString() string { return "66ecc42e" }
2601 func (*GbpRecircDetails) GetMessageType() api.MessageType {
2602 return api.ReplyMessage
2605 func (m *GbpRecircDetails) Size() (size int) {
2609 size += 4 // m.Recirc.SwIfIndex
2610 size += 2 // m.Recirc.Sclass
2611 size += 1 // m.Recirc.IsExt
2614 func (m *GbpRecircDetails) Marshal(b []byte) ([]byte, error) {
2616 b = make([]byte, m.Size())
2618 buf := codec.NewBuffer(b)
2619 buf.EncodeUint32(uint32(m.Recirc.SwIfIndex))
2620 buf.EncodeUint16(m.Recirc.Sclass)
2621 buf.EncodeBool(m.Recirc.IsExt)
2622 return buf.Bytes(), nil
2624 func (m *GbpRecircDetails) Unmarshal(b []byte) error {
2625 buf := codec.NewBuffer(b)
2626 m.Recirc.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2627 m.Recirc.Sclass = buf.DecodeUint16()
2628 m.Recirc.IsExt = buf.DecodeBool()
2632 // GbpRecircDump defines message 'gbp_recirc_dump'.
2633 type GbpRecircDump struct{}
2635 func (m *GbpRecircDump) Reset() { *m = GbpRecircDump{} }
2636 func (*GbpRecircDump) GetMessageName() string { return "gbp_recirc_dump" }
2637 func (*GbpRecircDump) GetCrcString() string { return "51077d14" }
2638 func (*GbpRecircDump) GetMessageType() api.MessageType {
2639 return api.RequestMessage
2642 func (m *GbpRecircDump) Size() (size int) {
2648 func (m *GbpRecircDump) Marshal(b []byte) ([]byte, error) {
2650 b = make([]byte, m.Size())
2652 buf := codec.NewBuffer(b)
2653 return buf.Bytes(), nil
2655 func (m *GbpRecircDump) Unmarshal(b []byte) error {
2659 // GbpRouteDomainAdd defines message 'gbp_route_domain_add'.
2660 type GbpRouteDomainAdd struct {
2661 Rd GbpRouteDomain `binapi:"gbp_route_domain,name=rd" json:"rd,omitempty"`
2664 func (m *GbpRouteDomainAdd) Reset() { *m = GbpRouteDomainAdd{} }
2665 func (*GbpRouteDomainAdd) GetMessageName() string { return "gbp_route_domain_add" }
2666 func (*GbpRouteDomainAdd) GetCrcString() string { return "2d0afe38" }
2667 func (*GbpRouteDomainAdd) GetMessageType() api.MessageType {
2668 return api.RequestMessage
2671 func (m *GbpRouteDomainAdd) Size() (size int) {
2675 size += 4 // m.Rd.RdID
2676 size += 4 // m.Rd.IP4TableID
2677 size += 4 // m.Rd.IP6TableID
2678 size += 4 // m.Rd.IP4UuSwIfIndex
2679 size += 4 // m.Rd.IP6UuSwIfIndex
2680 size += 2 // m.Rd.Scope
2683 func (m *GbpRouteDomainAdd) Marshal(b []byte) ([]byte, error) {
2685 b = make([]byte, m.Size())
2687 buf := codec.NewBuffer(b)
2688 buf.EncodeUint32(m.Rd.RdID)
2689 buf.EncodeUint32(m.Rd.IP4TableID)
2690 buf.EncodeUint32(m.Rd.IP6TableID)
2691 buf.EncodeUint32(uint32(m.Rd.IP4UuSwIfIndex))
2692 buf.EncodeUint32(uint32(m.Rd.IP6UuSwIfIndex))
2693 buf.EncodeUint16(uint16(m.Rd.Scope))
2694 return buf.Bytes(), nil
2696 func (m *GbpRouteDomainAdd) Unmarshal(b []byte) error {
2697 buf := codec.NewBuffer(b)
2698 m.Rd.RdID = buf.DecodeUint32()
2699 m.Rd.IP4TableID = buf.DecodeUint32()
2700 m.Rd.IP6TableID = buf.DecodeUint32()
2701 m.Rd.IP4UuSwIfIndex = InterfaceIndex(buf.DecodeUint32())
2702 m.Rd.IP6UuSwIfIndex = InterfaceIndex(buf.DecodeUint32())
2703 m.Rd.Scope = GbpScope(buf.DecodeUint16())
2707 // GbpRouteDomainAddReply defines message 'gbp_route_domain_add_reply'.
2708 type GbpRouteDomainAddReply struct {
2709 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2712 func (m *GbpRouteDomainAddReply) Reset() { *m = GbpRouteDomainAddReply{} }
2713 func (*GbpRouteDomainAddReply) GetMessageName() string { return "gbp_route_domain_add_reply" }
2714 func (*GbpRouteDomainAddReply) GetCrcString() string { return "e8d4e804" }
2715 func (*GbpRouteDomainAddReply) GetMessageType() api.MessageType {
2716 return api.ReplyMessage
2719 func (m *GbpRouteDomainAddReply) Size() (size int) {
2723 size += 4 // m.Retval
2726 func (m *GbpRouteDomainAddReply) Marshal(b []byte) ([]byte, error) {
2728 b = make([]byte, m.Size())
2730 buf := codec.NewBuffer(b)
2731 buf.EncodeInt32(m.Retval)
2732 return buf.Bytes(), nil
2734 func (m *GbpRouteDomainAddReply) Unmarshal(b []byte) error {
2735 buf := codec.NewBuffer(b)
2736 m.Retval = buf.DecodeInt32()
2740 // GbpRouteDomainDel defines message 'gbp_route_domain_del'.
2741 type GbpRouteDomainDel struct {
2742 RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
2745 func (m *GbpRouteDomainDel) Reset() { *m = GbpRouteDomainDel{} }
2746 func (*GbpRouteDomainDel) GetMessageName() string { return "gbp_route_domain_del" }
2747 func (*GbpRouteDomainDel) GetCrcString() string { return "bee4edcd" }
2748 func (*GbpRouteDomainDel) GetMessageType() api.MessageType {
2749 return api.RequestMessage
2752 func (m *GbpRouteDomainDel) Size() (size int) {
2759 func (m *GbpRouteDomainDel) Marshal(b []byte) ([]byte, error) {
2761 b = make([]byte, m.Size())
2763 buf := codec.NewBuffer(b)
2764 buf.EncodeUint32(m.RdID)
2765 return buf.Bytes(), nil
2767 func (m *GbpRouteDomainDel) Unmarshal(b []byte) error {
2768 buf := codec.NewBuffer(b)
2769 m.RdID = buf.DecodeUint32()
2773 // GbpRouteDomainDelReply defines message 'gbp_route_domain_del_reply'.
2774 type GbpRouteDomainDelReply struct {
2775 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2778 func (m *GbpRouteDomainDelReply) Reset() { *m = GbpRouteDomainDelReply{} }
2779 func (*GbpRouteDomainDelReply) GetMessageName() string { return "gbp_route_domain_del_reply" }
2780 func (*GbpRouteDomainDelReply) GetCrcString() string { return "e8d4e804" }
2781 func (*GbpRouteDomainDelReply) GetMessageType() api.MessageType {
2782 return api.ReplyMessage
2785 func (m *GbpRouteDomainDelReply) Size() (size int) {
2789 size += 4 // m.Retval
2792 func (m *GbpRouteDomainDelReply) Marshal(b []byte) ([]byte, error) {
2794 b = make([]byte, m.Size())
2796 buf := codec.NewBuffer(b)
2797 buf.EncodeInt32(m.Retval)
2798 return buf.Bytes(), nil
2800 func (m *GbpRouteDomainDelReply) Unmarshal(b []byte) error {
2801 buf := codec.NewBuffer(b)
2802 m.Retval = buf.DecodeInt32()
2806 // GbpRouteDomainDetails defines message 'gbp_route_domain_details'.
2807 type GbpRouteDomainDetails struct {
2808 Rd GbpRouteDomain `binapi:"gbp_route_domain,name=rd" json:"rd,omitempty"`
2811 func (m *GbpRouteDomainDetails) Reset() { *m = GbpRouteDomainDetails{} }
2812 func (*GbpRouteDomainDetails) GetMessageName() string { return "gbp_route_domain_details" }
2813 func (*GbpRouteDomainDetails) GetCrcString() string { return "8ab11375" }
2814 func (*GbpRouteDomainDetails) GetMessageType() api.MessageType {
2815 return api.ReplyMessage
2818 func (m *GbpRouteDomainDetails) Size() (size int) {
2822 size += 4 // m.Rd.RdID
2823 size += 4 // m.Rd.IP4TableID
2824 size += 4 // m.Rd.IP6TableID
2825 size += 4 // m.Rd.IP4UuSwIfIndex
2826 size += 4 // m.Rd.IP6UuSwIfIndex
2827 size += 2 // m.Rd.Scope
2830 func (m *GbpRouteDomainDetails) Marshal(b []byte) ([]byte, error) {
2832 b = make([]byte, m.Size())
2834 buf := codec.NewBuffer(b)
2835 buf.EncodeUint32(m.Rd.RdID)
2836 buf.EncodeUint32(m.Rd.IP4TableID)
2837 buf.EncodeUint32(m.Rd.IP6TableID)
2838 buf.EncodeUint32(uint32(m.Rd.IP4UuSwIfIndex))
2839 buf.EncodeUint32(uint32(m.Rd.IP6UuSwIfIndex))
2840 buf.EncodeUint16(uint16(m.Rd.Scope))
2841 return buf.Bytes(), nil
2843 func (m *GbpRouteDomainDetails) Unmarshal(b []byte) error {
2844 buf := codec.NewBuffer(b)
2845 m.Rd.RdID = buf.DecodeUint32()
2846 m.Rd.IP4TableID = buf.DecodeUint32()
2847 m.Rd.IP6TableID = buf.DecodeUint32()
2848 m.Rd.IP4UuSwIfIndex = InterfaceIndex(buf.DecodeUint32())
2849 m.Rd.IP6UuSwIfIndex = InterfaceIndex(buf.DecodeUint32())
2850 m.Rd.Scope = GbpScope(buf.DecodeUint16())
2854 // GbpRouteDomainDump defines message 'gbp_route_domain_dump'.
2855 type GbpRouteDomainDump struct{}
2857 func (m *GbpRouteDomainDump) Reset() { *m = GbpRouteDomainDump{} }
2858 func (*GbpRouteDomainDump) GetMessageName() string { return "gbp_route_domain_dump" }
2859 func (*GbpRouteDomainDump) GetCrcString() string { return "51077d14" }
2860 func (*GbpRouteDomainDump) GetMessageType() api.MessageType {
2861 return api.RequestMessage
2864 func (m *GbpRouteDomainDump) Size() (size int) {
2870 func (m *GbpRouteDomainDump) Marshal(b []byte) ([]byte, error) {
2872 b = make([]byte, m.Size())
2874 buf := codec.NewBuffer(b)
2875 return buf.Bytes(), nil
2877 func (m *GbpRouteDomainDump) Unmarshal(b []byte) error {
2881 // GbpRouteDomainDumpReply defines message 'gbp_route_domain_dump_reply'.
2882 type GbpRouteDomainDumpReply struct {
2883 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2886 func (m *GbpRouteDomainDumpReply) Reset() { *m = GbpRouteDomainDumpReply{} }
2887 func (*GbpRouteDomainDumpReply) GetMessageName() string { return "gbp_route_domain_dump_reply" }
2888 func (*GbpRouteDomainDumpReply) GetCrcString() string { return "e8d4e804" }
2889 func (*GbpRouteDomainDumpReply) GetMessageType() api.MessageType {
2890 return api.ReplyMessage
2893 func (m *GbpRouteDomainDumpReply) Size() (size int) {
2897 size += 4 // m.Retval
2900 func (m *GbpRouteDomainDumpReply) Marshal(b []byte) ([]byte, error) {
2902 b = make([]byte, m.Size())
2904 buf := codec.NewBuffer(b)
2905 buf.EncodeInt32(m.Retval)
2906 return buf.Bytes(), nil
2908 func (m *GbpRouteDomainDumpReply) Unmarshal(b []byte) error {
2909 buf := codec.NewBuffer(b)
2910 m.Retval = buf.DecodeInt32()
2914 // GbpSubnetAddDel defines message 'gbp_subnet_add_del'.
2915 type GbpSubnetAddDel struct {
2916 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
2917 Subnet GbpSubnet `binapi:"gbp_subnet,name=subnet" json:"subnet,omitempty"`
2920 func (m *GbpSubnetAddDel) Reset() { *m = GbpSubnetAddDel{} }
2921 func (*GbpSubnetAddDel) GetMessageName() string { return "gbp_subnet_add_del" }
2922 func (*GbpSubnetAddDel) GetCrcString() string { return "888aca35" }
2923 func (*GbpSubnetAddDel) GetMessageType() api.MessageType {
2924 return api.RequestMessage
2927 func (m *GbpSubnetAddDel) Size() (size int) {
2931 size += 1 // m.IsAdd
2932 size += 4 // m.Subnet.RdID
2933 size += 4 // m.Subnet.SwIfIndex
2934 size += 2 // m.Subnet.Sclass
2935 size += 4 // m.Subnet.Type
2936 size += 4 // m.Subnet.Prefix.Address.Af
2937 size += 1 * 16 // m.Subnet.Prefix.Address.Un
2938 size += 1 // m.Subnet.Prefix.Len
2941 func (m *GbpSubnetAddDel) Marshal(b []byte) ([]byte, error) {
2943 b = make([]byte, m.Size())
2945 buf := codec.NewBuffer(b)
2946 buf.EncodeBool(m.IsAdd)
2947 buf.EncodeUint32(m.Subnet.RdID)
2948 buf.EncodeUint32(uint32(m.Subnet.SwIfIndex))
2949 buf.EncodeUint16(m.Subnet.Sclass)
2950 buf.EncodeUint32(uint32(m.Subnet.Type))
2951 buf.EncodeUint32(uint32(m.Subnet.Prefix.Address.Af))
2952 buf.EncodeBytes(m.Subnet.Prefix.Address.Un.XXX_UnionData[:], 16)
2953 buf.EncodeUint8(m.Subnet.Prefix.Len)
2954 return buf.Bytes(), nil
2956 func (m *GbpSubnetAddDel) Unmarshal(b []byte) error {
2957 buf := codec.NewBuffer(b)
2958 m.IsAdd = buf.DecodeBool()
2959 m.Subnet.RdID = buf.DecodeUint32()
2960 m.Subnet.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2961 m.Subnet.Sclass = buf.DecodeUint16()
2962 m.Subnet.Type = GbpSubnetType(buf.DecodeUint32())
2963 m.Subnet.Prefix.Address.Af = AddressFamily(buf.DecodeUint32())
2964 copy(m.Subnet.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2965 m.Subnet.Prefix.Len = buf.DecodeUint8()
2969 // GbpSubnetAddDelReply defines message 'gbp_subnet_add_del_reply'.
2970 type GbpSubnetAddDelReply struct {
2971 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2974 func (m *GbpSubnetAddDelReply) Reset() { *m = GbpSubnetAddDelReply{} }
2975 func (*GbpSubnetAddDelReply) GetMessageName() string { return "gbp_subnet_add_del_reply" }
2976 func (*GbpSubnetAddDelReply) GetCrcString() string { return "e8d4e804" }
2977 func (*GbpSubnetAddDelReply) GetMessageType() api.MessageType {
2978 return api.ReplyMessage
2981 func (m *GbpSubnetAddDelReply) Size() (size int) {
2985 size += 4 // m.Retval
2988 func (m *GbpSubnetAddDelReply) Marshal(b []byte) ([]byte, error) {
2990 b = make([]byte, m.Size())
2992 buf := codec.NewBuffer(b)
2993 buf.EncodeInt32(m.Retval)
2994 return buf.Bytes(), nil
2996 func (m *GbpSubnetAddDelReply) Unmarshal(b []byte) error {
2997 buf := codec.NewBuffer(b)
2998 m.Retval = buf.DecodeInt32()
3002 // GbpSubnetDetails defines message 'gbp_subnet_details'.
3003 type GbpSubnetDetails struct {
3004 Subnet GbpSubnet `binapi:"gbp_subnet,name=subnet" json:"subnet,omitempty"`
3007 func (m *GbpSubnetDetails) Reset() { *m = GbpSubnetDetails{} }
3008 func (*GbpSubnetDetails) GetMessageName() string { return "gbp_subnet_details" }
3009 func (*GbpSubnetDetails) GetCrcString() string { return "4ed84156" }
3010 func (*GbpSubnetDetails) GetMessageType() api.MessageType {
3011 return api.ReplyMessage
3014 func (m *GbpSubnetDetails) Size() (size int) {
3018 size += 4 // m.Subnet.RdID
3019 size += 4 // m.Subnet.SwIfIndex
3020 size += 2 // m.Subnet.Sclass
3021 size += 4 // m.Subnet.Type
3022 size += 4 // m.Subnet.Prefix.Address.Af
3023 size += 1 * 16 // m.Subnet.Prefix.Address.Un
3024 size += 1 // m.Subnet.Prefix.Len
3027 func (m *GbpSubnetDetails) Marshal(b []byte) ([]byte, error) {
3029 b = make([]byte, m.Size())
3031 buf := codec.NewBuffer(b)
3032 buf.EncodeUint32(m.Subnet.RdID)
3033 buf.EncodeUint32(uint32(m.Subnet.SwIfIndex))
3034 buf.EncodeUint16(m.Subnet.Sclass)
3035 buf.EncodeUint32(uint32(m.Subnet.Type))
3036 buf.EncodeUint32(uint32(m.Subnet.Prefix.Address.Af))
3037 buf.EncodeBytes(m.Subnet.Prefix.Address.Un.XXX_UnionData[:], 16)
3038 buf.EncodeUint8(m.Subnet.Prefix.Len)
3039 return buf.Bytes(), nil
3041 func (m *GbpSubnetDetails) Unmarshal(b []byte) error {
3042 buf := codec.NewBuffer(b)
3043 m.Subnet.RdID = buf.DecodeUint32()
3044 m.Subnet.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
3045 m.Subnet.Sclass = buf.DecodeUint16()
3046 m.Subnet.Type = GbpSubnetType(buf.DecodeUint32())
3047 m.Subnet.Prefix.Address.Af = AddressFamily(buf.DecodeUint32())
3048 copy(m.Subnet.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
3049 m.Subnet.Prefix.Len = buf.DecodeUint8()
3053 // GbpSubnetDump defines message 'gbp_subnet_dump'.
3054 type GbpSubnetDump struct{}
3056 func (m *GbpSubnetDump) Reset() { *m = GbpSubnetDump{} }
3057 func (*GbpSubnetDump) GetMessageName() string { return "gbp_subnet_dump" }
3058 func (*GbpSubnetDump) GetCrcString() string { return "51077d14" }
3059 func (*GbpSubnetDump) GetMessageType() api.MessageType {
3060 return api.RequestMessage
3063 func (m *GbpSubnetDump) Size() (size int) {
3069 func (m *GbpSubnetDump) Marshal(b []byte) ([]byte, error) {
3071 b = make([]byte, m.Size())
3073 buf := codec.NewBuffer(b)
3074 return buf.Bytes(), nil
3076 func (m *GbpSubnetDump) Unmarshal(b []byte) error {
3080 // GbpVxlanTunnelAdd defines message 'gbp_vxlan_tunnel_add'.
3081 type GbpVxlanTunnelAdd struct {
3082 Tunnel GbpVxlanTunnel `binapi:"gbp_vxlan_tunnel,name=tunnel" json:"tunnel,omitempty"`
3085 func (m *GbpVxlanTunnelAdd) Reset() { *m = GbpVxlanTunnelAdd{} }
3086 func (*GbpVxlanTunnelAdd) GetMessageName() string { return "gbp_vxlan_tunnel_add" }
3087 func (*GbpVxlanTunnelAdd) GetCrcString() string { return "3e070b35" }
3088 func (*GbpVxlanTunnelAdd) GetMessageType() api.MessageType {
3089 return api.RequestMessage
3092 func (m *GbpVxlanTunnelAdd) Size() (size int) {
3096 size += 4 // m.Tunnel.Vni
3097 size += 4 // m.Tunnel.Mode
3098 size += 4 // m.Tunnel.BdRdID
3099 size += 1 * 4 // m.Tunnel.Src
3102 func (m *GbpVxlanTunnelAdd) Marshal(b []byte) ([]byte, error) {
3104 b = make([]byte, m.Size())
3106 buf := codec.NewBuffer(b)
3107 buf.EncodeUint32(m.Tunnel.Vni)
3108 buf.EncodeUint32(uint32(m.Tunnel.Mode))
3109 buf.EncodeUint32(m.Tunnel.BdRdID)
3110 buf.EncodeBytes(m.Tunnel.Src[:], 4)
3111 return buf.Bytes(), nil
3113 func (m *GbpVxlanTunnelAdd) Unmarshal(b []byte) error {
3114 buf := codec.NewBuffer(b)
3115 m.Tunnel.Vni = buf.DecodeUint32()
3116 m.Tunnel.Mode = GbpVxlanTunnelMode(buf.DecodeUint32())
3117 m.Tunnel.BdRdID = buf.DecodeUint32()
3118 copy(m.Tunnel.Src[:], buf.DecodeBytes(4))
3122 // GbpVxlanTunnelAddReply defines message 'gbp_vxlan_tunnel_add_reply'.
3123 type GbpVxlanTunnelAddReply struct {
3124 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3125 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
3128 func (m *GbpVxlanTunnelAddReply) Reset() { *m = GbpVxlanTunnelAddReply{} }
3129 func (*GbpVxlanTunnelAddReply) GetMessageName() string { return "gbp_vxlan_tunnel_add_reply" }
3130 func (*GbpVxlanTunnelAddReply) GetCrcString() string { return "5383d31f" }
3131 func (*GbpVxlanTunnelAddReply) GetMessageType() api.MessageType {
3132 return api.ReplyMessage
3135 func (m *GbpVxlanTunnelAddReply) Size() (size int) {
3139 size += 4 // m.Retval
3140 size += 4 // m.SwIfIndex
3143 func (m *GbpVxlanTunnelAddReply) Marshal(b []byte) ([]byte, error) {
3145 b = make([]byte, m.Size())
3147 buf := codec.NewBuffer(b)
3148 buf.EncodeInt32(m.Retval)
3149 buf.EncodeUint32(uint32(m.SwIfIndex))
3150 return buf.Bytes(), nil
3152 func (m *GbpVxlanTunnelAddReply) Unmarshal(b []byte) error {
3153 buf := codec.NewBuffer(b)
3154 m.Retval = buf.DecodeInt32()
3155 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
3159 // GbpVxlanTunnelDel defines message 'gbp_vxlan_tunnel_del'.
3160 type GbpVxlanTunnelDel struct {
3161 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
3164 func (m *GbpVxlanTunnelDel) Reset() { *m = GbpVxlanTunnelDel{} }
3165 func (*GbpVxlanTunnelDel) GetMessageName() string { return "gbp_vxlan_tunnel_del" }
3166 func (*GbpVxlanTunnelDel) GetCrcString() string { return "8d1f2fe9" }
3167 func (*GbpVxlanTunnelDel) GetMessageType() api.MessageType {
3168 return api.RequestMessage
3171 func (m *GbpVxlanTunnelDel) Size() (size int) {
3178 func (m *GbpVxlanTunnelDel) Marshal(b []byte) ([]byte, error) {
3180 b = make([]byte, m.Size())
3182 buf := codec.NewBuffer(b)
3183 buf.EncodeUint32(m.Vni)
3184 return buf.Bytes(), nil
3186 func (m *GbpVxlanTunnelDel) Unmarshal(b []byte) error {
3187 buf := codec.NewBuffer(b)
3188 m.Vni = buf.DecodeUint32()
3192 // GbpVxlanTunnelDelReply defines message 'gbp_vxlan_tunnel_del_reply'.
3193 type GbpVxlanTunnelDelReply struct {
3194 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
3197 func (m *GbpVxlanTunnelDelReply) Reset() { *m = GbpVxlanTunnelDelReply{} }
3198 func (*GbpVxlanTunnelDelReply) GetMessageName() string { return "gbp_vxlan_tunnel_del_reply" }
3199 func (*GbpVxlanTunnelDelReply) GetCrcString() string { return "e8d4e804" }
3200 func (*GbpVxlanTunnelDelReply) GetMessageType() api.MessageType {
3201 return api.ReplyMessage
3204 func (m *GbpVxlanTunnelDelReply) Size() (size int) {
3208 size += 4 // m.Retval
3211 func (m *GbpVxlanTunnelDelReply) Marshal(b []byte) ([]byte, error) {
3213 b = make([]byte, m.Size())
3215 buf := codec.NewBuffer(b)
3216 buf.EncodeInt32(m.Retval)
3217 return buf.Bytes(), nil
3219 func (m *GbpVxlanTunnelDelReply) Unmarshal(b []byte) error {
3220 buf := codec.NewBuffer(b)
3221 m.Retval = buf.DecodeInt32()
3225 // GbpVxlanTunnelDetails defines message 'gbp_vxlan_tunnel_details'.
3226 type GbpVxlanTunnelDetails struct {
3227 Tunnel GbpVxlanTunnel `binapi:"gbp_vxlan_tunnel,name=tunnel" json:"tunnel,omitempty"`
3230 func (m *GbpVxlanTunnelDetails) Reset() { *m = GbpVxlanTunnelDetails{} }
3231 func (*GbpVxlanTunnelDetails) GetMessageName() string { return "gbp_vxlan_tunnel_details" }
3232 func (*GbpVxlanTunnelDetails) GetCrcString() string { return "65c6c818" }
3233 func (*GbpVxlanTunnelDetails) GetMessageType() api.MessageType {
3234 return api.ReplyMessage
3237 func (m *GbpVxlanTunnelDetails) Size() (size int) {
3241 size += 4 // m.Tunnel.Vni
3242 size += 4 // m.Tunnel.Mode
3243 size += 4 // m.Tunnel.BdRdID
3244 size += 1 * 4 // m.Tunnel.Src
3247 func (m *GbpVxlanTunnelDetails) Marshal(b []byte) ([]byte, error) {
3249 b = make([]byte, m.Size())
3251 buf := codec.NewBuffer(b)
3252 buf.EncodeUint32(m.Tunnel.Vni)
3253 buf.EncodeUint32(uint32(m.Tunnel.Mode))
3254 buf.EncodeUint32(m.Tunnel.BdRdID)
3255 buf.EncodeBytes(m.Tunnel.Src[:], 4)
3256 return buf.Bytes(), nil
3258 func (m *GbpVxlanTunnelDetails) Unmarshal(b []byte) error {
3259 buf := codec.NewBuffer(b)
3260 m.Tunnel.Vni = buf.DecodeUint32()
3261 m.Tunnel.Mode = GbpVxlanTunnelMode(buf.DecodeUint32())
3262 m.Tunnel.BdRdID = buf.DecodeUint32()
3263 copy(m.Tunnel.Src[:], buf.DecodeBytes(4))
3267 // GbpVxlanTunnelDump defines message 'gbp_vxlan_tunnel_dump'.
3268 type GbpVxlanTunnelDump struct{}
3270 func (m *GbpVxlanTunnelDump) Reset() { *m = GbpVxlanTunnelDump{} }
3271 func (*GbpVxlanTunnelDump) GetMessageName() string { return "gbp_vxlan_tunnel_dump" }
3272 func (*GbpVxlanTunnelDump) GetCrcString() string { return "51077d14" }
3273 func (*GbpVxlanTunnelDump) GetMessageType() api.MessageType {
3274 return api.RequestMessage
3277 func (m *GbpVxlanTunnelDump) Size() (size int) {
3283 func (m *GbpVxlanTunnelDump) Marshal(b []byte) ([]byte, error) {
3285 b = make([]byte, m.Size())
3287 buf := codec.NewBuffer(b)
3288 return buf.Bytes(), nil
3290 func (m *GbpVxlanTunnelDump) Unmarshal(b []byte) error {
3294 func init() { file_gbp_binapi_init() }
3295 func file_gbp_binapi_init() {
3296 api.RegisterMessage((*GbpBridgeDomainAdd)(nil), "gbp_bridge_domain_add_8454bfdf")
3297 api.RegisterMessage((*GbpBridgeDomainAddReply)(nil), "gbp_bridge_domain_add_reply_e8d4e804")
3298 api.RegisterMessage((*GbpBridgeDomainDel)(nil), "gbp_bridge_domain_del_c25fdce6")
3299 api.RegisterMessage((*GbpBridgeDomainDelReply)(nil), "gbp_bridge_domain_del_reply_e8d4e804")
3300 api.RegisterMessage((*GbpBridgeDomainDetails)(nil), "gbp_bridge_domain_details_2acd15f9")
3301 api.RegisterMessage((*GbpBridgeDomainDump)(nil), "gbp_bridge_domain_dump_51077d14")
3302 api.RegisterMessage((*GbpBridgeDomainDumpReply)(nil), "gbp_bridge_domain_dump_reply_e8d4e804")
3303 api.RegisterMessage((*GbpContractAddDel)(nil), "gbp_contract_add_del_553e275b")
3304 api.RegisterMessage((*GbpContractAddDelReply)(nil), "gbp_contract_add_del_reply_1992deab")
3305 api.RegisterMessage((*GbpContractDetails)(nil), "gbp_contract_details_2a18db6e")
3306 api.RegisterMessage((*GbpContractDump)(nil), "gbp_contract_dump_51077d14")
3307 api.RegisterMessage((*GbpEndpointAdd)(nil), "gbp_endpoint_add_9ce16d5a")
3308 api.RegisterMessage((*GbpEndpointAddReply)(nil), "gbp_endpoint_add_reply_1dd3ff3e")
3309 api.RegisterMessage((*GbpEndpointDel)(nil), "gbp_endpoint_del_b93cd566")
3310 api.RegisterMessage((*GbpEndpointDelReply)(nil), "gbp_endpoint_del_reply_e8d4e804")
3311 api.RegisterMessage((*GbpEndpointDetails)(nil), "gbp_endpoint_details_08aecb60")
3312 api.RegisterMessage((*GbpEndpointDump)(nil), "gbp_endpoint_dump_51077d14")
3313 api.RegisterMessage((*GbpEndpointGroupAdd)(nil), "gbp_endpoint_group_add_8e0f4054")
3314 api.RegisterMessage((*GbpEndpointGroupAddReply)(nil), "gbp_endpoint_group_add_reply_e8d4e804")
3315 api.RegisterMessage((*GbpEndpointGroupDel)(nil), "gbp_endpoint_group_del_3436b8b7")
3316 api.RegisterMessage((*GbpEndpointGroupDelReply)(nil), "gbp_endpoint_group_del_reply_e8d4e804")
3317 api.RegisterMessage((*GbpEndpointGroupDetails)(nil), "gbp_endpoint_group_details_8f38292c")
3318 api.RegisterMessage((*GbpEndpointGroupDump)(nil), "gbp_endpoint_group_dump_51077d14")
3319 api.RegisterMessage((*GbpExtItfAddDel)(nil), "gbp_ext_itf_add_del_12ed5700")
3320 api.RegisterMessage((*GbpExtItfAddDelReply)(nil), "gbp_ext_itf_add_del_reply_e8d4e804")
3321 api.RegisterMessage((*GbpExtItfDetails)(nil), "gbp_ext_itf_details_408a45c0")
3322 api.RegisterMessage((*GbpExtItfDump)(nil), "gbp_ext_itf_dump_51077d14")
3323 api.RegisterMessage((*GbpRecircAddDel)(nil), "gbp_recirc_add_del_718c69c3")
3324 api.RegisterMessage((*GbpRecircAddDelReply)(nil), "gbp_recirc_add_del_reply_e8d4e804")
3325 api.RegisterMessage((*GbpRecircDetails)(nil), "gbp_recirc_details_66ecc42e")
3326 api.RegisterMessage((*GbpRecircDump)(nil), "gbp_recirc_dump_51077d14")
3327 api.RegisterMessage((*GbpRouteDomainAdd)(nil), "gbp_route_domain_add_2d0afe38")
3328 api.RegisterMessage((*GbpRouteDomainAddReply)(nil), "gbp_route_domain_add_reply_e8d4e804")
3329 api.RegisterMessage((*GbpRouteDomainDel)(nil), "gbp_route_domain_del_bee4edcd")
3330 api.RegisterMessage((*GbpRouteDomainDelReply)(nil), "gbp_route_domain_del_reply_e8d4e804")
3331 api.RegisterMessage((*GbpRouteDomainDetails)(nil), "gbp_route_domain_details_8ab11375")
3332 api.RegisterMessage((*GbpRouteDomainDump)(nil), "gbp_route_domain_dump_51077d14")
3333 api.RegisterMessage((*GbpRouteDomainDumpReply)(nil), "gbp_route_domain_dump_reply_e8d4e804")
3334 api.RegisterMessage((*GbpSubnetAddDel)(nil), "gbp_subnet_add_del_888aca35")
3335 api.RegisterMessage((*GbpSubnetAddDelReply)(nil), "gbp_subnet_add_del_reply_e8d4e804")
3336 api.RegisterMessage((*GbpSubnetDetails)(nil), "gbp_subnet_details_4ed84156")
3337 api.RegisterMessage((*GbpSubnetDump)(nil), "gbp_subnet_dump_51077d14")
3338 api.RegisterMessage((*GbpVxlanTunnelAdd)(nil), "gbp_vxlan_tunnel_add_3e070b35")
3339 api.RegisterMessage((*GbpVxlanTunnelAddReply)(nil), "gbp_vxlan_tunnel_add_reply_5383d31f")
3340 api.RegisterMessage((*GbpVxlanTunnelDel)(nil), "gbp_vxlan_tunnel_del_8d1f2fe9")
3341 api.RegisterMessage((*GbpVxlanTunnelDelReply)(nil), "gbp_vxlan_tunnel_del_reply_e8d4e804")
3342 api.RegisterMessage((*GbpVxlanTunnelDetails)(nil), "gbp_vxlan_tunnel_details_65c6c818")
3343 api.RegisterMessage((*GbpVxlanTunnelDump)(nil), "gbp_vxlan_tunnel_dump_51077d14")
3346 // Messages returns list of all messages in this module.
3347 func AllMessages() []api.Message {
3348 return []api.Message{
3349 (*GbpBridgeDomainAdd)(nil),
3350 (*GbpBridgeDomainAddReply)(nil),
3351 (*GbpBridgeDomainDel)(nil),
3352 (*GbpBridgeDomainDelReply)(nil),
3353 (*GbpBridgeDomainDetails)(nil),
3354 (*GbpBridgeDomainDump)(nil),
3355 (*GbpBridgeDomainDumpReply)(nil),
3356 (*GbpContractAddDel)(nil),
3357 (*GbpContractAddDelReply)(nil),
3358 (*GbpContractDetails)(nil),
3359 (*GbpContractDump)(nil),
3360 (*GbpEndpointAdd)(nil),
3361 (*GbpEndpointAddReply)(nil),
3362 (*GbpEndpointDel)(nil),
3363 (*GbpEndpointDelReply)(nil),
3364 (*GbpEndpointDetails)(nil),
3365 (*GbpEndpointDump)(nil),
3366 (*GbpEndpointGroupAdd)(nil),
3367 (*GbpEndpointGroupAddReply)(nil),
3368 (*GbpEndpointGroupDel)(nil),
3369 (*GbpEndpointGroupDelReply)(nil),
3370 (*GbpEndpointGroupDetails)(nil),
3371 (*GbpEndpointGroupDump)(nil),
3372 (*GbpExtItfAddDel)(nil),
3373 (*GbpExtItfAddDelReply)(nil),
3374 (*GbpExtItfDetails)(nil),
3375 (*GbpExtItfDump)(nil),
3376 (*GbpRecircAddDel)(nil),
3377 (*GbpRecircAddDelReply)(nil),
3378 (*GbpRecircDetails)(nil),
3379 (*GbpRecircDump)(nil),
3380 (*GbpRouteDomainAdd)(nil),
3381 (*GbpRouteDomainAddReply)(nil),
3382 (*GbpRouteDomainDel)(nil),
3383 (*GbpRouteDomainDelReply)(nil),
3384 (*GbpRouteDomainDetails)(nil),
3385 (*GbpRouteDomainDump)(nil),
3386 (*GbpRouteDomainDumpReply)(nil),
3387 (*GbpSubnetAddDel)(nil),
3388 (*GbpSubnetAddDelReply)(nil),
3389 (*GbpSubnetDetails)(nil),
3390 (*GbpSubnetDump)(nil),
3391 (*GbpVxlanTunnelAdd)(nil),
3392 (*GbpVxlanTunnelAddReply)(nil),
3393 (*GbpVxlanTunnelDel)(nil),
3394 (*GbpVxlanTunnelDelReply)(nil),
3395 (*GbpVxlanTunnelDetails)(nil),
3396 (*GbpVxlanTunnelDump)(nil),