go.ligato.io/vpp-agent/v3@v3.5.0/plugins/vpp/binapi/vpp2106/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/vpp2106/ethernet_types"
    16  	interface_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2106/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 = 0xa03f5330
    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  // Deprecated: the message will be removed in the future versions
   186  type BondCreate struct {
   187  	ID           uint32                    `binapi:"u32,name=id,default=4294967295" json:"id,omitempty"`
   188  	UseCustomMac bool                      `binapi:"bool,name=use_custom_mac" json:"use_custom_mac,omitempty"`
   189  	MacAddress   ethernet_types.MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
   190  	Mode         BondMode                  `binapi:"bond_mode,name=mode" json:"mode,omitempty"`
   191  	Lb           BondLbAlgo                `binapi:"bond_lb_algo,name=lb" json:"lb,omitempty"`
   192  	NumaOnly     bool                      `binapi:"bool,name=numa_only" json:"numa_only,omitempty"`
   193  }
   194  
   195  func (m *BondCreate) Reset()               { *m = BondCreate{} }
   196  func (*BondCreate) GetMessageName() string { return "bond_create" }
   197  func (*BondCreate) GetCrcString() string   { return "f1dbd4ff" }
   198  func (*BondCreate) GetMessageType() api.MessageType {
   199  	return api.RequestMessage
   200  }
   201  
   202  func (m *BondCreate) Size() (size int) {
   203  	if m == nil {
   204  		return 0
   205  	}
   206  	size += 4     // m.ID
   207  	size += 1     // m.UseCustomMac
   208  	size += 1 * 6 // m.MacAddress
   209  	size += 4     // m.Mode
   210  	size += 4     // m.Lb
   211  	size += 1     // m.NumaOnly
   212  	return size
   213  }
   214  func (m *BondCreate) Marshal(b []byte) ([]byte, error) {
   215  	if b == nil {
   216  		b = make([]byte, m.Size())
   217  	}
   218  	buf := codec.NewBuffer(b)
   219  	buf.EncodeUint32(m.ID)
   220  	buf.EncodeBool(m.UseCustomMac)
   221  	buf.EncodeBytes(m.MacAddress[:], 6)
   222  	buf.EncodeUint32(uint32(m.Mode))
   223  	buf.EncodeUint32(uint32(m.Lb))
   224  	buf.EncodeBool(m.NumaOnly)
   225  	return buf.Bytes(), nil
   226  }
   227  func (m *BondCreate) Unmarshal(b []byte) error {
   228  	buf := codec.NewBuffer(b)
   229  	m.ID = buf.DecodeUint32()
   230  	m.UseCustomMac = buf.DecodeBool()
   231  	copy(m.MacAddress[:], buf.DecodeBytes(6))
   232  	m.Mode = BondMode(buf.DecodeUint32())
   233  	m.Lb = BondLbAlgo(buf.DecodeUint32())
   234  	m.NumaOnly = buf.DecodeBool()
   235  	return nil
   236  }
   237  
   238  // BondCreate2 defines message 'bond_create2'.
   239  type BondCreate2 struct {
   240  	Mode         BondMode                  `binapi:"bond_mode,name=mode" json:"mode,omitempty"`
   241  	Lb           BondLbAlgo                `binapi:"bond_lb_algo,name=lb" json:"lb,omitempty"`
   242  	NumaOnly     bool                      `binapi:"bool,name=numa_only" json:"numa_only,omitempty"`
   243  	EnableGso    bool                      `binapi:"bool,name=enable_gso" json:"enable_gso,omitempty"`
   244  	UseCustomMac bool                      `binapi:"bool,name=use_custom_mac" json:"use_custom_mac,omitempty"`
   245  	MacAddress   ethernet_types.MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
   246  	ID           uint32                    `binapi:"u32,name=id,default=4294967295" json:"id,omitempty"`
   247  }
   248  
   249  func (m *BondCreate2) Reset()               { *m = BondCreate2{} }
   250  func (*BondCreate2) GetMessageName() string { return "bond_create2" }
   251  func (*BondCreate2) GetCrcString() string   { return "912fda76" }
   252  func (*BondCreate2) GetMessageType() api.MessageType {
   253  	return api.RequestMessage
   254  }
   255  
   256  func (m *BondCreate2) Size() (size int) {
   257  	if m == nil {
   258  		return 0
   259  	}
   260  	size += 4     // m.Mode
   261  	size += 4     // m.Lb
   262  	size += 1     // m.NumaOnly
   263  	size += 1     // m.EnableGso
   264  	size += 1     // m.UseCustomMac
   265  	size += 1 * 6 // m.MacAddress
   266  	size += 4     // m.ID
   267  	return size
   268  }
   269  func (m *BondCreate2) Marshal(b []byte) ([]byte, error) {
   270  	if b == nil {
   271  		b = make([]byte, m.Size())
   272  	}
   273  	buf := codec.NewBuffer(b)
   274  	buf.EncodeUint32(uint32(m.Mode))
   275  	buf.EncodeUint32(uint32(m.Lb))
   276  	buf.EncodeBool(m.NumaOnly)
   277  	buf.EncodeBool(m.EnableGso)
   278  	buf.EncodeBool(m.UseCustomMac)
   279  	buf.EncodeBytes(m.MacAddress[:], 6)
   280  	buf.EncodeUint32(m.ID)
   281  	return buf.Bytes(), nil
   282  }
   283  func (m *BondCreate2) Unmarshal(b []byte) error {
   284  	buf := codec.NewBuffer(b)
   285  	m.Mode = BondMode(buf.DecodeUint32())
   286  	m.Lb = BondLbAlgo(buf.DecodeUint32())
   287  	m.NumaOnly = buf.DecodeBool()
   288  	m.EnableGso = buf.DecodeBool()
   289  	m.UseCustomMac = buf.DecodeBool()
   290  	copy(m.MacAddress[:], buf.DecodeBytes(6))
   291  	m.ID = buf.DecodeUint32()
   292  	return nil
   293  }
   294  
   295  // BondCreate2Reply defines message 'bond_create2_reply'.
   296  type BondCreate2Reply struct {
   297  	Retval    int32                          `binapi:"i32,name=retval" json:"retval,omitempty"`
   298  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   299  }
   300  
   301  func (m *BondCreate2Reply) Reset()               { *m = BondCreate2Reply{} }
   302  func (*BondCreate2Reply) GetMessageName() string { return "bond_create2_reply" }
   303  func (*BondCreate2Reply) GetCrcString() string   { return "5383d31f" }
   304  func (*BondCreate2Reply) GetMessageType() api.MessageType {
   305  	return api.ReplyMessage
   306  }
   307  
   308  func (m *BondCreate2Reply) Size() (size int) {
   309  	if m == nil {
   310  		return 0
   311  	}
   312  	size += 4 // m.Retval
   313  	size += 4 // m.SwIfIndex
   314  	return size
   315  }
   316  func (m *BondCreate2Reply) Marshal(b []byte) ([]byte, error) {
   317  	if b == nil {
   318  		b = make([]byte, m.Size())
   319  	}
   320  	buf := codec.NewBuffer(b)
   321  	buf.EncodeInt32(m.Retval)
   322  	buf.EncodeUint32(uint32(m.SwIfIndex))
   323  	return buf.Bytes(), nil
   324  }
   325  func (m *BondCreate2Reply) Unmarshal(b []byte) error {
   326  	buf := codec.NewBuffer(b)
   327  	m.Retval = buf.DecodeInt32()
   328  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   329  	return nil
   330  }
   331  
   332  // BondCreateReply defines message 'bond_create_reply'.
   333  type BondCreateReply struct {
   334  	Retval    int32                          `binapi:"i32,name=retval" json:"retval,omitempty"`
   335  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   336  }
   337  
   338  func (m *BondCreateReply) Reset()               { *m = BondCreateReply{} }
   339  func (*BondCreateReply) GetMessageName() string { return "bond_create_reply" }
   340  func (*BondCreateReply) GetCrcString() string   { return "5383d31f" }
   341  func (*BondCreateReply) GetMessageType() api.MessageType {
   342  	return api.ReplyMessage
   343  }
   344  
   345  func (m *BondCreateReply) Size() (size int) {
   346  	if m == nil {
   347  		return 0
   348  	}
   349  	size += 4 // m.Retval
   350  	size += 4 // m.SwIfIndex
   351  	return size
   352  }
   353  func (m *BondCreateReply) Marshal(b []byte) ([]byte, error) {
   354  	if b == nil {
   355  		b = make([]byte, m.Size())
   356  	}
   357  	buf := codec.NewBuffer(b)
   358  	buf.EncodeInt32(m.Retval)
   359  	buf.EncodeUint32(uint32(m.SwIfIndex))
   360  	return buf.Bytes(), nil
   361  }
   362  func (m *BondCreateReply) Unmarshal(b []byte) error {
   363  	buf := codec.NewBuffer(b)
   364  	m.Retval = buf.DecodeInt32()
   365  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   366  	return nil
   367  }
   368  
   369  // BondDelete defines message 'bond_delete'.
   370  type BondDelete struct {
   371  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   372  }
   373  
   374  func (m *BondDelete) Reset()               { *m = BondDelete{} }
   375  func (*BondDelete) GetMessageName() string { return "bond_delete" }
   376  func (*BondDelete) GetCrcString() string   { return "f9e6675e" }
   377  func (*BondDelete) GetMessageType() api.MessageType {
   378  	return api.RequestMessage
   379  }
   380  
   381  func (m *BondDelete) Size() (size int) {
   382  	if m == nil {
   383  		return 0
   384  	}
   385  	size += 4 // m.SwIfIndex
   386  	return size
   387  }
   388  func (m *BondDelete) Marshal(b []byte) ([]byte, error) {
   389  	if b == nil {
   390  		b = make([]byte, m.Size())
   391  	}
   392  	buf := codec.NewBuffer(b)
   393  	buf.EncodeUint32(uint32(m.SwIfIndex))
   394  	return buf.Bytes(), nil
   395  }
   396  func (m *BondDelete) Unmarshal(b []byte) error {
   397  	buf := codec.NewBuffer(b)
   398  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   399  	return nil
   400  }
   401  
   402  // BondDeleteReply defines message 'bond_delete_reply'.
   403  type BondDeleteReply struct {
   404  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   405  }
   406  
   407  func (m *BondDeleteReply) Reset()               { *m = BondDeleteReply{} }
   408  func (*BondDeleteReply) GetMessageName() string { return "bond_delete_reply" }
   409  func (*BondDeleteReply) GetCrcString() string   { return "e8d4e804" }
   410  func (*BondDeleteReply) GetMessageType() api.MessageType {
   411  	return api.ReplyMessage
   412  }
   413  
   414  func (m *BondDeleteReply) Size() (size int) {
   415  	if m == nil {
   416  		return 0
   417  	}
   418  	size += 4 // m.Retval
   419  	return size
   420  }
   421  func (m *BondDeleteReply) Marshal(b []byte) ([]byte, error) {
   422  	if b == nil {
   423  		b = make([]byte, m.Size())
   424  	}
   425  	buf := codec.NewBuffer(b)
   426  	buf.EncodeInt32(m.Retval)
   427  	return buf.Bytes(), nil
   428  }
   429  func (m *BondDeleteReply) Unmarshal(b []byte) error {
   430  	buf := codec.NewBuffer(b)
   431  	m.Retval = buf.DecodeInt32()
   432  	return nil
   433  }
   434  
   435  // BondDetachMember defines message 'bond_detach_member'.
   436  type BondDetachMember struct {
   437  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   438  }
   439  
   440  func (m *BondDetachMember) Reset()               { *m = BondDetachMember{} }
   441  func (*BondDetachMember) GetMessageName() string { return "bond_detach_member" }
   442  func (*BondDetachMember) GetCrcString() string   { return "f9e6675e" }
   443  func (*BondDetachMember) GetMessageType() api.MessageType {
   444  	return api.RequestMessage
   445  }
   446  
   447  func (m *BondDetachMember) Size() (size int) {
   448  	if m == nil {
   449  		return 0
   450  	}
   451  	size += 4 // m.SwIfIndex
   452  	return size
   453  }
   454  func (m *BondDetachMember) Marshal(b []byte) ([]byte, error) {
   455  	if b == nil {
   456  		b = make([]byte, m.Size())
   457  	}
   458  	buf := codec.NewBuffer(b)
   459  	buf.EncodeUint32(uint32(m.SwIfIndex))
   460  	return buf.Bytes(), nil
   461  }
   462  func (m *BondDetachMember) Unmarshal(b []byte) error {
   463  	buf := codec.NewBuffer(b)
   464  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   465  	return nil
   466  }
   467  
   468  // BondDetachMemberReply defines message 'bond_detach_member_reply'.
   469  type BondDetachMemberReply struct {
   470  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   471  }
   472  
   473  func (m *BondDetachMemberReply) Reset()               { *m = BondDetachMemberReply{} }
   474  func (*BondDetachMemberReply) GetMessageName() string { return "bond_detach_member_reply" }
   475  func (*BondDetachMemberReply) GetCrcString() string   { return "e8d4e804" }
   476  func (*BondDetachMemberReply) GetMessageType() api.MessageType {
   477  	return api.ReplyMessage
   478  }
   479  
   480  func (m *BondDetachMemberReply) Size() (size int) {
   481  	if m == nil {
   482  		return 0
   483  	}
   484  	size += 4 // m.Retval
   485  	return size
   486  }
   487  func (m *BondDetachMemberReply) Marshal(b []byte) ([]byte, error) {
   488  	if b == nil {
   489  		b = make([]byte, m.Size())
   490  	}
   491  	buf := codec.NewBuffer(b)
   492  	buf.EncodeInt32(m.Retval)
   493  	return buf.Bytes(), nil
   494  }
   495  func (m *BondDetachMemberReply) Unmarshal(b []byte) error {
   496  	buf := codec.NewBuffer(b)
   497  	m.Retval = buf.DecodeInt32()
   498  	return nil
   499  }
   500  
   501  // BondDetachSlave defines message 'bond_detach_slave'.
   502  // Deprecated: the message will be removed in the future versions
   503  type BondDetachSlave struct {
   504  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   505  }
   506  
   507  func (m *BondDetachSlave) Reset()               { *m = BondDetachSlave{} }
   508  func (*BondDetachSlave) GetMessageName() string { return "bond_detach_slave" }
   509  func (*BondDetachSlave) GetCrcString() string   { return "f9e6675e" }
   510  func (*BondDetachSlave) GetMessageType() api.MessageType {
   511  	return api.RequestMessage
   512  }
   513  
   514  func (m *BondDetachSlave) Size() (size int) {
   515  	if m == nil {
   516  		return 0
   517  	}
   518  	size += 4 // m.SwIfIndex
   519  	return size
   520  }
   521  func (m *BondDetachSlave) Marshal(b []byte) ([]byte, error) {
   522  	if b == nil {
   523  		b = make([]byte, m.Size())
   524  	}
   525  	buf := codec.NewBuffer(b)
   526  	buf.EncodeUint32(uint32(m.SwIfIndex))
   527  	return buf.Bytes(), nil
   528  }
   529  func (m *BondDetachSlave) Unmarshal(b []byte) error {
   530  	buf := codec.NewBuffer(b)
   531  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   532  	return nil
   533  }
   534  
   535  // BondDetachSlaveReply defines message 'bond_detach_slave_reply'.
   536  // Deprecated: the message will be removed in the future versions
   537  type BondDetachSlaveReply struct {
   538  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   539  }
   540  
   541  func (m *BondDetachSlaveReply) Reset()               { *m = BondDetachSlaveReply{} }
   542  func (*BondDetachSlaveReply) GetMessageName() string { return "bond_detach_slave_reply" }
   543  func (*BondDetachSlaveReply) GetCrcString() string   { return "e8d4e804" }
   544  func (*BondDetachSlaveReply) GetMessageType() api.MessageType {
   545  	return api.ReplyMessage
   546  }
   547  
   548  func (m *BondDetachSlaveReply) Size() (size int) {
   549  	if m == nil {
   550  		return 0
   551  	}
   552  	size += 4 // m.Retval
   553  	return size
   554  }
   555  func (m *BondDetachSlaveReply) Marshal(b []byte) ([]byte, error) {
   556  	if b == nil {
   557  		b = make([]byte, m.Size())
   558  	}
   559  	buf := codec.NewBuffer(b)
   560  	buf.EncodeInt32(m.Retval)
   561  	return buf.Bytes(), nil
   562  }
   563  func (m *BondDetachSlaveReply) Unmarshal(b []byte) error {
   564  	buf := codec.NewBuffer(b)
   565  	m.Retval = buf.DecodeInt32()
   566  	return nil
   567  }
   568  
   569  // BondEnslave defines message 'bond_enslave'.
   570  // Deprecated: the message will be removed in the future versions
   571  type BondEnslave struct {
   572  	SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   573  	BondSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=bond_sw_if_index" json:"bond_sw_if_index,omitempty"`
   574  	IsPassive     bool                           `binapi:"bool,name=is_passive" json:"is_passive,omitempty"`
   575  	IsLongTimeout bool                           `binapi:"bool,name=is_long_timeout" json:"is_long_timeout,omitempty"`
   576  }
   577  
   578  func (m *BondEnslave) Reset()               { *m = BondEnslave{} }
   579  func (*BondEnslave) GetMessageName() string { return "bond_enslave" }
   580  func (*BondEnslave) GetCrcString() string   { return "e7d14948" }
   581  func (*BondEnslave) GetMessageType() api.MessageType {
   582  	return api.RequestMessage
   583  }
   584  
   585  func (m *BondEnslave) Size() (size int) {
   586  	if m == nil {
   587  		return 0
   588  	}
   589  	size += 4 // m.SwIfIndex
   590  	size += 4 // m.BondSwIfIndex
   591  	size += 1 // m.IsPassive
   592  	size += 1 // m.IsLongTimeout
   593  	return size
   594  }
   595  func (m *BondEnslave) Marshal(b []byte) ([]byte, error) {
   596  	if b == nil {
   597  		b = make([]byte, m.Size())
   598  	}
   599  	buf := codec.NewBuffer(b)
   600  	buf.EncodeUint32(uint32(m.SwIfIndex))
   601  	buf.EncodeUint32(uint32(m.BondSwIfIndex))
   602  	buf.EncodeBool(m.IsPassive)
   603  	buf.EncodeBool(m.IsLongTimeout)
   604  	return buf.Bytes(), nil
   605  }
   606  func (m *BondEnslave) Unmarshal(b []byte) error {
   607  	buf := codec.NewBuffer(b)
   608  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   609  	m.BondSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   610  	m.IsPassive = buf.DecodeBool()
   611  	m.IsLongTimeout = buf.DecodeBool()
   612  	return nil
   613  }
   614  
   615  // BondEnslaveReply defines message 'bond_enslave_reply'.
   616  type BondEnslaveReply struct {
   617  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   618  }
   619  
   620  func (m *BondEnslaveReply) Reset()               { *m = BondEnslaveReply{} }
   621  func (*BondEnslaveReply) GetMessageName() string { return "bond_enslave_reply" }
   622  func (*BondEnslaveReply) GetCrcString() string   { return "e8d4e804" }
   623  func (*BondEnslaveReply) GetMessageType() api.MessageType {
   624  	return api.ReplyMessage
   625  }
   626  
   627  func (m *BondEnslaveReply) Size() (size int) {
   628  	if m == nil {
   629  		return 0
   630  	}
   631  	size += 4 // m.Retval
   632  	return size
   633  }
   634  func (m *BondEnslaveReply) Marshal(b []byte) ([]byte, error) {
   635  	if b == nil {
   636  		b = make([]byte, m.Size())
   637  	}
   638  	buf := codec.NewBuffer(b)
   639  	buf.EncodeInt32(m.Retval)
   640  	return buf.Bytes(), nil
   641  }
   642  func (m *BondEnslaveReply) Unmarshal(b []byte) error {
   643  	buf := codec.NewBuffer(b)
   644  	m.Retval = buf.DecodeInt32()
   645  	return nil
   646  }
   647  
   648  // SwBondInterfaceDetails defines message 'sw_bond_interface_details'.
   649  type SwBondInterfaceDetails struct {
   650  	SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   651  	ID            uint32                         `binapi:"u32,name=id" json:"id,omitempty"`
   652  	Mode          BondMode                       `binapi:"bond_mode,name=mode" json:"mode,omitempty"`
   653  	Lb            BondLbAlgo                     `binapi:"bond_lb_algo,name=lb" json:"lb,omitempty"`
   654  	NumaOnly      bool                           `binapi:"bool,name=numa_only" json:"numa_only,omitempty"`
   655  	ActiveMembers uint32                         `binapi:"u32,name=active_members" json:"active_members,omitempty"`
   656  	Members       uint32                         `binapi:"u32,name=members" json:"members,omitempty"`
   657  	InterfaceName string                         `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
   658  }
   659  
   660  func (m *SwBondInterfaceDetails) Reset()               { *m = SwBondInterfaceDetails{} }
   661  func (*SwBondInterfaceDetails) GetMessageName() string { return "sw_bond_interface_details" }
   662  func (*SwBondInterfaceDetails) GetCrcString() string   { return "9428a69c" }
   663  func (*SwBondInterfaceDetails) GetMessageType() api.MessageType {
   664  	return api.ReplyMessage
   665  }
   666  
   667  func (m *SwBondInterfaceDetails) Size() (size int) {
   668  	if m == nil {
   669  		return 0
   670  	}
   671  	size += 4  // m.SwIfIndex
   672  	size += 4  // m.ID
   673  	size += 4  // m.Mode
   674  	size += 4  // m.Lb
   675  	size += 1  // m.NumaOnly
   676  	size += 4  // m.ActiveMembers
   677  	size += 4  // m.Members
   678  	size += 64 // m.InterfaceName
   679  	return size
   680  }
   681  func (m *SwBondInterfaceDetails) Marshal(b []byte) ([]byte, error) {
   682  	if b == nil {
   683  		b = make([]byte, m.Size())
   684  	}
   685  	buf := codec.NewBuffer(b)
   686  	buf.EncodeUint32(uint32(m.SwIfIndex))
   687  	buf.EncodeUint32(m.ID)
   688  	buf.EncodeUint32(uint32(m.Mode))
   689  	buf.EncodeUint32(uint32(m.Lb))
   690  	buf.EncodeBool(m.NumaOnly)
   691  	buf.EncodeUint32(m.ActiveMembers)
   692  	buf.EncodeUint32(m.Members)
   693  	buf.EncodeString(m.InterfaceName, 64)
   694  	return buf.Bytes(), nil
   695  }
   696  func (m *SwBondInterfaceDetails) Unmarshal(b []byte) error {
   697  	buf := codec.NewBuffer(b)
   698  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   699  	m.ID = buf.DecodeUint32()
   700  	m.Mode = BondMode(buf.DecodeUint32())
   701  	m.Lb = BondLbAlgo(buf.DecodeUint32())
   702  	m.NumaOnly = buf.DecodeBool()
   703  	m.ActiveMembers = buf.DecodeUint32()
   704  	m.Members = buf.DecodeUint32()
   705  	m.InterfaceName = buf.DecodeString(64)
   706  	return nil
   707  }
   708  
   709  // SwBondInterfaceDump defines message 'sw_bond_interface_dump'.
   710  type SwBondInterfaceDump struct {
   711  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
   712  }
   713  
   714  func (m *SwBondInterfaceDump) Reset()               { *m = SwBondInterfaceDump{} }
   715  func (*SwBondInterfaceDump) GetMessageName() string { return "sw_bond_interface_dump" }
   716  func (*SwBondInterfaceDump) GetCrcString() string   { return "f9e6675e" }
   717  func (*SwBondInterfaceDump) GetMessageType() api.MessageType {
   718  	return api.RequestMessage
   719  }
   720  
   721  func (m *SwBondInterfaceDump) Size() (size int) {
   722  	if m == nil {
   723  		return 0
   724  	}
   725  	size += 4 // m.SwIfIndex
   726  	return size
   727  }
   728  func (m *SwBondInterfaceDump) Marshal(b []byte) ([]byte, error) {
   729  	if b == nil {
   730  		b = make([]byte, m.Size())
   731  	}
   732  	buf := codec.NewBuffer(b)
   733  	buf.EncodeUint32(uint32(m.SwIfIndex))
   734  	return buf.Bytes(), nil
   735  }
   736  func (m *SwBondInterfaceDump) Unmarshal(b []byte) error {
   737  	buf := codec.NewBuffer(b)
   738  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   739  	return nil
   740  }
   741  
   742  // SwInterfaceBondDetails defines message 'sw_interface_bond_details'.
   743  type SwInterfaceBondDetails struct {
   744  	SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   745  	ID            uint32                         `binapi:"u32,name=id" json:"id,omitempty"`
   746  	Mode          BondMode                       `binapi:"bond_mode,name=mode" json:"mode,omitempty"`
   747  	Lb            BondLbAlgo                     `binapi:"bond_lb_algo,name=lb" json:"lb,omitempty"`
   748  	NumaOnly      bool                           `binapi:"bool,name=numa_only" json:"numa_only,omitempty"`
   749  	ActiveSlaves  uint32                         `binapi:"u32,name=active_slaves" json:"active_slaves,omitempty"`
   750  	Slaves        uint32                         `binapi:"u32,name=slaves" json:"slaves,omitempty"`
   751  	InterfaceName string                         `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
   752  }
   753  
   754  func (m *SwInterfaceBondDetails) Reset()               { *m = SwInterfaceBondDetails{} }
   755  func (*SwInterfaceBondDetails) GetMessageName() string { return "sw_interface_bond_details" }
   756  func (*SwInterfaceBondDetails) GetCrcString() string   { return "bb7c929b" }
   757  func (*SwInterfaceBondDetails) GetMessageType() api.MessageType {
   758  	return api.ReplyMessage
   759  }
   760  
   761  func (m *SwInterfaceBondDetails) Size() (size int) {
   762  	if m == nil {
   763  		return 0
   764  	}
   765  	size += 4  // m.SwIfIndex
   766  	size += 4  // m.ID
   767  	size += 4  // m.Mode
   768  	size += 4  // m.Lb
   769  	size += 1  // m.NumaOnly
   770  	size += 4  // m.ActiveSlaves
   771  	size += 4  // m.Slaves
   772  	size += 64 // m.InterfaceName
   773  	return size
   774  }
   775  func (m *SwInterfaceBondDetails) Marshal(b []byte) ([]byte, error) {
   776  	if b == nil {
   777  		b = make([]byte, m.Size())
   778  	}
   779  	buf := codec.NewBuffer(b)
   780  	buf.EncodeUint32(uint32(m.SwIfIndex))
   781  	buf.EncodeUint32(m.ID)
   782  	buf.EncodeUint32(uint32(m.Mode))
   783  	buf.EncodeUint32(uint32(m.Lb))
   784  	buf.EncodeBool(m.NumaOnly)
   785  	buf.EncodeUint32(m.ActiveSlaves)
   786  	buf.EncodeUint32(m.Slaves)
   787  	buf.EncodeString(m.InterfaceName, 64)
   788  	return buf.Bytes(), nil
   789  }
   790  func (m *SwInterfaceBondDetails) Unmarshal(b []byte) error {
   791  	buf := codec.NewBuffer(b)
   792  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   793  	m.ID = buf.DecodeUint32()
   794  	m.Mode = BondMode(buf.DecodeUint32())
   795  	m.Lb = BondLbAlgo(buf.DecodeUint32())
   796  	m.NumaOnly = buf.DecodeBool()
   797  	m.ActiveSlaves = buf.DecodeUint32()
   798  	m.Slaves = buf.DecodeUint32()
   799  	m.InterfaceName = buf.DecodeString(64)
   800  	return nil
   801  }
   802  
   803  // SwInterfaceBondDump defines message 'sw_interface_bond_dump'.
   804  // Deprecated: the message will be removed in the future versions
   805  type SwInterfaceBondDump struct{}
   806  
   807  func (m *SwInterfaceBondDump) Reset()               { *m = SwInterfaceBondDump{} }
   808  func (*SwInterfaceBondDump) GetMessageName() string { return "sw_interface_bond_dump" }
   809  func (*SwInterfaceBondDump) GetCrcString() string   { return "51077d14" }
   810  func (*SwInterfaceBondDump) GetMessageType() api.MessageType {
   811  	return api.RequestMessage
   812  }
   813  
   814  func (m *SwInterfaceBondDump) Size() (size int) {
   815  	if m == nil {
   816  		return 0
   817  	}
   818  	return size
   819  }
   820  func (m *SwInterfaceBondDump) Marshal(b []byte) ([]byte, error) {
   821  	if b == nil {
   822  		b = make([]byte, m.Size())
   823  	}
   824  	buf := codec.NewBuffer(b)
   825  	return buf.Bytes(), nil
   826  }
   827  func (m *SwInterfaceBondDump) Unmarshal(b []byte) error {
   828  	return nil
   829  }
   830  
   831  // SwInterfaceSetBondWeight defines message 'sw_interface_set_bond_weight'.
   832  type SwInterfaceSetBondWeight struct {
   833  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   834  	Weight    uint32                         `binapi:"u32,name=weight" json:"weight,omitempty"`
   835  }
   836  
   837  func (m *SwInterfaceSetBondWeight) Reset()               { *m = SwInterfaceSetBondWeight{} }
   838  func (*SwInterfaceSetBondWeight) GetMessageName() string { return "sw_interface_set_bond_weight" }
   839  func (*SwInterfaceSetBondWeight) GetCrcString() string   { return "deb510a0" }
   840  func (*SwInterfaceSetBondWeight) GetMessageType() api.MessageType {
   841  	return api.RequestMessage
   842  }
   843  
   844  func (m *SwInterfaceSetBondWeight) Size() (size int) {
   845  	if m == nil {
   846  		return 0
   847  	}
   848  	size += 4 // m.SwIfIndex
   849  	size += 4 // m.Weight
   850  	return size
   851  }
   852  func (m *SwInterfaceSetBondWeight) Marshal(b []byte) ([]byte, error) {
   853  	if b == nil {
   854  		b = make([]byte, m.Size())
   855  	}
   856  	buf := codec.NewBuffer(b)
   857  	buf.EncodeUint32(uint32(m.SwIfIndex))
   858  	buf.EncodeUint32(m.Weight)
   859  	return buf.Bytes(), nil
   860  }
   861  func (m *SwInterfaceSetBondWeight) Unmarshal(b []byte) error {
   862  	buf := codec.NewBuffer(b)
   863  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   864  	m.Weight = buf.DecodeUint32()
   865  	return nil
   866  }
   867  
   868  // SwInterfaceSetBondWeightReply defines message 'sw_interface_set_bond_weight_reply'.
   869  type SwInterfaceSetBondWeightReply struct {
   870  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   871  }
   872  
   873  func (m *SwInterfaceSetBondWeightReply) Reset() { *m = SwInterfaceSetBondWeightReply{} }
   874  func (*SwInterfaceSetBondWeightReply) GetMessageName() string {
   875  	return "sw_interface_set_bond_weight_reply"
   876  }
   877  func (*SwInterfaceSetBondWeightReply) GetCrcString() string { return "e8d4e804" }
   878  func (*SwInterfaceSetBondWeightReply) GetMessageType() api.MessageType {
   879  	return api.ReplyMessage
   880  }
   881  
   882  func (m *SwInterfaceSetBondWeightReply) Size() (size int) {
   883  	if m == nil {
   884  		return 0
   885  	}
   886  	size += 4 // m.Retval
   887  	return size
   888  }
   889  func (m *SwInterfaceSetBondWeightReply) Marshal(b []byte) ([]byte, error) {
   890  	if b == nil {
   891  		b = make([]byte, m.Size())
   892  	}
   893  	buf := codec.NewBuffer(b)
   894  	buf.EncodeInt32(m.Retval)
   895  	return buf.Bytes(), nil
   896  }
   897  func (m *SwInterfaceSetBondWeightReply) Unmarshal(b []byte) error {
   898  	buf := codec.NewBuffer(b)
   899  	m.Retval = buf.DecodeInt32()
   900  	return nil
   901  }
   902  
   903  // SwInterfaceSlaveDetails defines message 'sw_interface_slave_details'.
   904  type SwInterfaceSlaveDetails struct {
   905  	SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   906  	InterfaceName string                         `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
   907  	IsPassive     bool                           `binapi:"bool,name=is_passive" json:"is_passive,omitempty"`
   908  	IsLongTimeout bool                           `binapi:"bool,name=is_long_timeout" json:"is_long_timeout,omitempty"`
   909  	IsLocalNuma   bool                           `binapi:"bool,name=is_local_numa" json:"is_local_numa,omitempty"`
   910  	Weight        uint32                         `binapi:"u32,name=weight" json:"weight,omitempty"`
   911  }
   912  
   913  func (m *SwInterfaceSlaveDetails) Reset()               { *m = SwInterfaceSlaveDetails{} }
   914  func (*SwInterfaceSlaveDetails) GetMessageName() string { return "sw_interface_slave_details" }
   915  func (*SwInterfaceSlaveDetails) GetCrcString() string   { return "3c4a0e23" }
   916  func (*SwInterfaceSlaveDetails) GetMessageType() api.MessageType {
   917  	return api.ReplyMessage
   918  }
   919  
   920  func (m *SwInterfaceSlaveDetails) Size() (size int) {
   921  	if m == nil {
   922  		return 0
   923  	}
   924  	size += 4  // m.SwIfIndex
   925  	size += 64 // m.InterfaceName
   926  	size += 1  // m.IsPassive
   927  	size += 1  // m.IsLongTimeout
   928  	size += 1  // m.IsLocalNuma
   929  	size += 4  // m.Weight
   930  	return size
   931  }
   932  func (m *SwInterfaceSlaveDetails) Marshal(b []byte) ([]byte, error) {
   933  	if b == nil {
   934  		b = make([]byte, m.Size())
   935  	}
   936  	buf := codec.NewBuffer(b)
   937  	buf.EncodeUint32(uint32(m.SwIfIndex))
   938  	buf.EncodeString(m.InterfaceName, 64)
   939  	buf.EncodeBool(m.IsPassive)
   940  	buf.EncodeBool(m.IsLongTimeout)
   941  	buf.EncodeBool(m.IsLocalNuma)
   942  	buf.EncodeUint32(m.Weight)
   943  	return buf.Bytes(), nil
   944  }
   945  func (m *SwInterfaceSlaveDetails) Unmarshal(b []byte) error {
   946  	buf := codec.NewBuffer(b)
   947  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   948  	m.InterfaceName = buf.DecodeString(64)
   949  	m.IsPassive = buf.DecodeBool()
   950  	m.IsLongTimeout = buf.DecodeBool()
   951  	m.IsLocalNuma = buf.DecodeBool()
   952  	m.Weight = buf.DecodeUint32()
   953  	return nil
   954  }
   955  
   956  // SwInterfaceSlaveDump defines message 'sw_interface_slave_dump'.
   957  // Deprecated: the message will be removed in the future versions
   958  type SwInterfaceSlaveDump struct {
   959  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   960  }
   961  
   962  func (m *SwInterfaceSlaveDump) Reset()               { *m = SwInterfaceSlaveDump{} }
   963  func (*SwInterfaceSlaveDump) GetMessageName() string { return "sw_interface_slave_dump" }
   964  func (*SwInterfaceSlaveDump) GetCrcString() string   { return "f9e6675e" }
   965  func (*SwInterfaceSlaveDump) GetMessageType() api.MessageType {
   966  	return api.RequestMessage
   967  }
   968  
   969  func (m *SwInterfaceSlaveDump) Size() (size int) {
   970  	if m == nil {
   971  		return 0
   972  	}
   973  	size += 4 // m.SwIfIndex
   974  	return size
   975  }
   976  func (m *SwInterfaceSlaveDump) Marshal(b []byte) ([]byte, error) {
   977  	if b == nil {
   978  		b = make([]byte, m.Size())
   979  	}
   980  	buf := codec.NewBuffer(b)
   981  	buf.EncodeUint32(uint32(m.SwIfIndex))
   982  	return buf.Bytes(), nil
   983  }
   984  func (m *SwInterfaceSlaveDump) Unmarshal(b []byte) error {
   985  	buf := codec.NewBuffer(b)
   986  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   987  	return nil
   988  }
   989  
   990  // SwMemberInterfaceDetails defines message 'sw_member_interface_details'.
   991  type SwMemberInterfaceDetails struct {
   992  	SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   993  	InterfaceName string                         `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
   994  	IsPassive     bool                           `binapi:"bool,name=is_passive" json:"is_passive,omitempty"`
   995  	IsLongTimeout bool                           `binapi:"bool,name=is_long_timeout" json:"is_long_timeout,omitempty"`
   996  	IsLocalNuma   bool                           `binapi:"bool,name=is_local_numa" json:"is_local_numa,omitempty"`
   997  	Weight        uint32                         `binapi:"u32,name=weight" json:"weight,omitempty"`
   998  }
   999  
  1000  func (m *SwMemberInterfaceDetails) Reset()               { *m = SwMemberInterfaceDetails{} }
  1001  func (*SwMemberInterfaceDetails) GetMessageName() string { return "sw_member_interface_details" }
  1002  func (*SwMemberInterfaceDetails) GetCrcString() string   { return "3c4a0e23" }
  1003  func (*SwMemberInterfaceDetails) GetMessageType() api.MessageType {
  1004  	return api.ReplyMessage
  1005  }
  1006  
  1007  func (m *SwMemberInterfaceDetails) Size() (size int) {
  1008  	if m == nil {
  1009  		return 0
  1010  	}
  1011  	size += 4  // m.SwIfIndex
  1012  	size += 64 // m.InterfaceName
  1013  	size += 1  // m.IsPassive
  1014  	size += 1  // m.IsLongTimeout
  1015  	size += 1  // m.IsLocalNuma
  1016  	size += 4  // m.Weight
  1017  	return size
  1018  }
  1019  func (m *SwMemberInterfaceDetails) Marshal(b []byte) ([]byte, error) {
  1020  	if b == nil {
  1021  		b = make([]byte, m.Size())
  1022  	}
  1023  	buf := codec.NewBuffer(b)
  1024  	buf.EncodeUint32(uint32(m.SwIfIndex))
  1025  	buf.EncodeString(m.InterfaceName, 64)
  1026  	buf.EncodeBool(m.IsPassive)
  1027  	buf.EncodeBool(m.IsLongTimeout)
  1028  	buf.EncodeBool(m.IsLocalNuma)
  1029  	buf.EncodeUint32(m.Weight)
  1030  	return buf.Bytes(), nil
  1031  }
  1032  func (m *SwMemberInterfaceDetails) Unmarshal(b []byte) error {
  1033  	buf := codec.NewBuffer(b)
  1034  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1035  	m.InterfaceName = buf.DecodeString(64)
  1036  	m.IsPassive = buf.DecodeBool()
  1037  	m.IsLongTimeout = buf.DecodeBool()
  1038  	m.IsLocalNuma = buf.DecodeBool()
  1039  	m.Weight = buf.DecodeUint32()
  1040  	return nil
  1041  }
  1042  
  1043  // SwMemberInterfaceDump defines message 'sw_member_interface_dump'.
  1044  type SwMemberInterfaceDump struct {
  1045  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
  1046  }
  1047  
  1048  func (m *SwMemberInterfaceDump) Reset()               { *m = SwMemberInterfaceDump{} }
  1049  func (*SwMemberInterfaceDump) GetMessageName() string { return "sw_member_interface_dump" }
  1050  func (*SwMemberInterfaceDump) GetCrcString() string   { return "f9e6675e" }
  1051  func (*SwMemberInterfaceDump) GetMessageType() api.MessageType {
  1052  	return api.RequestMessage
  1053  }
  1054  
  1055  func (m *SwMemberInterfaceDump) Size() (size int) {
  1056  	if m == nil {
  1057  		return 0
  1058  	}
  1059  	size += 4 // m.SwIfIndex
  1060  	return size
  1061  }
  1062  func (m *SwMemberInterfaceDump) Marshal(b []byte) ([]byte, error) {
  1063  	if b == nil {
  1064  		b = make([]byte, m.Size())
  1065  	}
  1066  	buf := codec.NewBuffer(b)
  1067  	buf.EncodeUint32(uint32(m.SwIfIndex))
  1068  	return buf.Bytes(), nil
  1069  }
  1070  func (m *SwMemberInterfaceDump) Unmarshal(b []byte) error {
  1071  	buf := codec.NewBuffer(b)
  1072  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1073  	return nil
  1074  }
  1075  
  1076  func init() { file_bond_binapi_init() }
  1077  func file_bond_binapi_init() {
  1078  	api.RegisterMessage((*BondAddMember)(nil), "bond_add_member_e7d14948")
  1079  	api.RegisterMessage((*BondAddMemberReply)(nil), "bond_add_member_reply_e8d4e804")
  1080  	api.RegisterMessage((*BondCreate)(nil), "bond_create_f1dbd4ff")
  1081  	api.RegisterMessage((*BondCreate2)(nil), "bond_create2_912fda76")
  1082  	api.RegisterMessage((*BondCreate2Reply)(nil), "bond_create2_reply_5383d31f")
  1083  	api.RegisterMessage((*BondCreateReply)(nil), "bond_create_reply_5383d31f")
  1084  	api.RegisterMessage((*BondDelete)(nil), "bond_delete_f9e6675e")
  1085  	api.RegisterMessage((*BondDeleteReply)(nil), "bond_delete_reply_e8d4e804")
  1086  	api.RegisterMessage((*BondDetachMember)(nil), "bond_detach_member_f9e6675e")
  1087  	api.RegisterMessage((*BondDetachMemberReply)(nil), "bond_detach_member_reply_e8d4e804")
  1088  	api.RegisterMessage((*BondDetachSlave)(nil), "bond_detach_slave_f9e6675e")
  1089  	api.RegisterMessage((*BondDetachSlaveReply)(nil), "bond_detach_slave_reply_e8d4e804")
  1090  	api.RegisterMessage((*BondEnslave)(nil), "bond_enslave_e7d14948")
  1091  	api.RegisterMessage((*BondEnslaveReply)(nil), "bond_enslave_reply_e8d4e804")
  1092  	api.RegisterMessage((*SwBondInterfaceDetails)(nil), "sw_bond_interface_details_9428a69c")
  1093  	api.RegisterMessage((*SwBondInterfaceDump)(nil), "sw_bond_interface_dump_f9e6675e")
  1094  	api.RegisterMessage((*SwInterfaceBondDetails)(nil), "sw_interface_bond_details_bb7c929b")
  1095  	api.RegisterMessage((*SwInterfaceBondDump)(nil), "sw_interface_bond_dump_51077d14")
  1096  	api.RegisterMessage((*SwInterfaceSetBondWeight)(nil), "sw_interface_set_bond_weight_deb510a0")
  1097  	api.RegisterMessage((*SwInterfaceSetBondWeightReply)(nil), "sw_interface_set_bond_weight_reply_e8d4e804")
  1098  	api.RegisterMessage((*SwInterfaceSlaveDetails)(nil), "sw_interface_slave_details_3c4a0e23")
  1099  	api.RegisterMessage((*SwInterfaceSlaveDump)(nil), "sw_interface_slave_dump_f9e6675e")
  1100  	api.RegisterMessage((*SwMemberInterfaceDetails)(nil), "sw_member_interface_details_3c4a0e23")
  1101  	api.RegisterMessage((*SwMemberInterfaceDump)(nil), "sw_member_interface_dump_f9e6675e")
  1102  }
  1103  
  1104  // Messages returns list of all messages in this module.
  1105  func AllMessages() []api.Message {
  1106  	return []api.Message{
  1107  		(*BondAddMember)(nil),
  1108  		(*BondAddMemberReply)(nil),
  1109  		(*BondCreate)(nil),
  1110  		(*BondCreate2)(nil),
  1111  		(*BondCreate2Reply)(nil),
  1112  		(*BondCreateReply)(nil),
  1113  		(*BondDelete)(nil),
  1114  		(*BondDeleteReply)(nil),
  1115  		(*BondDetachMember)(nil),
  1116  		(*BondDetachMemberReply)(nil),
  1117  		(*BondDetachSlave)(nil),
  1118  		(*BondDetachSlaveReply)(nil),
  1119  		(*BondEnslave)(nil),
  1120  		(*BondEnslaveReply)(nil),
  1121  		(*SwBondInterfaceDetails)(nil),
  1122  		(*SwBondInterfaceDump)(nil),
  1123  		(*SwInterfaceBondDetails)(nil),
  1124  		(*SwInterfaceBondDump)(nil),
  1125  		(*SwInterfaceSetBondWeight)(nil),
  1126  		(*SwInterfaceSetBondWeightReply)(nil),
  1127  		(*SwInterfaceSlaveDetails)(nil),
  1128  		(*SwInterfaceSlaveDump)(nil),
  1129  		(*SwMemberInterfaceDetails)(nil),
  1130  		(*SwMemberInterfaceDump)(nil),
  1131  	}
  1132  }