go.ligato.io/vpp-agent/v3@v3.5.0/plugins/vpp/binapi/vpp2202/l2/l2.ba.go (about)

     1  // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
     2  
     3  // Package l2 contains generated bindings for API file l2.api.
     4  //
     5  // Contents:
     6  // -  3 enums
     7  // -  3 structs
     8  // - 62 messages
     9  package l2
    10  
    11  import (
    12  	"strconv"
    13  
    14  	api "go.fd.io/govpp/api"
    15  	codec "go.fd.io/govpp/codec"
    16  	ethernet_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2202/ethernet_types"
    17  	interface_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2202/interface_types"
    18  	ip_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2202/ip_types"
    19  )
    20  
    21  // This is a compile-time assertion to ensure that this generated file
    22  // is compatible with the GoVPP api package it is being compiled against.
    23  // A compilation error at this line likely means your copy of the
    24  // GoVPP api package needs to be updated.
    25  const _ = api.GoVppAPIPackageIsVersion2
    26  
    27  const (
    28  	APIFile    = "l2"
    29  	APIVersion = "3.1.0"
    30  	VersionCrc = 0xfc6b8fd2
    31  )
    32  
    33  // BdFlags defines enum 'bd_flags'.
    34  type BdFlags uint32
    35  
    36  const (
    37  	BRIDGE_API_FLAG_NONE     BdFlags = 0
    38  	BRIDGE_API_FLAG_LEARN    BdFlags = 1
    39  	BRIDGE_API_FLAG_FWD      BdFlags = 2
    40  	BRIDGE_API_FLAG_FLOOD    BdFlags = 4
    41  	BRIDGE_API_FLAG_UU_FLOOD BdFlags = 8
    42  	BRIDGE_API_FLAG_ARP_TERM BdFlags = 16
    43  	BRIDGE_API_FLAG_ARP_UFWD BdFlags = 32
    44  )
    45  
    46  var (
    47  	BdFlags_name = map[uint32]string{
    48  		0:  "BRIDGE_API_FLAG_NONE",
    49  		1:  "BRIDGE_API_FLAG_LEARN",
    50  		2:  "BRIDGE_API_FLAG_FWD",
    51  		4:  "BRIDGE_API_FLAG_FLOOD",
    52  		8:  "BRIDGE_API_FLAG_UU_FLOOD",
    53  		16: "BRIDGE_API_FLAG_ARP_TERM",
    54  		32: "BRIDGE_API_FLAG_ARP_UFWD",
    55  	}
    56  	BdFlags_value = map[string]uint32{
    57  		"BRIDGE_API_FLAG_NONE":     0,
    58  		"BRIDGE_API_FLAG_LEARN":    1,
    59  		"BRIDGE_API_FLAG_FWD":      2,
    60  		"BRIDGE_API_FLAG_FLOOD":    4,
    61  		"BRIDGE_API_FLAG_UU_FLOOD": 8,
    62  		"BRIDGE_API_FLAG_ARP_TERM": 16,
    63  		"BRIDGE_API_FLAG_ARP_UFWD": 32,
    64  	}
    65  )
    66  
    67  func (x BdFlags) String() string {
    68  	s, ok := BdFlags_name[uint32(x)]
    69  	if ok {
    70  		return s
    71  	}
    72  	str := func(n uint32) string {
    73  		s, ok := BdFlags_name[uint32(n)]
    74  		if ok {
    75  			return s
    76  		}
    77  		return "BdFlags(" + strconv.Itoa(int(n)) + ")"
    78  	}
    79  	for i := uint32(0); i <= 32; i++ {
    80  		val := uint32(x)
    81  		if val&(1<<i) != 0 {
    82  			if s != "" {
    83  				s += "|"
    84  			}
    85  			s += str(1 << i)
    86  		}
    87  	}
    88  	if s == "" {
    89  		return str(uint32(x))
    90  	}
    91  	return s
    92  }
    93  
    94  // L2PortType defines enum 'l2_port_type'.
    95  type L2PortType uint32
    96  
    97  const (
    98  	L2_API_PORT_TYPE_NORMAL L2PortType = 0
    99  	L2_API_PORT_TYPE_BVI    L2PortType = 1
   100  	L2_API_PORT_TYPE_UU_FWD L2PortType = 2
   101  )
   102  
   103  var (
   104  	L2PortType_name = map[uint32]string{
   105  		0: "L2_API_PORT_TYPE_NORMAL",
   106  		1: "L2_API_PORT_TYPE_BVI",
   107  		2: "L2_API_PORT_TYPE_UU_FWD",
   108  	}
   109  	L2PortType_value = map[string]uint32{
   110  		"L2_API_PORT_TYPE_NORMAL": 0,
   111  		"L2_API_PORT_TYPE_BVI":    1,
   112  		"L2_API_PORT_TYPE_UU_FWD": 2,
   113  	}
   114  )
   115  
   116  func (x L2PortType) String() string {
   117  	s, ok := L2PortType_name[uint32(x)]
   118  	if ok {
   119  		return s
   120  	}
   121  	return "L2PortType(" + strconv.Itoa(int(x)) + ")"
   122  }
   123  
   124  // MacEventAction defines enum 'mac_event_action'.
   125  type MacEventAction uint32
   126  
   127  const (
   128  	MAC_EVENT_ACTION_API_ADD    MacEventAction = 0
   129  	MAC_EVENT_ACTION_API_DELETE MacEventAction = 1
   130  	MAC_EVENT_ACTION_API_MOVE   MacEventAction = 2
   131  )
   132  
   133  var (
   134  	MacEventAction_name = map[uint32]string{
   135  		0: "MAC_EVENT_ACTION_API_ADD",
   136  		1: "MAC_EVENT_ACTION_API_DELETE",
   137  		2: "MAC_EVENT_ACTION_API_MOVE",
   138  	}
   139  	MacEventAction_value = map[string]uint32{
   140  		"MAC_EVENT_ACTION_API_ADD":    0,
   141  		"MAC_EVENT_ACTION_API_DELETE": 1,
   142  		"MAC_EVENT_ACTION_API_MOVE":   2,
   143  	}
   144  )
   145  
   146  func (x MacEventAction) String() string {
   147  	s, ok := MacEventAction_name[uint32(x)]
   148  	if ok {
   149  		return s
   150  	}
   151  	return "MacEventAction(" + strconv.Itoa(int(x)) + ")"
   152  }
   153  
   154  // BdIPMac defines type 'bd_ip_mac'.
   155  type BdIPMac struct {
   156  	BdID uint32                    `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
   157  	IP   ip_types.Address          `binapi:"address,name=ip" json:"ip,omitempty"`
   158  	Mac  ethernet_types.MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"`
   159  }
   160  
   161  // BridgeDomainSwIf defines type 'bridge_domain_sw_if'.
   162  type BridgeDomainSwIf struct {
   163  	Context   uint32                         `binapi:"u32,name=context" json:"context,omitempty"`
   164  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   165  	Shg       uint8                          `binapi:"u8,name=shg" json:"shg,omitempty"`
   166  }
   167  
   168  // MacEntry defines type 'mac_entry'.
   169  type MacEntry struct {
   170  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   171  	MacAddr   ethernet_types.MacAddress      `binapi:"mac_address,name=mac_addr" json:"mac_addr,omitempty"`
   172  	Action    MacEventAction                 `binapi:"mac_event_action,name=action" json:"action,omitempty"`
   173  	Flags     uint8                          `binapi:"u8,name=flags" json:"flags,omitempty"`
   174  }
   175  
   176  // BdIPMacAddDel defines message 'bd_ip_mac_add_del'.
   177  type BdIPMacAddDel struct {
   178  	IsAdd bool    `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
   179  	Entry BdIPMac `binapi:"bd_ip_mac,name=entry" json:"entry,omitempty"`
   180  }
   181  
   182  func (m *BdIPMacAddDel) Reset()               { *m = BdIPMacAddDel{} }
   183  func (*BdIPMacAddDel) GetMessageName() string { return "bd_ip_mac_add_del" }
   184  func (*BdIPMacAddDel) GetCrcString() string   { return "0257c869" }
   185  func (*BdIPMacAddDel) GetMessageType() api.MessageType {
   186  	return api.RequestMessage
   187  }
   188  
   189  func (m *BdIPMacAddDel) Size() (size int) {
   190  	if m == nil {
   191  		return 0
   192  	}
   193  	size += 1      // m.IsAdd
   194  	size += 4      // m.Entry.BdID
   195  	size += 1      // m.Entry.IP.Af
   196  	size += 1 * 16 // m.Entry.IP.Un
   197  	size += 1 * 6  // m.Entry.Mac
   198  	return size
   199  }
   200  func (m *BdIPMacAddDel) Marshal(b []byte) ([]byte, error) {
   201  	if b == nil {
   202  		b = make([]byte, m.Size())
   203  	}
   204  	buf := codec.NewBuffer(b)
   205  	buf.EncodeBool(m.IsAdd)
   206  	buf.EncodeUint32(m.Entry.BdID)
   207  	buf.EncodeUint8(uint8(m.Entry.IP.Af))
   208  	buf.EncodeBytes(m.Entry.IP.Un.XXX_UnionData[:], 16)
   209  	buf.EncodeBytes(m.Entry.Mac[:], 6)
   210  	return buf.Bytes(), nil
   211  }
   212  func (m *BdIPMacAddDel) Unmarshal(b []byte) error {
   213  	buf := codec.NewBuffer(b)
   214  	m.IsAdd = buf.DecodeBool()
   215  	m.Entry.BdID = buf.DecodeUint32()
   216  	m.Entry.IP.Af = ip_types.AddressFamily(buf.DecodeUint8())
   217  	copy(m.Entry.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   218  	copy(m.Entry.Mac[:], buf.DecodeBytes(6))
   219  	return nil
   220  }
   221  
   222  // BdIPMacAddDelReply defines message 'bd_ip_mac_add_del_reply'.
   223  type BdIPMacAddDelReply struct {
   224  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   225  }
   226  
   227  func (m *BdIPMacAddDelReply) Reset()               { *m = BdIPMacAddDelReply{} }
   228  func (*BdIPMacAddDelReply) GetMessageName() string { return "bd_ip_mac_add_del_reply" }
   229  func (*BdIPMacAddDelReply) GetCrcString() string   { return "e8d4e804" }
   230  func (*BdIPMacAddDelReply) GetMessageType() api.MessageType {
   231  	return api.ReplyMessage
   232  }
   233  
   234  func (m *BdIPMacAddDelReply) Size() (size int) {
   235  	if m == nil {
   236  		return 0
   237  	}
   238  	size += 4 // m.Retval
   239  	return size
   240  }
   241  func (m *BdIPMacAddDelReply) Marshal(b []byte) ([]byte, error) {
   242  	if b == nil {
   243  		b = make([]byte, m.Size())
   244  	}
   245  	buf := codec.NewBuffer(b)
   246  	buf.EncodeInt32(m.Retval)
   247  	return buf.Bytes(), nil
   248  }
   249  func (m *BdIPMacAddDelReply) Unmarshal(b []byte) error {
   250  	buf := codec.NewBuffer(b)
   251  	m.Retval = buf.DecodeInt32()
   252  	return nil
   253  }
   254  
   255  // BdIPMacDetails defines message 'bd_ip_mac_details'.
   256  type BdIPMacDetails struct {
   257  	Entry BdIPMac `binapi:"bd_ip_mac,name=entry" json:"entry,omitempty"`
   258  }
   259  
   260  func (m *BdIPMacDetails) Reset()               { *m = BdIPMacDetails{} }
   261  func (*BdIPMacDetails) GetMessageName() string { return "bd_ip_mac_details" }
   262  func (*BdIPMacDetails) GetCrcString() string   { return "545af86a" }
   263  func (*BdIPMacDetails) GetMessageType() api.MessageType {
   264  	return api.ReplyMessage
   265  }
   266  
   267  func (m *BdIPMacDetails) Size() (size int) {
   268  	if m == nil {
   269  		return 0
   270  	}
   271  	size += 4      // m.Entry.BdID
   272  	size += 1      // m.Entry.IP.Af
   273  	size += 1 * 16 // m.Entry.IP.Un
   274  	size += 1 * 6  // m.Entry.Mac
   275  	return size
   276  }
   277  func (m *BdIPMacDetails) Marshal(b []byte) ([]byte, error) {
   278  	if b == nil {
   279  		b = make([]byte, m.Size())
   280  	}
   281  	buf := codec.NewBuffer(b)
   282  	buf.EncodeUint32(m.Entry.BdID)
   283  	buf.EncodeUint8(uint8(m.Entry.IP.Af))
   284  	buf.EncodeBytes(m.Entry.IP.Un.XXX_UnionData[:], 16)
   285  	buf.EncodeBytes(m.Entry.Mac[:], 6)
   286  	return buf.Bytes(), nil
   287  }
   288  func (m *BdIPMacDetails) Unmarshal(b []byte) error {
   289  	buf := codec.NewBuffer(b)
   290  	m.Entry.BdID = buf.DecodeUint32()
   291  	m.Entry.IP.Af = ip_types.AddressFamily(buf.DecodeUint8())
   292  	copy(m.Entry.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   293  	copy(m.Entry.Mac[:], buf.DecodeBytes(6))
   294  	return nil
   295  }
   296  
   297  // BdIPMacDump defines message 'bd_ip_mac_dump'.
   298  type BdIPMacDump struct {
   299  	BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
   300  }
   301  
   302  func (m *BdIPMacDump) Reset()               { *m = BdIPMacDump{} }
   303  func (*BdIPMacDump) GetMessageName() string { return "bd_ip_mac_dump" }
   304  func (*BdIPMacDump) GetCrcString() string   { return "c25fdce6" }
   305  func (*BdIPMacDump) GetMessageType() api.MessageType {
   306  	return api.RequestMessage
   307  }
   308  
   309  func (m *BdIPMacDump) Size() (size int) {
   310  	if m == nil {
   311  		return 0
   312  	}
   313  	size += 4 // m.BdID
   314  	return size
   315  }
   316  func (m *BdIPMacDump) Marshal(b []byte) ([]byte, error) {
   317  	if b == nil {
   318  		b = make([]byte, m.Size())
   319  	}
   320  	buf := codec.NewBuffer(b)
   321  	buf.EncodeUint32(m.BdID)
   322  	return buf.Bytes(), nil
   323  }
   324  func (m *BdIPMacDump) Unmarshal(b []byte) error {
   325  	buf := codec.NewBuffer(b)
   326  	m.BdID = buf.DecodeUint32()
   327  	return nil
   328  }
   329  
   330  // BdIPMacFlush defines message 'bd_ip_mac_flush'.
   331  type BdIPMacFlush struct {
   332  	BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
   333  }
   334  
   335  func (m *BdIPMacFlush) Reset()               { *m = BdIPMacFlush{} }
   336  func (*BdIPMacFlush) GetMessageName() string { return "bd_ip_mac_flush" }
   337  func (*BdIPMacFlush) GetCrcString() string   { return "c25fdce6" }
   338  func (*BdIPMacFlush) GetMessageType() api.MessageType {
   339  	return api.RequestMessage
   340  }
   341  
   342  func (m *BdIPMacFlush) Size() (size int) {
   343  	if m == nil {
   344  		return 0
   345  	}
   346  	size += 4 // m.BdID
   347  	return size
   348  }
   349  func (m *BdIPMacFlush) Marshal(b []byte) ([]byte, error) {
   350  	if b == nil {
   351  		b = make([]byte, m.Size())
   352  	}
   353  	buf := codec.NewBuffer(b)
   354  	buf.EncodeUint32(m.BdID)
   355  	return buf.Bytes(), nil
   356  }
   357  func (m *BdIPMacFlush) Unmarshal(b []byte) error {
   358  	buf := codec.NewBuffer(b)
   359  	m.BdID = buf.DecodeUint32()
   360  	return nil
   361  }
   362  
   363  // BdIPMacFlushReply defines message 'bd_ip_mac_flush_reply'.
   364  type BdIPMacFlushReply struct {
   365  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   366  }
   367  
   368  func (m *BdIPMacFlushReply) Reset()               { *m = BdIPMacFlushReply{} }
   369  func (*BdIPMacFlushReply) GetMessageName() string { return "bd_ip_mac_flush_reply" }
   370  func (*BdIPMacFlushReply) GetCrcString() string   { return "e8d4e804" }
   371  func (*BdIPMacFlushReply) GetMessageType() api.MessageType {
   372  	return api.ReplyMessage
   373  }
   374  
   375  func (m *BdIPMacFlushReply) Size() (size int) {
   376  	if m == nil {
   377  		return 0
   378  	}
   379  	size += 4 // m.Retval
   380  	return size
   381  }
   382  func (m *BdIPMacFlushReply) Marshal(b []byte) ([]byte, error) {
   383  	if b == nil {
   384  		b = make([]byte, m.Size())
   385  	}
   386  	buf := codec.NewBuffer(b)
   387  	buf.EncodeInt32(m.Retval)
   388  	return buf.Bytes(), nil
   389  }
   390  func (m *BdIPMacFlushReply) Unmarshal(b []byte) error {
   391  	buf := codec.NewBuffer(b)
   392  	m.Retval = buf.DecodeInt32()
   393  	return nil
   394  }
   395  
   396  // BridgeDomainAddDel defines message 'bridge_domain_add_del'.
   397  type BridgeDomainAddDel struct {
   398  	BdID    uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
   399  	Flood   bool   `binapi:"bool,name=flood" json:"flood,omitempty"`
   400  	UuFlood bool   `binapi:"bool,name=uu_flood" json:"uu_flood,omitempty"`
   401  	Forward bool   `binapi:"bool,name=forward" json:"forward,omitempty"`
   402  	Learn   bool   `binapi:"bool,name=learn" json:"learn,omitempty"`
   403  	ArpTerm bool   `binapi:"bool,name=arp_term" json:"arp_term,omitempty"`
   404  	ArpUfwd bool   `binapi:"bool,name=arp_ufwd" json:"arp_ufwd,omitempty"`
   405  	MacAge  uint8  `binapi:"u8,name=mac_age" json:"mac_age,omitempty"`
   406  	BdTag   string `binapi:"string[64],name=bd_tag" json:"bd_tag,omitempty"`
   407  	IsAdd   bool   `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
   408  }
   409  
   410  func (m *BridgeDomainAddDel) Reset()               { *m = BridgeDomainAddDel{} }
   411  func (*BridgeDomainAddDel) GetMessageName() string { return "bridge_domain_add_del" }
   412  func (*BridgeDomainAddDel) GetCrcString() string   { return "600b7170" }
   413  func (*BridgeDomainAddDel) GetMessageType() api.MessageType {
   414  	return api.RequestMessage
   415  }
   416  
   417  func (m *BridgeDomainAddDel) Size() (size int) {
   418  	if m == nil {
   419  		return 0
   420  	}
   421  	size += 4  // m.BdID
   422  	size += 1  // m.Flood
   423  	size += 1  // m.UuFlood
   424  	size += 1  // m.Forward
   425  	size += 1  // m.Learn
   426  	size += 1  // m.ArpTerm
   427  	size += 1  // m.ArpUfwd
   428  	size += 1  // m.MacAge
   429  	size += 64 // m.BdTag
   430  	size += 1  // m.IsAdd
   431  	return size
   432  }
   433  func (m *BridgeDomainAddDel) Marshal(b []byte) ([]byte, error) {
   434  	if b == nil {
   435  		b = make([]byte, m.Size())
   436  	}
   437  	buf := codec.NewBuffer(b)
   438  	buf.EncodeUint32(m.BdID)
   439  	buf.EncodeBool(m.Flood)
   440  	buf.EncodeBool(m.UuFlood)
   441  	buf.EncodeBool(m.Forward)
   442  	buf.EncodeBool(m.Learn)
   443  	buf.EncodeBool(m.ArpTerm)
   444  	buf.EncodeBool(m.ArpUfwd)
   445  	buf.EncodeUint8(m.MacAge)
   446  	buf.EncodeString(m.BdTag, 64)
   447  	buf.EncodeBool(m.IsAdd)
   448  	return buf.Bytes(), nil
   449  }
   450  func (m *BridgeDomainAddDel) Unmarshal(b []byte) error {
   451  	buf := codec.NewBuffer(b)
   452  	m.BdID = buf.DecodeUint32()
   453  	m.Flood = buf.DecodeBool()
   454  	m.UuFlood = buf.DecodeBool()
   455  	m.Forward = buf.DecodeBool()
   456  	m.Learn = buf.DecodeBool()
   457  	m.ArpTerm = buf.DecodeBool()
   458  	m.ArpUfwd = buf.DecodeBool()
   459  	m.MacAge = buf.DecodeUint8()
   460  	m.BdTag = buf.DecodeString(64)
   461  	m.IsAdd = buf.DecodeBool()
   462  	return nil
   463  }
   464  
   465  // BridgeDomainAddDelReply defines message 'bridge_domain_add_del_reply'.
   466  type BridgeDomainAddDelReply struct {
   467  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   468  }
   469  
   470  func (m *BridgeDomainAddDelReply) Reset()               { *m = BridgeDomainAddDelReply{} }
   471  func (*BridgeDomainAddDelReply) GetMessageName() string { return "bridge_domain_add_del_reply" }
   472  func (*BridgeDomainAddDelReply) GetCrcString() string   { return "e8d4e804" }
   473  func (*BridgeDomainAddDelReply) GetMessageType() api.MessageType {
   474  	return api.ReplyMessage
   475  }
   476  
   477  func (m *BridgeDomainAddDelReply) Size() (size int) {
   478  	if m == nil {
   479  		return 0
   480  	}
   481  	size += 4 // m.Retval
   482  	return size
   483  }
   484  func (m *BridgeDomainAddDelReply) Marshal(b []byte) ([]byte, error) {
   485  	if b == nil {
   486  		b = make([]byte, m.Size())
   487  	}
   488  	buf := codec.NewBuffer(b)
   489  	buf.EncodeInt32(m.Retval)
   490  	return buf.Bytes(), nil
   491  }
   492  func (m *BridgeDomainAddDelReply) Unmarshal(b []byte) error {
   493  	buf := codec.NewBuffer(b)
   494  	m.Retval = buf.DecodeInt32()
   495  	return nil
   496  }
   497  
   498  // BridgeDomainDetails defines message 'bridge_domain_details'.
   499  type BridgeDomainDetails struct {
   500  	BdID           uint32                         `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
   501  	Flood          bool                           `binapi:"bool,name=flood" json:"flood,omitempty"`
   502  	UuFlood        bool                           `binapi:"bool,name=uu_flood" json:"uu_flood,omitempty"`
   503  	Forward        bool                           `binapi:"bool,name=forward" json:"forward,omitempty"`
   504  	Learn          bool                           `binapi:"bool,name=learn" json:"learn,omitempty"`
   505  	ArpTerm        bool                           `binapi:"bool,name=arp_term" json:"arp_term,omitempty"`
   506  	ArpUfwd        bool                           `binapi:"bool,name=arp_ufwd" json:"arp_ufwd,omitempty"`
   507  	MacAge         uint8                          `binapi:"u8,name=mac_age" json:"mac_age,omitempty"`
   508  	BdTag          string                         `binapi:"string[64],name=bd_tag" json:"bd_tag,omitempty"`
   509  	BviSwIfIndex   interface_types.InterfaceIndex `binapi:"interface_index,name=bvi_sw_if_index" json:"bvi_sw_if_index,omitempty"`
   510  	UuFwdSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=uu_fwd_sw_if_index" json:"uu_fwd_sw_if_index,omitempty"`
   511  	NSwIfs         uint32                         `binapi:"u32,name=n_sw_ifs" json:"-"`
   512  	SwIfDetails    []BridgeDomainSwIf             `binapi:"bridge_domain_sw_if[n_sw_ifs],name=sw_if_details" json:"sw_if_details,omitempty"`
   513  }
   514  
   515  func (m *BridgeDomainDetails) Reset()               { *m = BridgeDomainDetails{} }
   516  func (*BridgeDomainDetails) GetMessageName() string { return "bridge_domain_details" }
   517  func (*BridgeDomainDetails) GetCrcString() string   { return "0fa506fd" }
   518  func (*BridgeDomainDetails) GetMessageType() api.MessageType {
   519  	return api.ReplyMessage
   520  }
   521  
   522  func (m *BridgeDomainDetails) Size() (size int) {
   523  	if m == nil {
   524  		return 0
   525  	}
   526  	size += 4  // m.BdID
   527  	size += 1  // m.Flood
   528  	size += 1  // m.UuFlood
   529  	size += 1  // m.Forward
   530  	size += 1  // m.Learn
   531  	size += 1  // m.ArpTerm
   532  	size += 1  // m.ArpUfwd
   533  	size += 1  // m.MacAge
   534  	size += 64 // m.BdTag
   535  	size += 4  // m.BviSwIfIndex
   536  	size += 4  // m.UuFwdSwIfIndex
   537  	size += 4  // m.NSwIfs
   538  	for j1 := 0; j1 < len(m.SwIfDetails); j1++ {
   539  		var s1 BridgeDomainSwIf
   540  		_ = s1
   541  		if j1 < len(m.SwIfDetails) {
   542  			s1 = m.SwIfDetails[j1]
   543  		}
   544  		size += 4 // s1.Context
   545  		size += 4 // s1.SwIfIndex
   546  		size += 1 // s1.Shg
   547  	}
   548  	return size
   549  }
   550  func (m *BridgeDomainDetails) Marshal(b []byte) ([]byte, error) {
   551  	if b == nil {
   552  		b = make([]byte, m.Size())
   553  	}
   554  	buf := codec.NewBuffer(b)
   555  	buf.EncodeUint32(m.BdID)
   556  	buf.EncodeBool(m.Flood)
   557  	buf.EncodeBool(m.UuFlood)
   558  	buf.EncodeBool(m.Forward)
   559  	buf.EncodeBool(m.Learn)
   560  	buf.EncodeBool(m.ArpTerm)
   561  	buf.EncodeBool(m.ArpUfwd)
   562  	buf.EncodeUint8(m.MacAge)
   563  	buf.EncodeString(m.BdTag, 64)
   564  	buf.EncodeUint32(uint32(m.BviSwIfIndex))
   565  	buf.EncodeUint32(uint32(m.UuFwdSwIfIndex))
   566  	buf.EncodeUint32(uint32(len(m.SwIfDetails)))
   567  	for j0 := 0; j0 < len(m.SwIfDetails); j0++ {
   568  		var v0 BridgeDomainSwIf // SwIfDetails
   569  		if j0 < len(m.SwIfDetails) {
   570  			v0 = m.SwIfDetails[j0]
   571  		}
   572  		buf.EncodeUint32(v0.Context)
   573  		buf.EncodeUint32(uint32(v0.SwIfIndex))
   574  		buf.EncodeUint8(v0.Shg)
   575  	}
   576  	return buf.Bytes(), nil
   577  }
   578  func (m *BridgeDomainDetails) Unmarshal(b []byte) error {
   579  	buf := codec.NewBuffer(b)
   580  	m.BdID = buf.DecodeUint32()
   581  	m.Flood = buf.DecodeBool()
   582  	m.UuFlood = buf.DecodeBool()
   583  	m.Forward = buf.DecodeBool()
   584  	m.Learn = buf.DecodeBool()
   585  	m.ArpTerm = buf.DecodeBool()
   586  	m.ArpUfwd = buf.DecodeBool()
   587  	m.MacAge = buf.DecodeUint8()
   588  	m.BdTag = buf.DecodeString(64)
   589  	m.BviSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   590  	m.UuFwdSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   591  	m.NSwIfs = buf.DecodeUint32()
   592  	m.SwIfDetails = make([]BridgeDomainSwIf, m.NSwIfs)
   593  	for j0 := 0; j0 < len(m.SwIfDetails); j0++ {
   594  		m.SwIfDetails[j0].Context = buf.DecodeUint32()
   595  		m.SwIfDetails[j0].SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   596  		m.SwIfDetails[j0].Shg = buf.DecodeUint8()
   597  	}
   598  	return nil
   599  }
   600  
   601  // BridgeDomainDump defines message 'bridge_domain_dump'.
   602  type BridgeDomainDump struct {
   603  	BdID      uint32                         `binapi:"u32,name=bd_id,default=4294967295" json:"bd_id,omitempty"`
   604  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
   605  }
   606  
   607  func (m *BridgeDomainDump) Reset()               { *m = BridgeDomainDump{} }
   608  func (*BridgeDomainDump) GetMessageName() string { return "bridge_domain_dump" }
   609  func (*BridgeDomainDump) GetCrcString() string   { return "74396a43" }
   610  func (*BridgeDomainDump) GetMessageType() api.MessageType {
   611  	return api.RequestMessage
   612  }
   613  
   614  func (m *BridgeDomainDump) Size() (size int) {
   615  	if m == nil {
   616  		return 0
   617  	}
   618  	size += 4 // m.BdID
   619  	size += 4 // m.SwIfIndex
   620  	return size
   621  }
   622  func (m *BridgeDomainDump) Marshal(b []byte) ([]byte, error) {
   623  	if b == nil {
   624  		b = make([]byte, m.Size())
   625  	}
   626  	buf := codec.NewBuffer(b)
   627  	buf.EncodeUint32(m.BdID)
   628  	buf.EncodeUint32(uint32(m.SwIfIndex))
   629  	return buf.Bytes(), nil
   630  }
   631  func (m *BridgeDomainDump) Unmarshal(b []byte) error {
   632  	buf := codec.NewBuffer(b)
   633  	m.BdID = buf.DecodeUint32()
   634  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   635  	return nil
   636  }
   637  
   638  // BridgeDomainSetDefaultLearnLimit defines message 'bridge_domain_set_default_learn_limit'.
   639  type BridgeDomainSetDefaultLearnLimit struct {
   640  	LearnLimit uint32 `binapi:"u32,name=learn_limit" json:"learn_limit,omitempty"`
   641  }
   642  
   643  func (m *BridgeDomainSetDefaultLearnLimit) Reset() { *m = BridgeDomainSetDefaultLearnLimit{} }
   644  func (*BridgeDomainSetDefaultLearnLimit) GetMessageName() string {
   645  	return "bridge_domain_set_default_learn_limit"
   646  }
   647  func (*BridgeDomainSetDefaultLearnLimit) GetCrcString() string { return "f097ffce" }
   648  func (*BridgeDomainSetDefaultLearnLimit) GetMessageType() api.MessageType {
   649  	return api.RequestMessage
   650  }
   651  
   652  func (m *BridgeDomainSetDefaultLearnLimit) Size() (size int) {
   653  	if m == nil {
   654  		return 0
   655  	}
   656  	size += 4 // m.LearnLimit
   657  	return size
   658  }
   659  func (m *BridgeDomainSetDefaultLearnLimit) Marshal(b []byte) ([]byte, error) {
   660  	if b == nil {
   661  		b = make([]byte, m.Size())
   662  	}
   663  	buf := codec.NewBuffer(b)
   664  	buf.EncodeUint32(m.LearnLimit)
   665  	return buf.Bytes(), nil
   666  }
   667  func (m *BridgeDomainSetDefaultLearnLimit) Unmarshal(b []byte) error {
   668  	buf := codec.NewBuffer(b)
   669  	m.LearnLimit = buf.DecodeUint32()
   670  	return nil
   671  }
   672  
   673  // BridgeDomainSetDefaultLearnLimitReply defines message 'bridge_domain_set_default_learn_limit_reply'.
   674  type BridgeDomainSetDefaultLearnLimitReply struct {
   675  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   676  }
   677  
   678  func (m *BridgeDomainSetDefaultLearnLimitReply) Reset() { *m = BridgeDomainSetDefaultLearnLimitReply{} }
   679  func (*BridgeDomainSetDefaultLearnLimitReply) GetMessageName() string {
   680  	return "bridge_domain_set_default_learn_limit_reply"
   681  }
   682  func (*BridgeDomainSetDefaultLearnLimitReply) GetCrcString() string { return "e8d4e804" }
   683  func (*BridgeDomainSetDefaultLearnLimitReply) GetMessageType() api.MessageType {
   684  	return api.ReplyMessage
   685  }
   686  
   687  func (m *BridgeDomainSetDefaultLearnLimitReply) Size() (size int) {
   688  	if m == nil {
   689  		return 0
   690  	}
   691  	size += 4 // m.Retval
   692  	return size
   693  }
   694  func (m *BridgeDomainSetDefaultLearnLimitReply) Marshal(b []byte) ([]byte, error) {
   695  	if b == nil {
   696  		b = make([]byte, m.Size())
   697  	}
   698  	buf := codec.NewBuffer(b)
   699  	buf.EncodeInt32(m.Retval)
   700  	return buf.Bytes(), nil
   701  }
   702  func (m *BridgeDomainSetDefaultLearnLimitReply) Unmarshal(b []byte) error {
   703  	buf := codec.NewBuffer(b)
   704  	m.Retval = buf.DecodeInt32()
   705  	return nil
   706  }
   707  
   708  // BridgeDomainSetLearnLimit defines message 'bridge_domain_set_learn_limit'.
   709  type BridgeDomainSetLearnLimit struct {
   710  	BdID       uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
   711  	LearnLimit uint32 `binapi:"u32,name=learn_limit" json:"learn_limit,omitempty"`
   712  }
   713  
   714  func (m *BridgeDomainSetLearnLimit) Reset()               { *m = BridgeDomainSetLearnLimit{} }
   715  func (*BridgeDomainSetLearnLimit) GetMessageName() string { return "bridge_domain_set_learn_limit" }
   716  func (*BridgeDomainSetLearnLimit) GetCrcString() string   { return "89c52b5f" }
   717  func (*BridgeDomainSetLearnLimit) GetMessageType() api.MessageType {
   718  	return api.RequestMessage
   719  }
   720  
   721  func (m *BridgeDomainSetLearnLimit) Size() (size int) {
   722  	if m == nil {
   723  		return 0
   724  	}
   725  	size += 4 // m.BdID
   726  	size += 4 // m.LearnLimit
   727  	return size
   728  }
   729  func (m *BridgeDomainSetLearnLimit) Marshal(b []byte) ([]byte, error) {
   730  	if b == nil {
   731  		b = make([]byte, m.Size())
   732  	}
   733  	buf := codec.NewBuffer(b)
   734  	buf.EncodeUint32(m.BdID)
   735  	buf.EncodeUint32(m.LearnLimit)
   736  	return buf.Bytes(), nil
   737  }
   738  func (m *BridgeDomainSetLearnLimit) Unmarshal(b []byte) error {
   739  	buf := codec.NewBuffer(b)
   740  	m.BdID = buf.DecodeUint32()
   741  	m.LearnLimit = buf.DecodeUint32()
   742  	return nil
   743  }
   744  
   745  // BridgeDomainSetLearnLimitReply defines message 'bridge_domain_set_learn_limit_reply'.
   746  type BridgeDomainSetLearnLimitReply struct {
   747  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   748  }
   749  
   750  func (m *BridgeDomainSetLearnLimitReply) Reset() { *m = BridgeDomainSetLearnLimitReply{} }
   751  func (*BridgeDomainSetLearnLimitReply) GetMessageName() string {
   752  	return "bridge_domain_set_learn_limit_reply"
   753  }
   754  func (*BridgeDomainSetLearnLimitReply) GetCrcString() string { return "e8d4e804" }
   755  func (*BridgeDomainSetLearnLimitReply) GetMessageType() api.MessageType {
   756  	return api.ReplyMessage
   757  }
   758  
   759  func (m *BridgeDomainSetLearnLimitReply) Size() (size int) {
   760  	if m == nil {
   761  		return 0
   762  	}
   763  	size += 4 // m.Retval
   764  	return size
   765  }
   766  func (m *BridgeDomainSetLearnLimitReply) Marshal(b []byte) ([]byte, error) {
   767  	if b == nil {
   768  		b = make([]byte, m.Size())
   769  	}
   770  	buf := codec.NewBuffer(b)
   771  	buf.EncodeInt32(m.Retval)
   772  	return buf.Bytes(), nil
   773  }
   774  func (m *BridgeDomainSetLearnLimitReply) Unmarshal(b []byte) error {
   775  	buf := codec.NewBuffer(b)
   776  	m.Retval = buf.DecodeInt32()
   777  	return nil
   778  }
   779  
   780  // BridgeDomainSetMacAge defines message 'bridge_domain_set_mac_age'.
   781  type BridgeDomainSetMacAge struct {
   782  	BdID   uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
   783  	MacAge uint8  `binapi:"u8,name=mac_age" json:"mac_age,omitempty"`
   784  }
   785  
   786  func (m *BridgeDomainSetMacAge) Reset()               { *m = BridgeDomainSetMacAge{} }
   787  func (*BridgeDomainSetMacAge) GetMessageName() string { return "bridge_domain_set_mac_age" }
   788  func (*BridgeDomainSetMacAge) GetCrcString() string   { return "b537ad7b" }
   789  func (*BridgeDomainSetMacAge) GetMessageType() api.MessageType {
   790  	return api.RequestMessage
   791  }
   792  
   793  func (m *BridgeDomainSetMacAge) Size() (size int) {
   794  	if m == nil {
   795  		return 0
   796  	}
   797  	size += 4 // m.BdID
   798  	size += 1 // m.MacAge
   799  	return size
   800  }
   801  func (m *BridgeDomainSetMacAge) Marshal(b []byte) ([]byte, error) {
   802  	if b == nil {
   803  		b = make([]byte, m.Size())
   804  	}
   805  	buf := codec.NewBuffer(b)
   806  	buf.EncodeUint32(m.BdID)
   807  	buf.EncodeUint8(m.MacAge)
   808  	return buf.Bytes(), nil
   809  }
   810  func (m *BridgeDomainSetMacAge) Unmarshal(b []byte) error {
   811  	buf := codec.NewBuffer(b)
   812  	m.BdID = buf.DecodeUint32()
   813  	m.MacAge = buf.DecodeUint8()
   814  	return nil
   815  }
   816  
   817  // BridgeDomainSetMacAgeReply defines message 'bridge_domain_set_mac_age_reply'.
   818  type BridgeDomainSetMacAgeReply struct {
   819  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   820  }
   821  
   822  func (m *BridgeDomainSetMacAgeReply) Reset()               { *m = BridgeDomainSetMacAgeReply{} }
   823  func (*BridgeDomainSetMacAgeReply) GetMessageName() string { return "bridge_domain_set_mac_age_reply" }
   824  func (*BridgeDomainSetMacAgeReply) GetCrcString() string   { return "e8d4e804" }
   825  func (*BridgeDomainSetMacAgeReply) GetMessageType() api.MessageType {
   826  	return api.ReplyMessage
   827  }
   828  
   829  func (m *BridgeDomainSetMacAgeReply) Size() (size int) {
   830  	if m == nil {
   831  		return 0
   832  	}
   833  	size += 4 // m.Retval
   834  	return size
   835  }
   836  func (m *BridgeDomainSetMacAgeReply) Marshal(b []byte) ([]byte, error) {
   837  	if b == nil {
   838  		b = make([]byte, m.Size())
   839  	}
   840  	buf := codec.NewBuffer(b)
   841  	buf.EncodeInt32(m.Retval)
   842  	return buf.Bytes(), nil
   843  }
   844  func (m *BridgeDomainSetMacAgeReply) Unmarshal(b []byte) error {
   845  	buf := codec.NewBuffer(b)
   846  	m.Retval = buf.DecodeInt32()
   847  	return nil
   848  }
   849  
   850  // BridgeFlags defines message 'bridge_flags'.
   851  type BridgeFlags struct {
   852  	BdID  uint32  `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
   853  	IsSet bool    `binapi:"bool,name=is_set" json:"is_set,omitempty"`
   854  	Flags BdFlags `binapi:"bd_flags,name=flags" json:"flags,omitempty"`
   855  }
   856  
   857  func (m *BridgeFlags) Reset()               { *m = BridgeFlags{} }
   858  func (*BridgeFlags) GetMessageName() string { return "bridge_flags" }
   859  func (*BridgeFlags) GetCrcString() string   { return "1b0c5fbd" }
   860  func (*BridgeFlags) GetMessageType() api.MessageType {
   861  	return api.RequestMessage
   862  }
   863  
   864  func (m *BridgeFlags) Size() (size int) {
   865  	if m == nil {
   866  		return 0
   867  	}
   868  	size += 4 // m.BdID
   869  	size += 1 // m.IsSet
   870  	size += 4 // m.Flags
   871  	return size
   872  }
   873  func (m *BridgeFlags) Marshal(b []byte) ([]byte, error) {
   874  	if b == nil {
   875  		b = make([]byte, m.Size())
   876  	}
   877  	buf := codec.NewBuffer(b)
   878  	buf.EncodeUint32(m.BdID)
   879  	buf.EncodeBool(m.IsSet)
   880  	buf.EncodeUint32(uint32(m.Flags))
   881  	return buf.Bytes(), nil
   882  }
   883  func (m *BridgeFlags) Unmarshal(b []byte) error {
   884  	buf := codec.NewBuffer(b)
   885  	m.BdID = buf.DecodeUint32()
   886  	m.IsSet = buf.DecodeBool()
   887  	m.Flags = BdFlags(buf.DecodeUint32())
   888  	return nil
   889  }
   890  
   891  // BridgeFlagsReply defines message 'bridge_flags_reply'.
   892  type BridgeFlagsReply struct {
   893  	Retval                 int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
   894  	ResultingFeatureBitmap uint32 `binapi:"u32,name=resulting_feature_bitmap" json:"resulting_feature_bitmap,omitempty"`
   895  }
   896  
   897  func (m *BridgeFlagsReply) Reset()               { *m = BridgeFlagsReply{} }
   898  func (*BridgeFlagsReply) GetMessageName() string { return "bridge_flags_reply" }
   899  func (*BridgeFlagsReply) GetCrcString() string   { return "29b2a2b3" }
   900  func (*BridgeFlagsReply) GetMessageType() api.MessageType {
   901  	return api.ReplyMessage
   902  }
   903  
   904  func (m *BridgeFlagsReply) Size() (size int) {
   905  	if m == nil {
   906  		return 0
   907  	}
   908  	size += 4 // m.Retval
   909  	size += 4 // m.ResultingFeatureBitmap
   910  	return size
   911  }
   912  func (m *BridgeFlagsReply) Marshal(b []byte) ([]byte, error) {
   913  	if b == nil {
   914  		b = make([]byte, m.Size())
   915  	}
   916  	buf := codec.NewBuffer(b)
   917  	buf.EncodeInt32(m.Retval)
   918  	buf.EncodeUint32(m.ResultingFeatureBitmap)
   919  	return buf.Bytes(), nil
   920  }
   921  func (m *BridgeFlagsReply) Unmarshal(b []byte) error {
   922  	buf := codec.NewBuffer(b)
   923  	m.Retval = buf.DecodeInt32()
   924  	m.ResultingFeatureBitmap = buf.DecodeUint32()
   925  	return nil
   926  }
   927  
   928  // BviCreate defines message 'bvi_create'.
   929  type BviCreate struct {
   930  	Mac          ethernet_types.MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"`
   931  	UserInstance uint32                    `binapi:"u32,name=user_instance,default=4294967295" json:"user_instance,omitempty"`
   932  }
   933  
   934  func (m *BviCreate) Reset()               { *m = BviCreate{} }
   935  func (*BviCreate) GetMessageName() string { return "bvi_create" }
   936  func (*BviCreate) GetCrcString() string   { return "f5398559" }
   937  func (*BviCreate) GetMessageType() api.MessageType {
   938  	return api.RequestMessage
   939  }
   940  
   941  func (m *BviCreate) Size() (size int) {
   942  	if m == nil {
   943  		return 0
   944  	}
   945  	size += 1 * 6 // m.Mac
   946  	size += 4     // m.UserInstance
   947  	return size
   948  }
   949  func (m *BviCreate) Marshal(b []byte) ([]byte, error) {
   950  	if b == nil {
   951  		b = make([]byte, m.Size())
   952  	}
   953  	buf := codec.NewBuffer(b)
   954  	buf.EncodeBytes(m.Mac[:], 6)
   955  	buf.EncodeUint32(m.UserInstance)
   956  	return buf.Bytes(), nil
   957  }
   958  func (m *BviCreate) Unmarshal(b []byte) error {
   959  	buf := codec.NewBuffer(b)
   960  	copy(m.Mac[:], buf.DecodeBytes(6))
   961  	m.UserInstance = buf.DecodeUint32()
   962  	return nil
   963  }
   964  
   965  // BviCreateReply defines message 'bvi_create_reply'.
   966  type BviCreateReply struct {
   967  	Retval    int32                          `binapi:"i32,name=retval" json:"retval,omitempty"`
   968  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   969  }
   970  
   971  func (m *BviCreateReply) Reset()               { *m = BviCreateReply{} }
   972  func (*BviCreateReply) GetMessageName() string { return "bvi_create_reply" }
   973  func (*BviCreateReply) GetCrcString() string   { return "5383d31f" }
   974  func (*BviCreateReply) GetMessageType() api.MessageType {
   975  	return api.ReplyMessage
   976  }
   977  
   978  func (m *BviCreateReply) Size() (size int) {
   979  	if m == nil {
   980  		return 0
   981  	}
   982  	size += 4 // m.Retval
   983  	size += 4 // m.SwIfIndex
   984  	return size
   985  }
   986  func (m *BviCreateReply) Marshal(b []byte) ([]byte, error) {
   987  	if b == nil {
   988  		b = make([]byte, m.Size())
   989  	}
   990  	buf := codec.NewBuffer(b)
   991  	buf.EncodeInt32(m.Retval)
   992  	buf.EncodeUint32(uint32(m.SwIfIndex))
   993  	return buf.Bytes(), nil
   994  }
   995  func (m *BviCreateReply) Unmarshal(b []byte) error {
   996  	buf := codec.NewBuffer(b)
   997  	m.Retval = buf.DecodeInt32()
   998  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   999  	return nil
  1000  }
  1001  
  1002  // BviDelete defines message 'bvi_delete'.
  1003  type BviDelete struct {
  1004  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
  1005  }
  1006  
  1007  func (m *BviDelete) Reset()               { *m = BviDelete{} }
  1008  func (*BviDelete) GetMessageName() string { return "bvi_delete" }
  1009  func (*BviDelete) GetCrcString() string   { return "f9e6675e" }
  1010  func (*BviDelete) GetMessageType() api.MessageType {
  1011  	return api.RequestMessage
  1012  }
  1013  
  1014  func (m *BviDelete) Size() (size int) {
  1015  	if m == nil {
  1016  		return 0
  1017  	}
  1018  	size += 4 // m.SwIfIndex
  1019  	return size
  1020  }
  1021  func (m *BviDelete) Marshal(b []byte) ([]byte, error) {
  1022  	if b == nil {
  1023  		b = make([]byte, m.Size())
  1024  	}
  1025  	buf := codec.NewBuffer(b)
  1026  	buf.EncodeUint32(uint32(m.SwIfIndex))
  1027  	return buf.Bytes(), nil
  1028  }
  1029  func (m *BviDelete) Unmarshal(b []byte) error {
  1030  	buf := codec.NewBuffer(b)
  1031  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1032  	return nil
  1033  }
  1034  
  1035  // BviDeleteReply defines message 'bvi_delete_reply'.
  1036  type BviDeleteReply struct {
  1037  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  1038  }
  1039  
  1040  func (m *BviDeleteReply) Reset()               { *m = BviDeleteReply{} }
  1041  func (*BviDeleteReply) GetMessageName() string { return "bvi_delete_reply" }
  1042  func (*BviDeleteReply) GetCrcString() string   { return "e8d4e804" }
  1043  func (*BviDeleteReply) GetMessageType() api.MessageType {
  1044  	return api.ReplyMessage
  1045  }
  1046  
  1047  func (m *BviDeleteReply) Size() (size int) {
  1048  	if m == nil {
  1049  		return 0
  1050  	}
  1051  	size += 4 // m.Retval
  1052  	return size
  1053  }
  1054  func (m *BviDeleteReply) Marshal(b []byte) ([]byte, error) {
  1055  	if b == nil {
  1056  		b = make([]byte, m.Size())
  1057  	}
  1058  	buf := codec.NewBuffer(b)
  1059  	buf.EncodeInt32(m.Retval)
  1060  	return buf.Bytes(), nil
  1061  }
  1062  func (m *BviDeleteReply) Unmarshal(b []byte) error {
  1063  	buf := codec.NewBuffer(b)
  1064  	m.Retval = buf.DecodeInt32()
  1065  	return nil
  1066  }
  1067  
  1068  // L2ArpTermEvent defines message 'l2_arp_term_event'.
  1069  type L2ArpTermEvent struct {
  1070  	PID       uint32                         `binapi:"u32,name=pid" json:"pid,omitempty"`
  1071  	IP        ip_types.Address               `binapi:"address,name=ip" json:"ip,omitempty"`
  1072  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
  1073  	Mac       ethernet_types.MacAddress      `binapi:"mac_address,name=mac" json:"mac,omitempty"`
  1074  }
  1075  
  1076  func (m *L2ArpTermEvent) Reset()               { *m = L2ArpTermEvent{} }
  1077  func (*L2ArpTermEvent) GetMessageName() string { return "l2_arp_term_event" }
  1078  func (*L2ArpTermEvent) GetCrcString() string   { return "6963e07a" }
  1079  func (*L2ArpTermEvent) GetMessageType() api.MessageType {
  1080  	return api.EventMessage
  1081  }
  1082  
  1083  func (m *L2ArpTermEvent) Size() (size int) {
  1084  	if m == nil {
  1085  		return 0
  1086  	}
  1087  	size += 4      // m.PID
  1088  	size += 1      // m.IP.Af
  1089  	size += 1 * 16 // m.IP.Un
  1090  	size += 4      // m.SwIfIndex
  1091  	size += 1 * 6  // m.Mac
  1092  	return size
  1093  }
  1094  func (m *L2ArpTermEvent) Marshal(b []byte) ([]byte, error) {
  1095  	if b == nil {
  1096  		b = make([]byte, m.Size())
  1097  	}
  1098  	buf := codec.NewBuffer(b)
  1099  	buf.EncodeUint32(m.PID)
  1100  	buf.EncodeUint8(uint8(m.IP.Af))
  1101  	buf.EncodeBytes(m.IP.Un.XXX_UnionData[:], 16)
  1102  	buf.EncodeUint32(uint32(m.SwIfIndex))
  1103  	buf.EncodeBytes(m.Mac[:], 6)
  1104  	return buf.Bytes(), nil
  1105  }
  1106  func (m *L2ArpTermEvent) Unmarshal(b []byte) error {
  1107  	buf := codec.NewBuffer(b)
  1108  	m.PID = buf.DecodeUint32()
  1109  	m.IP.Af = ip_types.AddressFamily(buf.DecodeUint8())
  1110  	copy(m.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
  1111  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1112  	copy(m.Mac[:], buf.DecodeBytes(6))
  1113  	return nil
  1114  }
  1115  
  1116  // L2FibClearTable defines message 'l2_fib_clear_table'.
  1117  type L2FibClearTable struct{}
  1118  
  1119  func (m *L2FibClearTable) Reset()               { *m = L2FibClearTable{} }
  1120  func (*L2FibClearTable) GetMessageName() string { return "l2_fib_clear_table" }
  1121  func (*L2FibClearTable) GetCrcString() string   { return "51077d14" }
  1122  func (*L2FibClearTable) GetMessageType() api.MessageType {
  1123  	return api.RequestMessage
  1124  }
  1125  
  1126  func (m *L2FibClearTable) Size() (size int) {
  1127  	if m == nil {
  1128  		return 0
  1129  	}
  1130  	return size
  1131  }
  1132  func (m *L2FibClearTable) Marshal(b []byte) ([]byte, error) {
  1133  	if b == nil {
  1134  		b = make([]byte, m.Size())
  1135  	}
  1136  	buf := codec.NewBuffer(b)
  1137  	return buf.Bytes(), nil
  1138  }
  1139  func (m *L2FibClearTable) Unmarshal(b []byte) error {
  1140  	return nil
  1141  }
  1142  
  1143  // L2FibClearTableReply defines message 'l2_fib_clear_table_reply'.
  1144  type L2FibClearTableReply struct {
  1145  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  1146  }
  1147  
  1148  func (m *L2FibClearTableReply) Reset()               { *m = L2FibClearTableReply{} }
  1149  func (*L2FibClearTableReply) GetMessageName() string { return "l2_fib_clear_table_reply" }
  1150  func (*L2FibClearTableReply) GetCrcString() string   { return "e8d4e804" }
  1151  func (*L2FibClearTableReply) GetMessageType() api.MessageType {
  1152  	return api.ReplyMessage
  1153  }
  1154  
  1155  func (m *L2FibClearTableReply) Size() (size int) {
  1156  	if m == nil {
  1157  		return 0
  1158  	}
  1159  	size += 4 // m.Retval
  1160  	return size
  1161  }
  1162  func (m *L2FibClearTableReply) Marshal(b []byte) ([]byte, error) {
  1163  	if b == nil {
  1164  		b = make([]byte, m.Size())
  1165  	}
  1166  	buf := codec.NewBuffer(b)
  1167  	buf.EncodeInt32(m.Retval)
  1168  	return buf.Bytes(), nil
  1169  }
  1170  func (m *L2FibClearTableReply) Unmarshal(b []byte) error {
  1171  	buf := codec.NewBuffer(b)
  1172  	m.Retval = buf.DecodeInt32()
  1173  	return nil
  1174  }
  1175  
  1176  // L2FibTableDetails defines message 'l2_fib_table_details'.
  1177  type L2FibTableDetails struct {
  1178  	BdID      uint32                         `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
  1179  	Mac       ethernet_types.MacAddress      `binapi:"mac_address,name=mac" json:"mac,omitempty"`
  1180  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
  1181  	StaticMac bool                           `binapi:"bool,name=static_mac" json:"static_mac,omitempty"`
  1182  	FilterMac bool                           `binapi:"bool,name=filter_mac" json:"filter_mac,omitempty"`
  1183  	BviMac    bool                           `binapi:"bool,name=bvi_mac" json:"bvi_mac,omitempty"`
  1184  }
  1185  
  1186  func (m *L2FibTableDetails) Reset()               { *m = L2FibTableDetails{} }
  1187  func (*L2FibTableDetails) GetMessageName() string { return "l2_fib_table_details" }
  1188  func (*L2FibTableDetails) GetCrcString() string   { return "a44ef6b8" }
  1189  func (*L2FibTableDetails) GetMessageType() api.MessageType {
  1190  	return api.ReplyMessage
  1191  }
  1192  
  1193  func (m *L2FibTableDetails) Size() (size int) {
  1194  	if m == nil {
  1195  		return 0
  1196  	}
  1197  	size += 4     // m.BdID
  1198  	size += 1 * 6 // m.Mac
  1199  	size += 4     // m.SwIfIndex
  1200  	size += 1     // m.StaticMac
  1201  	size += 1     // m.FilterMac
  1202  	size += 1     // m.BviMac
  1203  	return size
  1204  }
  1205  func (m *L2FibTableDetails) Marshal(b []byte) ([]byte, error) {
  1206  	if b == nil {
  1207  		b = make([]byte, m.Size())
  1208  	}
  1209  	buf := codec.NewBuffer(b)
  1210  	buf.EncodeUint32(m.BdID)
  1211  	buf.EncodeBytes(m.Mac[:], 6)
  1212  	buf.EncodeUint32(uint32(m.SwIfIndex))
  1213  	buf.EncodeBool(m.StaticMac)
  1214  	buf.EncodeBool(m.FilterMac)
  1215  	buf.EncodeBool(m.BviMac)
  1216  	return buf.Bytes(), nil
  1217  }
  1218  func (m *L2FibTableDetails) Unmarshal(b []byte) error {
  1219  	buf := codec.NewBuffer(b)
  1220  	m.BdID = buf.DecodeUint32()
  1221  	copy(m.Mac[:], buf.DecodeBytes(6))
  1222  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1223  	m.StaticMac = buf.DecodeBool()
  1224  	m.FilterMac = buf.DecodeBool()
  1225  	m.BviMac = buf.DecodeBool()
  1226  	return nil
  1227  }
  1228  
  1229  // L2FibTableDump defines message 'l2_fib_table_dump'.
  1230  type L2FibTableDump struct {
  1231  	BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
  1232  }
  1233  
  1234  func (m *L2FibTableDump) Reset()               { *m = L2FibTableDump{} }
  1235  func (*L2FibTableDump) GetMessageName() string { return "l2_fib_table_dump" }
  1236  func (*L2FibTableDump) GetCrcString() string   { return "c25fdce6" }
  1237  func (*L2FibTableDump) GetMessageType() api.MessageType {
  1238  	return api.RequestMessage
  1239  }
  1240  
  1241  func (m *L2FibTableDump) Size() (size int) {
  1242  	if m == nil {
  1243  		return 0
  1244  	}
  1245  	size += 4 // m.BdID
  1246  	return size
  1247  }
  1248  func (m *L2FibTableDump) Marshal(b []byte) ([]byte, error) {
  1249  	if b == nil {
  1250  		b = make([]byte, m.Size())
  1251  	}
  1252  	buf := codec.NewBuffer(b)
  1253  	buf.EncodeUint32(m.BdID)
  1254  	return buf.Bytes(), nil
  1255  }
  1256  func (m *L2FibTableDump) Unmarshal(b []byte) error {
  1257  	buf := codec.NewBuffer(b)
  1258  	m.BdID = buf.DecodeUint32()
  1259  	return nil
  1260  }
  1261  
  1262  // L2Flags defines message 'l2_flags'.
  1263  type L2Flags struct {
  1264  	SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
  1265  	IsSet         bool                           `binapi:"bool,name=is_set" json:"is_set,omitempty"`
  1266  	FeatureBitmap uint32                         `binapi:"u32,name=feature_bitmap" json:"feature_bitmap,omitempty"`
  1267  }
  1268  
  1269  func (m *L2Flags) Reset()               { *m = L2Flags{} }
  1270  func (*L2Flags) GetMessageName() string { return "l2_flags" }
  1271  func (*L2Flags) GetCrcString() string   { return "fc41cfe8" }
  1272  func (*L2Flags) GetMessageType() api.MessageType {
  1273  	return api.RequestMessage
  1274  }
  1275  
  1276  func (m *L2Flags) Size() (size int) {
  1277  	if m == nil {
  1278  		return 0
  1279  	}
  1280  	size += 4 // m.SwIfIndex
  1281  	size += 1 // m.IsSet
  1282  	size += 4 // m.FeatureBitmap
  1283  	return size
  1284  }
  1285  func (m *L2Flags) Marshal(b []byte) ([]byte, error) {
  1286  	if b == nil {
  1287  		b = make([]byte, m.Size())
  1288  	}
  1289  	buf := codec.NewBuffer(b)
  1290  	buf.EncodeUint32(uint32(m.SwIfIndex))
  1291  	buf.EncodeBool(m.IsSet)
  1292  	buf.EncodeUint32(m.FeatureBitmap)
  1293  	return buf.Bytes(), nil
  1294  }
  1295  func (m *L2Flags) Unmarshal(b []byte) error {
  1296  	buf := codec.NewBuffer(b)
  1297  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1298  	m.IsSet = buf.DecodeBool()
  1299  	m.FeatureBitmap = buf.DecodeUint32()
  1300  	return nil
  1301  }
  1302  
  1303  // L2FlagsReply defines message 'l2_flags_reply'.
  1304  type L2FlagsReply struct {
  1305  	Retval                 int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
  1306  	ResultingFeatureBitmap uint32 `binapi:"u32,name=resulting_feature_bitmap" json:"resulting_feature_bitmap,omitempty"`
  1307  }
  1308  
  1309  func (m *L2FlagsReply) Reset()               { *m = L2FlagsReply{} }
  1310  func (*L2FlagsReply) GetMessageName() string { return "l2_flags_reply" }
  1311  func (*L2FlagsReply) GetCrcString() string   { return "29b2a2b3" }
  1312  func (*L2FlagsReply) GetMessageType() api.MessageType {
  1313  	return api.ReplyMessage
  1314  }
  1315  
  1316  func (m *L2FlagsReply) Size() (size int) {
  1317  	if m == nil {
  1318  		return 0
  1319  	}
  1320  	size += 4 // m.Retval
  1321  	size += 4 // m.ResultingFeatureBitmap
  1322  	return size
  1323  }
  1324  func (m *L2FlagsReply) Marshal(b []byte) ([]byte, error) {
  1325  	if b == nil {
  1326  		b = make([]byte, m.Size())
  1327  	}
  1328  	buf := codec.NewBuffer(b)
  1329  	buf.EncodeInt32(m.Retval)
  1330  	buf.EncodeUint32(m.ResultingFeatureBitmap)
  1331  	return buf.Bytes(), nil
  1332  }
  1333  func (m *L2FlagsReply) Unmarshal(b []byte) error {
  1334  	buf := codec.NewBuffer(b)
  1335  	m.Retval = buf.DecodeInt32()
  1336  	m.ResultingFeatureBitmap = buf.DecodeUint32()
  1337  	return nil
  1338  }
  1339  
  1340  // L2InterfaceEfpFilter defines message 'l2_interface_efp_filter'.
  1341  type L2InterfaceEfpFilter struct {
  1342  	SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
  1343  	EnableDisable bool                           `binapi:"bool,name=enable_disable,default=true" json:"enable_disable,omitempty"`
  1344  }
  1345  
  1346  func (m *L2InterfaceEfpFilter) Reset()               { *m = L2InterfaceEfpFilter{} }
  1347  func (*L2InterfaceEfpFilter) GetMessageName() string { return "l2_interface_efp_filter" }
  1348  func (*L2InterfaceEfpFilter) GetCrcString() string   { return "5501adee" }
  1349  func (*L2InterfaceEfpFilter) GetMessageType() api.MessageType {
  1350  	return api.RequestMessage
  1351  }
  1352  
  1353  func (m *L2InterfaceEfpFilter) Size() (size int) {
  1354  	if m == nil {
  1355  		return 0
  1356  	}
  1357  	size += 4 // m.SwIfIndex
  1358  	size += 1 // m.EnableDisable
  1359  	return size
  1360  }
  1361  func (m *L2InterfaceEfpFilter) Marshal(b []byte) ([]byte, error) {
  1362  	if b == nil {
  1363  		b = make([]byte, m.Size())
  1364  	}
  1365  	buf := codec.NewBuffer(b)
  1366  	buf.EncodeUint32(uint32(m.SwIfIndex))
  1367  	buf.EncodeBool(m.EnableDisable)
  1368  	return buf.Bytes(), nil
  1369  }
  1370  func (m *L2InterfaceEfpFilter) Unmarshal(b []byte) error {
  1371  	buf := codec.NewBuffer(b)
  1372  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1373  	m.EnableDisable = buf.DecodeBool()
  1374  	return nil
  1375  }
  1376  
  1377  // L2InterfaceEfpFilterReply defines message 'l2_interface_efp_filter_reply'.
  1378  type L2InterfaceEfpFilterReply struct {
  1379  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  1380  }
  1381  
  1382  func (m *L2InterfaceEfpFilterReply) Reset()               { *m = L2InterfaceEfpFilterReply{} }
  1383  func (*L2InterfaceEfpFilterReply) GetMessageName() string { return "l2_interface_efp_filter_reply" }
  1384  func (*L2InterfaceEfpFilterReply) GetCrcString() string   { return "e8d4e804" }
  1385  func (*L2InterfaceEfpFilterReply) GetMessageType() api.MessageType {
  1386  	return api.ReplyMessage
  1387  }
  1388  
  1389  func (m *L2InterfaceEfpFilterReply) Size() (size int) {
  1390  	if m == nil {
  1391  		return 0
  1392  	}
  1393  	size += 4 // m.Retval
  1394  	return size
  1395  }
  1396  func (m *L2InterfaceEfpFilterReply) Marshal(b []byte) ([]byte, error) {
  1397  	if b == nil {
  1398  		b = make([]byte, m.Size())
  1399  	}
  1400  	buf := codec.NewBuffer(b)
  1401  	buf.EncodeInt32(m.Retval)
  1402  	return buf.Bytes(), nil
  1403  }
  1404  func (m *L2InterfaceEfpFilterReply) Unmarshal(b []byte) error {
  1405  	buf := codec.NewBuffer(b)
  1406  	m.Retval = buf.DecodeInt32()
  1407  	return nil
  1408  }
  1409  
  1410  // L2InterfacePbbTagRewrite defines message 'l2_interface_pbb_tag_rewrite'.
  1411  type L2InterfacePbbTagRewrite struct {
  1412  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
  1413  	VtrOp     uint32                         `binapi:"u32,name=vtr_op" json:"vtr_op,omitempty"`
  1414  	OuterTag  uint16                         `binapi:"u16,name=outer_tag" json:"outer_tag,omitempty"`
  1415  	BDmac     ethernet_types.MacAddress      `binapi:"mac_address,name=b_dmac" json:"b_dmac,omitempty"`
  1416  	BSmac     ethernet_types.MacAddress      `binapi:"mac_address,name=b_smac" json:"b_smac,omitempty"`
  1417  	BVlanid   uint16                         `binapi:"u16,name=b_vlanid" json:"b_vlanid,omitempty"`
  1418  	ISid      uint32                         `binapi:"u32,name=i_sid" json:"i_sid,omitempty"`
  1419  }
  1420  
  1421  func (m *L2InterfacePbbTagRewrite) Reset()               { *m = L2InterfacePbbTagRewrite{} }
  1422  func (*L2InterfacePbbTagRewrite) GetMessageName() string { return "l2_interface_pbb_tag_rewrite" }
  1423  func (*L2InterfacePbbTagRewrite) GetCrcString() string   { return "38e802a8" }
  1424  func (*L2InterfacePbbTagRewrite) GetMessageType() api.MessageType {
  1425  	return api.RequestMessage
  1426  }
  1427  
  1428  func (m *L2InterfacePbbTagRewrite) Size() (size int) {
  1429  	if m == nil {
  1430  		return 0
  1431  	}
  1432  	size += 4     // m.SwIfIndex
  1433  	size += 4     // m.VtrOp
  1434  	size += 2     // m.OuterTag
  1435  	size += 1 * 6 // m.BDmac
  1436  	size += 1 * 6 // m.BSmac
  1437  	size += 2     // m.BVlanid
  1438  	size += 4     // m.ISid
  1439  	return size
  1440  }
  1441  func (m *L2InterfacePbbTagRewrite) Marshal(b []byte) ([]byte, error) {
  1442  	if b == nil {
  1443  		b = make([]byte, m.Size())
  1444  	}
  1445  	buf := codec.NewBuffer(b)
  1446  	buf.EncodeUint32(uint32(m.SwIfIndex))
  1447  	buf.EncodeUint32(m.VtrOp)
  1448  	buf.EncodeUint16(m.OuterTag)
  1449  	buf.EncodeBytes(m.BDmac[:], 6)
  1450  	buf.EncodeBytes(m.BSmac[:], 6)
  1451  	buf.EncodeUint16(m.BVlanid)
  1452  	buf.EncodeUint32(m.ISid)
  1453  	return buf.Bytes(), nil
  1454  }
  1455  func (m *L2InterfacePbbTagRewrite) Unmarshal(b []byte) error {
  1456  	buf := codec.NewBuffer(b)
  1457  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1458  	m.VtrOp = buf.DecodeUint32()
  1459  	m.OuterTag = buf.DecodeUint16()
  1460  	copy(m.BDmac[:], buf.DecodeBytes(6))
  1461  	copy(m.BSmac[:], buf.DecodeBytes(6))
  1462  	m.BVlanid = buf.DecodeUint16()
  1463  	m.ISid = buf.DecodeUint32()
  1464  	return nil
  1465  }
  1466  
  1467  // L2InterfacePbbTagRewriteReply defines message 'l2_interface_pbb_tag_rewrite_reply'.
  1468  type L2InterfacePbbTagRewriteReply struct {
  1469  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  1470  }
  1471  
  1472  func (m *L2InterfacePbbTagRewriteReply) Reset() { *m = L2InterfacePbbTagRewriteReply{} }
  1473  func (*L2InterfacePbbTagRewriteReply) GetMessageName() string {
  1474  	return "l2_interface_pbb_tag_rewrite_reply"
  1475  }
  1476  func (*L2InterfacePbbTagRewriteReply) GetCrcString() string { return "e8d4e804" }
  1477  func (*L2InterfacePbbTagRewriteReply) GetMessageType() api.MessageType {
  1478  	return api.ReplyMessage
  1479  }
  1480  
  1481  func (m *L2InterfacePbbTagRewriteReply) Size() (size int) {
  1482  	if m == nil {
  1483  		return 0
  1484  	}
  1485  	size += 4 // m.Retval
  1486  	return size
  1487  }
  1488  func (m *L2InterfacePbbTagRewriteReply) Marshal(b []byte) ([]byte, error) {
  1489  	if b == nil {
  1490  		b = make([]byte, m.Size())
  1491  	}
  1492  	buf := codec.NewBuffer(b)
  1493  	buf.EncodeInt32(m.Retval)
  1494  	return buf.Bytes(), nil
  1495  }
  1496  func (m *L2InterfacePbbTagRewriteReply) Unmarshal(b []byte) error {
  1497  	buf := codec.NewBuffer(b)
  1498  	m.Retval = buf.DecodeInt32()
  1499  	return nil
  1500  }
  1501  
  1502  // L2InterfaceVlanTagRewrite defines message 'l2_interface_vlan_tag_rewrite'.
  1503  type L2InterfaceVlanTagRewrite struct {
  1504  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
  1505  	VtrOp     uint32                         `binapi:"u32,name=vtr_op" json:"vtr_op,omitempty"`
  1506  	PushDot1q uint32                         `binapi:"u32,name=push_dot1q" json:"push_dot1q,omitempty"`
  1507  	Tag1      uint32                         `binapi:"u32,name=tag1" json:"tag1,omitempty"`
  1508  	Tag2      uint32                         `binapi:"u32,name=tag2" json:"tag2,omitempty"`
  1509  }
  1510  
  1511  func (m *L2InterfaceVlanTagRewrite) Reset()               { *m = L2InterfaceVlanTagRewrite{} }
  1512  func (*L2InterfaceVlanTagRewrite) GetMessageName() string { return "l2_interface_vlan_tag_rewrite" }
  1513  func (*L2InterfaceVlanTagRewrite) GetCrcString() string   { return "62cc0bbc" }
  1514  func (*L2InterfaceVlanTagRewrite) GetMessageType() api.MessageType {
  1515  	return api.RequestMessage
  1516  }
  1517  
  1518  func (m *L2InterfaceVlanTagRewrite) Size() (size int) {
  1519  	if m == nil {
  1520  		return 0
  1521  	}
  1522  	size += 4 // m.SwIfIndex
  1523  	size += 4 // m.VtrOp
  1524  	size += 4 // m.PushDot1q
  1525  	size += 4 // m.Tag1
  1526  	size += 4 // m.Tag2
  1527  	return size
  1528  }
  1529  func (m *L2InterfaceVlanTagRewrite) Marshal(b []byte) ([]byte, error) {
  1530  	if b == nil {
  1531  		b = make([]byte, m.Size())
  1532  	}
  1533  	buf := codec.NewBuffer(b)
  1534  	buf.EncodeUint32(uint32(m.SwIfIndex))
  1535  	buf.EncodeUint32(m.VtrOp)
  1536  	buf.EncodeUint32(m.PushDot1q)
  1537  	buf.EncodeUint32(m.Tag1)
  1538  	buf.EncodeUint32(m.Tag2)
  1539  	return buf.Bytes(), nil
  1540  }
  1541  func (m *L2InterfaceVlanTagRewrite) Unmarshal(b []byte) error {
  1542  	buf := codec.NewBuffer(b)
  1543  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1544  	m.VtrOp = buf.DecodeUint32()
  1545  	m.PushDot1q = buf.DecodeUint32()
  1546  	m.Tag1 = buf.DecodeUint32()
  1547  	m.Tag2 = buf.DecodeUint32()
  1548  	return nil
  1549  }
  1550  
  1551  // L2InterfaceVlanTagRewriteReply defines message 'l2_interface_vlan_tag_rewrite_reply'.
  1552  type L2InterfaceVlanTagRewriteReply struct {
  1553  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  1554  }
  1555  
  1556  func (m *L2InterfaceVlanTagRewriteReply) Reset() { *m = L2InterfaceVlanTagRewriteReply{} }
  1557  func (*L2InterfaceVlanTagRewriteReply) GetMessageName() string {
  1558  	return "l2_interface_vlan_tag_rewrite_reply"
  1559  }
  1560  func (*L2InterfaceVlanTagRewriteReply) GetCrcString() string { return "e8d4e804" }
  1561  func (*L2InterfaceVlanTagRewriteReply) GetMessageType() api.MessageType {
  1562  	return api.ReplyMessage
  1563  }
  1564  
  1565  func (m *L2InterfaceVlanTagRewriteReply) Size() (size int) {
  1566  	if m == nil {
  1567  		return 0
  1568  	}
  1569  	size += 4 // m.Retval
  1570  	return size
  1571  }
  1572  func (m *L2InterfaceVlanTagRewriteReply) Marshal(b []byte) ([]byte, error) {
  1573  	if b == nil {
  1574  		b = make([]byte, m.Size())
  1575  	}
  1576  	buf := codec.NewBuffer(b)
  1577  	buf.EncodeInt32(m.Retval)
  1578  	return buf.Bytes(), nil
  1579  }
  1580  func (m *L2InterfaceVlanTagRewriteReply) Unmarshal(b []byte) error {
  1581  	buf := codec.NewBuffer(b)
  1582  	m.Retval = buf.DecodeInt32()
  1583  	return nil
  1584  }
  1585  
  1586  // L2MacsEvent defines message 'l2_macs_event'.
  1587  type L2MacsEvent struct {
  1588  	PID   uint32     `binapi:"u32,name=pid" json:"pid,omitempty"`
  1589  	NMacs uint32     `binapi:"u32,name=n_macs" json:"-"`
  1590  	Mac   []MacEntry `binapi:"mac_entry[n_macs],name=mac" json:"mac,omitempty"`
  1591  }
  1592  
  1593  func (m *L2MacsEvent) Reset()               { *m = L2MacsEvent{} }
  1594  func (*L2MacsEvent) GetMessageName() string { return "l2_macs_event" }
  1595  func (*L2MacsEvent) GetCrcString() string   { return "44b8fd64" }
  1596  func (*L2MacsEvent) GetMessageType() api.MessageType {
  1597  	return api.EventMessage
  1598  }
  1599  
  1600  func (m *L2MacsEvent) Size() (size int) {
  1601  	if m == nil {
  1602  		return 0
  1603  	}
  1604  	size += 4 // m.PID
  1605  	size += 4 // m.NMacs
  1606  	for j1 := 0; j1 < len(m.Mac); j1++ {
  1607  		var s1 MacEntry
  1608  		_ = s1
  1609  		if j1 < len(m.Mac) {
  1610  			s1 = m.Mac[j1]
  1611  		}
  1612  		size += 4     // s1.SwIfIndex
  1613  		size += 1 * 6 // s1.MacAddr
  1614  		size += 4     // s1.Action
  1615  		size += 1     // s1.Flags
  1616  	}
  1617  	return size
  1618  }
  1619  func (m *L2MacsEvent) Marshal(b []byte) ([]byte, error) {
  1620  	if b == nil {
  1621  		b = make([]byte, m.Size())
  1622  	}
  1623  	buf := codec.NewBuffer(b)
  1624  	buf.EncodeUint32(m.PID)
  1625  	buf.EncodeUint32(uint32(len(m.Mac)))
  1626  	for j0 := 0; j0 < len(m.Mac); j0++ {
  1627  		var v0 MacEntry // Mac
  1628  		if j0 < len(m.Mac) {
  1629  			v0 = m.Mac[j0]
  1630  		}
  1631  		buf.EncodeUint32(uint32(v0.SwIfIndex))
  1632  		buf.EncodeBytes(v0.MacAddr[:], 6)
  1633  		buf.EncodeUint32(uint32(v0.Action))
  1634  		buf.EncodeUint8(v0.Flags)
  1635  	}
  1636  	return buf.Bytes(), nil
  1637  }
  1638  func (m *L2MacsEvent) Unmarshal(b []byte) error {
  1639  	buf := codec.NewBuffer(b)
  1640  	m.PID = buf.DecodeUint32()
  1641  	m.NMacs = buf.DecodeUint32()
  1642  	m.Mac = make([]MacEntry, m.NMacs)
  1643  	for j0 := 0; j0 < len(m.Mac); j0++ {
  1644  		m.Mac[j0].SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1645  		copy(m.Mac[j0].MacAddr[:], buf.DecodeBytes(6))
  1646  		m.Mac[j0].Action = MacEventAction(buf.DecodeUint32())
  1647  		m.Mac[j0].Flags = buf.DecodeUint8()
  1648  	}
  1649  	return nil
  1650  }
  1651  
  1652  // L2PatchAddDel defines message 'l2_patch_add_del'.
  1653  type L2PatchAddDel struct {
  1654  	RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
  1655  	TxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"`
  1656  	IsAdd       bool                           `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
  1657  }
  1658  
  1659  func (m *L2PatchAddDel) Reset()               { *m = L2PatchAddDel{} }
  1660  func (*L2PatchAddDel) GetMessageName() string { return "l2_patch_add_del" }
  1661  func (*L2PatchAddDel) GetCrcString() string   { return "a1f6a6f3" }
  1662  func (*L2PatchAddDel) GetMessageType() api.MessageType {
  1663  	return api.RequestMessage
  1664  }
  1665  
  1666  func (m *L2PatchAddDel) Size() (size int) {
  1667  	if m == nil {
  1668  		return 0
  1669  	}
  1670  	size += 4 // m.RxSwIfIndex
  1671  	size += 4 // m.TxSwIfIndex
  1672  	size += 1 // m.IsAdd
  1673  	return size
  1674  }
  1675  func (m *L2PatchAddDel) Marshal(b []byte) ([]byte, error) {
  1676  	if b == nil {
  1677  		b = make([]byte, m.Size())
  1678  	}
  1679  	buf := codec.NewBuffer(b)
  1680  	buf.EncodeUint32(uint32(m.RxSwIfIndex))
  1681  	buf.EncodeUint32(uint32(m.TxSwIfIndex))
  1682  	buf.EncodeBool(m.IsAdd)
  1683  	return buf.Bytes(), nil
  1684  }
  1685  func (m *L2PatchAddDel) Unmarshal(b []byte) error {
  1686  	buf := codec.NewBuffer(b)
  1687  	m.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1688  	m.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1689  	m.IsAdd = buf.DecodeBool()
  1690  	return nil
  1691  }
  1692  
  1693  // L2PatchAddDelReply defines message 'l2_patch_add_del_reply'.
  1694  type L2PatchAddDelReply struct {
  1695  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  1696  }
  1697  
  1698  func (m *L2PatchAddDelReply) Reset()               { *m = L2PatchAddDelReply{} }
  1699  func (*L2PatchAddDelReply) GetMessageName() string { return "l2_patch_add_del_reply" }
  1700  func (*L2PatchAddDelReply) GetCrcString() string   { return "e8d4e804" }
  1701  func (*L2PatchAddDelReply) GetMessageType() api.MessageType {
  1702  	return api.ReplyMessage
  1703  }
  1704  
  1705  func (m *L2PatchAddDelReply) Size() (size int) {
  1706  	if m == nil {
  1707  		return 0
  1708  	}
  1709  	size += 4 // m.Retval
  1710  	return size
  1711  }
  1712  func (m *L2PatchAddDelReply) Marshal(b []byte) ([]byte, error) {
  1713  	if b == nil {
  1714  		b = make([]byte, m.Size())
  1715  	}
  1716  	buf := codec.NewBuffer(b)
  1717  	buf.EncodeInt32(m.Retval)
  1718  	return buf.Bytes(), nil
  1719  }
  1720  func (m *L2PatchAddDelReply) Unmarshal(b []byte) error {
  1721  	buf := codec.NewBuffer(b)
  1722  	m.Retval = buf.DecodeInt32()
  1723  	return nil
  1724  }
  1725  
  1726  // L2XconnectDetails defines message 'l2_xconnect_details'.
  1727  type L2XconnectDetails struct {
  1728  	RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
  1729  	TxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"`
  1730  }
  1731  
  1732  func (m *L2XconnectDetails) Reset()               { *m = L2XconnectDetails{} }
  1733  func (*L2XconnectDetails) GetMessageName() string { return "l2_xconnect_details" }
  1734  func (*L2XconnectDetails) GetCrcString() string   { return "472b6b67" }
  1735  func (*L2XconnectDetails) GetMessageType() api.MessageType {
  1736  	return api.ReplyMessage
  1737  }
  1738  
  1739  func (m *L2XconnectDetails) Size() (size int) {
  1740  	if m == nil {
  1741  		return 0
  1742  	}
  1743  	size += 4 // m.RxSwIfIndex
  1744  	size += 4 // m.TxSwIfIndex
  1745  	return size
  1746  }
  1747  func (m *L2XconnectDetails) Marshal(b []byte) ([]byte, error) {
  1748  	if b == nil {
  1749  		b = make([]byte, m.Size())
  1750  	}
  1751  	buf := codec.NewBuffer(b)
  1752  	buf.EncodeUint32(uint32(m.RxSwIfIndex))
  1753  	buf.EncodeUint32(uint32(m.TxSwIfIndex))
  1754  	return buf.Bytes(), nil
  1755  }
  1756  func (m *L2XconnectDetails) Unmarshal(b []byte) error {
  1757  	buf := codec.NewBuffer(b)
  1758  	m.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1759  	m.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1760  	return nil
  1761  }
  1762  
  1763  // L2XconnectDump defines message 'l2_xconnect_dump'.
  1764  type L2XconnectDump struct{}
  1765  
  1766  func (m *L2XconnectDump) Reset()               { *m = L2XconnectDump{} }
  1767  func (*L2XconnectDump) GetMessageName() string { return "l2_xconnect_dump" }
  1768  func (*L2XconnectDump) GetCrcString() string   { return "51077d14" }
  1769  func (*L2XconnectDump) GetMessageType() api.MessageType {
  1770  	return api.RequestMessage
  1771  }
  1772  
  1773  func (m *L2XconnectDump) Size() (size int) {
  1774  	if m == nil {
  1775  		return 0
  1776  	}
  1777  	return size
  1778  }
  1779  func (m *L2XconnectDump) Marshal(b []byte) ([]byte, error) {
  1780  	if b == nil {
  1781  		b = make([]byte, m.Size())
  1782  	}
  1783  	buf := codec.NewBuffer(b)
  1784  	return buf.Bytes(), nil
  1785  }
  1786  func (m *L2XconnectDump) Unmarshal(b []byte) error {
  1787  	return nil
  1788  }
  1789  
  1790  // L2fibAddDel defines message 'l2fib_add_del'.
  1791  type L2fibAddDel struct {
  1792  	Mac       ethernet_types.MacAddress      `binapi:"mac_address,name=mac" json:"mac,omitempty"`
  1793  	BdID      uint32                         `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
  1794  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
  1795  	IsAdd     bool                           `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
  1796  	StaticMac bool                           `binapi:"bool,name=static_mac" json:"static_mac,omitempty"`
  1797  	FilterMac bool                           `binapi:"bool,name=filter_mac" json:"filter_mac,omitempty"`
  1798  	BviMac    bool                           `binapi:"bool,name=bvi_mac" json:"bvi_mac,omitempty"`
  1799  }
  1800  
  1801  func (m *L2fibAddDel) Reset()               { *m = L2fibAddDel{} }
  1802  func (*L2fibAddDel) GetMessageName() string { return "l2fib_add_del" }
  1803  func (*L2fibAddDel) GetCrcString() string   { return "eddda487" }
  1804  func (*L2fibAddDel) GetMessageType() api.MessageType {
  1805  	return api.RequestMessage
  1806  }
  1807  
  1808  func (m *L2fibAddDel) Size() (size int) {
  1809  	if m == nil {
  1810  		return 0
  1811  	}
  1812  	size += 1 * 6 // m.Mac
  1813  	size += 4     // m.BdID
  1814  	size += 4     // m.SwIfIndex
  1815  	size += 1     // m.IsAdd
  1816  	size += 1     // m.StaticMac
  1817  	size += 1     // m.FilterMac
  1818  	size += 1     // m.BviMac
  1819  	return size
  1820  }
  1821  func (m *L2fibAddDel) Marshal(b []byte) ([]byte, error) {
  1822  	if b == nil {
  1823  		b = make([]byte, m.Size())
  1824  	}
  1825  	buf := codec.NewBuffer(b)
  1826  	buf.EncodeBytes(m.Mac[:], 6)
  1827  	buf.EncodeUint32(m.BdID)
  1828  	buf.EncodeUint32(uint32(m.SwIfIndex))
  1829  	buf.EncodeBool(m.IsAdd)
  1830  	buf.EncodeBool(m.StaticMac)
  1831  	buf.EncodeBool(m.FilterMac)
  1832  	buf.EncodeBool(m.BviMac)
  1833  	return buf.Bytes(), nil
  1834  }
  1835  func (m *L2fibAddDel) Unmarshal(b []byte) error {
  1836  	buf := codec.NewBuffer(b)
  1837  	copy(m.Mac[:], buf.DecodeBytes(6))
  1838  	m.BdID = buf.DecodeUint32()
  1839  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1840  	m.IsAdd = buf.DecodeBool()
  1841  	m.StaticMac = buf.DecodeBool()
  1842  	m.FilterMac = buf.DecodeBool()
  1843  	m.BviMac = buf.DecodeBool()
  1844  	return nil
  1845  }
  1846  
  1847  // L2fibAddDelReply defines message 'l2fib_add_del_reply'.
  1848  type L2fibAddDelReply struct {
  1849  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  1850  }
  1851  
  1852  func (m *L2fibAddDelReply) Reset()               { *m = L2fibAddDelReply{} }
  1853  func (*L2fibAddDelReply) GetMessageName() string { return "l2fib_add_del_reply" }
  1854  func (*L2fibAddDelReply) GetCrcString() string   { return "e8d4e804" }
  1855  func (*L2fibAddDelReply) GetMessageType() api.MessageType {
  1856  	return api.ReplyMessage
  1857  }
  1858  
  1859  func (m *L2fibAddDelReply) Size() (size int) {
  1860  	if m == nil {
  1861  		return 0
  1862  	}
  1863  	size += 4 // m.Retval
  1864  	return size
  1865  }
  1866  func (m *L2fibAddDelReply) Marshal(b []byte) ([]byte, error) {
  1867  	if b == nil {
  1868  		b = make([]byte, m.Size())
  1869  	}
  1870  	buf := codec.NewBuffer(b)
  1871  	buf.EncodeInt32(m.Retval)
  1872  	return buf.Bytes(), nil
  1873  }
  1874  func (m *L2fibAddDelReply) Unmarshal(b []byte) error {
  1875  	buf := codec.NewBuffer(b)
  1876  	m.Retval = buf.DecodeInt32()
  1877  	return nil
  1878  }
  1879  
  1880  // L2fibFlushAll defines message 'l2fib_flush_all'.
  1881  type L2fibFlushAll struct{}
  1882  
  1883  func (m *L2fibFlushAll) Reset()               { *m = L2fibFlushAll{} }
  1884  func (*L2fibFlushAll) GetMessageName() string { return "l2fib_flush_all" }
  1885  func (*L2fibFlushAll) GetCrcString() string   { return "51077d14" }
  1886  func (*L2fibFlushAll) GetMessageType() api.MessageType {
  1887  	return api.RequestMessage
  1888  }
  1889  
  1890  func (m *L2fibFlushAll) Size() (size int) {
  1891  	if m == nil {
  1892  		return 0
  1893  	}
  1894  	return size
  1895  }
  1896  func (m *L2fibFlushAll) Marshal(b []byte) ([]byte, error) {
  1897  	if b == nil {
  1898  		b = make([]byte, m.Size())
  1899  	}
  1900  	buf := codec.NewBuffer(b)
  1901  	return buf.Bytes(), nil
  1902  }
  1903  func (m *L2fibFlushAll) Unmarshal(b []byte) error {
  1904  	return nil
  1905  }
  1906  
  1907  // L2fibFlushAllReply defines message 'l2fib_flush_all_reply'.
  1908  type L2fibFlushAllReply struct {
  1909  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  1910  }
  1911  
  1912  func (m *L2fibFlushAllReply) Reset()               { *m = L2fibFlushAllReply{} }
  1913  func (*L2fibFlushAllReply) GetMessageName() string { return "l2fib_flush_all_reply" }
  1914  func (*L2fibFlushAllReply) GetCrcString() string   { return "e8d4e804" }
  1915  func (*L2fibFlushAllReply) GetMessageType() api.MessageType {
  1916  	return api.ReplyMessage
  1917  }
  1918  
  1919  func (m *L2fibFlushAllReply) Size() (size int) {
  1920  	if m == nil {
  1921  		return 0
  1922  	}
  1923  	size += 4 // m.Retval
  1924  	return size
  1925  }
  1926  func (m *L2fibFlushAllReply) Marshal(b []byte) ([]byte, error) {
  1927  	if b == nil {
  1928  		b = make([]byte, m.Size())
  1929  	}
  1930  	buf := codec.NewBuffer(b)
  1931  	buf.EncodeInt32(m.Retval)
  1932  	return buf.Bytes(), nil
  1933  }
  1934  func (m *L2fibFlushAllReply) Unmarshal(b []byte) error {
  1935  	buf := codec.NewBuffer(b)
  1936  	m.Retval = buf.DecodeInt32()
  1937  	return nil
  1938  }
  1939  
  1940  // L2fibFlushBd defines message 'l2fib_flush_bd'.
  1941  type L2fibFlushBd struct {
  1942  	BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
  1943  }
  1944  
  1945  func (m *L2fibFlushBd) Reset()               { *m = L2fibFlushBd{} }
  1946  func (*L2fibFlushBd) GetMessageName() string { return "l2fib_flush_bd" }
  1947  func (*L2fibFlushBd) GetCrcString() string   { return "c25fdce6" }
  1948  func (*L2fibFlushBd) GetMessageType() api.MessageType {
  1949  	return api.RequestMessage
  1950  }
  1951  
  1952  func (m *L2fibFlushBd) Size() (size int) {
  1953  	if m == nil {
  1954  		return 0
  1955  	}
  1956  	size += 4 // m.BdID
  1957  	return size
  1958  }
  1959  func (m *L2fibFlushBd) Marshal(b []byte) ([]byte, error) {
  1960  	if b == nil {
  1961  		b = make([]byte, m.Size())
  1962  	}
  1963  	buf := codec.NewBuffer(b)
  1964  	buf.EncodeUint32(m.BdID)
  1965  	return buf.Bytes(), nil
  1966  }
  1967  func (m *L2fibFlushBd) Unmarshal(b []byte) error {
  1968  	buf := codec.NewBuffer(b)
  1969  	m.BdID = buf.DecodeUint32()
  1970  	return nil
  1971  }
  1972  
  1973  // L2fibFlushBdReply defines message 'l2fib_flush_bd_reply'.
  1974  type L2fibFlushBdReply struct {
  1975  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  1976  }
  1977  
  1978  func (m *L2fibFlushBdReply) Reset()               { *m = L2fibFlushBdReply{} }
  1979  func (*L2fibFlushBdReply) GetMessageName() string { return "l2fib_flush_bd_reply" }
  1980  func (*L2fibFlushBdReply) GetCrcString() string   { return "e8d4e804" }
  1981  func (*L2fibFlushBdReply) GetMessageType() api.MessageType {
  1982  	return api.ReplyMessage
  1983  }
  1984  
  1985  func (m *L2fibFlushBdReply) Size() (size int) {
  1986  	if m == nil {
  1987  		return 0
  1988  	}
  1989  	size += 4 // m.Retval
  1990  	return size
  1991  }
  1992  func (m *L2fibFlushBdReply) Marshal(b []byte) ([]byte, error) {
  1993  	if b == nil {
  1994  		b = make([]byte, m.Size())
  1995  	}
  1996  	buf := codec.NewBuffer(b)
  1997  	buf.EncodeInt32(m.Retval)
  1998  	return buf.Bytes(), nil
  1999  }
  2000  func (m *L2fibFlushBdReply) Unmarshal(b []byte) error {
  2001  	buf := codec.NewBuffer(b)
  2002  	m.Retval = buf.DecodeInt32()
  2003  	return nil
  2004  }
  2005  
  2006  // L2fibFlushInt defines message 'l2fib_flush_int'.
  2007  type L2fibFlushInt struct {
  2008  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
  2009  }
  2010  
  2011  func (m *L2fibFlushInt) Reset()               { *m = L2fibFlushInt{} }
  2012  func (*L2fibFlushInt) GetMessageName() string { return "l2fib_flush_int" }
  2013  func (*L2fibFlushInt) GetCrcString() string   { return "f9e6675e" }
  2014  func (*L2fibFlushInt) GetMessageType() api.MessageType {
  2015  	return api.RequestMessage
  2016  }
  2017  
  2018  func (m *L2fibFlushInt) Size() (size int) {
  2019  	if m == nil {
  2020  		return 0
  2021  	}
  2022  	size += 4 // m.SwIfIndex
  2023  	return size
  2024  }
  2025  func (m *L2fibFlushInt) Marshal(b []byte) ([]byte, error) {
  2026  	if b == nil {
  2027  		b = make([]byte, m.Size())
  2028  	}
  2029  	buf := codec.NewBuffer(b)
  2030  	buf.EncodeUint32(uint32(m.SwIfIndex))
  2031  	return buf.Bytes(), nil
  2032  }
  2033  func (m *L2fibFlushInt) Unmarshal(b []byte) error {
  2034  	buf := codec.NewBuffer(b)
  2035  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  2036  	return nil
  2037  }
  2038  
  2039  // L2fibFlushIntReply defines message 'l2fib_flush_int_reply'.
  2040  type L2fibFlushIntReply struct {
  2041  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  2042  }
  2043  
  2044  func (m *L2fibFlushIntReply) Reset()               { *m = L2fibFlushIntReply{} }
  2045  func (*L2fibFlushIntReply) GetMessageName() string { return "l2fib_flush_int_reply" }
  2046  func (*L2fibFlushIntReply) GetCrcString() string   { return "e8d4e804" }
  2047  func (*L2fibFlushIntReply) GetMessageType() api.MessageType {
  2048  	return api.ReplyMessage
  2049  }
  2050  
  2051  func (m *L2fibFlushIntReply) Size() (size int) {
  2052  	if m == nil {
  2053  		return 0
  2054  	}
  2055  	size += 4 // m.Retval
  2056  	return size
  2057  }
  2058  func (m *L2fibFlushIntReply) Marshal(b []byte) ([]byte, error) {
  2059  	if b == nil {
  2060  		b = make([]byte, m.Size())
  2061  	}
  2062  	buf := codec.NewBuffer(b)
  2063  	buf.EncodeInt32(m.Retval)
  2064  	return buf.Bytes(), nil
  2065  }
  2066  func (m *L2fibFlushIntReply) Unmarshal(b []byte) error {
  2067  	buf := codec.NewBuffer(b)
  2068  	m.Retval = buf.DecodeInt32()
  2069  	return nil
  2070  }
  2071  
  2072  // L2fibSetScanDelay defines message 'l2fib_set_scan_delay'.
  2073  type L2fibSetScanDelay struct {
  2074  	ScanDelay uint16 `binapi:"u16,name=scan_delay,default=10" json:"scan_delay,omitempty"`
  2075  }
  2076  
  2077  func (m *L2fibSetScanDelay) Reset()               { *m = L2fibSetScanDelay{} }
  2078  func (*L2fibSetScanDelay) GetMessageName() string { return "l2fib_set_scan_delay" }
  2079  func (*L2fibSetScanDelay) GetCrcString() string   { return "a3b968a4" }
  2080  func (*L2fibSetScanDelay) GetMessageType() api.MessageType {
  2081  	return api.RequestMessage
  2082  }
  2083  
  2084  func (m *L2fibSetScanDelay) Size() (size int) {
  2085  	if m == nil {
  2086  		return 0
  2087  	}
  2088  	size += 2 // m.ScanDelay
  2089  	return size
  2090  }
  2091  func (m *L2fibSetScanDelay) Marshal(b []byte) ([]byte, error) {
  2092  	if b == nil {
  2093  		b = make([]byte, m.Size())
  2094  	}
  2095  	buf := codec.NewBuffer(b)
  2096  	buf.EncodeUint16(m.ScanDelay)
  2097  	return buf.Bytes(), nil
  2098  }
  2099  func (m *L2fibSetScanDelay) Unmarshal(b []byte) error {
  2100  	buf := codec.NewBuffer(b)
  2101  	m.ScanDelay = buf.DecodeUint16()
  2102  	return nil
  2103  }
  2104  
  2105  // L2fibSetScanDelayReply defines message 'l2fib_set_scan_delay_reply'.
  2106  type L2fibSetScanDelayReply struct {
  2107  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  2108  }
  2109  
  2110  func (m *L2fibSetScanDelayReply) Reset()               { *m = L2fibSetScanDelayReply{} }
  2111  func (*L2fibSetScanDelayReply) GetMessageName() string { return "l2fib_set_scan_delay_reply" }
  2112  func (*L2fibSetScanDelayReply) GetCrcString() string   { return "e8d4e804" }
  2113  func (*L2fibSetScanDelayReply) GetMessageType() api.MessageType {
  2114  	return api.ReplyMessage
  2115  }
  2116  
  2117  func (m *L2fibSetScanDelayReply) Size() (size int) {
  2118  	if m == nil {
  2119  		return 0
  2120  	}
  2121  	size += 4 // m.Retval
  2122  	return size
  2123  }
  2124  func (m *L2fibSetScanDelayReply) Marshal(b []byte) ([]byte, error) {
  2125  	if b == nil {
  2126  		b = make([]byte, m.Size())
  2127  	}
  2128  	buf := codec.NewBuffer(b)
  2129  	buf.EncodeInt32(m.Retval)
  2130  	return buf.Bytes(), nil
  2131  }
  2132  func (m *L2fibSetScanDelayReply) Unmarshal(b []byte) error {
  2133  	buf := codec.NewBuffer(b)
  2134  	m.Retval = buf.DecodeInt32()
  2135  	return nil
  2136  }
  2137  
  2138  // SwInterfaceSetL2Bridge defines message 'sw_interface_set_l2_bridge'.
  2139  type SwInterfaceSetL2Bridge struct {
  2140  	RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
  2141  	BdID        uint32                         `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
  2142  	PortType    L2PortType                     `binapi:"l2_port_type,name=port_type" json:"port_type,omitempty"`
  2143  	Shg         uint8                          `binapi:"u8,name=shg" json:"shg,omitempty"`
  2144  	Enable      bool                           `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
  2145  }
  2146  
  2147  func (m *SwInterfaceSetL2Bridge) Reset()               { *m = SwInterfaceSetL2Bridge{} }
  2148  func (*SwInterfaceSetL2Bridge) GetMessageName() string { return "sw_interface_set_l2_bridge" }
  2149  func (*SwInterfaceSetL2Bridge) GetCrcString() string   { return "d0678b13" }
  2150  func (*SwInterfaceSetL2Bridge) GetMessageType() api.MessageType {
  2151  	return api.RequestMessage
  2152  }
  2153  
  2154  func (m *SwInterfaceSetL2Bridge) Size() (size int) {
  2155  	if m == nil {
  2156  		return 0
  2157  	}
  2158  	size += 4 // m.RxSwIfIndex
  2159  	size += 4 // m.BdID
  2160  	size += 4 // m.PortType
  2161  	size += 1 // m.Shg
  2162  	size += 1 // m.Enable
  2163  	return size
  2164  }
  2165  func (m *SwInterfaceSetL2Bridge) Marshal(b []byte) ([]byte, error) {
  2166  	if b == nil {
  2167  		b = make([]byte, m.Size())
  2168  	}
  2169  	buf := codec.NewBuffer(b)
  2170  	buf.EncodeUint32(uint32(m.RxSwIfIndex))
  2171  	buf.EncodeUint32(m.BdID)
  2172  	buf.EncodeUint32(uint32(m.PortType))
  2173  	buf.EncodeUint8(m.Shg)
  2174  	buf.EncodeBool(m.Enable)
  2175  	return buf.Bytes(), nil
  2176  }
  2177  func (m *SwInterfaceSetL2Bridge) Unmarshal(b []byte) error {
  2178  	buf := codec.NewBuffer(b)
  2179  	m.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  2180  	m.BdID = buf.DecodeUint32()
  2181  	m.PortType = L2PortType(buf.DecodeUint32())
  2182  	m.Shg = buf.DecodeUint8()
  2183  	m.Enable = buf.DecodeBool()
  2184  	return nil
  2185  }
  2186  
  2187  // SwInterfaceSetL2BridgeReply defines message 'sw_interface_set_l2_bridge_reply'.
  2188  type SwInterfaceSetL2BridgeReply struct {
  2189  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  2190  }
  2191  
  2192  func (m *SwInterfaceSetL2BridgeReply) Reset() { *m = SwInterfaceSetL2BridgeReply{} }
  2193  func (*SwInterfaceSetL2BridgeReply) GetMessageName() string {
  2194  	return "sw_interface_set_l2_bridge_reply"
  2195  }
  2196  func (*SwInterfaceSetL2BridgeReply) GetCrcString() string { return "e8d4e804" }
  2197  func (*SwInterfaceSetL2BridgeReply) GetMessageType() api.MessageType {
  2198  	return api.ReplyMessage
  2199  }
  2200  
  2201  func (m *SwInterfaceSetL2BridgeReply) Size() (size int) {
  2202  	if m == nil {
  2203  		return 0
  2204  	}
  2205  	size += 4 // m.Retval
  2206  	return size
  2207  }
  2208  func (m *SwInterfaceSetL2BridgeReply) Marshal(b []byte) ([]byte, error) {
  2209  	if b == nil {
  2210  		b = make([]byte, m.Size())
  2211  	}
  2212  	buf := codec.NewBuffer(b)
  2213  	buf.EncodeInt32(m.Retval)
  2214  	return buf.Bytes(), nil
  2215  }
  2216  func (m *SwInterfaceSetL2BridgeReply) Unmarshal(b []byte) error {
  2217  	buf := codec.NewBuffer(b)
  2218  	m.Retval = buf.DecodeInt32()
  2219  	return nil
  2220  }
  2221  
  2222  // SwInterfaceSetL2Xconnect defines message 'sw_interface_set_l2_xconnect'.
  2223  type SwInterfaceSetL2Xconnect struct {
  2224  	RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
  2225  	TxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"`
  2226  	Enable      bool                           `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
  2227  }
  2228  
  2229  func (m *SwInterfaceSetL2Xconnect) Reset()               { *m = SwInterfaceSetL2Xconnect{} }
  2230  func (*SwInterfaceSetL2Xconnect) GetMessageName() string { return "sw_interface_set_l2_xconnect" }
  2231  func (*SwInterfaceSetL2Xconnect) GetCrcString() string   { return "4fa28a85" }
  2232  func (*SwInterfaceSetL2Xconnect) GetMessageType() api.MessageType {
  2233  	return api.RequestMessage
  2234  }
  2235  
  2236  func (m *SwInterfaceSetL2Xconnect) Size() (size int) {
  2237  	if m == nil {
  2238  		return 0
  2239  	}
  2240  	size += 4 // m.RxSwIfIndex
  2241  	size += 4 // m.TxSwIfIndex
  2242  	size += 1 // m.Enable
  2243  	return size
  2244  }
  2245  func (m *SwInterfaceSetL2Xconnect) Marshal(b []byte) ([]byte, error) {
  2246  	if b == nil {
  2247  		b = make([]byte, m.Size())
  2248  	}
  2249  	buf := codec.NewBuffer(b)
  2250  	buf.EncodeUint32(uint32(m.RxSwIfIndex))
  2251  	buf.EncodeUint32(uint32(m.TxSwIfIndex))
  2252  	buf.EncodeBool(m.Enable)
  2253  	return buf.Bytes(), nil
  2254  }
  2255  func (m *SwInterfaceSetL2Xconnect) Unmarshal(b []byte) error {
  2256  	buf := codec.NewBuffer(b)
  2257  	m.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  2258  	m.TxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  2259  	m.Enable = buf.DecodeBool()
  2260  	return nil
  2261  }
  2262  
  2263  // SwInterfaceSetL2XconnectReply defines message 'sw_interface_set_l2_xconnect_reply'.
  2264  type SwInterfaceSetL2XconnectReply struct {
  2265  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  2266  }
  2267  
  2268  func (m *SwInterfaceSetL2XconnectReply) Reset() { *m = SwInterfaceSetL2XconnectReply{} }
  2269  func (*SwInterfaceSetL2XconnectReply) GetMessageName() string {
  2270  	return "sw_interface_set_l2_xconnect_reply"
  2271  }
  2272  func (*SwInterfaceSetL2XconnectReply) GetCrcString() string { return "e8d4e804" }
  2273  func (*SwInterfaceSetL2XconnectReply) GetMessageType() api.MessageType {
  2274  	return api.ReplyMessage
  2275  }
  2276  
  2277  func (m *SwInterfaceSetL2XconnectReply) Size() (size int) {
  2278  	if m == nil {
  2279  		return 0
  2280  	}
  2281  	size += 4 // m.Retval
  2282  	return size
  2283  }
  2284  func (m *SwInterfaceSetL2XconnectReply) Marshal(b []byte) ([]byte, error) {
  2285  	if b == nil {
  2286  		b = make([]byte, m.Size())
  2287  	}
  2288  	buf := codec.NewBuffer(b)
  2289  	buf.EncodeInt32(m.Retval)
  2290  	return buf.Bytes(), nil
  2291  }
  2292  func (m *SwInterfaceSetL2XconnectReply) Unmarshal(b []byte) error {
  2293  	buf := codec.NewBuffer(b)
  2294  	m.Retval = buf.DecodeInt32()
  2295  	return nil
  2296  }
  2297  
  2298  // SwInterfaceSetVpath defines message 'sw_interface_set_vpath'.
  2299  type SwInterfaceSetVpath struct {
  2300  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
  2301  	Enable    bool                           `binapi:"bool,name=enable,default=4.294967295e+09" json:"enable,omitempty"`
  2302  }
  2303  
  2304  func (m *SwInterfaceSetVpath) Reset()               { *m = SwInterfaceSetVpath{} }
  2305  func (*SwInterfaceSetVpath) GetMessageName() string { return "sw_interface_set_vpath" }
  2306  func (*SwInterfaceSetVpath) GetCrcString() string   { return "ae6cfcfb" }
  2307  func (*SwInterfaceSetVpath) GetMessageType() api.MessageType {
  2308  	return api.RequestMessage
  2309  }
  2310  
  2311  func (m *SwInterfaceSetVpath) Size() (size int) {
  2312  	if m == nil {
  2313  		return 0
  2314  	}
  2315  	size += 4 // m.SwIfIndex
  2316  	size += 1 // m.Enable
  2317  	return size
  2318  }
  2319  func (m *SwInterfaceSetVpath) Marshal(b []byte) ([]byte, error) {
  2320  	if b == nil {
  2321  		b = make([]byte, m.Size())
  2322  	}
  2323  	buf := codec.NewBuffer(b)
  2324  	buf.EncodeUint32(uint32(m.SwIfIndex))
  2325  	buf.EncodeBool(m.Enable)
  2326  	return buf.Bytes(), nil
  2327  }
  2328  func (m *SwInterfaceSetVpath) Unmarshal(b []byte) error {
  2329  	buf := codec.NewBuffer(b)
  2330  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  2331  	m.Enable = buf.DecodeBool()
  2332  	return nil
  2333  }
  2334  
  2335  // SwInterfaceSetVpathReply defines message 'sw_interface_set_vpath_reply'.
  2336  type SwInterfaceSetVpathReply struct {
  2337  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  2338  }
  2339  
  2340  func (m *SwInterfaceSetVpathReply) Reset()               { *m = SwInterfaceSetVpathReply{} }
  2341  func (*SwInterfaceSetVpathReply) GetMessageName() string { return "sw_interface_set_vpath_reply" }
  2342  func (*SwInterfaceSetVpathReply) GetCrcString() string   { return "e8d4e804" }
  2343  func (*SwInterfaceSetVpathReply) GetMessageType() api.MessageType {
  2344  	return api.ReplyMessage
  2345  }
  2346  
  2347  func (m *SwInterfaceSetVpathReply) Size() (size int) {
  2348  	if m == nil {
  2349  		return 0
  2350  	}
  2351  	size += 4 // m.Retval
  2352  	return size
  2353  }
  2354  func (m *SwInterfaceSetVpathReply) Marshal(b []byte) ([]byte, error) {
  2355  	if b == nil {
  2356  		b = make([]byte, m.Size())
  2357  	}
  2358  	buf := codec.NewBuffer(b)
  2359  	buf.EncodeInt32(m.Retval)
  2360  	return buf.Bytes(), nil
  2361  }
  2362  func (m *SwInterfaceSetVpathReply) Unmarshal(b []byte) error {
  2363  	buf := codec.NewBuffer(b)
  2364  	m.Retval = buf.DecodeInt32()
  2365  	return nil
  2366  }
  2367  
  2368  // WantL2ArpTermEvents defines message 'want_l2_arp_term_events'.
  2369  type WantL2ArpTermEvents struct {
  2370  	Enable bool   `binapi:"bool,name=enable" json:"enable,omitempty"`
  2371  	PID    uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
  2372  }
  2373  
  2374  func (m *WantL2ArpTermEvents) Reset()               { *m = WantL2ArpTermEvents{} }
  2375  func (*WantL2ArpTermEvents) GetMessageName() string { return "want_l2_arp_term_events" }
  2376  func (*WantL2ArpTermEvents) GetCrcString() string   { return "3ec6d6c2" }
  2377  func (*WantL2ArpTermEvents) GetMessageType() api.MessageType {
  2378  	return api.RequestMessage
  2379  }
  2380  
  2381  func (m *WantL2ArpTermEvents) Size() (size int) {
  2382  	if m == nil {
  2383  		return 0
  2384  	}
  2385  	size += 1 // m.Enable
  2386  	size += 4 // m.PID
  2387  	return size
  2388  }
  2389  func (m *WantL2ArpTermEvents) Marshal(b []byte) ([]byte, error) {
  2390  	if b == nil {
  2391  		b = make([]byte, m.Size())
  2392  	}
  2393  	buf := codec.NewBuffer(b)
  2394  	buf.EncodeBool(m.Enable)
  2395  	buf.EncodeUint32(m.PID)
  2396  	return buf.Bytes(), nil
  2397  }
  2398  func (m *WantL2ArpTermEvents) Unmarshal(b []byte) error {
  2399  	buf := codec.NewBuffer(b)
  2400  	m.Enable = buf.DecodeBool()
  2401  	m.PID = buf.DecodeUint32()
  2402  	return nil
  2403  }
  2404  
  2405  // WantL2ArpTermEventsReply defines message 'want_l2_arp_term_events_reply'.
  2406  type WantL2ArpTermEventsReply struct {
  2407  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  2408  }
  2409  
  2410  func (m *WantL2ArpTermEventsReply) Reset()               { *m = WantL2ArpTermEventsReply{} }
  2411  func (*WantL2ArpTermEventsReply) GetMessageName() string { return "want_l2_arp_term_events_reply" }
  2412  func (*WantL2ArpTermEventsReply) GetCrcString() string   { return "e8d4e804" }
  2413  func (*WantL2ArpTermEventsReply) GetMessageType() api.MessageType {
  2414  	return api.ReplyMessage
  2415  }
  2416  
  2417  func (m *WantL2ArpTermEventsReply) Size() (size int) {
  2418  	if m == nil {
  2419  		return 0
  2420  	}
  2421  	size += 4 // m.Retval
  2422  	return size
  2423  }
  2424  func (m *WantL2ArpTermEventsReply) Marshal(b []byte) ([]byte, error) {
  2425  	if b == nil {
  2426  		b = make([]byte, m.Size())
  2427  	}
  2428  	buf := codec.NewBuffer(b)
  2429  	buf.EncodeInt32(m.Retval)
  2430  	return buf.Bytes(), nil
  2431  }
  2432  func (m *WantL2ArpTermEventsReply) Unmarshal(b []byte) error {
  2433  	buf := codec.NewBuffer(b)
  2434  	m.Retval = buf.DecodeInt32()
  2435  	return nil
  2436  }
  2437  
  2438  // WantL2MacsEvents defines message 'want_l2_macs_events'.
  2439  // Deprecated: the message will be removed in the future versions
  2440  type WantL2MacsEvents struct {
  2441  	LearnLimit     uint32 `binapi:"u32,name=learn_limit,default=1000" json:"learn_limit,omitempty"`
  2442  	ScanDelay      uint8  `binapi:"u8,name=scan_delay,default=10" json:"scan_delay,omitempty"`
  2443  	MaxMacsInEvent uint8  `binapi:"u8,name=max_macs_in_event,default=10" json:"max_macs_in_event,omitempty"`
  2444  	EnableDisable  bool   `binapi:"bool,name=enable_disable,default=true" json:"enable_disable,omitempty"`
  2445  	PID            uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
  2446  }
  2447  
  2448  func (m *WantL2MacsEvents) Reset()               { *m = WantL2MacsEvents{} }
  2449  func (*WantL2MacsEvents) GetMessageName() string { return "want_l2_macs_events" }
  2450  func (*WantL2MacsEvents) GetCrcString() string   { return "9aabdfde" }
  2451  func (*WantL2MacsEvents) GetMessageType() api.MessageType {
  2452  	return api.RequestMessage
  2453  }
  2454  
  2455  func (m *WantL2MacsEvents) Size() (size int) {
  2456  	if m == nil {
  2457  		return 0
  2458  	}
  2459  	size += 4 // m.LearnLimit
  2460  	size += 1 // m.ScanDelay
  2461  	size += 1 // m.MaxMacsInEvent
  2462  	size += 1 // m.EnableDisable
  2463  	size += 4 // m.PID
  2464  	return size
  2465  }
  2466  func (m *WantL2MacsEvents) Marshal(b []byte) ([]byte, error) {
  2467  	if b == nil {
  2468  		b = make([]byte, m.Size())
  2469  	}
  2470  	buf := codec.NewBuffer(b)
  2471  	buf.EncodeUint32(m.LearnLimit)
  2472  	buf.EncodeUint8(m.ScanDelay)
  2473  	buf.EncodeUint8(m.MaxMacsInEvent)
  2474  	buf.EncodeBool(m.EnableDisable)
  2475  	buf.EncodeUint32(m.PID)
  2476  	return buf.Bytes(), nil
  2477  }
  2478  func (m *WantL2MacsEvents) Unmarshal(b []byte) error {
  2479  	buf := codec.NewBuffer(b)
  2480  	m.LearnLimit = buf.DecodeUint32()
  2481  	m.ScanDelay = buf.DecodeUint8()
  2482  	m.MaxMacsInEvent = buf.DecodeUint8()
  2483  	m.EnableDisable = buf.DecodeBool()
  2484  	m.PID = buf.DecodeUint32()
  2485  	return nil
  2486  }
  2487  
  2488  // WantL2MacsEvents2 defines message 'want_l2_macs_events2'.
  2489  type WantL2MacsEvents2 struct {
  2490  	MaxMacsInEvent uint8  `binapi:"u8,name=max_macs_in_event,default=10" json:"max_macs_in_event,omitempty"`
  2491  	EnableDisable  bool   `binapi:"bool,name=enable_disable,default=true" json:"enable_disable,omitempty"`
  2492  	PID            uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
  2493  }
  2494  
  2495  func (m *WantL2MacsEvents2) Reset()               { *m = WantL2MacsEvents2{} }
  2496  func (*WantL2MacsEvents2) GetMessageName() string { return "want_l2_macs_events2" }
  2497  func (*WantL2MacsEvents2) GetCrcString() string   { return "cc1377b0" }
  2498  func (*WantL2MacsEvents2) GetMessageType() api.MessageType {
  2499  	return api.RequestMessage
  2500  }
  2501  
  2502  func (m *WantL2MacsEvents2) Size() (size int) {
  2503  	if m == nil {
  2504  		return 0
  2505  	}
  2506  	size += 1 // m.MaxMacsInEvent
  2507  	size += 1 // m.EnableDisable
  2508  	size += 4 // m.PID
  2509  	return size
  2510  }
  2511  func (m *WantL2MacsEvents2) Marshal(b []byte) ([]byte, error) {
  2512  	if b == nil {
  2513  		b = make([]byte, m.Size())
  2514  	}
  2515  	buf := codec.NewBuffer(b)
  2516  	buf.EncodeUint8(m.MaxMacsInEvent)
  2517  	buf.EncodeBool(m.EnableDisable)
  2518  	buf.EncodeUint32(m.PID)
  2519  	return buf.Bytes(), nil
  2520  }
  2521  func (m *WantL2MacsEvents2) Unmarshal(b []byte) error {
  2522  	buf := codec.NewBuffer(b)
  2523  	m.MaxMacsInEvent = buf.DecodeUint8()
  2524  	m.EnableDisable = buf.DecodeBool()
  2525  	m.PID = buf.DecodeUint32()
  2526  	return nil
  2527  }
  2528  
  2529  // WantL2MacsEvents2Reply defines message 'want_l2_macs_events2_reply'.
  2530  type WantL2MacsEvents2Reply struct {
  2531  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  2532  }
  2533  
  2534  func (m *WantL2MacsEvents2Reply) Reset()               { *m = WantL2MacsEvents2Reply{} }
  2535  func (*WantL2MacsEvents2Reply) GetMessageName() string { return "want_l2_macs_events2_reply" }
  2536  func (*WantL2MacsEvents2Reply) GetCrcString() string   { return "e8d4e804" }
  2537  func (*WantL2MacsEvents2Reply) GetMessageType() api.MessageType {
  2538  	return api.ReplyMessage
  2539  }
  2540  
  2541  func (m *WantL2MacsEvents2Reply) Size() (size int) {
  2542  	if m == nil {
  2543  		return 0
  2544  	}
  2545  	size += 4 // m.Retval
  2546  	return size
  2547  }
  2548  func (m *WantL2MacsEvents2Reply) Marshal(b []byte) ([]byte, error) {
  2549  	if b == nil {
  2550  		b = make([]byte, m.Size())
  2551  	}
  2552  	buf := codec.NewBuffer(b)
  2553  	buf.EncodeInt32(m.Retval)
  2554  	return buf.Bytes(), nil
  2555  }
  2556  func (m *WantL2MacsEvents2Reply) Unmarshal(b []byte) error {
  2557  	buf := codec.NewBuffer(b)
  2558  	m.Retval = buf.DecodeInt32()
  2559  	return nil
  2560  }
  2561  
  2562  // WantL2MacsEventsReply defines message 'want_l2_macs_events_reply'.
  2563  // Deprecated: the message will be removed in the future versions
  2564  type WantL2MacsEventsReply struct {
  2565  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  2566  }
  2567  
  2568  func (m *WantL2MacsEventsReply) Reset()               { *m = WantL2MacsEventsReply{} }
  2569  func (*WantL2MacsEventsReply) GetMessageName() string { return "want_l2_macs_events_reply" }
  2570  func (*WantL2MacsEventsReply) GetCrcString() string   { return "e8d4e804" }
  2571  func (*WantL2MacsEventsReply) GetMessageType() api.MessageType {
  2572  	return api.ReplyMessage
  2573  }
  2574  
  2575  func (m *WantL2MacsEventsReply) Size() (size int) {
  2576  	if m == nil {
  2577  		return 0
  2578  	}
  2579  	size += 4 // m.Retval
  2580  	return size
  2581  }
  2582  func (m *WantL2MacsEventsReply) Marshal(b []byte) ([]byte, error) {
  2583  	if b == nil {
  2584  		b = make([]byte, m.Size())
  2585  	}
  2586  	buf := codec.NewBuffer(b)
  2587  	buf.EncodeInt32(m.Retval)
  2588  	return buf.Bytes(), nil
  2589  }
  2590  func (m *WantL2MacsEventsReply) Unmarshal(b []byte) error {
  2591  	buf := codec.NewBuffer(b)
  2592  	m.Retval = buf.DecodeInt32()
  2593  	return nil
  2594  }
  2595  
  2596  func init() { file_l2_binapi_init() }
  2597  func file_l2_binapi_init() {
  2598  	api.RegisterMessage((*BdIPMacAddDel)(nil), "bd_ip_mac_add_del_0257c869")
  2599  	api.RegisterMessage((*BdIPMacAddDelReply)(nil), "bd_ip_mac_add_del_reply_e8d4e804")
  2600  	api.RegisterMessage((*BdIPMacDetails)(nil), "bd_ip_mac_details_545af86a")
  2601  	api.RegisterMessage((*BdIPMacDump)(nil), "bd_ip_mac_dump_c25fdce6")
  2602  	api.RegisterMessage((*BdIPMacFlush)(nil), "bd_ip_mac_flush_c25fdce6")
  2603  	api.RegisterMessage((*BdIPMacFlushReply)(nil), "bd_ip_mac_flush_reply_e8d4e804")
  2604  	api.RegisterMessage((*BridgeDomainAddDel)(nil), "bridge_domain_add_del_600b7170")
  2605  	api.RegisterMessage((*BridgeDomainAddDelReply)(nil), "bridge_domain_add_del_reply_e8d4e804")
  2606  	api.RegisterMessage((*BridgeDomainDetails)(nil), "bridge_domain_details_0fa506fd")
  2607  	api.RegisterMessage((*BridgeDomainDump)(nil), "bridge_domain_dump_74396a43")
  2608  	api.RegisterMessage((*BridgeDomainSetDefaultLearnLimit)(nil), "bridge_domain_set_default_learn_limit_f097ffce")
  2609  	api.RegisterMessage((*BridgeDomainSetDefaultLearnLimitReply)(nil), "bridge_domain_set_default_learn_limit_reply_e8d4e804")
  2610  	api.RegisterMessage((*BridgeDomainSetLearnLimit)(nil), "bridge_domain_set_learn_limit_89c52b5f")
  2611  	api.RegisterMessage((*BridgeDomainSetLearnLimitReply)(nil), "bridge_domain_set_learn_limit_reply_e8d4e804")
  2612  	api.RegisterMessage((*BridgeDomainSetMacAge)(nil), "bridge_domain_set_mac_age_b537ad7b")
  2613  	api.RegisterMessage((*BridgeDomainSetMacAgeReply)(nil), "bridge_domain_set_mac_age_reply_e8d4e804")
  2614  	api.RegisterMessage((*BridgeFlags)(nil), "bridge_flags_1b0c5fbd")
  2615  	api.RegisterMessage((*BridgeFlagsReply)(nil), "bridge_flags_reply_29b2a2b3")
  2616  	api.RegisterMessage((*BviCreate)(nil), "bvi_create_f5398559")
  2617  	api.RegisterMessage((*BviCreateReply)(nil), "bvi_create_reply_5383d31f")
  2618  	api.RegisterMessage((*BviDelete)(nil), "bvi_delete_f9e6675e")
  2619  	api.RegisterMessage((*BviDeleteReply)(nil), "bvi_delete_reply_e8d4e804")
  2620  	api.RegisterMessage((*L2ArpTermEvent)(nil), "l2_arp_term_event_6963e07a")
  2621  	api.RegisterMessage((*L2FibClearTable)(nil), "l2_fib_clear_table_51077d14")
  2622  	api.RegisterMessage((*L2FibClearTableReply)(nil), "l2_fib_clear_table_reply_e8d4e804")
  2623  	api.RegisterMessage((*L2FibTableDetails)(nil), "l2_fib_table_details_a44ef6b8")
  2624  	api.RegisterMessage((*L2FibTableDump)(nil), "l2_fib_table_dump_c25fdce6")
  2625  	api.RegisterMessage((*L2Flags)(nil), "l2_flags_fc41cfe8")
  2626  	api.RegisterMessage((*L2FlagsReply)(nil), "l2_flags_reply_29b2a2b3")
  2627  	api.RegisterMessage((*L2InterfaceEfpFilter)(nil), "l2_interface_efp_filter_5501adee")
  2628  	api.RegisterMessage((*L2InterfaceEfpFilterReply)(nil), "l2_interface_efp_filter_reply_e8d4e804")
  2629  	api.RegisterMessage((*L2InterfacePbbTagRewrite)(nil), "l2_interface_pbb_tag_rewrite_38e802a8")
  2630  	api.RegisterMessage((*L2InterfacePbbTagRewriteReply)(nil), "l2_interface_pbb_tag_rewrite_reply_e8d4e804")
  2631  	api.RegisterMessage((*L2InterfaceVlanTagRewrite)(nil), "l2_interface_vlan_tag_rewrite_62cc0bbc")
  2632  	api.RegisterMessage((*L2InterfaceVlanTagRewriteReply)(nil), "l2_interface_vlan_tag_rewrite_reply_e8d4e804")
  2633  	api.RegisterMessage((*L2MacsEvent)(nil), "l2_macs_event_44b8fd64")
  2634  	api.RegisterMessage((*L2PatchAddDel)(nil), "l2_patch_add_del_a1f6a6f3")
  2635  	api.RegisterMessage((*L2PatchAddDelReply)(nil), "l2_patch_add_del_reply_e8d4e804")
  2636  	api.RegisterMessage((*L2XconnectDetails)(nil), "l2_xconnect_details_472b6b67")
  2637  	api.RegisterMessage((*L2XconnectDump)(nil), "l2_xconnect_dump_51077d14")
  2638  	api.RegisterMessage((*L2fibAddDel)(nil), "l2fib_add_del_eddda487")
  2639  	api.RegisterMessage((*L2fibAddDelReply)(nil), "l2fib_add_del_reply_e8d4e804")
  2640  	api.RegisterMessage((*L2fibFlushAll)(nil), "l2fib_flush_all_51077d14")
  2641  	api.RegisterMessage((*L2fibFlushAllReply)(nil), "l2fib_flush_all_reply_e8d4e804")
  2642  	api.RegisterMessage((*L2fibFlushBd)(nil), "l2fib_flush_bd_c25fdce6")
  2643  	api.RegisterMessage((*L2fibFlushBdReply)(nil), "l2fib_flush_bd_reply_e8d4e804")
  2644  	api.RegisterMessage((*L2fibFlushInt)(nil), "l2fib_flush_int_f9e6675e")
  2645  	api.RegisterMessage((*L2fibFlushIntReply)(nil), "l2fib_flush_int_reply_e8d4e804")
  2646  	api.RegisterMessage((*L2fibSetScanDelay)(nil), "l2fib_set_scan_delay_a3b968a4")
  2647  	api.RegisterMessage((*L2fibSetScanDelayReply)(nil), "l2fib_set_scan_delay_reply_e8d4e804")
  2648  	api.RegisterMessage((*SwInterfaceSetL2Bridge)(nil), "sw_interface_set_l2_bridge_d0678b13")
  2649  	api.RegisterMessage((*SwInterfaceSetL2BridgeReply)(nil), "sw_interface_set_l2_bridge_reply_e8d4e804")
  2650  	api.RegisterMessage((*SwInterfaceSetL2Xconnect)(nil), "sw_interface_set_l2_xconnect_4fa28a85")
  2651  	api.RegisterMessage((*SwInterfaceSetL2XconnectReply)(nil), "sw_interface_set_l2_xconnect_reply_e8d4e804")
  2652  	api.RegisterMessage((*SwInterfaceSetVpath)(nil), "sw_interface_set_vpath_ae6cfcfb")
  2653  	api.RegisterMessage((*SwInterfaceSetVpathReply)(nil), "sw_interface_set_vpath_reply_e8d4e804")
  2654  	api.RegisterMessage((*WantL2ArpTermEvents)(nil), "want_l2_arp_term_events_3ec6d6c2")
  2655  	api.RegisterMessage((*WantL2ArpTermEventsReply)(nil), "want_l2_arp_term_events_reply_e8d4e804")
  2656  	api.RegisterMessage((*WantL2MacsEvents)(nil), "want_l2_macs_events_9aabdfde")
  2657  	api.RegisterMessage((*WantL2MacsEvents2)(nil), "want_l2_macs_events2_cc1377b0")
  2658  	api.RegisterMessage((*WantL2MacsEvents2Reply)(nil), "want_l2_macs_events2_reply_e8d4e804")
  2659  	api.RegisterMessage((*WantL2MacsEventsReply)(nil), "want_l2_macs_events_reply_e8d4e804")
  2660  }
  2661  
  2662  // Messages returns list of all messages in this module.
  2663  func AllMessages() []api.Message {
  2664  	return []api.Message{
  2665  		(*BdIPMacAddDel)(nil),
  2666  		(*BdIPMacAddDelReply)(nil),
  2667  		(*BdIPMacDetails)(nil),
  2668  		(*BdIPMacDump)(nil),
  2669  		(*BdIPMacFlush)(nil),
  2670  		(*BdIPMacFlushReply)(nil),
  2671  		(*BridgeDomainAddDel)(nil),
  2672  		(*BridgeDomainAddDelReply)(nil),
  2673  		(*BridgeDomainDetails)(nil),
  2674  		(*BridgeDomainDump)(nil),
  2675  		(*BridgeDomainSetDefaultLearnLimit)(nil),
  2676  		(*BridgeDomainSetDefaultLearnLimitReply)(nil),
  2677  		(*BridgeDomainSetLearnLimit)(nil),
  2678  		(*BridgeDomainSetLearnLimitReply)(nil),
  2679  		(*BridgeDomainSetMacAge)(nil),
  2680  		(*BridgeDomainSetMacAgeReply)(nil),
  2681  		(*BridgeFlags)(nil),
  2682  		(*BridgeFlagsReply)(nil),
  2683  		(*BviCreate)(nil),
  2684  		(*BviCreateReply)(nil),
  2685  		(*BviDelete)(nil),
  2686  		(*BviDeleteReply)(nil),
  2687  		(*L2ArpTermEvent)(nil),
  2688  		(*L2FibClearTable)(nil),
  2689  		(*L2FibClearTableReply)(nil),
  2690  		(*L2FibTableDetails)(nil),
  2691  		(*L2FibTableDump)(nil),
  2692  		(*L2Flags)(nil),
  2693  		(*L2FlagsReply)(nil),
  2694  		(*L2InterfaceEfpFilter)(nil),
  2695  		(*L2InterfaceEfpFilterReply)(nil),
  2696  		(*L2InterfacePbbTagRewrite)(nil),
  2697  		(*L2InterfacePbbTagRewriteReply)(nil),
  2698  		(*L2InterfaceVlanTagRewrite)(nil),
  2699  		(*L2InterfaceVlanTagRewriteReply)(nil),
  2700  		(*L2MacsEvent)(nil),
  2701  		(*L2PatchAddDel)(nil),
  2702  		(*L2PatchAddDelReply)(nil),
  2703  		(*L2XconnectDetails)(nil),
  2704  		(*L2XconnectDump)(nil),
  2705  		(*L2fibAddDel)(nil),
  2706  		(*L2fibAddDelReply)(nil),
  2707  		(*L2fibFlushAll)(nil),
  2708  		(*L2fibFlushAllReply)(nil),
  2709  		(*L2fibFlushBd)(nil),
  2710  		(*L2fibFlushBdReply)(nil),
  2711  		(*L2fibFlushInt)(nil),
  2712  		(*L2fibFlushIntReply)(nil),
  2713  		(*L2fibSetScanDelay)(nil),
  2714  		(*L2fibSetScanDelayReply)(nil),
  2715  		(*SwInterfaceSetL2Bridge)(nil),
  2716  		(*SwInterfaceSetL2BridgeReply)(nil),
  2717  		(*SwInterfaceSetL2Xconnect)(nil),
  2718  		(*SwInterfaceSetL2XconnectReply)(nil),
  2719  		(*SwInterfaceSetVpath)(nil),
  2720  		(*SwInterfaceSetVpathReply)(nil),
  2721  		(*WantL2ArpTermEvents)(nil),
  2722  		(*WantL2ArpTermEventsReply)(nil),
  2723  		(*WantL2MacsEvents)(nil),
  2724  		(*WantL2MacsEvents2)(nil),
  2725  		(*WantL2MacsEvents2Reply)(nil),
  2726  		(*WantL2MacsEventsReply)(nil),
  2727  	}
  2728  }