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

     1  // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
     2  
     3  // Package bond contains generated bindings for API file bond.api.
     4  //
     5  // Contents:
     6  // -  2 enums
     7  // - 24 messages
     8  package bond
     9  
    10  import (
    11  	"strconv"
    12  
    13  	api "go.fd.io/govpp/api"
    14  	codec "go.fd.io/govpp/codec"
    15  	ethernet_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2101/ethernet_types"
    16  	interface_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2101/interface_types"
    17  )
    18  
    19  // This is a compile-time assertion to ensure that this generated file
    20  // is compatible with the GoVPP api package it is being compiled against.
    21  // A compilation error at this line likely means your copy of the
    22  // GoVPP api package needs to be updated.
    23  const _ = api.GoVppAPIPackageIsVersion2
    24  
    25  const (
    26  	APIFile    = "bond"
    27  	APIVersion = "2.1.0"
    28  	VersionCrc = 0x2b0675da
    29  )
    30  
    31  // BondLbAlgo defines enum 'bond_lb_algo'.
    32  type BondLbAlgo uint32
    33  
    34  const (
    35  	BOND_API_LB_ALGO_L2  BondLbAlgo = 0
    36  	BOND_API_LB_ALGO_L34 BondLbAlgo = 1
    37  	BOND_API_LB_ALGO_L23 BondLbAlgo = 2
    38  	BOND_API_LB_ALGO_RR  BondLbAlgo = 3
    39  	BOND_API_LB_ALGO_BC  BondLbAlgo = 4
    40  	BOND_API_LB_ALGO_AB  BondLbAlgo = 5
    41  )
    42  
    43  var (
    44  	BondLbAlgo_name = map[uint32]string{
    45  		0: "BOND_API_LB_ALGO_L2",
    46  		1: "BOND_API_LB_ALGO_L34",
    47  		2: "BOND_API_LB_ALGO_L23",
    48  		3: "BOND_API_LB_ALGO_RR",
    49  		4: "BOND_API_LB_ALGO_BC",
    50  		5: "BOND_API_LB_ALGO_AB",
    51  	}
    52  	BondLbAlgo_value = map[string]uint32{
    53  		"BOND_API_LB_ALGO_L2":  0,
    54  		"BOND_API_LB_ALGO_L34": 1,
    55  		"BOND_API_LB_ALGO_L23": 2,
    56  		"BOND_API_LB_ALGO_RR":  3,
    57  		"BOND_API_LB_ALGO_BC":  4,
    58  		"BOND_API_LB_ALGO_AB":  5,
    59  	}
    60  )
    61  
    62  func (x BondLbAlgo) String() string {
    63  	s, ok := BondLbAlgo_name[uint32(x)]
    64  	if ok {
    65  		return s
    66  	}
    67  	return "BondLbAlgo(" + strconv.Itoa(int(x)) + ")"
    68  }
    69  
    70  // BondMode defines enum 'bond_mode'.
    71  type BondMode uint32
    72  
    73  const (
    74  	BOND_API_MODE_ROUND_ROBIN   BondMode = 1
    75  	BOND_API_MODE_ACTIVE_BACKUP BondMode = 2
    76  	BOND_API_MODE_XOR           BondMode = 3
    77  	BOND_API_MODE_BROADCAST     BondMode = 4
    78  	BOND_API_MODE_LACP          BondMode = 5
    79  )
    80  
    81  var (
    82  	BondMode_name = map[uint32]string{
    83  		1: "BOND_API_MODE_ROUND_ROBIN",
    84  		2: "BOND_API_MODE_ACTIVE_BACKUP",
    85  		3: "BOND_API_MODE_XOR",
    86  		4: "BOND_API_MODE_BROADCAST",
    87  		5: "BOND_API_MODE_LACP",
    88  	}
    89  	BondMode_value = map[string]uint32{
    90  		"BOND_API_MODE_ROUND_ROBIN":   1,
    91  		"BOND_API_MODE_ACTIVE_BACKUP": 2,
    92  		"BOND_API_MODE_XOR":           3,
    93  		"BOND_API_MODE_BROADCAST":     4,
    94  		"BOND_API_MODE_LACP":          5,
    95  	}
    96  )
    97  
    98  func (x BondMode) String() string {
    99  	s, ok := BondMode_name[uint32(x)]
   100  	if ok {
   101  		return s
   102  	}
   103  	return "BondMode(" + strconv.Itoa(int(x)) + ")"
   104  }
   105  
   106  // BondAddMember defines message 'bond_add_member'.
   107  type BondAddMember struct {
   108  	SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   109  	BondSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=bond_sw_if_index" json:"bond_sw_if_index,omitempty"`
   110  	IsPassive     bool                           `binapi:"bool,name=is_passive" json:"is_passive,omitempty"`
   111  	IsLongTimeout bool                           `binapi:"bool,name=is_long_timeout" json:"is_long_timeout,omitempty"`
   112  }
   113  
   114  func (m *BondAddMember) Reset()               { *m = BondAddMember{} }
   115  func (*BondAddMember) GetMessageName() string { return "bond_add_member" }
   116  func (*BondAddMember) GetCrcString() string   { return "e7d14948" }
   117  func (*BondAddMember) GetMessageType() api.MessageType {
   118  	return api.RequestMessage
   119  }
   120  
   121  func (m *BondAddMember) Size() (size int) {
   122  	if m == nil {
   123  		return 0
   124  	}
   125  	size += 4 // m.SwIfIndex
   126  	size += 4 // m.BondSwIfIndex
   127  	size += 1 // m.IsPassive
   128  	size += 1 // m.IsLongTimeout
   129  	return size
   130  }
   131  func (m *BondAddMember) Marshal(b []byte) ([]byte, error) {
   132  	if b == nil {
   133  		b = make([]byte, m.Size())
   134  	}
   135  	buf := codec.NewBuffer(b)
   136  	buf.EncodeUint32(uint32(m.SwIfIndex))
   137  	buf.EncodeUint32(uint32(m.BondSwIfIndex))
   138  	buf.EncodeBool(m.IsPassive)
   139  	buf.EncodeBool(m.IsLongTimeout)
   140  	return buf.Bytes(), nil
   141  }
   142  func (m *BondAddMember) Unmarshal(b []byte) error {
   143  	buf := codec.NewBuffer(b)
   144  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   145  	m.BondSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   146  	m.IsPassive = buf.DecodeBool()
   147  	m.IsLongTimeout = buf.DecodeBool()
   148  	return nil
   149  }
   150  
   151  // BondAddMemberReply defines message 'bond_add_member_reply'.
   152  type BondAddMemberReply struct {
   153  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   154  }
   155  
   156  func (m *BondAddMemberReply) Reset()               { *m = BondAddMemberReply{} }
   157  func (*BondAddMemberReply) GetMessageName() string { return "bond_add_member_reply" }
   158  func (*BondAddMemberReply) GetCrcString() string   { return "e8d4e804" }
   159  func (*BondAddMemberReply) GetMessageType() api.MessageType {
   160  	return api.ReplyMessage
   161  }
   162  
   163  func (m *BondAddMemberReply) Size() (size int) {
   164  	if m == nil {
   165  		return 0
   166  	}
   167  	size += 4 // m.Retval
   168  	return size
   169  }
   170  func (m *BondAddMemberReply) Marshal(b []byte) ([]byte, error) {
   171  	if b == nil {
   172  		b = make([]byte, m.Size())
   173  	}
   174  	buf := codec.NewBuffer(b)
   175  	buf.EncodeInt32(m.Retval)
   176  	return buf.Bytes(), nil
   177  }
   178  func (m *BondAddMemberReply) Unmarshal(b []byte) error {
   179  	buf := codec.NewBuffer(b)
   180  	m.Retval = buf.DecodeInt32()
   181  	return nil
   182  }
   183  
   184  // BondCreate defines message 'bond_create'.
   185  type BondCreate struct {
   186  	ID           uint32                    `binapi:"u32,name=id,default=4294967295" json:"id,omitempty"`
   187  	UseCustomMac bool                      `binapi:"bool,name=use_custom_mac" json:"use_custom_mac,omitempty"`
   188  	MacAddress   ethernet_types.MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
   189  	Mode         BondMode                  `binapi:"bond_mode,name=mode" json:"mode,omitempty"`
   190  	Lb           BondLbAlgo                `binapi:"bond_lb_algo,name=lb" json:"lb,omitempty"`
   191  	NumaOnly     bool                      `binapi:"bool,name=numa_only" json:"numa_only,omitempty"`
   192  }
   193  
   194  func (m *BondCreate) Reset()               { *m = BondCreate{} }
   195  func (*BondCreate) GetMessageName() string { return "bond_create" }
   196  func (*BondCreate) GetCrcString() string   { return "48883c7e" }
   197  func (*BondCreate) GetMessageType() api.MessageType {
   198  	return api.RequestMessage
   199  }
   200  
   201  func (m *BondCreate) Size() (size int) {
   202  	if m == nil {
   203  		return 0
   204  	}
   205  	size += 4     // m.ID
   206  	size += 1     // m.UseCustomMac
   207  	size += 1 * 6 // m.MacAddress
   208  	size += 4     // m.Mode
   209  	size += 4     // m.Lb
   210  	size += 1     // m.NumaOnly
   211  	return size
   212  }
   213  func (m *BondCreate) Marshal(b []byte) ([]byte, error) {
   214  	if b == nil {
   215  		b = make([]byte, m.Size())
   216  	}
   217  	buf := codec.NewBuffer(b)
   218  	buf.EncodeUint32(m.ID)
   219  	buf.EncodeBool(m.UseCustomMac)
   220  	buf.EncodeBytes(m.MacAddress[:], 6)
   221  	buf.EncodeUint32(uint32(m.Mode))
   222  	buf.EncodeUint32(uint32(m.Lb))
   223  	buf.EncodeBool(m.NumaOnly)
   224  	return buf.Bytes(), nil
   225  }
   226  func (m *BondCreate) Unmarshal(b []byte) error {
   227  	buf := codec.NewBuffer(b)
   228  	m.ID = buf.DecodeUint32()
   229  	m.UseCustomMac = buf.DecodeBool()
   230  	copy(m.MacAddress[:], buf.DecodeBytes(6))
   231  	m.Mode = BondMode(buf.DecodeUint32())
   232  	m.Lb = BondLbAlgo(buf.DecodeUint32())
   233  	m.NumaOnly = buf.DecodeBool()
   234  	return nil
   235  }
   236  
   237  // BondCreate2 defines message 'bond_create2'.
   238  type BondCreate2 struct {
   239  	Mode         BondMode                  `binapi:"bond_mode,name=mode" json:"mode,omitempty"`
   240  	Lb           BondLbAlgo                `binapi:"bond_lb_algo,name=lb" json:"lb,omitempty"`
   241  	NumaOnly     bool                      `binapi:"bool,name=numa_only" json:"numa_only,omitempty"`
   242  	EnableGso    bool                      `binapi:"bool,name=enable_gso" json:"enable_gso,omitempty"`
   243  	UseCustomMac bool                      `binapi:"bool,name=use_custom_mac" json:"use_custom_mac,omitempty"`
   244  	MacAddress   ethernet_types.MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
   245  	ID           uint32                    `binapi:"u32,name=id,default=4294967295" json:"id,omitempty"`
   246  }
   247  
   248  func (m *BondCreate2) Reset()               { *m = BondCreate2{} }
   249  func (*BondCreate2) GetMessageName() string { return "bond_create2" }
   250  func (*BondCreate2) GetCrcString() string   { return "912fda76" }
   251  func (*BondCreate2) GetMessageType() api.MessageType {
   252  	return api.RequestMessage
   253  }
   254  
   255  func (m *BondCreate2) Size() (size int) {
   256  	if m == nil {
   257  		return 0
   258  	}
   259  	size += 4     // m.Mode
   260  	size += 4     // m.Lb
   261  	size += 1     // m.NumaOnly
   262  	size += 1     // m.EnableGso
   263  	size += 1     // m.UseCustomMac
   264  	size += 1 * 6 // m.MacAddress
   265  	size += 4     // m.ID
   266  	return size
   267  }
   268  func (m *BondCreate2) Marshal(b []byte) ([]byte, error) {
   269  	if b == nil {
   270  		b = make([]byte, m.Size())
   271  	}
   272  	buf := codec.NewBuffer(b)
   273  	buf.EncodeUint32(uint32(m.Mode))
   274  	buf.EncodeUint32(uint32(m.Lb))
   275  	buf.EncodeBool(m.NumaOnly)
   276  	buf.EncodeBool(m.EnableGso)
   277  	buf.EncodeBool(m.UseCustomMac)
   278  	buf.EncodeBytes(m.MacAddress[:], 6)
   279  	buf.EncodeUint32(m.ID)
   280  	return buf.Bytes(), nil
   281  }
   282  func (m *BondCreate2) Unmarshal(b []byte) error {
   283  	buf := codec.NewBuffer(b)
   284  	m.Mode = BondMode(buf.DecodeUint32())
   285  	m.Lb = BondLbAlgo(buf.DecodeUint32())
   286  	m.NumaOnly = buf.DecodeBool()
   287  	m.EnableGso = buf.DecodeBool()
   288  	m.UseCustomMac = buf.DecodeBool()
   289  	copy(m.MacAddress[:], buf.DecodeBytes(6))
   290  	m.ID = buf.DecodeUint32()
   291  	return nil
   292  }
   293  
   294  // BondCreate2Reply defines message 'bond_create2_reply'.
   295  type BondCreate2Reply struct {
   296  	Retval    int32                          `binapi:"i32,name=retval" json:"retval,omitempty"`
   297  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   298  }
   299  
   300  func (m *BondCreate2Reply) Reset()               { *m = BondCreate2Reply{} }
   301  func (*BondCreate2Reply) GetMessageName() string { return "bond_create2_reply" }
   302  func (*BondCreate2Reply) GetCrcString() string   { return "5383d31f" }
   303  func (*BondCreate2Reply) GetMessageType() api.MessageType {
   304  	return api.ReplyMessage
   305  }
   306  
   307  func (m *BondCreate2Reply) Size() (size int) {
   308  	if m == nil {
   309  		return 0
   310  	}
   311  	size += 4 // m.Retval
   312  	size += 4 // m.SwIfIndex
   313  	return size
   314  }
   315  func (m *BondCreate2Reply) Marshal(b []byte) ([]byte, error) {
   316  	if b == nil {
   317  		b = make([]byte, m.Size())
   318  	}
   319  	buf := codec.NewBuffer(b)
   320  	buf.EncodeInt32(m.Retval)
   321  	buf.EncodeUint32(uint32(m.SwIfIndex))
   322  	return buf.Bytes(), nil
   323  }
   324  func (m *BondCreate2Reply) Unmarshal(b []byte) error {
   325  	buf := codec.NewBuffer(b)
   326  	m.Retval = buf.DecodeInt32()
   327  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   328  	return nil
   329  }
   330  
   331  // BondCreateReply defines message 'bond_create_reply'.
   332  type BondCreateReply struct {
   333  	Retval    int32                          `binapi:"i32,name=retval" json:"retval,omitempty"`
   334  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   335  }
   336  
   337  func (m *BondCreateReply) Reset()               { *m = BondCreateReply{} }
   338  func (*BondCreateReply) GetMessageName() string { return "bond_create_reply" }
   339  func (*BondCreateReply) GetCrcString() string   { return "5383d31f" }
   340  func (*BondCreateReply) GetMessageType() api.MessageType {
   341  	return api.ReplyMessage
   342  }
   343  
   344  func (m *BondCreateReply) Size() (size int) {
   345  	if m == nil {
   346  		return 0
   347  	}
   348  	size += 4 // m.Retval
   349  	size += 4 // m.SwIfIndex
   350  	return size
   351  }
   352  func (m *BondCreateReply) Marshal(b []byte) ([]byte, error) {
   353  	if b == nil {
   354  		b = make([]byte, m.Size())
   355  	}
   356  	buf := codec.NewBuffer(b)
   357  	buf.EncodeInt32(m.Retval)
   358  	buf.EncodeUint32(uint32(m.SwIfIndex))
   359  	return buf.Bytes(), nil
   360  }
   361  func (m *BondCreateReply) Unmarshal(b []byte) error {
   362  	buf := codec.NewBuffer(b)
   363  	m.Retval = buf.DecodeInt32()
   364  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   365  	return nil
   366  }
   367  
   368  // BondDelete defines message 'bond_delete'.
   369  type BondDelete struct {
   370  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   371  }
   372  
   373  func (m *BondDelete) Reset()               { *m = BondDelete{} }
   374  func (*BondDelete) GetMessageName() string { return "bond_delete" }
   375  func (*BondDelete) GetCrcString() string   { return "f9e6675e" }
   376  func (*BondDelete) GetMessageType() api.MessageType {
   377  	return api.RequestMessage
   378  }
   379  
   380  func (m *BondDelete) Size() (size int) {
   381  	if m == nil {
   382  		return 0
   383  	}
   384  	size += 4 // m.SwIfIndex
   385  	return size
   386  }
   387  func (m *BondDelete) Marshal(b []byte) ([]byte, error) {
   388  	if b == nil {
   389  		b = make([]byte, m.Size())
   390  	}
   391  	buf := codec.NewBuffer(b)
   392  	buf.EncodeUint32(uint32(m.SwIfIndex))
   393  	return buf.Bytes(), nil
   394  }
   395  func (m *BondDelete) Unmarshal(b []byte) error {
   396  	buf := codec.NewBuffer(b)
   397  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   398  	return nil
   399  }
   400  
   401  // BondDeleteReply defines message 'bond_delete_reply'.
   402  type BondDeleteReply struct {
   403  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   404  }
   405  
   406  func (m *BondDeleteReply) Reset()               { *m = BondDeleteReply{} }
   407  func (*BondDeleteReply) GetMessageName() string { return "bond_delete_reply" }
   408  func (*BondDeleteReply) GetCrcString() string   { return "e8d4e804" }
   409  func (*BondDeleteReply) GetMessageType() api.MessageType {
   410  	return api.ReplyMessage
   411  }
   412  
   413  func (m *BondDeleteReply) Size() (size int) {
   414  	if m == nil {
   415  		return 0
   416  	}
   417  	size += 4 // m.Retval
   418  	return size
   419  }
   420  func (m *BondDeleteReply) Marshal(b []byte) ([]byte, error) {
   421  	if b == nil {
   422  		b = make([]byte, m.Size())
   423  	}
   424  	buf := codec.NewBuffer(b)
   425  	buf.EncodeInt32(m.Retval)
   426  	return buf.Bytes(), nil
   427  }
   428  func (m *BondDeleteReply) Unmarshal(b []byte) error {
   429  	buf := codec.NewBuffer(b)
   430  	m.Retval = buf.DecodeInt32()
   431  	return nil
   432  }
   433  
   434  // BondDetachMember defines message 'bond_detach_member'.
   435  type BondDetachMember struct {
   436  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   437  }
   438  
   439  func (m *BondDetachMember) Reset()               { *m = BondDetachMember{} }
   440  func (*BondDetachMember) GetMessageName() string { return "bond_detach_member" }
   441  func (*BondDetachMember) GetCrcString() string   { return "f9e6675e" }
   442  func (*BondDetachMember) GetMessageType() api.MessageType {
   443  	return api.RequestMessage
   444  }
   445  
   446  func (m *BondDetachMember) Size() (size int) {
   447  	if m == nil {
   448  		return 0
   449  	}
   450  	size += 4 // m.SwIfIndex
   451  	return size
   452  }
   453  func (m *BondDetachMember) Marshal(b []byte) ([]byte, error) {
   454  	if b == nil {
   455  		b = make([]byte, m.Size())
   456  	}
   457  	buf := codec.NewBuffer(b)
   458  	buf.EncodeUint32(uint32(m.SwIfIndex))
   459  	return buf.Bytes(), nil
   460  }
   461  func (m *BondDetachMember) Unmarshal(b []byte) error {
   462  	buf := codec.NewBuffer(b)
   463  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   464  	return nil
   465  }
   466  
   467  // BondDetachMemberReply defines message 'bond_detach_member_reply'.
   468  type BondDetachMemberReply struct {
   469  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   470  }
   471  
   472  func (m *BondDetachMemberReply) Reset()               { *m = BondDetachMemberReply{} }
   473  func (*BondDetachMemberReply) GetMessageName() string { return "bond_detach_member_reply" }
   474  func (*BondDetachMemberReply) GetCrcString() string   { return "e8d4e804" }
   475  func (*BondDetachMemberReply) GetMessageType() api.MessageType {
   476  	return api.ReplyMessage
   477  }
   478  
   479  func (m *BondDetachMemberReply) Size() (size int) {
   480  	if m == nil {
   481  		return 0
   482  	}
   483  	size += 4 // m.Retval
   484  	return size
   485  }
   486  func (m *BondDetachMemberReply) Marshal(b []byte) ([]byte, error) {
   487  	if b == nil {
   488  		b = make([]byte, m.Size())
   489  	}
   490  	buf := codec.NewBuffer(b)
   491  	buf.EncodeInt32(m.Retval)
   492  	return buf.Bytes(), nil
   493  }
   494  func (m *BondDetachMemberReply) Unmarshal(b []byte) error {
   495  	buf := codec.NewBuffer(b)
   496  	m.Retval = buf.DecodeInt32()
   497  	return nil
   498  }
   499  
   500  // BondDetachSlave defines message 'bond_detach_slave'.
   501  type BondDetachSlave struct {
   502  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   503  }
   504  
   505  func (m *BondDetachSlave) Reset()               { *m = BondDetachSlave{} }
   506  func (*BondDetachSlave) GetMessageName() string { return "bond_detach_slave" }
   507  func (*BondDetachSlave) GetCrcString() string   { return "f9e6675e" }
   508  func (*BondDetachSlave) GetMessageType() api.MessageType {
   509  	return api.RequestMessage
   510  }
   511  
   512  func (m *BondDetachSlave) Size() (size int) {
   513  	if m == nil {
   514  		return 0
   515  	}
   516  	size += 4 // m.SwIfIndex
   517  	return size
   518  }
   519  func (m *BondDetachSlave) Marshal(b []byte) ([]byte, error) {
   520  	if b == nil {
   521  		b = make([]byte, m.Size())
   522  	}
   523  	buf := codec.NewBuffer(b)
   524  	buf.EncodeUint32(uint32(m.SwIfIndex))
   525  	return buf.Bytes(), nil
   526  }
   527  func (m *BondDetachSlave) Unmarshal(b []byte) error {
   528  	buf := codec.NewBuffer(b)
   529  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   530  	return nil
   531  }
   532  
   533  // BondDetachSlaveReply defines message 'bond_detach_slave_reply'.
   534  type BondDetachSlaveReply struct {
   535  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   536  }
   537  
   538  func (m *BondDetachSlaveReply) Reset()               { *m = BondDetachSlaveReply{} }
   539  func (*BondDetachSlaveReply) GetMessageName() string { return "bond_detach_slave_reply" }
   540  func (*BondDetachSlaveReply) GetCrcString() string   { return "e8d4e804" }
   541  func (*BondDetachSlaveReply) GetMessageType() api.MessageType {
   542  	return api.ReplyMessage
   543  }
   544  
   545  func (m *BondDetachSlaveReply) Size() (size int) {
   546  	if m == nil {
   547  		return 0
   548  	}
   549  	size += 4 // m.Retval
   550  	return size
   551  }
   552  func (m *BondDetachSlaveReply) Marshal(b []byte) ([]byte, error) {
   553  	if b == nil {
   554  		b = make([]byte, m.Size())
   555  	}
   556  	buf := codec.NewBuffer(b)
   557  	buf.EncodeInt32(m.Retval)
   558  	return buf.Bytes(), nil
   559  }
   560  func (m *BondDetachSlaveReply) Unmarshal(b []byte) error {
   561  	buf := codec.NewBuffer(b)
   562  	m.Retval = buf.DecodeInt32()
   563  	return nil
   564  }
   565  
   566  // BondEnslave defines message 'bond_enslave'.
   567  type BondEnslave struct {
   568  	SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   569  	BondSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=bond_sw_if_index" json:"bond_sw_if_index,omitempty"`
   570  	IsPassive     bool                           `binapi:"bool,name=is_passive" json:"is_passive,omitempty"`
   571  	IsLongTimeout bool                           `binapi:"bool,name=is_long_timeout" json:"is_long_timeout,omitempty"`
   572  }
   573  
   574  func (m *BondEnslave) Reset()               { *m = BondEnslave{} }
   575  func (*BondEnslave) GetMessageName() string { return "bond_enslave" }
   576  func (*BondEnslave) GetCrcString() string   { return "076ecfa7" }
   577  func (*BondEnslave) GetMessageType() api.MessageType {
   578  	return api.RequestMessage
   579  }
   580  
   581  func (m *BondEnslave) Size() (size int) {
   582  	if m == nil {
   583  		return 0
   584  	}
   585  	size += 4 // m.SwIfIndex
   586  	size += 4 // m.BondSwIfIndex
   587  	size += 1 // m.IsPassive
   588  	size += 1 // m.IsLongTimeout
   589  	return size
   590  }
   591  func (m *BondEnslave) Marshal(b []byte) ([]byte, error) {
   592  	if b == nil {
   593  		b = make([]byte, m.Size())
   594  	}
   595  	buf := codec.NewBuffer(b)
   596  	buf.EncodeUint32(uint32(m.SwIfIndex))
   597  	buf.EncodeUint32(uint32(m.BondSwIfIndex))
   598  	buf.EncodeBool(m.IsPassive)
   599  	buf.EncodeBool(m.IsLongTimeout)
   600  	return buf.Bytes(), nil
   601  }
   602  func (m *BondEnslave) Unmarshal(b []byte) error {
   603  	buf := codec.NewBuffer(b)
   604  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   605  	m.BondSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   606  	m.IsPassive = buf.DecodeBool()
   607  	m.IsLongTimeout = buf.DecodeBool()
   608  	return nil
   609  }
   610  
   611  // BondEnslaveReply defines message 'bond_enslave_reply'.
   612  type BondEnslaveReply struct {
   613  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   614  }
   615  
   616  func (m *BondEnslaveReply) Reset()               { *m = BondEnslaveReply{} }
   617  func (*BondEnslaveReply) GetMessageName() string { return "bond_enslave_reply" }
   618  func (*BondEnslaveReply) GetCrcString() string   { return "e8d4e804" }
   619  func (*BondEnslaveReply) GetMessageType() api.MessageType {
   620  	return api.ReplyMessage
   621  }
   622  
   623  func (m *BondEnslaveReply) Size() (size int) {
   624  	if m == nil {
   625  		return 0
   626  	}
   627  	size += 4 // m.Retval
   628  	return size
   629  }
   630  func (m *BondEnslaveReply) Marshal(b []byte) ([]byte, error) {
   631  	if b == nil {
   632  		b = make([]byte, m.Size())
   633  	}
   634  	buf := codec.NewBuffer(b)
   635  	buf.EncodeInt32(m.Retval)
   636  	return buf.Bytes(), nil
   637  }
   638  func (m *BondEnslaveReply) Unmarshal(b []byte) error {
   639  	buf := codec.NewBuffer(b)
   640  	m.Retval = buf.DecodeInt32()
   641  	return nil
   642  }
   643  
   644  // SwBondInterfaceDetails defines message 'sw_bond_interface_details'.
   645  type SwBondInterfaceDetails struct {
   646  	SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   647  	ID            uint32                         `binapi:"u32,name=id" json:"id,omitempty"`
   648  	Mode          BondMode                       `binapi:"bond_mode,name=mode" json:"mode,omitempty"`
   649  	Lb            BondLbAlgo                     `binapi:"bond_lb_algo,name=lb" json:"lb,omitempty"`
   650  	NumaOnly      bool                           `binapi:"bool,name=numa_only" json:"numa_only,omitempty"`
   651  	ActiveMembers uint32                         `binapi:"u32,name=active_members" json:"active_members,omitempty"`
   652  	Members       uint32                         `binapi:"u32,name=members" json:"members,omitempty"`
   653  	InterfaceName string                         `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
   654  }
   655  
   656  func (m *SwBondInterfaceDetails) Reset()               { *m = SwBondInterfaceDetails{} }
   657  func (*SwBondInterfaceDetails) GetMessageName() string { return "sw_bond_interface_details" }
   658  func (*SwBondInterfaceDetails) GetCrcString() string   { return "9428a69c" }
   659  func (*SwBondInterfaceDetails) GetMessageType() api.MessageType {
   660  	return api.ReplyMessage
   661  }
   662  
   663  func (m *SwBondInterfaceDetails) Size() (size int) {
   664  	if m == nil {
   665  		return 0
   666  	}
   667  	size += 4  // m.SwIfIndex
   668  	size += 4  // m.ID
   669  	size += 4  // m.Mode
   670  	size += 4  // m.Lb
   671  	size += 1  // m.NumaOnly
   672  	size += 4  // m.ActiveMembers
   673  	size += 4  // m.Members
   674  	size += 64 // m.InterfaceName
   675  	return size
   676  }
   677  func (m *SwBondInterfaceDetails) Marshal(b []byte) ([]byte, error) {
   678  	if b == nil {
   679  		b = make([]byte, m.Size())
   680  	}
   681  	buf := codec.NewBuffer(b)
   682  	buf.EncodeUint32(uint32(m.SwIfIndex))
   683  	buf.EncodeUint32(m.ID)
   684  	buf.EncodeUint32(uint32(m.Mode))
   685  	buf.EncodeUint32(uint32(m.Lb))
   686  	buf.EncodeBool(m.NumaOnly)
   687  	buf.EncodeUint32(m.ActiveMembers)
   688  	buf.EncodeUint32(m.Members)
   689  	buf.EncodeString(m.InterfaceName, 64)
   690  	return buf.Bytes(), nil
   691  }
   692  func (m *SwBondInterfaceDetails) Unmarshal(b []byte) error {
   693  	buf := codec.NewBuffer(b)
   694  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   695  	m.ID = buf.DecodeUint32()
   696  	m.Mode = BondMode(buf.DecodeUint32())
   697  	m.Lb = BondLbAlgo(buf.DecodeUint32())
   698  	m.NumaOnly = buf.DecodeBool()
   699  	m.ActiveMembers = buf.DecodeUint32()
   700  	m.Members = buf.DecodeUint32()
   701  	m.InterfaceName = buf.DecodeString(64)
   702  	return nil
   703  }
   704  
   705  // SwBondInterfaceDump defines message 'sw_bond_interface_dump'.
   706  type SwBondInterfaceDump struct {
   707  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
   708  }
   709  
   710  func (m *SwBondInterfaceDump) Reset()               { *m = SwBondInterfaceDump{} }
   711  func (*SwBondInterfaceDump) GetMessageName() string { return "sw_bond_interface_dump" }
   712  func (*SwBondInterfaceDump) GetCrcString() string   { return "f9e6675e" }
   713  func (*SwBondInterfaceDump) GetMessageType() api.MessageType {
   714  	return api.RequestMessage
   715  }
   716  
   717  func (m *SwBondInterfaceDump) Size() (size int) {
   718  	if m == nil {
   719  		return 0
   720  	}
   721  	size += 4 // m.SwIfIndex
   722  	return size
   723  }
   724  func (m *SwBondInterfaceDump) Marshal(b []byte) ([]byte, error) {
   725  	if b == nil {
   726  		b = make([]byte, m.Size())
   727  	}
   728  	buf := codec.NewBuffer(b)
   729  	buf.EncodeUint32(uint32(m.SwIfIndex))
   730  	return buf.Bytes(), nil
   731  }
   732  func (m *SwBondInterfaceDump) Unmarshal(b []byte) error {
   733  	buf := codec.NewBuffer(b)
   734  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   735  	return nil
   736  }
   737  
   738  // SwInterfaceBondDetails defines message 'sw_interface_bond_details'.
   739  type SwInterfaceBondDetails struct {
   740  	SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   741  	ID            uint32                         `binapi:"u32,name=id" json:"id,omitempty"`
   742  	Mode          BondMode                       `binapi:"bond_mode,name=mode" json:"mode,omitempty"`
   743  	Lb            BondLbAlgo                     `binapi:"bond_lb_algo,name=lb" json:"lb,omitempty"`
   744  	NumaOnly      bool                           `binapi:"bool,name=numa_only" json:"numa_only,omitempty"`
   745  	ActiveSlaves  uint32                         `binapi:"u32,name=active_slaves" json:"active_slaves,omitempty"`
   746  	Slaves        uint32                         `binapi:"u32,name=slaves" json:"slaves,omitempty"`
   747  	InterfaceName string                         `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
   748  }
   749  
   750  func (m *SwInterfaceBondDetails) Reset()               { *m = SwInterfaceBondDetails{} }
   751  func (*SwInterfaceBondDetails) GetMessageName() string { return "sw_interface_bond_details" }
   752  func (*SwInterfaceBondDetails) GetCrcString() string   { return "f5ef2106" }
   753  func (*SwInterfaceBondDetails) GetMessageType() api.MessageType {
   754  	return api.ReplyMessage
   755  }
   756  
   757  func (m *SwInterfaceBondDetails) Size() (size int) {
   758  	if m == nil {
   759  		return 0
   760  	}
   761  	size += 4  // m.SwIfIndex
   762  	size += 4  // m.ID
   763  	size += 4  // m.Mode
   764  	size += 4  // m.Lb
   765  	size += 1  // m.NumaOnly
   766  	size += 4  // m.ActiveSlaves
   767  	size += 4  // m.Slaves
   768  	size += 64 // m.InterfaceName
   769  	return size
   770  }
   771  func (m *SwInterfaceBondDetails) Marshal(b []byte) ([]byte, error) {
   772  	if b == nil {
   773  		b = make([]byte, m.Size())
   774  	}
   775  	buf := codec.NewBuffer(b)
   776  	buf.EncodeUint32(uint32(m.SwIfIndex))
   777  	buf.EncodeUint32(m.ID)
   778  	buf.EncodeUint32(uint32(m.Mode))
   779  	buf.EncodeUint32(uint32(m.Lb))
   780  	buf.EncodeBool(m.NumaOnly)
   781  	buf.EncodeUint32(m.ActiveSlaves)
   782  	buf.EncodeUint32(m.Slaves)
   783  	buf.EncodeString(m.InterfaceName, 64)
   784  	return buf.Bytes(), nil
   785  }
   786  func (m *SwInterfaceBondDetails) Unmarshal(b []byte) error {
   787  	buf := codec.NewBuffer(b)
   788  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   789  	m.ID = buf.DecodeUint32()
   790  	m.Mode = BondMode(buf.DecodeUint32())
   791  	m.Lb = BondLbAlgo(buf.DecodeUint32())
   792  	m.NumaOnly = buf.DecodeBool()
   793  	m.ActiveSlaves = buf.DecodeUint32()
   794  	m.Slaves = buf.DecodeUint32()
   795  	m.InterfaceName = buf.DecodeString(64)
   796  	return nil
   797  }
   798  
   799  // SwInterfaceBondDump defines message 'sw_interface_bond_dump'.
   800  type SwInterfaceBondDump struct{}
   801  
   802  func (m *SwInterfaceBondDump) Reset()               { *m = SwInterfaceBondDump{} }
   803  func (*SwInterfaceBondDump) GetMessageName() string { return "sw_interface_bond_dump" }
   804  func (*SwInterfaceBondDump) GetCrcString() string   { return "51077d14" }
   805  func (*SwInterfaceBondDump) GetMessageType() api.MessageType {
   806  	return api.RequestMessage
   807  }
   808  
   809  func (m *SwInterfaceBondDump) Size() (size int) {
   810  	if m == nil {
   811  		return 0
   812  	}
   813  	return size
   814  }
   815  func (m *SwInterfaceBondDump) Marshal(b []byte) ([]byte, error) {
   816  	if b == nil {
   817  		b = make([]byte, m.Size())
   818  	}
   819  	buf := codec.NewBuffer(b)
   820  	return buf.Bytes(), nil
   821  }
   822  func (m *SwInterfaceBondDump) Unmarshal(b []byte) error {
   823  	return nil
   824  }
   825  
   826  // SwInterfaceSetBondWeight defines message 'sw_interface_set_bond_weight'.
   827  type SwInterfaceSetBondWeight struct {
   828  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   829  	Weight    uint32                         `binapi:"u32,name=weight" json:"weight,omitempty"`
   830  }
   831  
   832  func (m *SwInterfaceSetBondWeight) Reset()               { *m = SwInterfaceSetBondWeight{} }
   833  func (*SwInterfaceSetBondWeight) GetMessageName() string { return "sw_interface_set_bond_weight" }
   834  func (*SwInterfaceSetBondWeight) GetCrcString() string   { return "deb510a0" }
   835  func (*SwInterfaceSetBondWeight) GetMessageType() api.MessageType {
   836  	return api.RequestMessage
   837  }
   838  
   839  func (m *SwInterfaceSetBondWeight) Size() (size int) {
   840  	if m == nil {
   841  		return 0
   842  	}
   843  	size += 4 // m.SwIfIndex
   844  	size += 4 // m.Weight
   845  	return size
   846  }
   847  func (m *SwInterfaceSetBondWeight) Marshal(b []byte) ([]byte, error) {
   848  	if b == nil {
   849  		b = make([]byte, m.Size())
   850  	}
   851  	buf := codec.NewBuffer(b)
   852  	buf.EncodeUint32(uint32(m.SwIfIndex))
   853  	buf.EncodeUint32(m.Weight)
   854  	return buf.Bytes(), nil
   855  }
   856  func (m *SwInterfaceSetBondWeight) Unmarshal(b []byte) error {
   857  	buf := codec.NewBuffer(b)
   858  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   859  	m.Weight = buf.DecodeUint32()
   860  	return nil
   861  }
   862  
   863  // SwInterfaceSetBondWeightReply defines message 'sw_interface_set_bond_weight_reply'.
   864  type SwInterfaceSetBondWeightReply struct {
   865  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   866  }
   867  
   868  func (m *SwInterfaceSetBondWeightReply) Reset() { *m = SwInterfaceSetBondWeightReply{} }
   869  func (*SwInterfaceSetBondWeightReply) GetMessageName() string {
   870  	return "sw_interface_set_bond_weight_reply"
   871  }
   872  func (*SwInterfaceSetBondWeightReply) GetCrcString() string { return "e8d4e804" }
   873  func (*SwInterfaceSetBondWeightReply) GetMessageType() api.MessageType {
   874  	return api.ReplyMessage
   875  }
   876  
   877  func (m *SwInterfaceSetBondWeightReply) Size() (size int) {
   878  	if m == nil {
   879  		return 0
   880  	}
   881  	size += 4 // m.Retval
   882  	return size
   883  }
   884  func (m *SwInterfaceSetBondWeightReply) Marshal(b []byte) ([]byte, error) {
   885  	if b == nil {
   886  		b = make([]byte, m.Size())
   887  	}
   888  	buf := codec.NewBuffer(b)
   889  	buf.EncodeInt32(m.Retval)
   890  	return buf.Bytes(), nil
   891  }
   892  func (m *SwInterfaceSetBondWeightReply) Unmarshal(b []byte) error {
   893  	buf := codec.NewBuffer(b)
   894  	m.Retval = buf.DecodeInt32()
   895  	return nil
   896  }
   897  
   898  // SwInterfaceSlaveDetails defines message 'sw_interface_slave_details'.
   899  type SwInterfaceSlaveDetails struct {
   900  	SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   901  	InterfaceName string                         `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
   902  	IsPassive     bool                           `binapi:"bool,name=is_passive" json:"is_passive,omitempty"`
   903  	IsLongTimeout bool                           `binapi:"bool,name=is_long_timeout" json:"is_long_timeout,omitempty"`
   904  	IsLocalNuma   bool                           `binapi:"bool,name=is_local_numa" json:"is_local_numa,omitempty"`
   905  	Weight        uint32                         `binapi:"u32,name=weight" json:"weight,omitempty"`
   906  }
   907  
   908  func (m *SwInterfaceSlaveDetails) Reset()               { *m = SwInterfaceSlaveDetails{} }
   909  func (*SwInterfaceSlaveDetails) GetMessageName() string { return "sw_interface_slave_details" }
   910  func (*SwInterfaceSlaveDetails) GetCrcString() string   { return "3c4a0e23" }
   911  func (*SwInterfaceSlaveDetails) GetMessageType() api.MessageType {
   912  	return api.ReplyMessage
   913  }
   914  
   915  func (m *SwInterfaceSlaveDetails) Size() (size int) {
   916  	if m == nil {
   917  		return 0
   918  	}
   919  	size += 4  // m.SwIfIndex
   920  	size += 64 // m.InterfaceName
   921  	size += 1  // m.IsPassive
   922  	size += 1  // m.IsLongTimeout
   923  	size += 1  // m.IsLocalNuma
   924  	size += 4  // m.Weight
   925  	return size
   926  }
   927  func (m *SwInterfaceSlaveDetails) Marshal(b []byte) ([]byte, error) {
   928  	if b == nil {
   929  		b = make([]byte, m.Size())
   930  	}
   931  	buf := codec.NewBuffer(b)
   932  	buf.EncodeUint32(uint32(m.SwIfIndex))
   933  	buf.EncodeString(m.InterfaceName, 64)
   934  	buf.EncodeBool(m.IsPassive)
   935  	buf.EncodeBool(m.IsLongTimeout)
   936  	buf.EncodeBool(m.IsLocalNuma)
   937  	buf.EncodeUint32(m.Weight)
   938  	return buf.Bytes(), nil
   939  }
   940  func (m *SwInterfaceSlaveDetails) Unmarshal(b []byte) error {
   941  	buf := codec.NewBuffer(b)
   942  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   943  	m.InterfaceName = buf.DecodeString(64)
   944  	m.IsPassive = buf.DecodeBool()
   945  	m.IsLongTimeout = buf.DecodeBool()
   946  	m.IsLocalNuma = buf.DecodeBool()
   947  	m.Weight = buf.DecodeUint32()
   948  	return nil
   949  }
   950  
   951  // SwInterfaceSlaveDump defines message 'sw_interface_slave_dump'.
   952  type SwInterfaceSlaveDump struct {
   953  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   954  }
   955  
   956  func (m *SwInterfaceSlaveDump) Reset()               { *m = SwInterfaceSlaveDump{} }
   957  func (*SwInterfaceSlaveDump) GetMessageName() string { return "sw_interface_slave_dump" }
   958  func (*SwInterfaceSlaveDump) GetCrcString() string   { return "f9e6675e" }
   959  func (*SwInterfaceSlaveDump) GetMessageType() api.MessageType {
   960  	return api.RequestMessage
   961  }
   962  
   963  func (m *SwInterfaceSlaveDump) Size() (size int) {
   964  	if m == nil {
   965  		return 0
   966  	}
   967  	size += 4 // m.SwIfIndex
   968  	return size
   969  }
   970  func (m *SwInterfaceSlaveDump) Marshal(b []byte) ([]byte, error) {
   971  	if b == nil {
   972  		b = make([]byte, m.Size())
   973  	}
   974  	buf := codec.NewBuffer(b)
   975  	buf.EncodeUint32(uint32(m.SwIfIndex))
   976  	return buf.Bytes(), nil
   977  }
   978  func (m *SwInterfaceSlaveDump) Unmarshal(b []byte) error {
   979  	buf := codec.NewBuffer(b)
   980  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   981  	return nil
   982  }
   983  
   984  // SwMemberInterfaceDetails defines message 'sw_member_interface_details'.
   985  type SwMemberInterfaceDetails struct {
   986  	SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   987  	InterfaceName string                         `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
   988  	IsPassive     bool                           `binapi:"bool,name=is_passive" json:"is_passive,omitempty"`
   989  	IsLongTimeout bool                           `binapi:"bool,name=is_long_timeout" json:"is_long_timeout,omitempty"`
   990  	IsLocalNuma   bool                           `binapi:"bool,name=is_local_numa" json:"is_local_numa,omitempty"`
   991  	Weight        uint32                         `binapi:"u32,name=weight" json:"weight,omitempty"`
   992  }
   993  
   994  func (m *SwMemberInterfaceDetails) Reset()               { *m = SwMemberInterfaceDetails{} }
   995  func (*SwMemberInterfaceDetails) GetMessageName() string { return "sw_member_interface_details" }
   996  func (*SwMemberInterfaceDetails) GetCrcString() string   { return "3c4a0e23" }
   997  func (*SwMemberInterfaceDetails) GetMessageType() api.MessageType {
   998  	return api.ReplyMessage
   999  }
  1000  
  1001  func (m *SwMemberInterfaceDetails) Size() (size int) {
  1002  	if m == nil {
  1003  		return 0
  1004  	}
  1005  	size += 4  // m.SwIfIndex
  1006  	size += 64 // m.InterfaceName
  1007  	size += 1  // m.IsPassive
  1008  	size += 1  // m.IsLongTimeout
  1009  	size += 1  // m.IsLocalNuma
  1010  	size += 4  // m.Weight
  1011  	return size
  1012  }
  1013  func (m *SwMemberInterfaceDetails) Marshal(b []byte) ([]byte, error) {
  1014  	if b == nil {
  1015  		b = make([]byte, m.Size())
  1016  	}
  1017  	buf := codec.NewBuffer(b)
  1018  	buf.EncodeUint32(uint32(m.SwIfIndex))
  1019  	buf.EncodeString(m.InterfaceName, 64)
  1020  	buf.EncodeBool(m.IsPassive)
  1021  	buf.EncodeBool(m.IsLongTimeout)
  1022  	buf.EncodeBool(m.IsLocalNuma)
  1023  	buf.EncodeUint32(m.Weight)
  1024  	return buf.Bytes(), nil
  1025  }
  1026  func (m *SwMemberInterfaceDetails) Unmarshal(b []byte) error {
  1027  	buf := codec.NewBuffer(b)
  1028  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1029  	m.InterfaceName = buf.DecodeString(64)
  1030  	m.IsPassive = buf.DecodeBool()
  1031  	m.IsLongTimeout = buf.DecodeBool()
  1032  	m.IsLocalNuma = buf.DecodeBool()
  1033  	m.Weight = buf.DecodeUint32()
  1034  	return nil
  1035  }
  1036  
  1037  // SwMemberInterfaceDump defines message 'sw_member_interface_dump'.
  1038  type SwMemberInterfaceDump struct {
  1039  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
  1040  }
  1041  
  1042  func (m *SwMemberInterfaceDump) Reset()               { *m = SwMemberInterfaceDump{} }
  1043  func (*SwMemberInterfaceDump) GetMessageName() string { return "sw_member_interface_dump" }
  1044  func (*SwMemberInterfaceDump) GetCrcString() string   { return "f9e6675e" }
  1045  func (*SwMemberInterfaceDump) GetMessageType() api.MessageType {
  1046  	return api.RequestMessage
  1047  }
  1048  
  1049  func (m *SwMemberInterfaceDump) Size() (size int) {
  1050  	if m == nil {
  1051  		return 0
  1052  	}
  1053  	size += 4 // m.SwIfIndex
  1054  	return size
  1055  }
  1056  func (m *SwMemberInterfaceDump) Marshal(b []byte) ([]byte, error) {
  1057  	if b == nil {
  1058  		b = make([]byte, m.Size())
  1059  	}
  1060  	buf := codec.NewBuffer(b)
  1061  	buf.EncodeUint32(uint32(m.SwIfIndex))
  1062  	return buf.Bytes(), nil
  1063  }
  1064  func (m *SwMemberInterfaceDump) Unmarshal(b []byte) error {
  1065  	buf := codec.NewBuffer(b)
  1066  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1067  	return nil
  1068  }
  1069  
  1070  func init() { file_bond_binapi_init() }
  1071  func file_bond_binapi_init() {
  1072  	api.RegisterMessage((*BondAddMember)(nil), "bond_add_member_e7d14948")
  1073  	api.RegisterMessage((*BondAddMemberReply)(nil), "bond_add_member_reply_e8d4e804")
  1074  	api.RegisterMessage((*BondCreate)(nil), "bond_create_48883c7e")
  1075  	api.RegisterMessage((*BondCreate2)(nil), "bond_create2_912fda76")
  1076  	api.RegisterMessage((*BondCreate2Reply)(nil), "bond_create2_reply_5383d31f")
  1077  	api.RegisterMessage((*BondCreateReply)(nil), "bond_create_reply_5383d31f")
  1078  	api.RegisterMessage((*BondDelete)(nil), "bond_delete_f9e6675e")
  1079  	api.RegisterMessage((*BondDeleteReply)(nil), "bond_delete_reply_e8d4e804")
  1080  	api.RegisterMessage((*BondDetachMember)(nil), "bond_detach_member_f9e6675e")
  1081  	api.RegisterMessage((*BondDetachMemberReply)(nil), "bond_detach_member_reply_e8d4e804")
  1082  	api.RegisterMessage((*BondDetachSlave)(nil), "bond_detach_slave_f9e6675e")
  1083  	api.RegisterMessage((*BondDetachSlaveReply)(nil), "bond_detach_slave_reply_e8d4e804")
  1084  	api.RegisterMessage((*BondEnslave)(nil), "bond_enslave_076ecfa7")
  1085  	api.RegisterMessage((*BondEnslaveReply)(nil), "bond_enslave_reply_e8d4e804")
  1086  	api.RegisterMessage((*SwBondInterfaceDetails)(nil), "sw_bond_interface_details_9428a69c")
  1087  	api.RegisterMessage((*SwBondInterfaceDump)(nil), "sw_bond_interface_dump_f9e6675e")
  1088  	api.RegisterMessage((*SwInterfaceBondDetails)(nil), "sw_interface_bond_details_f5ef2106")
  1089  	api.RegisterMessage((*SwInterfaceBondDump)(nil), "sw_interface_bond_dump_51077d14")
  1090  	api.RegisterMessage((*SwInterfaceSetBondWeight)(nil), "sw_interface_set_bond_weight_deb510a0")
  1091  	api.RegisterMessage((*SwInterfaceSetBondWeightReply)(nil), "sw_interface_set_bond_weight_reply_e8d4e804")
  1092  	api.RegisterMessage((*SwInterfaceSlaveDetails)(nil), "sw_interface_slave_details_3c4a0e23")
  1093  	api.RegisterMessage((*SwInterfaceSlaveDump)(nil), "sw_interface_slave_dump_f9e6675e")
  1094  	api.RegisterMessage((*SwMemberInterfaceDetails)(nil), "sw_member_interface_details_3c4a0e23")
  1095  	api.RegisterMessage((*SwMemberInterfaceDump)(nil), "sw_member_interface_dump_f9e6675e")
  1096  }
  1097  
  1098  // Messages returns list of all messages in this module.
  1099  func AllMessages() []api.Message {
  1100  	return []api.Message{
  1101  		(*BondAddMember)(nil),
  1102  		(*BondAddMemberReply)(nil),
  1103  		(*BondCreate)(nil),
  1104  		(*BondCreate2)(nil),
  1105  		(*BondCreate2Reply)(nil),
  1106  		(*BondCreateReply)(nil),
  1107  		(*BondDelete)(nil),
  1108  		(*BondDeleteReply)(nil),
  1109  		(*BondDetachMember)(nil),
  1110  		(*BondDetachMemberReply)(nil),
  1111  		(*BondDetachSlave)(nil),
  1112  		(*BondDetachSlaveReply)(nil),
  1113  		(*BondEnslave)(nil),
  1114  		(*BondEnslaveReply)(nil),
  1115  		(*SwBondInterfaceDetails)(nil),
  1116  		(*SwBondInterfaceDump)(nil),
  1117  		(*SwInterfaceBondDetails)(nil),
  1118  		(*SwInterfaceBondDump)(nil),
  1119  		(*SwInterfaceSetBondWeight)(nil),
  1120  		(*SwInterfaceSetBondWeightReply)(nil),
  1121  		(*SwInterfaceSlaveDetails)(nil),
  1122  		(*SwInterfaceSlaveDump)(nil),
  1123  		(*SwMemberInterfaceDetails)(nil),
  1124  		(*SwMemberInterfaceDump)(nil),
  1125  	}
  1126  }