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

     1  // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
     2  
     3  // Package vmxnet3 contains generated bindings for API file vmxnet3.api.
     4  //
     5  // Contents:
     6  // -  2 structs
     7  // -  8 messages
     8  package vmxnet3
     9  
    10  import (
    11  	api "go.fd.io/govpp/api"
    12  	codec "go.fd.io/govpp/codec"
    13  	ethernet_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2106/ethernet_types"
    14  	interface_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2106/interface_types"
    15  )
    16  
    17  // This is a compile-time assertion to ensure that this generated file
    18  // is compatible with the GoVPP api package it is being compiled against.
    19  // A compilation error at this line likely means your copy of the
    20  // GoVPP api package needs to be updated.
    21  const _ = api.GoVppAPIPackageIsVersion2
    22  
    23  const (
    24  	APIFile    = "vmxnet3"
    25  	APIVersion = "1.2.0"
    26  	VersionCrc = 0x609454ea
    27  )
    28  
    29  // Vmxnet3RxList defines type 'vmxnet3_rx_list'.
    30  type Vmxnet3RxList struct {
    31  	RxQsize   uint16   `binapi:"u16,name=rx_qsize" json:"rx_qsize,omitempty"`
    32  	RxFill    []uint16 `binapi:"u16[2],name=rx_fill" json:"rx_fill,omitempty"`
    33  	RxNext    uint16   `binapi:"u16,name=rx_next" json:"rx_next,omitempty"`
    34  	RxProduce []uint16 `binapi:"u16[2],name=rx_produce" json:"rx_produce,omitempty"`
    35  	RxConsume []uint16 `binapi:"u16[2],name=rx_consume" json:"rx_consume,omitempty"`
    36  }
    37  
    38  // Vmxnet3TxList defines type 'vmxnet3_tx_list'.
    39  type Vmxnet3TxList struct {
    40  	TxQsize   uint16 `binapi:"u16,name=tx_qsize" json:"tx_qsize,omitempty"`
    41  	TxNext    uint16 `binapi:"u16,name=tx_next" json:"tx_next,omitempty"`
    42  	TxProduce uint16 `binapi:"u16,name=tx_produce" json:"tx_produce,omitempty"`
    43  	TxConsume uint16 `binapi:"u16,name=tx_consume" json:"tx_consume,omitempty"`
    44  }
    45  
    46  // SwVmxnet3InterfaceDetails defines message 'sw_vmxnet3_interface_details'.
    47  type SwVmxnet3InterfaceDetails struct {
    48  	SwIfIndex   interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
    49  	IfName      string                         `binapi:"string[64],name=if_name" json:"if_name,omitempty"`
    50  	HwAddr      ethernet_types.MacAddress      `binapi:"mac_address,name=hw_addr" json:"hw_addr,omitempty"`
    51  	PciAddr     uint32                         `binapi:"u32,name=pci_addr" json:"pci_addr,omitempty"`
    52  	Version     uint8                          `binapi:"u8,name=version" json:"version,omitempty"`
    53  	AdminUpDown bool                           `binapi:"bool,name=admin_up_down" json:"admin_up_down,omitempty"`
    54  	RxCount     uint8                          `binapi:"u8,name=rx_count" json:"rx_count,omitempty"`
    55  	RxList      [16]Vmxnet3RxList              `binapi:"vmxnet3_rx_list[16],name=rx_list" json:"rx_list,omitempty"`
    56  	TxCount     uint8                          `binapi:"u8,name=tx_count" json:"tx_count,omitempty"`
    57  	TxList      [8]Vmxnet3TxList               `binapi:"vmxnet3_tx_list[8],name=tx_list" json:"tx_list,omitempty"`
    58  }
    59  
    60  func (m *SwVmxnet3InterfaceDetails) Reset()               { *m = SwVmxnet3InterfaceDetails{} }
    61  func (*SwVmxnet3InterfaceDetails) GetMessageName() string { return "sw_vmxnet3_interface_details" }
    62  func (*SwVmxnet3InterfaceDetails) GetCrcString() string   { return "6a1a5498" }
    63  func (*SwVmxnet3InterfaceDetails) GetMessageType() api.MessageType {
    64  	return api.ReplyMessage
    65  }
    66  
    67  func (m *SwVmxnet3InterfaceDetails) Size() (size int) {
    68  	if m == nil {
    69  		return 0
    70  	}
    71  	size += 4     // m.SwIfIndex
    72  	size += 64    // m.IfName
    73  	size += 1 * 6 // m.HwAddr
    74  	size += 4     // m.PciAddr
    75  	size += 1     // m.Version
    76  	size += 1     // m.AdminUpDown
    77  	size += 1     // m.RxCount
    78  	for j1 := 0; j1 < 16; j1++ {
    79  		size += 2     // m.RxList[j1].RxQsize
    80  		size += 2 * 2 // m.RxList[j1].RxFill
    81  		size += 2     // m.RxList[j1].RxNext
    82  		size += 2 * 2 // m.RxList[j1].RxProduce
    83  		size += 2 * 2 // m.RxList[j1].RxConsume
    84  	}
    85  	size += 1 // m.TxCount
    86  	for j1 := 0; j1 < 8; j1++ {
    87  		size += 2 // m.TxList[j1].TxQsize
    88  		size += 2 // m.TxList[j1].TxNext
    89  		size += 2 // m.TxList[j1].TxProduce
    90  		size += 2 // m.TxList[j1].TxConsume
    91  	}
    92  	return size
    93  }
    94  func (m *SwVmxnet3InterfaceDetails) Marshal(b []byte) ([]byte, error) {
    95  	if b == nil {
    96  		b = make([]byte, m.Size())
    97  	}
    98  	buf := codec.NewBuffer(b)
    99  	buf.EncodeUint32(uint32(m.SwIfIndex))
   100  	buf.EncodeString(m.IfName, 64)
   101  	buf.EncodeBytes(m.HwAddr[:], 6)
   102  	buf.EncodeUint32(m.PciAddr)
   103  	buf.EncodeUint8(m.Version)
   104  	buf.EncodeBool(m.AdminUpDown)
   105  	buf.EncodeUint8(m.RxCount)
   106  	for j0 := 0; j0 < 16; j0++ {
   107  		buf.EncodeUint16(m.RxList[j0].RxQsize)
   108  		for i := 0; i < 2; i++ {
   109  			var x uint16
   110  			if i < len(m.RxList[j0].RxFill) {
   111  				x = uint16(m.RxList[j0].RxFill[i])
   112  			}
   113  			buf.EncodeUint16(x)
   114  		}
   115  		buf.EncodeUint16(m.RxList[j0].RxNext)
   116  		for i := 0; i < 2; i++ {
   117  			var x uint16
   118  			if i < len(m.RxList[j0].RxProduce) {
   119  				x = uint16(m.RxList[j0].RxProduce[i])
   120  			}
   121  			buf.EncodeUint16(x)
   122  		}
   123  		for i := 0; i < 2; i++ {
   124  			var x uint16
   125  			if i < len(m.RxList[j0].RxConsume) {
   126  				x = uint16(m.RxList[j0].RxConsume[i])
   127  			}
   128  			buf.EncodeUint16(x)
   129  		}
   130  	}
   131  	buf.EncodeUint8(m.TxCount)
   132  	for j0 := 0; j0 < 8; j0++ {
   133  		buf.EncodeUint16(m.TxList[j0].TxQsize)
   134  		buf.EncodeUint16(m.TxList[j0].TxNext)
   135  		buf.EncodeUint16(m.TxList[j0].TxProduce)
   136  		buf.EncodeUint16(m.TxList[j0].TxConsume)
   137  	}
   138  	return buf.Bytes(), nil
   139  }
   140  func (m *SwVmxnet3InterfaceDetails) Unmarshal(b []byte) error {
   141  	buf := codec.NewBuffer(b)
   142  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   143  	m.IfName = buf.DecodeString(64)
   144  	copy(m.HwAddr[:], buf.DecodeBytes(6))
   145  	m.PciAddr = buf.DecodeUint32()
   146  	m.Version = buf.DecodeUint8()
   147  	m.AdminUpDown = buf.DecodeBool()
   148  	m.RxCount = buf.DecodeUint8()
   149  	for j0 := 0; j0 < 16; j0++ {
   150  		m.RxList[j0].RxQsize = buf.DecodeUint16()
   151  		m.RxList[j0].RxFill = make([]uint16, 2)
   152  		for i := 0; i < len(m.RxList[j0].RxFill); i++ {
   153  			m.RxList[j0].RxFill[i] = buf.DecodeUint16()
   154  		}
   155  		m.RxList[j0].RxNext = buf.DecodeUint16()
   156  		m.RxList[j0].RxProduce = make([]uint16, 2)
   157  		for i := 0; i < len(m.RxList[j0].RxProduce); i++ {
   158  			m.RxList[j0].RxProduce[i] = buf.DecodeUint16()
   159  		}
   160  		m.RxList[j0].RxConsume = make([]uint16, 2)
   161  		for i := 0; i < len(m.RxList[j0].RxConsume); i++ {
   162  			m.RxList[j0].RxConsume[i] = buf.DecodeUint16()
   163  		}
   164  	}
   165  	m.TxCount = buf.DecodeUint8()
   166  	for j0 := 0; j0 < 8; j0++ {
   167  		m.TxList[j0].TxQsize = buf.DecodeUint16()
   168  		m.TxList[j0].TxNext = buf.DecodeUint16()
   169  		m.TxList[j0].TxProduce = buf.DecodeUint16()
   170  		m.TxList[j0].TxConsume = buf.DecodeUint16()
   171  	}
   172  	return nil
   173  }
   174  
   175  // SwVmxnet3InterfaceDump defines message 'sw_vmxnet3_interface_dump'.
   176  type SwVmxnet3InterfaceDump struct {
   177  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
   178  }
   179  
   180  func (m *SwVmxnet3InterfaceDump) Reset()               { *m = SwVmxnet3InterfaceDump{} }
   181  func (*SwVmxnet3InterfaceDump) GetMessageName() string { return "sw_vmxnet3_interface_dump" }
   182  func (*SwVmxnet3InterfaceDump) GetCrcString() string   { return "f9e6675e" }
   183  func (*SwVmxnet3InterfaceDump) GetMessageType() api.MessageType {
   184  	return api.RequestMessage
   185  }
   186  
   187  func (m *SwVmxnet3InterfaceDump) Size() (size int) {
   188  	if m == nil {
   189  		return 0
   190  	}
   191  	size += 4 // m.SwIfIndex
   192  	return size
   193  }
   194  func (m *SwVmxnet3InterfaceDump) Marshal(b []byte) ([]byte, error) {
   195  	if b == nil {
   196  		b = make([]byte, m.Size())
   197  	}
   198  	buf := codec.NewBuffer(b)
   199  	buf.EncodeUint32(uint32(m.SwIfIndex))
   200  	return buf.Bytes(), nil
   201  }
   202  func (m *SwVmxnet3InterfaceDump) Unmarshal(b []byte) error {
   203  	buf := codec.NewBuffer(b)
   204  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   205  	return nil
   206  }
   207  
   208  // Vmxnet3Create defines message 'vmxnet3_create'.
   209  type Vmxnet3Create struct {
   210  	PciAddr    uint32 `binapi:"u32,name=pci_addr" json:"pci_addr,omitempty"`
   211  	EnableElog int32  `binapi:"i32,name=enable_elog" json:"enable_elog,omitempty"`
   212  	RxqSize    uint16 `binapi:"u16,name=rxq_size" json:"rxq_size,omitempty"`
   213  	RxqNum     uint16 `binapi:"u16,name=rxq_num" json:"rxq_num,omitempty"`
   214  	TxqSize    uint16 `binapi:"u16,name=txq_size" json:"txq_size,omitempty"`
   215  	TxqNum     uint16 `binapi:"u16,name=txq_num" json:"txq_num,omitempty"`
   216  	Bind       uint8  `binapi:"u8,name=bind" json:"bind,omitempty"`
   217  	EnableGso  bool   `binapi:"bool,name=enable_gso" json:"enable_gso,omitempty"`
   218  }
   219  
   220  func (m *Vmxnet3Create) Reset()               { *m = Vmxnet3Create{} }
   221  func (*Vmxnet3Create) GetMessageName() string { return "vmxnet3_create" }
   222  func (*Vmxnet3Create) GetCrcString() string   { return "71a07314" }
   223  func (*Vmxnet3Create) GetMessageType() api.MessageType {
   224  	return api.RequestMessage
   225  }
   226  
   227  func (m *Vmxnet3Create) Size() (size int) {
   228  	if m == nil {
   229  		return 0
   230  	}
   231  	size += 4 // m.PciAddr
   232  	size += 4 // m.EnableElog
   233  	size += 2 // m.RxqSize
   234  	size += 2 // m.RxqNum
   235  	size += 2 // m.TxqSize
   236  	size += 2 // m.TxqNum
   237  	size += 1 // m.Bind
   238  	size += 1 // m.EnableGso
   239  	return size
   240  }
   241  func (m *Vmxnet3Create) Marshal(b []byte) ([]byte, error) {
   242  	if b == nil {
   243  		b = make([]byte, m.Size())
   244  	}
   245  	buf := codec.NewBuffer(b)
   246  	buf.EncodeUint32(m.PciAddr)
   247  	buf.EncodeInt32(m.EnableElog)
   248  	buf.EncodeUint16(m.RxqSize)
   249  	buf.EncodeUint16(m.RxqNum)
   250  	buf.EncodeUint16(m.TxqSize)
   251  	buf.EncodeUint16(m.TxqNum)
   252  	buf.EncodeUint8(m.Bind)
   253  	buf.EncodeBool(m.EnableGso)
   254  	return buf.Bytes(), nil
   255  }
   256  func (m *Vmxnet3Create) Unmarshal(b []byte) error {
   257  	buf := codec.NewBuffer(b)
   258  	m.PciAddr = buf.DecodeUint32()
   259  	m.EnableElog = buf.DecodeInt32()
   260  	m.RxqSize = buf.DecodeUint16()
   261  	m.RxqNum = buf.DecodeUint16()
   262  	m.TxqSize = buf.DecodeUint16()
   263  	m.TxqNum = buf.DecodeUint16()
   264  	m.Bind = buf.DecodeUint8()
   265  	m.EnableGso = buf.DecodeBool()
   266  	return nil
   267  }
   268  
   269  // Vmxnet3CreateReply defines message 'vmxnet3_create_reply'.
   270  type Vmxnet3CreateReply struct {
   271  	Retval    int32                          `binapi:"i32,name=retval" json:"retval,omitempty"`
   272  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   273  }
   274  
   275  func (m *Vmxnet3CreateReply) Reset()               { *m = Vmxnet3CreateReply{} }
   276  func (*Vmxnet3CreateReply) GetMessageName() string { return "vmxnet3_create_reply" }
   277  func (*Vmxnet3CreateReply) GetCrcString() string   { return "5383d31f" }
   278  func (*Vmxnet3CreateReply) GetMessageType() api.MessageType {
   279  	return api.ReplyMessage
   280  }
   281  
   282  func (m *Vmxnet3CreateReply) Size() (size int) {
   283  	if m == nil {
   284  		return 0
   285  	}
   286  	size += 4 // m.Retval
   287  	size += 4 // m.SwIfIndex
   288  	return size
   289  }
   290  func (m *Vmxnet3CreateReply) Marshal(b []byte) ([]byte, error) {
   291  	if b == nil {
   292  		b = make([]byte, m.Size())
   293  	}
   294  	buf := codec.NewBuffer(b)
   295  	buf.EncodeInt32(m.Retval)
   296  	buf.EncodeUint32(uint32(m.SwIfIndex))
   297  	return buf.Bytes(), nil
   298  }
   299  func (m *Vmxnet3CreateReply) Unmarshal(b []byte) error {
   300  	buf := codec.NewBuffer(b)
   301  	m.Retval = buf.DecodeInt32()
   302  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   303  	return nil
   304  }
   305  
   306  // Vmxnet3Delete defines message 'vmxnet3_delete'.
   307  type Vmxnet3Delete struct {
   308  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   309  }
   310  
   311  func (m *Vmxnet3Delete) Reset()               { *m = Vmxnet3Delete{} }
   312  func (*Vmxnet3Delete) GetMessageName() string { return "vmxnet3_delete" }
   313  func (*Vmxnet3Delete) GetCrcString() string   { return "f9e6675e" }
   314  func (*Vmxnet3Delete) GetMessageType() api.MessageType {
   315  	return api.RequestMessage
   316  }
   317  
   318  func (m *Vmxnet3Delete) Size() (size int) {
   319  	if m == nil {
   320  		return 0
   321  	}
   322  	size += 4 // m.SwIfIndex
   323  	return size
   324  }
   325  func (m *Vmxnet3Delete) Marshal(b []byte) ([]byte, error) {
   326  	if b == nil {
   327  		b = make([]byte, m.Size())
   328  	}
   329  	buf := codec.NewBuffer(b)
   330  	buf.EncodeUint32(uint32(m.SwIfIndex))
   331  	return buf.Bytes(), nil
   332  }
   333  func (m *Vmxnet3Delete) Unmarshal(b []byte) error {
   334  	buf := codec.NewBuffer(b)
   335  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   336  	return nil
   337  }
   338  
   339  // Vmxnet3DeleteReply defines message 'vmxnet3_delete_reply'.
   340  type Vmxnet3DeleteReply struct {
   341  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   342  }
   343  
   344  func (m *Vmxnet3DeleteReply) Reset()               { *m = Vmxnet3DeleteReply{} }
   345  func (*Vmxnet3DeleteReply) GetMessageName() string { return "vmxnet3_delete_reply" }
   346  func (*Vmxnet3DeleteReply) GetCrcString() string   { return "e8d4e804" }
   347  func (*Vmxnet3DeleteReply) GetMessageType() api.MessageType {
   348  	return api.ReplyMessage
   349  }
   350  
   351  func (m *Vmxnet3DeleteReply) Size() (size int) {
   352  	if m == nil {
   353  		return 0
   354  	}
   355  	size += 4 // m.Retval
   356  	return size
   357  }
   358  func (m *Vmxnet3DeleteReply) Marshal(b []byte) ([]byte, error) {
   359  	if b == nil {
   360  		b = make([]byte, m.Size())
   361  	}
   362  	buf := codec.NewBuffer(b)
   363  	buf.EncodeInt32(m.Retval)
   364  	return buf.Bytes(), nil
   365  }
   366  func (m *Vmxnet3DeleteReply) Unmarshal(b []byte) error {
   367  	buf := codec.NewBuffer(b)
   368  	m.Retval = buf.DecodeInt32()
   369  	return nil
   370  }
   371  
   372  // Vmxnet3Details defines message 'vmxnet3_details'.
   373  type Vmxnet3Details struct {
   374  	SwIfIndex   interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   375  	IfName      string                         `binapi:"string[64],name=if_name" json:"if_name,omitempty"`
   376  	HwAddr      ethernet_types.MacAddress      `binapi:"mac_address,name=hw_addr" json:"hw_addr,omitempty"`
   377  	PciAddr     uint32                         `binapi:"u32,name=pci_addr" json:"pci_addr,omitempty"`
   378  	Version     uint8                          `binapi:"u8,name=version" json:"version,omitempty"`
   379  	AdminUpDown bool                           `binapi:"bool,name=admin_up_down" json:"admin_up_down,omitempty"`
   380  	RxCount     uint8                          `binapi:"u8,name=rx_count" json:"rx_count,omitempty"`
   381  	RxList      [16]Vmxnet3RxList              `binapi:"vmxnet3_rx_list[16],name=rx_list" json:"rx_list,omitempty"`
   382  	TxCount     uint8                          `binapi:"u8,name=tx_count" json:"tx_count,omitempty"`
   383  	TxList      [8]Vmxnet3TxList               `binapi:"vmxnet3_tx_list[8],name=tx_list" json:"tx_list,omitempty"`
   384  }
   385  
   386  func (m *Vmxnet3Details) Reset()               { *m = Vmxnet3Details{} }
   387  func (*Vmxnet3Details) GetMessageName() string { return "vmxnet3_details" }
   388  func (*Vmxnet3Details) GetCrcString() string   { return "6a1a5498" }
   389  func (*Vmxnet3Details) GetMessageType() api.MessageType {
   390  	return api.ReplyMessage
   391  }
   392  
   393  func (m *Vmxnet3Details) Size() (size int) {
   394  	if m == nil {
   395  		return 0
   396  	}
   397  	size += 4     // m.SwIfIndex
   398  	size += 64    // m.IfName
   399  	size += 1 * 6 // m.HwAddr
   400  	size += 4     // m.PciAddr
   401  	size += 1     // m.Version
   402  	size += 1     // m.AdminUpDown
   403  	size += 1     // m.RxCount
   404  	for j1 := 0; j1 < 16; j1++ {
   405  		size += 2     // m.RxList[j1].RxQsize
   406  		size += 2 * 2 // m.RxList[j1].RxFill
   407  		size += 2     // m.RxList[j1].RxNext
   408  		size += 2 * 2 // m.RxList[j1].RxProduce
   409  		size += 2 * 2 // m.RxList[j1].RxConsume
   410  	}
   411  	size += 1 // m.TxCount
   412  	for j1 := 0; j1 < 8; j1++ {
   413  		size += 2 // m.TxList[j1].TxQsize
   414  		size += 2 // m.TxList[j1].TxNext
   415  		size += 2 // m.TxList[j1].TxProduce
   416  		size += 2 // m.TxList[j1].TxConsume
   417  	}
   418  	return size
   419  }
   420  func (m *Vmxnet3Details) Marshal(b []byte) ([]byte, error) {
   421  	if b == nil {
   422  		b = make([]byte, m.Size())
   423  	}
   424  	buf := codec.NewBuffer(b)
   425  	buf.EncodeUint32(uint32(m.SwIfIndex))
   426  	buf.EncodeString(m.IfName, 64)
   427  	buf.EncodeBytes(m.HwAddr[:], 6)
   428  	buf.EncodeUint32(m.PciAddr)
   429  	buf.EncodeUint8(m.Version)
   430  	buf.EncodeBool(m.AdminUpDown)
   431  	buf.EncodeUint8(m.RxCount)
   432  	for j0 := 0; j0 < 16; j0++ {
   433  		buf.EncodeUint16(m.RxList[j0].RxQsize)
   434  		for i := 0; i < 2; i++ {
   435  			var x uint16
   436  			if i < len(m.RxList[j0].RxFill) {
   437  				x = uint16(m.RxList[j0].RxFill[i])
   438  			}
   439  			buf.EncodeUint16(x)
   440  		}
   441  		buf.EncodeUint16(m.RxList[j0].RxNext)
   442  		for i := 0; i < 2; i++ {
   443  			var x uint16
   444  			if i < len(m.RxList[j0].RxProduce) {
   445  				x = uint16(m.RxList[j0].RxProduce[i])
   446  			}
   447  			buf.EncodeUint16(x)
   448  		}
   449  		for i := 0; i < 2; i++ {
   450  			var x uint16
   451  			if i < len(m.RxList[j0].RxConsume) {
   452  				x = uint16(m.RxList[j0].RxConsume[i])
   453  			}
   454  			buf.EncodeUint16(x)
   455  		}
   456  	}
   457  	buf.EncodeUint8(m.TxCount)
   458  	for j0 := 0; j0 < 8; j0++ {
   459  		buf.EncodeUint16(m.TxList[j0].TxQsize)
   460  		buf.EncodeUint16(m.TxList[j0].TxNext)
   461  		buf.EncodeUint16(m.TxList[j0].TxProduce)
   462  		buf.EncodeUint16(m.TxList[j0].TxConsume)
   463  	}
   464  	return buf.Bytes(), nil
   465  }
   466  func (m *Vmxnet3Details) Unmarshal(b []byte) error {
   467  	buf := codec.NewBuffer(b)
   468  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   469  	m.IfName = buf.DecodeString(64)
   470  	copy(m.HwAddr[:], buf.DecodeBytes(6))
   471  	m.PciAddr = buf.DecodeUint32()
   472  	m.Version = buf.DecodeUint8()
   473  	m.AdminUpDown = buf.DecodeBool()
   474  	m.RxCount = buf.DecodeUint8()
   475  	for j0 := 0; j0 < 16; j0++ {
   476  		m.RxList[j0].RxQsize = buf.DecodeUint16()
   477  		m.RxList[j0].RxFill = make([]uint16, 2)
   478  		for i := 0; i < len(m.RxList[j0].RxFill); i++ {
   479  			m.RxList[j0].RxFill[i] = buf.DecodeUint16()
   480  		}
   481  		m.RxList[j0].RxNext = buf.DecodeUint16()
   482  		m.RxList[j0].RxProduce = make([]uint16, 2)
   483  		for i := 0; i < len(m.RxList[j0].RxProduce); i++ {
   484  			m.RxList[j0].RxProduce[i] = buf.DecodeUint16()
   485  		}
   486  		m.RxList[j0].RxConsume = make([]uint16, 2)
   487  		for i := 0; i < len(m.RxList[j0].RxConsume); i++ {
   488  			m.RxList[j0].RxConsume[i] = buf.DecodeUint16()
   489  		}
   490  	}
   491  	m.TxCount = buf.DecodeUint8()
   492  	for j0 := 0; j0 < 8; j0++ {
   493  		m.TxList[j0].TxQsize = buf.DecodeUint16()
   494  		m.TxList[j0].TxNext = buf.DecodeUint16()
   495  		m.TxList[j0].TxProduce = buf.DecodeUint16()
   496  		m.TxList[j0].TxConsume = buf.DecodeUint16()
   497  	}
   498  	return nil
   499  }
   500  
   501  // Vmxnet3Dump defines message 'vmxnet3_dump'.
   502  // Deprecated: the message will be removed in the future versions
   503  type Vmxnet3Dump struct{}
   504  
   505  func (m *Vmxnet3Dump) Reset()               { *m = Vmxnet3Dump{} }
   506  func (*Vmxnet3Dump) GetMessageName() string { return "vmxnet3_dump" }
   507  func (*Vmxnet3Dump) GetCrcString() string   { return "51077d14" }
   508  func (*Vmxnet3Dump) GetMessageType() api.MessageType {
   509  	return api.RequestMessage
   510  }
   511  
   512  func (m *Vmxnet3Dump) Size() (size int) {
   513  	if m == nil {
   514  		return 0
   515  	}
   516  	return size
   517  }
   518  func (m *Vmxnet3Dump) Marshal(b []byte) ([]byte, error) {
   519  	if b == nil {
   520  		b = make([]byte, m.Size())
   521  	}
   522  	buf := codec.NewBuffer(b)
   523  	return buf.Bytes(), nil
   524  }
   525  func (m *Vmxnet3Dump) Unmarshal(b []byte) error {
   526  	return nil
   527  }
   528  
   529  func init() { file_vmxnet3_binapi_init() }
   530  func file_vmxnet3_binapi_init() {
   531  	api.RegisterMessage((*SwVmxnet3InterfaceDetails)(nil), "sw_vmxnet3_interface_details_6a1a5498")
   532  	api.RegisterMessage((*SwVmxnet3InterfaceDump)(nil), "sw_vmxnet3_interface_dump_f9e6675e")
   533  	api.RegisterMessage((*Vmxnet3Create)(nil), "vmxnet3_create_71a07314")
   534  	api.RegisterMessage((*Vmxnet3CreateReply)(nil), "vmxnet3_create_reply_5383d31f")
   535  	api.RegisterMessage((*Vmxnet3Delete)(nil), "vmxnet3_delete_f9e6675e")
   536  	api.RegisterMessage((*Vmxnet3DeleteReply)(nil), "vmxnet3_delete_reply_e8d4e804")
   537  	api.RegisterMessage((*Vmxnet3Details)(nil), "vmxnet3_details_6a1a5498")
   538  	api.RegisterMessage((*Vmxnet3Dump)(nil), "vmxnet3_dump_51077d14")
   539  }
   540  
   541  // Messages returns list of all messages in this module.
   542  func AllMessages() []api.Message {
   543  	return []api.Message{
   544  		(*SwVmxnet3InterfaceDetails)(nil),
   545  		(*SwVmxnet3InterfaceDump)(nil),
   546  		(*Vmxnet3Create)(nil),
   547  		(*Vmxnet3CreateReply)(nil),
   548  		(*Vmxnet3Delete)(nil),
   549  		(*Vmxnet3DeleteReply)(nil),
   550  		(*Vmxnet3Details)(nil),
   551  		(*Vmxnet3Dump)(nil),
   552  	}
   553  }