github.com/edwarnicke/govpp@v0.0.0-20230130211138-14ef5d20b1d0/binapi/l2/l2.ba.go (about)

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