aboutsummaryrefslogtreecommitdiffstats
path: root/internal/testbinapi/binapi2001/l2/l2.ba.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/testbinapi/binapi2001/l2/l2.ba.go')
-rw-r--r--internal/testbinapi/binapi2001/l2/l2.ba.go3250
1 files changed, 0 insertions, 3250 deletions
diff --git a/internal/testbinapi/binapi2001/l2/l2.ba.go b/internal/testbinapi/binapi2001/l2/l2.ba.go
deleted file mode 100644
index d4af668..0000000
--- a/internal/testbinapi/binapi2001/l2/l2.ba.go
+++ /dev/null
@@ -1,3250 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.4.0-dev
-// VPP: 20.01
-// source: .vppapi/core/l2.api.json
-
-// Package l2 contains generated bindings for API file l2.api.
-//
-// Contents:
-// 7 aliases
-// 12 enums
-// 9 structs
-// 1 union
-// 54 messages
-//
-package l2
-
-import (
- "fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
- "net"
- "strconv"
- "strings"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "l2"
- APIVersion = "2.2.2"
- VersionCrc = 0x2e148df3
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// BdFlags defines enum 'bd_flags'.
-type BdFlags uint32
-
-const (
- BRIDGE_API_FLAG_NONE BdFlags = 0
- BRIDGE_API_FLAG_LEARN BdFlags = 1
- BRIDGE_API_FLAG_FWD BdFlags = 2
- BRIDGE_API_FLAG_FLOOD BdFlags = 4
- BRIDGE_API_FLAG_UU_FLOOD BdFlags = 8
- BRIDGE_API_FLAG_ARP_TERM BdFlags = 16
- BRIDGE_API_FLAG_ARP_UFWD BdFlags = 32
-)
-
-var (
- BdFlags_name = map[uint32]string{
- 0: "BRIDGE_API_FLAG_NONE",
- 1: "BRIDGE_API_FLAG_LEARN",
- 2: "BRIDGE_API_FLAG_FWD",
- 4: "BRIDGE_API_FLAG_FLOOD",
- 8: "BRIDGE_API_FLAG_UU_FLOOD",
- 16: "BRIDGE_API_FLAG_ARP_TERM",
- 32: "BRIDGE_API_FLAG_ARP_UFWD",
- }
- BdFlags_value = map[string]uint32{
- "BRIDGE_API_FLAG_NONE": 0,
- "BRIDGE_API_FLAG_LEARN": 1,
- "BRIDGE_API_FLAG_FWD": 2,
- "BRIDGE_API_FLAG_FLOOD": 4,
- "BRIDGE_API_FLAG_UU_FLOOD": 8,
- "BRIDGE_API_FLAG_ARP_TERM": 16,
- "BRIDGE_API_FLAG_ARP_UFWD": 32,
- }
-)
-
-func (x BdFlags) String() string {
- s, ok := BdFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := BdFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "BdFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// L2PortType defines enum 'l2_port_type'.
-type L2PortType uint32
-
-const (
- L2_API_PORT_TYPE_NORMAL L2PortType = 0
- L2_API_PORT_TYPE_BVI L2PortType = 1
- L2_API_PORT_TYPE_UU_FWD L2PortType = 2
-)
-
-var (
- L2PortType_name = map[uint32]string{
- 0: "L2_API_PORT_TYPE_NORMAL",
- 1: "L2_API_PORT_TYPE_BVI",
- 2: "L2_API_PORT_TYPE_UU_FWD",
- }
- L2PortType_value = map[string]uint32{
- "L2_API_PORT_TYPE_NORMAL": 0,
- "L2_API_PORT_TYPE_BVI": 1,
- "L2_API_PORT_TYPE_UU_FWD": 2,
- }
-)
-
-func (x L2PortType) String() string {
- s, ok := L2PortType_name[uint32(x)]
- if ok {
- return s
- }
- return "L2PortType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// MacAddress defines alias 'mac_address'.
-type MacAddress [6]uint8
-
-func ParseMacAddress(s string) (MacAddress, error) {
- var macaddr MacAddress
- mac, err := net.ParseMAC(s)
- if err != nil {
- return macaddr, err
- }
- copy(macaddr[:], mac[:])
- return macaddr, nil
-}
-func (x MacAddress) ToMAC() net.HardwareAddr {
- return net.HardwareAddr(x[:])
-}
-func (x MacAddress) String() string {
- return x.ToMAC().String()
-}
-func (x *MacAddress) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-func (x *MacAddress) UnmarshalText(text []byte) error {
- mac, err := ParseMacAddress(string(text))
- if err != nil {
- return err
- }
- *x = mac
- return nil
-}
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr, nil
-}
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-func (x Address) String() string {
- return x.ToIP().String()
-}
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// BdIPMac defines type 'bd_ip_mac'.
-type BdIPMac struct {
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
- IP Address `binapi:"address,name=ip" json:"ip,omitempty"`
- Mac MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"`
-}
-
-// BridgeDomainSwIf defines type 'bridge_domain_sw_if'.
-type BridgeDomainSwIf struct {
- Context uint32 `binapi:"u32,name=context" json:"context,omitempty"`
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- Shg uint8 `binapi:"u8,name=shg" json:"shg,omitempty"`
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// MacEntry defines type 'mac_entry'.
-type MacEntry struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- MacAddr []byte `binapi:"u8[6],name=mac_addr" json:"mac_addr,omitempty"`
- Action uint8 `binapi:"u8,name=action" json:"action,omitempty"`
- Flags uint8 `binapi:"u8,name=flags" json:"flags,omitempty"`
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// BdIPMacAddDel defines message 'bd_ip_mac_add_del'.
-type BdIPMacAddDel struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- Entry BdIPMac `binapi:"bd_ip_mac,name=entry" json:"entry,omitempty"`
-}
-
-func (m *BdIPMacAddDel) Reset() { *m = BdIPMacAddDel{} }
-func (*BdIPMacAddDel) GetMessageName() string { return "bd_ip_mac_add_del" }
-func (*BdIPMacAddDel) GetCrcString() string { return "25bf4063" }
-func (*BdIPMacAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BdIPMacAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.Entry.BdID
- size += 4 // m.Entry.IP.Af
- size += 1 * 16 // m.Entry.IP.Un
- size += 1 * 6 // m.Entry.Mac
- return size
-}
-func (m *BdIPMacAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeUint32(m.Entry.BdID)
- buf.EncodeUint32(uint32(m.Entry.IP.Af))
- buf.EncodeBytes(m.Entry.IP.Un.XXX_UnionData[:], 16)
- buf.EncodeBytes(m.Entry.Mac[:], 6)
- return buf.Bytes(), nil
-}
-func (m *BdIPMacAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.Entry.BdID = buf.DecodeUint32()
- m.Entry.IP.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Entry.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- copy(m.Entry.Mac[:], buf.DecodeBytes(6))
- return nil
-}
-
-// BdIPMacAddDelReply defines message 'bd_ip_mac_add_del_reply'.
-type BdIPMacAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BdIPMacAddDelReply) Reset() { *m = BdIPMacAddDelReply{} }
-func (*BdIPMacAddDelReply) GetMessageName() string { return "bd_ip_mac_add_del_reply" }
-func (*BdIPMacAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*BdIPMacAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BdIPMacAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BdIPMacAddDelReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *BdIPMacAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// BdIPMacDetails defines message 'bd_ip_mac_details'.
-type BdIPMacDetails struct {
- Entry BdIPMac `binapi:"bd_ip_mac,name=entry" json:"entry,omitempty"`
-}
-
-func (m *BdIPMacDetails) Reset() { *m = BdIPMacDetails{} }
-func (*BdIPMacDetails) GetMessageName() string { return "bd_ip_mac_details" }
-func (*BdIPMacDetails) GetCrcString() string { return "a52f8044" }
-func (*BdIPMacDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BdIPMacDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Entry.BdID
- size += 4 // m.Entry.IP.Af
- size += 1 * 16 // m.Entry.IP.Un
- size += 1 * 6 // m.Entry.Mac
- return size
-}
-func (m *BdIPMacDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Entry.BdID)
- buf.EncodeUint32(uint32(m.Entry.IP.Af))
- buf.EncodeBytes(m.Entry.IP.Un.XXX_UnionData[:], 16)
- buf.EncodeBytes(m.Entry.Mac[:], 6)
- return buf.Bytes(), nil
-}
-func (m *BdIPMacDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Entry.BdID = buf.DecodeUint32()
- m.Entry.IP.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Entry.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- copy(m.Entry.Mac[:], buf.DecodeBytes(6))
- return nil
-}
-
-// BdIPMacDump defines message 'bd_ip_mac_dump'.
-type BdIPMacDump struct {
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
-}
-
-func (m *BdIPMacDump) Reset() { *m = BdIPMacDump{} }
-func (*BdIPMacDump) GetMessageName() string { return "bd_ip_mac_dump" }
-func (*BdIPMacDump) GetCrcString() string { return "c25fdce6" }
-func (*BdIPMacDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BdIPMacDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.BdID
- return size
-}
-func (m *BdIPMacDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.BdID)
- return buf.Bytes(), nil
-}
-func (m *BdIPMacDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BdID = buf.DecodeUint32()
- return nil
-}
-
-// BdIPMacFlush defines message 'bd_ip_mac_flush'.
-type BdIPMacFlush struct {
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
-}
-
-func (m *BdIPMacFlush) Reset() { *m = BdIPMacFlush{} }
-func (*BdIPMacFlush) GetMessageName() string { return "bd_ip_mac_flush" }
-func (*BdIPMacFlush) GetCrcString() string { return "c25fdce6" }
-func (*BdIPMacFlush) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BdIPMacFlush) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.BdID
- return size
-}
-func (m *BdIPMacFlush) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.BdID)
- return buf.Bytes(), nil
-}
-func (m *BdIPMacFlush) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BdID = buf.DecodeUint32()
- return nil
-}
-
-// BdIPMacFlushReply defines message 'bd_ip_mac_flush_reply'.
-type BdIPMacFlushReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BdIPMacFlushReply) Reset() { *m = BdIPMacFlushReply{} }
-func (*BdIPMacFlushReply) GetMessageName() string { return "bd_ip_mac_flush_reply" }
-func (*BdIPMacFlushReply) GetCrcString() string { return "e8d4e804" }
-func (*BdIPMacFlushReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BdIPMacFlushReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BdIPMacFlushReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *BdIPMacFlushReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// BridgeDomainAddDel defines message 'bridge_domain_add_del'.
-type BridgeDomainAddDel struct {
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
- Flood uint8 `binapi:"u8,name=flood" json:"flood,omitempty"`
- UuFlood uint8 `binapi:"u8,name=uu_flood" json:"uu_flood,omitempty"`
- Forward uint8 `binapi:"u8,name=forward" json:"forward,omitempty"`
- Learn uint8 `binapi:"u8,name=learn" json:"learn,omitempty"`
- ArpTerm uint8 `binapi:"u8,name=arp_term" json:"arp_term,omitempty"`
- ArpUfwd uint8 `binapi:"u8,name=arp_ufwd" json:"arp_ufwd,omitempty"`
- MacAge uint8 `binapi:"u8,name=mac_age" json:"mac_age,omitempty"`
- BdTag []byte `binapi:"u8[64],name=bd_tag" json:"bd_tag,omitempty"`
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
-}
-
-func (m *BridgeDomainAddDel) Reset() { *m = BridgeDomainAddDel{} }
-func (*BridgeDomainAddDel) GetMessageName() string { return "bridge_domain_add_del" }
-func (*BridgeDomainAddDel) GetCrcString() string { return "c6360720" }
-func (*BridgeDomainAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BridgeDomainAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.BdID
- size += 1 // m.Flood
- size += 1 // m.UuFlood
- size += 1 // m.Forward
- size += 1 // m.Learn
- size += 1 // m.ArpTerm
- size += 1 // m.ArpUfwd
- size += 1 // m.MacAge
- size += 1 * 64 // m.BdTag
- size += 1 // m.IsAdd
- return size
-}
-func (m *BridgeDomainAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.BdID)
- buf.EncodeUint8(m.Flood)
- buf.EncodeUint8(m.UuFlood)
- buf.EncodeUint8(m.Forward)
- buf.EncodeUint8(m.Learn)
- buf.EncodeUint8(m.ArpTerm)
- buf.EncodeUint8(m.ArpUfwd)
- buf.EncodeUint8(m.MacAge)
- buf.EncodeBytes(m.BdTag, 64)
- buf.EncodeUint8(m.IsAdd)
- return buf.Bytes(), nil
-}
-func (m *BridgeDomainAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BdID = buf.DecodeUint32()
- m.Flood = buf.DecodeUint8()
- m.UuFlood = buf.DecodeUint8()
- m.Forward = buf.DecodeUint8()
- m.Learn = buf.DecodeUint8()
- m.ArpTerm = buf.DecodeUint8()
- m.ArpUfwd = buf.DecodeUint8()
- m.MacAge = buf.DecodeUint8()
- m.BdTag = make([]byte, 64)
- copy(m.BdTag, buf.DecodeBytes(len(m.BdTag)))
- m.IsAdd = buf.DecodeUint8()
- return nil
-}
-
-// BridgeDomainAddDelReply defines message 'bridge_domain_add_del_reply'.
-type BridgeDomainAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BridgeDomainAddDelReply) Reset() { *m = BridgeDomainAddDelReply{} }
-func (*BridgeDomainAddDelReply) GetMessageName() string { return "bridge_domain_add_del_reply" }
-func (*BridgeDomainAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*BridgeDomainAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BridgeDomainAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BridgeDomainAddDelReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *BridgeDomainAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// BridgeDomainDetails defines message 'bridge_domain_details'.
-type BridgeDomainDetails struct {
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
- Flood uint8 `binapi:"u8,name=flood" json:"flood,omitempty"`
- UuFlood uint8 `binapi:"u8,name=uu_flood" json:"uu_flood,omitempty"`
- Forward uint8 `binapi:"u8,name=forward" json:"forward,omitempty"`
- Learn uint8 `binapi:"u8,name=learn" json:"learn,omitempty"`
- ArpTerm uint8 `binapi:"u8,name=arp_term" json:"arp_term,omitempty"`
- ArpUfwd uint8 `binapi:"u8,name=arp_ufwd" json:"arp_ufwd,omitempty"`
- MacAge uint8 `binapi:"u8,name=mac_age" json:"mac_age,omitempty"`
- BdTag []byte `binapi:"u8[64],name=bd_tag" json:"bd_tag,omitempty"`
- BviSwIfIndex uint32 `binapi:"u32,name=bvi_sw_if_index" json:"bvi_sw_if_index,omitempty"`
- UuFwdSwIfIndex uint32 `binapi:"u32,name=uu_fwd_sw_if_index" json:"uu_fwd_sw_if_index,omitempty"`
- NSwIfs uint32 `binapi:"u32,name=n_sw_ifs" json:"-"`
- SwIfDetails []BridgeDomainSwIf `binapi:"bridge_domain_sw_if[n_sw_ifs],name=sw_if_details" json:"sw_if_details,omitempty"`
-}
-
-func (m *BridgeDomainDetails) Reset() { *m = BridgeDomainDetails{} }
-func (*BridgeDomainDetails) GetMessageName() string { return "bridge_domain_details" }
-func (*BridgeDomainDetails) GetCrcString() string { return "748c854a" }
-func (*BridgeDomainDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BridgeDomainDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.BdID
- size += 1 // m.Flood
- size += 1 // m.UuFlood
- size += 1 // m.Forward
- size += 1 // m.Learn
- size += 1 // m.ArpTerm
- size += 1 // m.ArpUfwd
- size += 1 // m.MacAge
- size += 1 * 64 // m.BdTag
- size += 4 // m.BviSwIfIndex
- size += 4 // m.UuFwdSwIfIndex
- size += 4 // m.NSwIfs
- for j1 := 0; j1 < len(m.SwIfDetails); j1++ {
- var s1 BridgeDomainSwIf
- _ = s1
- if j1 < len(m.SwIfDetails) {
- s1 = m.SwIfDetails[j1]
- }
- size += 4 // s1.Context
- size += 4 // s1.SwIfIndex
- size += 1 // s1.Shg
- }
- return size
-}
-func (m *BridgeDomainDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.BdID)
- buf.EncodeUint8(m.Flood)
- buf.EncodeUint8(m.UuFlood)
- buf.EncodeUint8(m.Forward)
- buf.EncodeUint8(m.Learn)
- buf.EncodeUint8(m.ArpTerm)
- buf.EncodeUint8(m.ArpUfwd)
- buf.EncodeUint8(m.MacAge)
- buf.EncodeBytes(m.BdTag, 64)
- buf.EncodeUint32(m.BviSwIfIndex)
- buf.EncodeUint32(m.UuFwdSwIfIndex)
- buf.EncodeUint32(uint32(len(m.SwIfDetails)))
- for j0 := 0; j0 < len(m.SwIfDetails); j0++ {
- var v0 BridgeDomainSwIf // SwIfDetails
- if j0 < len(m.SwIfDetails) {
- v0 = m.SwIfDetails[j0]
- }
- buf.EncodeUint32(v0.Context)
- buf.EncodeUint32(v0.SwIfIndex)
- buf.EncodeUint8(v0.Shg)
- }
- return buf.Bytes(), nil
-}
-func (m *BridgeDomainDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BdID = buf.DecodeUint32()
- m.Flood = buf.DecodeUint8()
- m.UuFlood = buf.DecodeUint8()
- m.Forward = buf.DecodeUint8()
- m.Learn = buf.DecodeUint8()
- m.ArpTerm = buf.DecodeUint8()
- m.ArpUfwd = buf.DecodeUint8()
- m.MacAge = buf.DecodeUint8()
- m.BdTag = make([]byte, 64)
- copy(m.BdTag, buf.DecodeBytes(len(m.BdTag)))
- m.BviSwIfIndex = buf.DecodeUint32()
- m.UuFwdSwIfIndex = buf.DecodeUint32()
- m.NSwIfs = buf.DecodeUint32()
- m.SwIfDetails = make([]BridgeDomainSwIf, m.NSwIfs)
- for j0 := 0; j0 < len(m.SwIfDetails); j0++ {
- m.SwIfDetails[j0].Context = buf.DecodeUint32()
- m.SwIfDetails[j0].SwIfIndex = buf.DecodeUint32()
- m.SwIfDetails[j0].Shg = buf.DecodeUint8()
- }
- return nil
-}
-
-// BridgeDomainDump defines message 'bridge_domain_dump'.
-type BridgeDomainDump struct {
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
-}
-
-func (m *BridgeDomainDump) Reset() { *m = BridgeDomainDump{} }
-func (*BridgeDomainDump) GetMessageName() string { return "bridge_domain_dump" }
-func (*BridgeDomainDump) GetCrcString() string { return "c25fdce6" }
-func (*BridgeDomainDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BridgeDomainDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.BdID
- return size
-}
-func (m *BridgeDomainDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.BdID)
- return buf.Bytes(), nil
-}
-func (m *BridgeDomainDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BdID = buf.DecodeUint32()
- return nil
-}
-
-// BridgeDomainSetMacAge defines message 'bridge_domain_set_mac_age'.
-type BridgeDomainSetMacAge struct {
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
- MacAge uint8 `binapi:"u8,name=mac_age" json:"mac_age,omitempty"`
-}
-
-func (m *BridgeDomainSetMacAge) Reset() { *m = BridgeDomainSetMacAge{} }
-func (*BridgeDomainSetMacAge) GetMessageName() string { return "bridge_domain_set_mac_age" }
-func (*BridgeDomainSetMacAge) GetCrcString() string { return "b537ad7b" }
-func (*BridgeDomainSetMacAge) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BridgeDomainSetMacAge) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.BdID
- size += 1 // m.MacAge
- return size
-}
-func (m *BridgeDomainSetMacAge) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.BdID)
- buf.EncodeUint8(m.MacAge)
- return buf.Bytes(), nil
-}
-func (m *BridgeDomainSetMacAge) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BdID = buf.DecodeUint32()
- m.MacAge = buf.DecodeUint8()
- return nil
-}
-
-// BridgeDomainSetMacAgeReply defines message 'bridge_domain_set_mac_age_reply'.
-type BridgeDomainSetMacAgeReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BridgeDomainSetMacAgeReply) Reset() { *m = BridgeDomainSetMacAgeReply{} }
-func (*BridgeDomainSetMacAgeReply) GetMessageName() string { return "bridge_domain_set_mac_age_reply" }
-func (*BridgeDomainSetMacAgeReply) GetCrcString() string { return "e8d4e804" }
-func (*BridgeDomainSetMacAgeReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BridgeDomainSetMacAgeReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BridgeDomainSetMacAgeReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *BridgeDomainSetMacAgeReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// BridgeFlags defines message 'bridge_flags'.
-type BridgeFlags struct {
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
- IsSet uint8 `binapi:"u8,name=is_set" json:"is_set,omitempty"`
- Flags BdFlags `binapi:"bd_flags,name=flags" json:"flags,omitempty"`
-}
-
-func (m *BridgeFlags) Reset() { *m = BridgeFlags{} }
-func (*BridgeFlags) GetMessageName() string { return "bridge_flags" }
-func (*BridgeFlags) GetCrcString() string { return "2eb9b76c" }
-func (*BridgeFlags) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BridgeFlags) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.BdID
- size += 1 // m.IsSet
- size += 4 // m.Flags
- return size
-}
-func (m *BridgeFlags) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.BdID)
- buf.EncodeUint8(m.IsSet)
- buf.EncodeUint32(uint32(m.Flags))
- return buf.Bytes(), nil
-}
-func (m *BridgeFlags) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BdID = buf.DecodeUint32()
- m.IsSet = buf.DecodeUint8()
- m.Flags = BdFlags(buf.DecodeUint32())
- return nil
-}
-
-// BridgeFlagsReply defines message 'bridge_flags_reply'.
-type BridgeFlagsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- ResultingFeatureBitmap uint32 `binapi:"u32,name=resulting_feature_bitmap" json:"resulting_feature_bitmap,omitempty"`
-}
-
-func (m *BridgeFlagsReply) Reset() { *m = BridgeFlagsReply{} }
-func (*BridgeFlagsReply) GetMessageName() string { return "bridge_flags_reply" }
-func (*BridgeFlagsReply) GetCrcString() string { return "29b2a2b3" }
-func (*BridgeFlagsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BridgeFlagsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.ResultingFeatureBitmap
- return size
-}
-func (m *BridgeFlagsReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.ResultingFeatureBitmap)
- return buf.Bytes(), nil
-}
-func (m *BridgeFlagsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.ResultingFeatureBitmap = buf.DecodeUint32()
- return nil
-}
-
-// BviCreate defines message 'bvi_create'.
-type BviCreate struct {
- Mac MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"`
- UserInstance uint32 `binapi:"u32,name=user_instance" json:"user_instance,omitempty"`
-}
-
-func (m *BviCreate) Reset() { *m = BviCreate{} }
-func (*BviCreate) GetMessageName() string { return "bvi_create" }
-func (*BviCreate) GetCrcString() string { return "f5398559" }
-func (*BviCreate) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BviCreate) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 6 // m.Mac
- size += 4 // m.UserInstance
- return size
-}
-func (m *BviCreate) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.Mac[:], 6)
- buf.EncodeUint32(m.UserInstance)
- return buf.Bytes(), nil
-}
-func (m *BviCreate) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.Mac[:], buf.DecodeBytes(6))
- m.UserInstance = buf.DecodeUint32()
- return nil
-}
-
-// BviCreateReply defines message 'bvi_create_reply'.
-type BviCreateReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *BviCreateReply) Reset() { *m = BviCreateReply{} }
-func (*BviCreateReply) GetMessageName() string { return "bvi_create_reply" }
-func (*BviCreateReply) GetCrcString() string { return "fda5941f" }
-func (*BviCreateReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BviCreateReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *BviCreateReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.SwIfIndex)
- return buf.Bytes(), nil
-}
-func (m *BviCreateReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = buf.DecodeUint32()
- return nil
-}
-
-// BviDelete defines message 'bvi_delete'.
-type BviDelete struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *BviDelete) Reset() { *m = BviDelete{} }
-func (*BviDelete) GetMessageName() string { return "bvi_delete" }
-func (*BviDelete) GetCrcString() string { return "529cb13f" }
-func (*BviDelete) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BviDelete) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *BviDelete) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- return buf.Bytes(), nil
-}
-func (m *BviDelete) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- return nil
-}
-
-// BviDeleteReply defines message 'bvi_delete_reply'.
-type BviDeleteReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BviDeleteReply) Reset() { *m = BviDeleteReply{} }
-func (*BviDeleteReply) GetMessageName() string { return "bvi_delete_reply" }
-func (*BviDeleteReply) GetCrcString() string { return "e8d4e804" }
-func (*BviDeleteReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BviDeleteReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BviDeleteReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *BviDeleteReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// L2ArpTermEvent defines message 'l2_arp_term_event'.
-type L2ArpTermEvent struct {
- PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
- IP Address `binapi:"address,name=ip" json:"ip,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Mac MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"`
-}
-
-func (m *L2ArpTermEvent) Reset() { *m = L2ArpTermEvent{} }
-func (*L2ArpTermEvent) GetMessageName() string { return "l2_arp_term_event" }
-func (*L2ArpTermEvent) GetCrcString() string { return "85ff71ea" }
-func (*L2ArpTermEvent) GetMessageType() api.MessageType {
- return api.EventMessage
-}
-
-func (m *L2ArpTermEvent) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.PID
- size += 4 // m.IP.Af
- size += 1 * 16 // m.IP.Un
- size += 4 // m.SwIfIndex
- size += 1 * 6 // m.Mac
- return size
-}
-func (m *L2ArpTermEvent) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.PID)
- buf.EncodeUint32(uint32(m.IP.Af))
- buf.EncodeBytes(m.IP.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBytes(m.Mac[:], 6)
- return buf.Bytes(), nil
-}
-func (m *L2ArpTermEvent) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.PID = buf.DecodeUint32()
- m.IP.Af = AddressFamily(buf.DecodeUint32())
- copy(m.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- copy(m.Mac[:], buf.DecodeBytes(6))
- return nil
-}
-
-// L2FibClearTable defines message 'l2_fib_clear_table'.
-type L2FibClearTable struct{}
-
-func (m *L2FibClearTable) Reset() { *m = L2FibClearTable{} }
-func (*L2FibClearTable) GetMessageName() string { return "l2_fib_clear_table" }
-func (*L2FibClearTable) GetCrcString() string { return "51077d14" }
-func (*L2FibClearTable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2FibClearTable) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *L2FibClearTable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *L2FibClearTable) Unmarshal(b []byte) error {
- return nil
-}
-
-// L2FibClearTableReply defines message 'l2_fib_clear_table_reply'.
-type L2FibClearTableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *L2FibClearTableReply) Reset() { *m = L2FibClearTableReply{} }
-func (*L2FibClearTableReply) GetMessageName() string { return "l2_fib_clear_table_reply" }
-func (*L2FibClearTableReply) GetCrcString() string { return "e8d4e804" }
-func (*L2FibClearTableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2FibClearTableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *L2FibClearTableReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *L2FibClearTableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// L2FibTableDetails defines message 'l2_fib_table_details'.
-type L2FibTableDetails struct {
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
- Mac []byte `binapi:"u8[6],name=mac" json:"mac,omitempty"`
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- StaticMac uint8 `binapi:"u8,name=static_mac" json:"static_mac,omitempty"`
- FilterMac uint8 `binapi:"u8,name=filter_mac" json:"filter_mac,omitempty"`
- BviMac uint8 `binapi:"u8,name=bvi_mac" json:"bvi_mac,omitempty"`
-}
-
-func (m *L2FibTableDetails) Reset() { *m = L2FibTableDetails{} }
-func (*L2FibTableDetails) GetMessageName() string { return "l2_fib_table_details" }
-func (*L2FibTableDetails) GetCrcString() string { return "c7392706" }
-func (*L2FibTableDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2FibTableDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.BdID
- size += 1 * 6 // m.Mac
- size += 4 // m.SwIfIndex
- size += 1 // m.StaticMac
- size += 1 // m.FilterMac
- size += 1 // m.BviMac
- return size
-}
-func (m *L2FibTableDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.BdID)
- buf.EncodeBytes(m.Mac, 6)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint8(m.StaticMac)
- buf.EncodeUint8(m.FilterMac)
- buf.EncodeUint8(m.BviMac)
- return buf.Bytes(), nil
-}
-func (m *L2FibTableDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BdID = buf.DecodeUint32()
- m.Mac = make([]byte, 6)
- copy(m.Mac, buf.DecodeBytes(len(m.Mac)))
- m.SwIfIndex = buf.DecodeUint32()
- m.StaticMac = buf.DecodeUint8()
- m.FilterMac = buf.DecodeUint8()
- m.BviMac = buf.DecodeUint8()
- return nil
-}
-
-// L2FibTableDump defines message 'l2_fib_table_dump'.
-type L2FibTableDump struct {
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
-}
-
-func (m *L2FibTableDump) Reset() { *m = L2FibTableDump{} }
-func (*L2FibTableDump) GetMessageName() string { return "l2_fib_table_dump" }
-func (*L2FibTableDump) GetCrcString() string { return "c25fdce6" }
-func (*L2FibTableDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2FibTableDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.BdID
- return size
-}
-func (m *L2FibTableDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.BdID)
- return buf.Bytes(), nil
-}
-func (m *L2FibTableDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BdID = buf.DecodeUint32()
- return nil
-}
-
-// L2Flags defines message 'l2_flags'.
-type L2Flags struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- IsSet uint8 `binapi:"u8,name=is_set" json:"is_set,omitempty"`
- FeatureBitmap uint32 `binapi:"u32,name=feature_bitmap" json:"feature_bitmap,omitempty"`
-}
-
-func (m *L2Flags) Reset() { *m = L2Flags{} }
-func (*L2Flags) GetMessageName() string { return "l2_flags" }
-func (*L2Flags) GetCrcString() string { return "0e889fb9" }
-func (*L2Flags) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2Flags) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.IsSet
- size += 4 // m.FeatureBitmap
- return size
-}
-func (m *L2Flags) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint8(m.IsSet)
- buf.EncodeUint32(m.FeatureBitmap)
- return buf.Bytes(), nil
-}
-func (m *L2Flags) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- m.IsSet = buf.DecodeUint8()
- m.FeatureBitmap = buf.DecodeUint32()
- return nil
-}
-
-// L2FlagsReply defines message 'l2_flags_reply'.
-type L2FlagsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- ResultingFeatureBitmap uint32 `binapi:"u32,name=resulting_feature_bitmap" json:"resulting_feature_bitmap,omitempty"`
-}
-
-func (m *L2FlagsReply) Reset() { *m = L2FlagsReply{} }
-func (*L2FlagsReply) GetMessageName() string { return "l2_flags_reply" }
-func (*L2FlagsReply) GetCrcString() string { return "29b2a2b3" }
-func (*L2FlagsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2FlagsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.ResultingFeatureBitmap
- return size
-}
-func (m *L2FlagsReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.ResultingFeatureBitmap)
- return buf.Bytes(), nil
-}
-func (m *L2FlagsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.ResultingFeatureBitmap = buf.DecodeUint32()
- return nil
-}
-
-// L2InterfaceEfpFilter defines message 'l2_interface_efp_filter'.
-type L2InterfaceEfpFilter struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- EnableDisable uint8 `binapi:"u8,name=enable_disable" json:"enable_disable,omitempty"`
-}
-
-func (m *L2InterfaceEfpFilter) Reset() { *m = L2InterfaceEfpFilter{} }
-func (*L2InterfaceEfpFilter) GetMessageName() string { return "l2_interface_efp_filter" }
-func (*L2InterfaceEfpFilter) GetCrcString() string { return "69d24598" }
-func (*L2InterfaceEfpFilter) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2InterfaceEfpFilter) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.EnableDisable
- return size
-}
-func (m *L2InterfaceEfpFilter) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint8(m.EnableDisable)
- return buf.Bytes(), nil
-}
-func (m *L2InterfaceEfpFilter) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- m.EnableDisable = buf.DecodeUint8()
- return nil
-}
-
-// L2InterfaceEfpFilterReply defines message 'l2_interface_efp_filter_reply'.
-type L2InterfaceEfpFilterReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *L2InterfaceEfpFilterReply) Reset() { *m = L2InterfaceEfpFilterReply{} }
-func (*L2InterfaceEfpFilterReply) GetMessageName() string { return "l2_interface_efp_filter_reply" }
-func (*L2InterfaceEfpFilterReply) GetCrcString() string { return "e8d4e804" }
-func (*L2InterfaceEfpFilterReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2InterfaceEfpFilterReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *L2InterfaceEfpFilterReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *L2InterfaceEfpFilterReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// L2InterfacePbbTagRewrite defines message 'l2_interface_pbb_tag_rewrite'.
-type L2InterfacePbbTagRewrite struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- VtrOp uint32 `binapi:"u32,name=vtr_op" json:"vtr_op,omitempty"`
- OuterTag uint16 `binapi:"u16,name=outer_tag" json:"outer_tag,omitempty"`
- BDmac []byte `binapi:"u8[6],name=b_dmac" json:"b_dmac,omitempty"`
- BSmac []byte `binapi:"u8[6],name=b_smac" json:"b_smac,omitempty"`
- BVlanid uint16 `binapi:"u16,name=b_vlanid" json:"b_vlanid,omitempty"`
- ISid uint32 `binapi:"u32,name=i_sid" json:"i_sid,omitempty"`
-}
-
-func (m *L2InterfacePbbTagRewrite) Reset() { *m = L2InterfacePbbTagRewrite{} }
-func (*L2InterfacePbbTagRewrite) GetMessageName() string { return "l2_interface_pbb_tag_rewrite" }
-func (*L2InterfacePbbTagRewrite) GetCrcString() string { return "6cf815f9" }
-func (*L2InterfacePbbTagRewrite) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2InterfacePbbTagRewrite) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.VtrOp
- size += 2 // m.OuterTag
- size += 1 * 6 // m.BDmac
- size += 1 * 6 // m.BSmac
- size += 2 // m.BVlanid
- size += 4 // m.ISid
- return size
-}
-func (m *L2InterfacePbbTagRewrite) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint32(m.VtrOp)
- buf.EncodeUint16(m.OuterTag)
- buf.EncodeBytes(m.BDmac, 6)
- buf.EncodeBytes(m.BSmac, 6)
- buf.EncodeUint16(m.BVlanid)
- buf.EncodeUint32(m.ISid)
- return buf.Bytes(), nil
-}
-func (m *L2InterfacePbbTagRewrite) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- m.VtrOp = buf.DecodeUint32()
- m.OuterTag = buf.DecodeUint16()
- m.BDmac = make([]byte, 6)
- copy(m.BDmac, buf.DecodeBytes(len(m.BDmac)))
- m.BSmac = make([]byte, 6)
- copy(m.BSmac, buf.DecodeBytes(len(m.BSmac)))
- m.BVlanid = buf.DecodeUint16()
- m.ISid = buf.DecodeUint32()
- return nil
-}
-
-// L2InterfacePbbTagRewriteReply defines message 'l2_interface_pbb_tag_rewrite_reply'.
-type L2InterfacePbbTagRewriteReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *L2InterfacePbbTagRewriteReply) Reset() { *m = L2InterfacePbbTagRewriteReply{} }
-func (*L2InterfacePbbTagRewriteReply) GetMessageName() string {
- return "l2_interface_pbb_tag_rewrite_reply"
-}
-func (*L2InterfacePbbTagRewriteReply) GetCrcString() string { return "e8d4e804" }
-func (*L2InterfacePbbTagRewriteReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2InterfacePbbTagRewriteReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *L2InterfacePbbTagRewriteReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *L2InterfacePbbTagRewriteReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// L2InterfaceVlanTagRewrite defines message 'l2_interface_vlan_tag_rewrite'.
-type L2InterfaceVlanTagRewrite struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- VtrOp uint32 `binapi:"u32,name=vtr_op" json:"vtr_op,omitempty"`
- PushDot1q uint32 `binapi:"u32,name=push_dot1q" json:"push_dot1q,omitempty"`
- Tag1 uint32 `binapi:"u32,name=tag1" json:"tag1,omitempty"`
- Tag2 uint32 `binapi:"u32,name=tag2" json:"tag2,omitempty"`
-}
-
-func (m *L2InterfaceVlanTagRewrite) Reset() { *m = L2InterfaceVlanTagRewrite{} }
-func (*L2InterfaceVlanTagRewrite) GetMessageName() string { return "l2_interface_vlan_tag_rewrite" }
-func (*L2InterfaceVlanTagRewrite) GetCrcString() string { return "b90be6b4" }
-func (*L2InterfaceVlanTagRewrite) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2InterfaceVlanTagRewrite) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.VtrOp
- size += 4 // m.PushDot1q
- size += 4 // m.Tag1
- size += 4 // m.Tag2
- return size
-}
-func (m *L2InterfaceVlanTagRewrite) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint32(m.VtrOp)
- buf.EncodeUint32(m.PushDot1q)
- buf.EncodeUint32(m.Tag1)
- buf.EncodeUint32(m.Tag2)
- return buf.Bytes(), nil
-}
-func (m *L2InterfaceVlanTagRewrite) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- m.VtrOp = buf.DecodeUint32()
- m.PushDot1q = buf.DecodeUint32()
- m.Tag1 = buf.DecodeUint32()
- m.Tag2 = buf.DecodeUint32()
- return nil
-}
-
-// L2InterfaceVlanTagRewriteReply defines message 'l2_interface_vlan_tag_rewrite_reply'.
-type L2InterfaceVlanTagRewriteReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *L2InterfaceVlanTagRewriteReply) Reset() { *m = L2InterfaceVlanTagRewriteReply{} }
-func (*L2InterfaceVlanTagRewriteReply) GetMessageName() string {
- return "l2_interface_vlan_tag_rewrite_reply"
-}
-func (*L2InterfaceVlanTagRewriteReply) GetCrcString() string { return "e8d4e804" }
-func (*L2InterfaceVlanTagRewriteReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2InterfaceVlanTagRewriteReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *L2InterfaceVlanTagRewriteReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *L2InterfaceVlanTagRewriteReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// L2MacsEvent defines message 'l2_macs_event'.
-type L2MacsEvent struct {
- PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
- NMacs uint32 `binapi:"u32,name=n_macs" json:"-"`
- Mac []MacEntry `binapi:"mac_entry[n_macs],name=mac" json:"mac,omitempty"`
-}
-
-func (m *L2MacsEvent) Reset() { *m = L2MacsEvent{} }
-func (*L2MacsEvent) GetMessageName() string { return "l2_macs_event" }
-func (*L2MacsEvent) GetCrcString() string { return "afc74a60" }
-func (*L2MacsEvent) GetMessageType() api.MessageType {
- return api.EventMessage
-}
-
-func (m *L2MacsEvent) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.PID
- size += 4 // m.NMacs
- for j1 := 0; j1 < len(m.Mac); j1++ {
- var s1 MacEntry
- _ = s1
- if j1 < len(m.Mac) {
- s1 = m.Mac[j1]
- }
- size += 4 // s1.SwIfIndex
- size += 1 * 6 // s1.MacAddr
- size += 1 // s1.Action
- size += 1 // s1.Flags
- }
- return size
-}
-func (m *L2MacsEvent) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.PID)
- buf.EncodeUint32(uint32(len(m.Mac)))
- for j0 := 0; j0 < len(m.Mac); j0++ {
- var v0 MacEntry // Mac
- if j0 < len(m.Mac) {
- v0 = m.Mac[j0]
- }
- buf.EncodeUint32(v0.SwIfIndex)
- buf.EncodeBytes(v0.MacAddr, 6)
- buf.EncodeUint8(v0.Action)
- buf.EncodeUint8(v0.Flags)
- }
- return buf.Bytes(), nil
-}
-func (m *L2MacsEvent) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.PID = buf.DecodeUint32()
- m.NMacs = buf.DecodeUint32()
- m.Mac = make([]MacEntry, m.NMacs)
- for j0 := 0; j0 < len(m.Mac); j0++ {
- m.Mac[j0].SwIfIndex = buf.DecodeUint32()
- m.Mac[j0].MacAddr = make([]byte, 6)
- copy(m.Mac[j0].MacAddr, buf.DecodeBytes(len(m.Mac[j0].MacAddr)))
- m.Mac[j0].Action = buf.DecodeUint8()
- m.Mac[j0].Flags = buf.DecodeUint8()
- }
- return nil
-}
-
-// L2PatchAddDel defines message 'l2_patch_add_del'.
-type L2PatchAddDel struct {
- RxSwIfIndex uint32 `binapi:"u32,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
- TxSwIfIndex uint32 `binapi:"u32,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"`
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
-}
-
-func (m *L2PatchAddDel) Reset() { *m = L2PatchAddDel{} }
-func (*L2PatchAddDel) GetMessageName() string { return "l2_patch_add_del" }
-func (*L2PatchAddDel) GetCrcString() string { return "62506e63" }
-func (*L2PatchAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2PatchAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.RxSwIfIndex
- size += 4 // m.TxSwIfIndex
- size += 1 // m.IsAdd
- return size
-}
-func (m *L2PatchAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.RxSwIfIndex)
- buf.EncodeUint32(m.TxSwIfIndex)
- buf.EncodeUint8(m.IsAdd)
- return buf.Bytes(), nil
-}
-func (m *L2PatchAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.RxSwIfIndex = buf.DecodeUint32()
- m.TxSwIfIndex = buf.DecodeUint32()
- m.IsAdd = buf.DecodeUint8()
- return nil
-}
-
-// L2PatchAddDelReply defines message 'l2_patch_add_del_reply'.
-type L2PatchAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *L2PatchAddDelReply) Reset() { *m = L2PatchAddDelReply{} }
-func (*L2PatchAddDelReply) GetMessageName() string { return "l2_patch_add_del_reply" }
-func (*L2PatchAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*L2PatchAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2PatchAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *L2PatchAddDelReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *L2PatchAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// L2XconnectDetails defines message 'l2_xconnect_details'.
-type L2XconnectDetails struct {
- RxSwIfIndex uint32 `binapi:"u32,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
- TxSwIfIndex uint32 `binapi:"u32,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"`
-}
-
-func (m *L2XconnectDetails) Reset() { *m = L2XconnectDetails{} }
-func (*L2XconnectDetails) GetMessageName() string { return "l2_xconnect_details" }
-func (*L2XconnectDetails) GetCrcString() string { return "722e2378" }
-func (*L2XconnectDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2XconnectDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.RxSwIfIndex
- size += 4 // m.TxSwIfIndex
- return size
-}
-func (m *L2XconnectDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.RxSwIfIndex)
- buf.EncodeUint32(m.TxSwIfIndex)
- return buf.Bytes(), nil
-}
-func (m *L2XconnectDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.RxSwIfIndex = buf.DecodeUint32()
- m.TxSwIfIndex = buf.DecodeUint32()
- return nil
-}
-
-// L2XconnectDump defines message 'l2_xconnect_dump'.
-type L2XconnectDump struct{}
-
-func (m *L2XconnectDump) Reset() { *m = L2XconnectDump{} }
-func (*L2XconnectDump) GetMessageName() string { return "l2_xconnect_dump" }
-func (*L2XconnectDump) GetCrcString() string { return "51077d14" }
-func (*L2XconnectDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2XconnectDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *L2XconnectDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *L2XconnectDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// L2fibAddDel defines message 'l2fib_add_del'.
-type L2fibAddDel struct {
- Mac []byte `binapi:"u8[6],name=mac" json:"mac,omitempty"`
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- StaticMac uint8 `binapi:"u8,name=static_mac" json:"static_mac,omitempty"`
- FilterMac uint8 `binapi:"u8,name=filter_mac" json:"filter_mac,omitempty"`
- BviMac uint8 `binapi:"u8,name=bvi_mac" json:"bvi_mac,omitempty"`
-}
-
-func (m *L2fibAddDel) Reset() { *m = L2fibAddDel{} }
-func (*L2fibAddDel) GetMessageName() string { return "l2fib_add_del" }
-func (*L2fibAddDel) GetCrcString() string { return "34ced3eb" }
-func (*L2fibAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2fibAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 6 // m.Mac
- size += 4 // m.BdID
- size += 4 // m.SwIfIndex
- size += 1 // m.IsAdd
- size += 1 // m.StaticMac
- size += 1 // m.FilterMac
- size += 1 // m.BviMac
- return size
-}
-func (m *L2fibAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.Mac, 6)
- buf.EncodeUint32(m.BdID)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeUint8(m.StaticMac)
- buf.EncodeUint8(m.FilterMac)
- buf.EncodeUint8(m.BviMac)
- return buf.Bytes(), nil
-}
-func (m *L2fibAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Mac = make([]byte, 6)
- copy(m.Mac, buf.DecodeBytes(len(m.Mac)))
- m.BdID = buf.DecodeUint32()
- m.SwIfIndex = buf.DecodeUint32()
- m.IsAdd = buf.DecodeUint8()
- m.StaticMac = buf.DecodeUint8()
- m.FilterMac = buf.DecodeUint8()
- m.BviMac = buf.DecodeUint8()
- return nil
-}
-
-// L2fibAddDelReply defines message 'l2fib_add_del_reply'.
-type L2fibAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *L2fibAddDelReply) Reset() { *m = L2fibAddDelReply{} }
-func (*L2fibAddDelReply) GetMessageName() string { return "l2fib_add_del_reply" }
-func (*L2fibAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*L2fibAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2fibAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *L2fibAddDelReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *L2fibAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// L2fibFlushAll defines message 'l2fib_flush_all'.
-type L2fibFlushAll struct{}
-
-func (m *L2fibFlushAll) Reset() { *m = L2fibFlushAll{} }
-func (*L2fibFlushAll) GetMessageName() string { return "l2fib_flush_all" }
-func (*L2fibFlushAll) GetCrcString() string { return "51077d14" }
-func (*L2fibFlushAll) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2fibFlushAll) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *L2fibFlushAll) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *L2fibFlushAll) Unmarshal(b []byte) error {
- return nil
-}
-
-// L2fibFlushAllReply defines message 'l2fib_flush_all_reply'.
-type L2fibFlushAllReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *L2fibFlushAllReply) Reset() { *m = L2fibFlushAllReply{} }
-func (*L2fibFlushAllReply) GetMessageName() string { return "l2fib_flush_all_reply" }
-func (*L2fibFlushAllReply) GetCrcString() string { return "e8d4e804" }
-func (*L2fibFlushAllReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2fibFlushAllReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *L2fibFlushAllReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *L2fibFlushAllReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// L2fibFlushBd defines message 'l2fib_flush_bd'.
-type L2fibFlushBd struct {
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
-}
-
-func (m *L2fibFlushBd) Reset() { *m = L2fibFlushBd{} }
-func (*L2fibFlushBd) GetMessageName() string { return "l2fib_flush_bd" }
-func (*L2fibFlushBd) GetCrcString() string { return "c25fdce6" }
-func (*L2fibFlushBd) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2fibFlushBd) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.BdID
- return size
-}
-func (m *L2fibFlushBd) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.BdID)
- return buf.Bytes(), nil
-}
-func (m *L2fibFlushBd) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BdID = buf.DecodeUint32()
- return nil
-}
-
-// L2fibFlushBdReply defines message 'l2fib_flush_bd_reply'.
-type L2fibFlushBdReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *L2fibFlushBdReply) Reset() { *m = L2fibFlushBdReply{} }
-func (*L2fibFlushBdReply) GetMessageName() string { return "l2fib_flush_bd_reply" }
-func (*L2fibFlushBdReply) GetCrcString() string { return "e8d4e804" }
-func (*L2fibFlushBdReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2fibFlushBdReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *L2fibFlushBdReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *L2fibFlushBdReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// L2fibFlushInt defines message 'l2fib_flush_int'.
-type L2fibFlushInt struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *L2fibFlushInt) Reset() { *m = L2fibFlushInt{} }
-func (*L2fibFlushInt) GetMessageName() string { return "l2fib_flush_int" }
-func (*L2fibFlushInt) GetCrcString() string { return "529cb13f" }
-func (*L2fibFlushInt) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2fibFlushInt) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *L2fibFlushInt) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- return buf.Bytes(), nil
-}
-func (m *L2fibFlushInt) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- return nil
-}
-
-// L2fibFlushIntReply defines message 'l2fib_flush_int_reply'.
-type L2fibFlushIntReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *L2fibFlushIntReply) Reset() { *m = L2fibFlushIntReply{} }
-func (*L2fibFlushIntReply) GetMessageName() string { return "l2fib_flush_int_reply" }
-func (*L2fibFlushIntReply) GetCrcString() string { return "e8d4e804" }
-func (*L2fibFlushIntReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2fibFlushIntReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *L2fibFlushIntReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *L2fibFlushIntReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SwInterfaceSetL2Bridge defines message 'sw_interface_set_l2_bridge'.
-type SwInterfaceSetL2Bridge struct {
- RxSwIfIndex uint32 `binapi:"u32,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
- PortType L2PortType `binapi:"l2_port_type,name=port_type" json:"port_type,omitempty"`
- Shg uint8 `binapi:"u8,name=shg" json:"shg,omitempty"`
- Enable uint8 `binapi:"u8,name=enable" json:"enable,omitempty"`
-}
-
-func (m *SwInterfaceSetL2Bridge) Reset() { *m = SwInterfaceSetL2Bridge{} }
-func (*SwInterfaceSetL2Bridge) GetMessageName() string { return "sw_interface_set_l2_bridge" }
-func (*SwInterfaceSetL2Bridge) GetCrcString() string { return "5579f809" }
-func (*SwInterfaceSetL2Bridge) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceSetL2Bridge) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.RxSwIfIndex
- size += 4 // m.BdID
- size += 4 // m.PortType
- size += 1 // m.Shg
- size += 1 // m.Enable
- return size
-}
-func (m *SwInterfaceSetL2Bridge) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.RxSwIfIndex)
- buf.EncodeUint32(m.BdID)
- buf.EncodeUint32(uint32(m.PortType))
- buf.EncodeUint8(m.Shg)
- buf.EncodeUint8(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSetL2Bridge) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.RxSwIfIndex = buf.DecodeUint32()
- m.BdID = buf.DecodeUint32()
- m.PortType = L2PortType(buf.DecodeUint32())
- m.Shg = buf.DecodeUint8()
- m.Enable = buf.DecodeUint8()
- return nil
-}
-
-// SwInterfaceSetL2BridgeReply defines message 'sw_interface_set_l2_bridge_reply'.
-type SwInterfaceSetL2BridgeReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceSetL2BridgeReply) Reset() { *m = SwInterfaceSetL2BridgeReply{} }
-func (*SwInterfaceSetL2BridgeReply) GetMessageName() string {
- return "sw_interface_set_l2_bridge_reply"
-}
-func (*SwInterfaceSetL2BridgeReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceSetL2BridgeReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceSetL2BridgeReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceSetL2BridgeReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSetL2BridgeReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SwInterfaceSetL2Xconnect defines message 'sw_interface_set_l2_xconnect'.
-type SwInterfaceSetL2Xconnect struct {
- RxSwIfIndex uint32 `binapi:"u32,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
- TxSwIfIndex uint32 `binapi:"u32,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"`
- Enable uint8 `binapi:"u8,name=enable" json:"enable,omitempty"`
-}
-
-func (m *SwInterfaceSetL2Xconnect) Reset() { *m = SwInterfaceSetL2Xconnect{} }
-func (*SwInterfaceSetL2Xconnect) GetMessageName() string { return "sw_interface_set_l2_xconnect" }
-func (*SwInterfaceSetL2Xconnect) GetCrcString() string { return "95de3988" }
-func (*SwInterfaceSetL2Xconnect) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceSetL2Xconnect) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.RxSwIfIndex
- size += 4 // m.TxSwIfIndex
- size += 1 // m.Enable
- return size
-}
-func (m *SwInterfaceSetL2Xconnect) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.RxSwIfIndex)
- buf.EncodeUint32(m.TxSwIfIndex)
- buf.EncodeUint8(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSetL2Xconnect) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.RxSwIfIndex = buf.DecodeUint32()
- m.TxSwIfIndex = buf.DecodeUint32()
- m.Enable = buf.DecodeUint8()
- return nil
-}
-
-// SwInterfaceSetL2XconnectReply defines message 'sw_interface_set_l2_xconnect_reply'.
-type SwInterfaceSetL2XconnectReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceSetL2XconnectReply) Reset() { *m = SwInterfaceSetL2XconnectReply{} }
-func (*SwInterfaceSetL2XconnectReply) GetMessageName() string {
- return "sw_interface_set_l2_xconnect_reply"
-}
-func (*SwInterfaceSetL2XconnectReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceSetL2XconnectReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceSetL2XconnectReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceSetL2XconnectReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSetL2XconnectReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SwInterfaceSetVpath defines message 'sw_interface_set_vpath'.
-type SwInterfaceSetVpath struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- Enable uint8 `binapi:"u8,name=enable" json:"enable,omitempty"`
-}
-
-func (m *SwInterfaceSetVpath) Reset() { *m = SwInterfaceSetVpath{} }
-func (*SwInterfaceSetVpath) GetMessageName() string { return "sw_interface_set_vpath" }
-func (*SwInterfaceSetVpath) GetCrcString() string { return "a36fadc0" }
-func (*SwInterfaceSetVpath) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceSetVpath) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.Enable
- return size
-}
-func (m *SwInterfaceSetVpath) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint8(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSetVpath) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- m.Enable = buf.DecodeUint8()
- return nil
-}
-
-// SwInterfaceSetVpathReply defines message 'sw_interface_set_vpath_reply'.
-type SwInterfaceSetVpathReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceSetVpathReply) Reset() { *m = SwInterfaceSetVpathReply{} }
-func (*SwInterfaceSetVpathReply) GetMessageName() string { return "sw_interface_set_vpath_reply" }
-func (*SwInterfaceSetVpathReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceSetVpathReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceSetVpathReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceSetVpathReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSetVpathReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// WantL2ArpTermEvents defines message 'want_l2_arp_term_events'.
-type WantL2ArpTermEvents struct {
- Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
- PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
-}
-
-func (m *WantL2ArpTermEvents) Reset() { *m = WantL2ArpTermEvents{} }
-func (*WantL2ArpTermEvents) GetMessageName() string { return "want_l2_arp_term_events" }
-func (*WantL2ArpTermEvents) GetCrcString() string { return "3ec6d6c2" }
-func (*WantL2ArpTermEvents) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *WantL2ArpTermEvents) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Enable
- size += 4 // m.PID
- return size
-}
-func (m *WantL2ArpTermEvents) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.Enable)
- buf.EncodeUint32(m.PID)
- return buf.Bytes(), nil
-}
-func (m *WantL2ArpTermEvents) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Enable = buf.DecodeBool()
- m.PID = buf.DecodeUint32()
- return nil
-}
-
-// WantL2ArpTermEventsReply defines message 'want_l2_arp_term_events_reply'.
-type WantL2ArpTermEventsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *WantL2ArpTermEventsReply) Reset() { *m = WantL2ArpTermEventsReply{} }
-func (*WantL2ArpTermEventsReply) GetMessageName() string { return "want_l2_arp_term_events_reply" }
-func (*WantL2ArpTermEventsReply) GetCrcString() string { return "e8d4e804" }
-func (*WantL2ArpTermEventsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *WantL2ArpTermEventsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *WantL2ArpTermEventsReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *WantL2ArpTermEventsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// WantL2MacsEvents defines message 'want_l2_macs_events'.
-type WantL2MacsEvents struct {
- LearnLimit uint32 `binapi:"u32,name=learn_limit" json:"learn_limit,omitempty"`
- ScanDelay uint8 `binapi:"u8,name=scan_delay" json:"scan_delay,omitempty"`
- MaxMacsInEvent uint8 `binapi:"u8,name=max_macs_in_event" json:"max_macs_in_event,omitempty"`
- EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
- PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
-}
-
-func (m *WantL2MacsEvents) Reset() { *m = WantL2MacsEvents{} }
-func (*WantL2MacsEvents) GetMessageName() string { return "want_l2_macs_events" }
-func (*WantL2MacsEvents) GetCrcString() string { return "9aabdfde" }
-func (*WantL2MacsEvents) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *WantL2MacsEvents) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.LearnLimit
- size += 1 // m.ScanDelay
- size += 1 // m.MaxMacsInEvent
- size += 1 // m.EnableDisable
- size += 4 // m.PID
- return size
-}
-func (m *WantL2MacsEvents) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.LearnLimit)
- buf.EncodeUint8(m.ScanDelay)
- buf.EncodeUint8(m.MaxMacsInEvent)
- buf.EncodeBool(m.EnableDisable)
- buf.EncodeUint32(m.PID)
- return buf.Bytes(), nil
-}
-func (m *WantL2MacsEvents) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.LearnLimit = buf.DecodeUint32()
- m.ScanDelay = buf.DecodeUint8()
- m.MaxMacsInEvent = buf.DecodeUint8()
- m.EnableDisable = buf.DecodeBool()
- m.PID = buf.DecodeUint32()
- return nil
-}
-
-// WantL2MacsEventsReply defines message 'want_l2_macs_events_reply'.
-type WantL2MacsEventsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *WantL2MacsEventsReply) Reset() { *m = WantL2MacsEventsReply{} }
-func (*WantL2MacsEventsReply) GetMessageName() string { return "want_l2_macs_events_reply" }
-func (*WantL2MacsEventsReply) GetCrcString() string { return "e8d4e804" }
-func (*WantL2MacsEventsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *WantL2MacsEventsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *WantL2MacsEventsReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *WantL2MacsEventsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_l2_binapi_init() }
-func file_l2_binapi_init() {
- api.RegisterMessage((*BdIPMacAddDel)(nil), "bd_ip_mac_add_del_25bf4063")
- api.RegisterMessage((*BdIPMacAddDelReply)(nil), "bd_ip_mac_add_del_reply_e8d4e804")
- api.RegisterMessage((*BdIPMacDetails)(nil), "bd_ip_mac_details_a52f8044")
- api.RegisterMessage((*BdIPMacDump)(nil), "bd_ip_mac_dump_c25fdce6")
- api.RegisterMessage((*BdIPMacFlush)(nil), "bd_ip_mac_flush_c25fdce6")
- api.RegisterMessage((*BdIPMacFlushReply)(nil), "bd_ip_mac_flush_reply_e8d4e804")
- api.RegisterMessage((*BridgeDomainAddDel)(nil), "bridge_domain_add_del_c6360720")
- api.RegisterMessage((*BridgeDomainAddDelReply)(nil), "bridge_domain_add_del_reply_e8d4e804")
- api.RegisterMessage((*BridgeDomainDetails)(nil), "bridge_domain_details_748c854a")
- api.RegisterMessage((*BridgeDomainDump)(nil), "bridge_domain_dump_c25fdce6")
- api.RegisterMessage((*BridgeDomainSetMacAge)(nil), "bridge_domain_set_mac_age_b537ad7b")
- api.RegisterMessage((*BridgeDomainSetMacAgeReply)(nil), "bridge_domain_set_mac_age_reply_e8d4e804")
- api.RegisterMessage((*BridgeFlags)(nil), "bridge_flags_2eb9b76c")
- api.RegisterMessage((*BridgeFlagsReply)(nil), "bridge_flags_reply_29b2a2b3")
- api.RegisterMessage((*BviCreate)(nil), "bvi_create_f5398559")
- api.RegisterMessage((*BviCreateReply)(nil), "bvi_create_reply_fda5941f")
- api.RegisterMessage((*BviDelete)(nil), "bvi_delete_529cb13f")
- api.RegisterMessage((*BviDeleteReply)(nil), "bvi_delete_reply_e8d4e804")
- api.RegisterMessage((*L2ArpTermEvent)(nil), "l2_arp_term_event_85ff71ea")
- api.RegisterMessage((*L2FibClearTable)(nil), "l2_fib_clear_table_51077d14")
- api.RegisterMessage((*L2FibClearTableReply)(nil), "l2_fib_clear_table_reply_e8d4e804")
- api.RegisterMessage((*L2FibTableDetails)(nil), "l2_fib_table_details_c7392706")
- api.RegisterMessage((*L2FibTableDump)(nil), "l2_fib_table_dump_c25fdce6")
- api.RegisterMessage((*L2Flags)(nil), "l2_flags_0e889fb9")
- api.RegisterMessage((*L2FlagsReply)(nil), "l2_flags_reply_29b2a2b3")
- api.RegisterMessage((*L2InterfaceEfpFilter)(nil), "l2_interface_efp_filter_69d24598")
- api.RegisterMessage((*L2InterfaceEfpFilterReply)(nil), "l2_interface_efp_filter_reply_e8d4e804")
- api.RegisterMessage((*L2InterfacePbbTagRewrite)(nil), "l2_interface_pbb_tag_rewrite_6cf815f9")
- api.RegisterMessage((*L2InterfacePbbTagRewriteReply)(nil), "l2_interface_pbb_tag_rewrite_reply_e8d4e804")
- api.RegisterMessage((*L2InterfaceVlanTagRewrite)(nil), "l2_interface_vlan_tag_rewrite_b90be6b4")
- api.RegisterMessage((*L2InterfaceVlanTagRewriteReply)(nil), "l2_interface_vlan_tag_rewrite_reply_e8d4e804")
- api.RegisterMessage((*L2MacsEvent)(nil), "l2_macs_event_afc74a60")
- api.RegisterMessage((*L2PatchAddDel)(nil), "l2_patch_add_del_62506e63")
- api.RegisterMessage((*L2PatchAddDelReply)(nil), "l2_patch_add_del_reply_e8d4e804")
- api.RegisterMessage((*L2XconnectDetails)(nil), "l2_xconnect_details_722e2378")
- api.RegisterMessage((*L2XconnectDump)(nil), "l2_xconnect_dump_51077d14")
- api.RegisterMessage((*L2fibAddDel)(nil), "l2fib_add_del_34ced3eb")
- api.RegisterMessage((*L2fibAddDelReply)(nil), "l2fib_add_del_reply_e8d4e804")
- api.RegisterMessage((*L2fibFlushAll)(nil), "l2fib_flush_all_51077d14")
- api.RegisterMessage((*L2fibFlushAllReply)(nil), "l2fib_flush_all_reply_e8d4e804")
- api.RegisterMessage((*L2fibFlushBd)(nil), "l2fib_flush_bd_c25fdce6")
- api.RegisterMessage((*L2fibFlushBdReply)(nil), "l2fib_flush_bd_reply_e8d4e804")
- api.RegisterMessage((*L2fibFlushInt)(nil), "l2fib_flush_int_529cb13f")
- api.RegisterMessage((*L2fibFlushIntReply)(nil), "l2fib_flush_int_reply_e8d4e804")
- api.RegisterMessage((*SwInterfaceSetL2Bridge)(nil), "sw_interface_set_l2_bridge_5579f809")
- api.RegisterMessage((*SwInterfaceSetL2BridgeReply)(nil), "sw_interface_set_l2_bridge_reply_e8d4e804")
- api.RegisterMessage((*SwInterfaceSetL2Xconnect)(nil), "sw_interface_set_l2_xconnect_95de3988")
- api.RegisterMessage((*SwInterfaceSetL2XconnectReply)(nil), "sw_interface_set_l2_xconnect_reply_e8d4e804")
- api.RegisterMessage((*SwInterfaceSetVpath)(nil), "sw_interface_set_vpath_a36fadc0")
- api.RegisterMessage((*SwInterfaceSetVpathReply)(nil), "sw_interface_set_vpath_reply_e8d4e804")
- api.RegisterMessage((*WantL2ArpTermEvents)(nil), "want_l2_arp_term_events_3ec6d6c2")
- api.RegisterMessage((*WantL2ArpTermEventsReply)(nil), "want_l2_arp_term_events_reply_e8d4e804")
- api.RegisterMessage((*WantL2MacsEvents)(nil), "want_l2_macs_events_9aabdfde")
- api.RegisterMessage((*WantL2MacsEventsReply)(nil), "want_l2_macs_events_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*BdIPMacAddDel)(nil),
- (*BdIPMacAddDelReply)(nil),
- (*BdIPMacDetails)(nil),
- (*BdIPMacDump)(nil),
- (*BdIPMacFlush)(nil),
- (*BdIPMacFlushReply)(nil),
- (*BridgeDomainAddDel)(nil),
- (*BridgeDomainAddDelReply)(nil),
- (*BridgeDomainDetails)(nil),
- (*BridgeDomainDump)(nil),
- (*BridgeDomainSetMacAge)(nil),
- (*BridgeDomainSetMacAgeReply)(nil),
- (*BridgeFlags)(nil),
- (*BridgeFlagsReply)(nil),
- (*BviCreate)(nil),
- (*BviCreateReply)(nil),
- (*BviDelete)(nil),
- (*BviDeleteReply)(nil),
- (*L2ArpTermEvent)(nil),
- (*L2FibClearTable)(nil),
- (*L2FibClearTableReply)(nil),
- (*L2FibTableDetails)(nil),
- (*L2FibTableDump)(nil),
- (*L2Flags)(nil),
- (*L2FlagsReply)(nil),
- (*L2InterfaceEfpFilter)(nil),
- (*L2InterfaceEfpFilterReply)(nil),
- (*L2InterfacePbbTagRewrite)(nil),
- (*L2InterfacePbbTagRewriteReply)(nil),
- (*L2InterfaceVlanTagRewrite)(nil),
- (*L2InterfaceVlanTagRewriteReply)(nil),
- (*L2MacsEvent)(nil),
- (*L2PatchAddDel)(nil),
- (*L2PatchAddDelReply)(nil),
- (*L2XconnectDetails)(nil),
- (*L2XconnectDump)(nil),
- (*L2fibAddDel)(nil),
- (*L2fibAddDelReply)(nil),
- (*L2fibFlushAll)(nil),
- (*L2fibFlushAllReply)(nil),
- (*L2fibFlushBd)(nil),
- (*L2fibFlushBdReply)(nil),
- (*L2fibFlushInt)(nil),
- (*L2fibFlushIntReply)(nil),
- (*SwInterfaceSetL2Bridge)(nil),
- (*SwInterfaceSetL2BridgeReply)(nil),
- (*SwInterfaceSetL2Xconnect)(nil),
- (*SwInterfaceSetL2XconnectReply)(nil),
- (*SwInterfaceSetVpath)(nil),
- (*SwInterfaceSetVpathReply)(nil),
- (*WantL2ArpTermEvents)(nil),
- (*WantL2ArpTermEventsReply)(nil),
- (*WantL2MacsEvents)(nil),
- (*WantL2MacsEventsReply)(nil),
- }
-}