diff options
Diffstat (limited to 'binapi/interface/interface.ba.go')
-rw-r--r-- | binapi/interface/interface.ba.go | 319 |
1 files changed, 315 insertions, 4 deletions
diff --git a/binapi/interface/interface.ba.go b/binapi/interface/interface.ba.go index 7640f17..b137c71 100644 --- a/binapi/interface/interface.ba.go +++ b/binapi/interface/interface.ba.go @@ -1,13 +1,13 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: // binapi-generator: v0.5.0-dev -// VPP: 21.06-release +// VPP: 22.02-release // source: /usr/share/vpp/api/core/interface.api.json // Package interfaces contains generated bindings for API file interface.api. // // Contents: -// 59 messages +// 66 messages // package interfaces @@ -27,8 +27,8 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "interface" - APIVersion = "3.2.2" - VersionCrc = 0x29a0076c + APIVersion = "3.2.3" + VersionCrc = 0x13ab947a ) // CollectDetailedInterfaceStats defines message 'collect_detailed_interface_stats'. @@ -1567,6 +1567,78 @@ func (m *SwInterfaceSetFlagsReply) Unmarshal(b []byte) error { return nil } +// SwInterfaceSetInterfaceName defines message 'sw_interface_set_interface_name'. +type SwInterfaceSetInterfaceName struct { + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + Name string `binapi:"string[64],name=name" json:"name,omitempty"` +} + +func (m *SwInterfaceSetInterfaceName) Reset() { *m = SwInterfaceSetInterfaceName{} } +func (*SwInterfaceSetInterfaceName) GetMessageName() string { return "sw_interface_set_interface_name" } +func (*SwInterfaceSetInterfaceName) GetCrcString() string { return "45a1d548" } +func (*SwInterfaceSetInterfaceName) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *SwInterfaceSetInterfaceName) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.SwIfIndex + size += 64 // m.Name + return size +} +func (m *SwInterfaceSetInterfaceName) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(uint32(m.SwIfIndex)) + buf.EncodeString(m.Name, 64) + return buf.Bytes(), nil +} +func (m *SwInterfaceSetInterfaceName) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.Name = buf.DecodeString(64) + return nil +} + +// SwInterfaceSetInterfaceNameReply defines message 'sw_interface_set_interface_name_reply'. +type SwInterfaceSetInterfaceNameReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *SwInterfaceSetInterfaceNameReply) Reset() { *m = SwInterfaceSetInterfaceNameReply{} } +func (*SwInterfaceSetInterfaceNameReply) GetMessageName() string { + return "sw_interface_set_interface_name_reply" +} +func (*SwInterfaceSetInterfaceNameReply) GetCrcString() string { return "e8d4e804" } +func (*SwInterfaceSetInterfaceNameReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *SwInterfaceSetInterfaceNameReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *SwInterfaceSetInterfaceNameReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *SwInterfaceSetInterfaceNameReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + // SwInterfaceSetIPDirectedBroadcast defines message 'sw_interface_set_ip_directed_broadcast'. type SwInterfaceSetIPDirectedBroadcast struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -2096,6 +2168,95 @@ func (m *SwInterfaceSetTableReply) Unmarshal(b []byte) error { return nil } +// SwInterfaceSetTxPlacement defines message 'sw_interface_set_tx_placement'. +type SwInterfaceSetTxPlacement struct { + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"` + ArraySize uint32 `binapi:"u32,name=array_size" json:"-"` + Threads []uint32 `binapi:"u32[array_size],name=threads" json:"threads,omitempty"` +} + +func (m *SwInterfaceSetTxPlacement) Reset() { *m = SwInterfaceSetTxPlacement{} } +func (*SwInterfaceSetTxPlacement) GetMessageName() string { return "sw_interface_set_tx_placement" } +func (*SwInterfaceSetTxPlacement) GetCrcString() string { return "4e0cd5ff" } +func (*SwInterfaceSetTxPlacement) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *SwInterfaceSetTxPlacement) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.SwIfIndex + size += 4 // m.QueueID + size += 4 // m.ArraySize + size += 4 * len(m.Threads) // m.Threads + return size +} +func (m *SwInterfaceSetTxPlacement) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(uint32(m.SwIfIndex)) + buf.EncodeUint32(m.QueueID) + buf.EncodeUint32(uint32(len(m.Threads))) + for i := 0; i < len(m.Threads); i++ { + var x uint32 + if i < len(m.Threads) { + x = uint32(m.Threads[i]) + } + buf.EncodeUint32(x) + } + return buf.Bytes(), nil +} +func (m *SwInterfaceSetTxPlacement) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.QueueID = buf.DecodeUint32() + m.ArraySize = buf.DecodeUint32() + m.Threads = make([]uint32, m.ArraySize) + for i := 0; i < len(m.Threads); i++ { + m.Threads[i] = buf.DecodeUint32() + } + return nil +} + +// SwInterfaceSetTxPlacementReply defines message 'sw_interface_set_tx_placement_reply'. +type SwInterfaceSetTxPlacementReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *SwInterfaceSetTxPlacementReply) Reset() { *m = SwInterfaceSetTxPlacementReply{} } +func (*SwInterfaceSetTxPlacementReply) GetMessageName() string { + return "sw_interface_set_tx_placement_reply" +} +func (*SwInterfaceSetTxPlacementReply) GetCrcString() string { return "e8d4e804" } +func (*SwInterfaceSetTxPlacementReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *SwInterfaceSetTxPlacementReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *SwInterfaceSetTxPlacementReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + return buf.Bytes(), nil +} +func (m *SwInterfaceSetTxPlacementReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + // SwInterfaceSetUnnumbered defines message 'sw_interface_set_unnumbered'. type SwInterfaceSetUnnumbered struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -2246,6 +2407,142 @@ func (m *SwInterfaceTagAddDelReply) Unmarshal(b []byte) error { return nil } +// SwInterfaceTxPlacementDetails defines message 'sw_interface_tx_placement_details'. +type SwInterfaceTxPlacementDetails struct { + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"` + Shared uint8 `binapi:"u8,name=shared" json:"shared,omitempty"` + ArraySize uint32 `binapi:"u32,name=array_size" json:"-"` + Threads []uint32 `binapi:"u32[array_size],name=threads" json:"threads,omitempty"` +} + +func (m *SwInterfaceTxPlacementDetails) Reset() { *m = SwInterfaceTxPlacementDetails{} } +func (*SwInterfaceTxPlacementDetails) GetMessageName() string { + return "sw_interface_tx_placement_details" +} +func (*SwInterfaceTxPlacementDetails) GetCrcString() string { return "00381a2e" } +func (*SwInterfaceTxPlacementDetails) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *SwInterfaceTxPlacementDetails) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.SwIfIndex + size += 4 // m.QueueID + size += 1 // m.Shared + size += 4 // m.ArraySize + size += 4 * len(m.Threads) // m.Threads + return size +} +func (m *SwInterfaceTxPlacementDetails) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(uint32(m.SwIfIndex)) + buf.EncodeUint32(m.QueueID) + buf.EncodeUint8(m.Shared) + buf.EncodeUint32(uint32(len(m.Threads))) + for i := 0; i < len(m.Threads); i++ { + var x uint32 + if i < len(m.Threads) { + x = uint32(m.Threads[i]) + } + buf.EncodeUint32(x) + } + return buf.Bytes(), nil +} +func (m *SwInterfaceTxPlacementDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.QueueID = buf.DecodeUint32() + m.Shared = buf.DecodeUint8() + m.ArraySize = buf.DecodeUint32() + m.Threads = make([]uint32, m.ArraySize) + for i := 0; i < len(m.Threads); i++ { + m.Threads[i] = buf.DecodeUint32() + } + return nil +} + +// SwInterfaceTxPlacementGet defines message 'sw_interface_tx_placement_get'. +type SwInterfaceTxPlacementGet struct { + Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"` + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` +} + +func (m *SwInterfaceTxPlacementGet) Reset() { *m = SwInterfaceTxPlacementGet{} } +func (*SwInterfaceTxPlacementGet) GetMessageName() string { return "sw_interface_tx_placement_get" } +func (*SwInterfaceTxPlacementGet) GetCrcString() string { return "47250981" } +func (*SwInterfaceTxPlacementGet) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *SwInterfaceTxPlacementGet) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Cursor + size += 4 // m.SwIfIndex + return size +} +func (m *SwInterfaceTxPlacementGet) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.Cursor) + buf.EncodeUint32(uint32(m.SwIfIndex)) + return buf.Bytes(), nil +} +func (m *SwInterfaceTxPlacementGet) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Cursor = buf.DecodeUint32() + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + return nil +} + +// SwInterfaceTxPlacementGetReply defines message 'sw_interface_tx_placement_get_reply'. +type SwInterfaceTxPlacementGetReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"` +} + +func (m *SwInterfaceTxPlacementGetReply) Reset() { *m = SwInterfaceTxPlacementGetReply{} } +func (*SwInterfaceTxPlacementGetReply) GetMessageName() string { + return "sw_interface_tx_placement_get_reply" +} +func (*SwInterfaceTxPlacementGetReply) GetCrcString() string { return "53b48f5d" } +func (*SwInterfaceTxPlacementGetReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *SwInterfaceTxPlacementGetReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 4 // m.Cursor + return size +} +func (m *SwInterfaceTxPlacementGetReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeUint32(m.Cursor) + return buf.Bytes(), nil +} +func (m *SwInterfaceTxPlacementGetReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + m.Cursor = buf.DecodeUint32() + return nil +} + // WantInterfaceEvents defines message 'want_interface_events'. type WantInterfaceEvents struct { EnableDisable uint32 `binapi:"u32,name=enable_disable" json:"enable_disable,omitempty"` @@ -2357,6 +2654,8 @@ func file_interfaces_binapi_init() { api.RegisterMessage((*SwInterfaceRxPlacementDump)(nil), "sw_interface_rx_placement_dump_f9e6675e") api.RegisterMessage((*SwInterfaceSetFlags)(nil), "sw_interface_set_flags_f5aec1b8") api.RegisterMessage((*SwInterfaceSetFlagsReply)(nil), "sw_interface_set_flags_reply_e8d4e804") + api.RegisterMessage((*SwInterfaceSetInterfaceName)(nil), "sw_interface_set_interface_name_45a1d548") + api.RegisterMessage((*SwInterfaceSetInterfaceNameReply)(nil), "sw_interface_set_interface_name_reply_e8d4e804") api.RegisterMessage((*SwInterfaceSetIPDirectedBroadcast)(nil), "sw_interface_set_ip_directed_broadcast_ae6cfcfb") api.RegisterMessage((*SwInterfaceSetIPDirectedBroadcastReply)(nil), "sw_interface_set_ip_directed_broadcast_reply_e8d4e804") api.RegisterMessage((*SwInterfaceSetMacAddress)(nil), "sw_interface_set_mac_address_c536e7eb") @@ -2371,10 +2670,15 @@ func file_interfaces_binapi_init() { api.RegisterMessage((*SwInterfaceSetRxPlacementReply)(nil), "sw_interface_set_rx_placement_reply_e8d4e804") api.RegisterMessage((*SwInterfaceSetTable)(nil), "sw_interface_set_table_df42a577") api.RegisterMessage((*SwInterfaceSetTableReply)(nil), "sw_interface_set_table_reply_e8d4e804") + api.RegisterMessage((*SwInterfaceSetTxPlacement)(nil), "sw_interface_set_tx_placement_4e0cd5ff") + api.RegisterMessage((*SwInterfaceSetTxPlacementReply)(nil), "sw_interface_set_tx_placement_reply_e8d4e804") api.RegisterMessage((*SwInterfaceSetUnnumbered)(nil), "sw_interface_set_unnumbered_154a6439") api.RegisterMessage((*SwInterfaceSetUnnumberedReply)(nil), "sw_interface_set_unnumbered_reply_e8d4e804") api.RegisterMessage((*SwInterfaceTagAddDel)(nil), "sw_interface_tag_add_del_426f8bc1") api.RegisterMessage((*SwInterfaceTagAddDelReply)(nil), "sw_interface_tag_add_del_reply_e8d4e804") + api.RegisterMessage((*SwInterfaceTxPlacementDetails)(nil), "sw_interface_tx_placement_details_00381a2e") + api.RegisterMessage((*SwInterfaceTxPlacementGet)(nil), "sw_interface_tx_placement_get_47250981") + api.RegisterMessage((*SwInterfaceTxPlacementGetReply)(nil), "sw_interface_tx_placement_get_reply_53b48f5d") api.RegisterMessage((*WantInterfaceEvents)(nil), "want_interface_events_476f5a08") api.RegisterMessage((*WantInterfaceEventsReply)(nil), "want_interface_events_reply_e8d4e804") } @@ -2421,6 +2725,8 @@ func AllMessages() []api.Message { (*SwInterfaceRxPlacementDump)(nil), (*SwInterfaceSetFlags)(nil), (*SwInterfaceSetFlagsReply)(nil), + (*SwInterfaceSetInterfaceName)(nil), + (*SwInterfaceSetInterfaceNameReply)(nil), (*SwInterfaceSetIPDirectedBroadcast)(nil), (*SwInterfaceSetIPDirectedBroadcastReply)(nil), (*SwInterfaceSetMacAddress)(nil), @@ -2435,10 +2741,15 @@ func AllMessages() []api.Message { (*SwInterfaceSetRxPlacementReply)(nil), (*SwInterfaceSetTable)(nil), (*SwInterfaceSetTableReply)(nil), + (*SwInterfaceSetTxPlacement)(nil), + (*SwInterfaceSetTxPlacementReply)(nil), (*SwInterfaceSetUnnumbered)(nil), (*SwInterfaceSetUnnumberedReply)(nil), (*SwInterfaceTagAddDel)(nil), (*SwInterfaceTagAddDelReply)(nil), + (*SwInterfaceTxPlacementDetails)(nil), + (*SwInterfaceTxPlacementGet)(nil), + (*SwInterfaceTxPlacementGetReply)(nil), (*WantInterfaceEvents)(nil), (*WantInterfaceEventsReply)(nil), } |