"bytes"
"context"
"encoding/binary"
+ "fmt"
"io"
"math"
+ "net"
"strconv"
+ "strings"
api "git.fd.io/govpp.git/api"
codec "git.fd.io/govpp.git/codec"
VersionCrc = 0x58d4cf5a
)
-type AddressFamily = ip_types.AddressFamily
-
-type IfStatusFlags = interface_types.IfStatusFlags
-
-type IfType = interface_types.IfType
-
-type IPDscp = ip_types.IPDscp
-
-type IPEcn = ip_types.IPEcn
-
-type IPProto = ip_types.IPProto
-
-type LinkDuplex = interface_types.LinkDuplex
-
-type MtuProto = interface_types.MtuProto
-
-type RxMode = interface_types.RxMode
-
-type SubIfFlags = interface_types.SubIfFlags
-
-type AddressWithPrefix = ip_types.AddressWithPrefix
-
-type InterfaceIndex = interface_types.InterfaceIndex
-
-type IP4Address = ip_types.IP4Address
-
-type IP4AddressWithPrefix = ip_types.IP4AddressWithPrefix
-
-type IP6Address = ip_types.IP6Address
-
-type IP6AddressWithPrefix = ip_types.IP6AddressWithPrefix
-
// MacAddress represents VPP binary API alias 'mac_address'.
type MacAddress [6]uint8
-type Address = ip_types.Address
-
-type IP4Prefix = ip_types.IP4Prefix
-
-type IP6Prefix = ip_types.IP6Prefix
-
-type Mprefix = ip_types.Mprefix
-
-type Prefix = ip_types.Prefix
-
-type PrefixMatcher = ip_types.PrefixMatcher
+func ParseMAC(mac string) (parsed MacAddress, err error) {
+ var hw net.HardwareAddr
+ if hw, err = net.ParseMAC(mac); err != nil {
+ return
+ }
+ copy(parsed[:], hw[:])
+ return
+}
-type AddressUnion = ip_types.AddressUnion
+func (m *MacAddress) ToString() string {
+ return net.HardwareAddr(m[:]).String()
+}
// CollectDetailedInterfaceStats represents VPP binary API message 'collect_detailed_interface_stats'.
type CollectDetailedInterfaceStats struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
}
func (m *CollectDetailedInterfaceStats) Reset() { *m = CollectDetailedInterfaceStats{} }
pos := 0
_ = pos
// field[1] m.SwIfIndex
- m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.EnableDisable
m.EnableDisable = tmp[pos] != 0
// CreateLoopbackInstanceReply represents VPP binary API message 'create_loopback_instance_reply'.
type CreateLoopbackInstanceReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}
func (m *CreateLoopbackInstanceReply) Reset() { *m = CreateLoopbackInstanceReply{} }
m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.SwIfIndex
- m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
return nil
}
// CreateLoopbackReply represents VPP binary API message 'create_loopback_reply'.
type CreateLoopbackReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}
func (m *CreateLoopbackReply) Reset() { *m = CreateLoopbackReply{} }
m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.SwIfIndex
- m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
return nil
}
// CreateSubif represents VPP binary API message 'create_subif'.
type CreateSubif struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- SubID uint32 `binapi:"u32,name=sub_id" json:"sub_id,omitempty"`
- SubIfFlags SubIfFlags `binapi:"sub_if_flags,name=sub_if_flags" json:"sub_if_flags,omitempty"`
- OuterVlanID uint16 `binapi:"u16,name=outer_vlan_id" json:"outer_vlan_id,omitempty"`
- InnerVlanID uint16 `binapi:"u16,name=inner_vlan_id" json:"inner_vlan_id,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ SubID uint32 `binapi:"u32,name=sub_id" json:"sub_id,omitempty"`
+ SubIfFlags interface_types.SubIfFlags `binapi:"sub_if_flags,name=sub_if_flags" json:"sub_if_flags,omitempty"`
+ OuterVlanID uint16 `binapi:"u16,name=outer_vlan_id" json:"outer_vlan_id,omitempty"`
+ InnerVlanID uint16 `binapi:"u16,name=inner_vlan_id" json:"inner_vlan_id,omitempty"`
}
func (m *CreateSubif) Reset() { *m = CreateSubif{} }
pos := 0
_ = pos
// field[1] m.SwIfIndex
- m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.SubID
m.SubID = uint32(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.SubIfFlags
- m.SubIfFlags = SubIfFlags(o.Uint32(tmp[pos : pos+4]))
+ m.SubIfFlags = interface_types.SubIfFlags(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.OuterVlanID
m.OuterVlanID = uint16(o.Uint16(tmp[pos : pos+2]))
// CreateSubifReply represents VPP binary API message 'create_subif_reply'.
type CreateSubifReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}
func (m *CreateSubifReply) Reset() { *m = CreateSubifReply{} }
m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.SwIfIndex
- m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
return nil
}
// CreateVlanSubif represents VPP binary API message 'create_vlan_subif'.
type CreateVlanSubif struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- VlanID uint32 `binapi:"u32,name=vlan_id" json:"vlan_id,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ VlanID uint32 `binapi:"u32,name=vlan_id" json:"vlan_id,omitempty"`
}
func (m *CreateVlanSubif) Reset() { *m = CreateVlanSubif{} }
pos := 0
_ = pos
// field[1] m.SwIfIndex
- m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.VlanID
m.VlanID = uint32(o.Uint32(tmp[pos : pos+4]))
// CreateVlanSubifReply represents VPP binary API message 'create_vlan_subif_reply'.
type CreateVlanSubifReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}
func (m *CreateVlanSubifReply) Reset() { *m = CreateVlanSubifReply{} }
m.Retval = int32(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.SwIfIndex
- m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
return nil
}
// DeleteLoopback represents VPP binary API message 'delete_loopback'.
type DeleteLoopback struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}
func (m *DeleteLoopback) Reset() { *m = DeleteLoopback{} }
pos := 0
_ = pos
// field[1] m.SwIfIndex
- m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
return nil
}
// DeleteSubif represents VPP binary API message 'delete_subif'.
type DeleteSubif struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}
func (m *DeleteSubif) Reset() { *m = DeleteSubif{} }
pos := 0
_ = pos
// field[1] m.SwIfIndex
- m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
return nil
}
// HwInterfaceSetMtu represents VPP binary API message 'hw_interface_set_mtu'.
type HwInterfaceSetMtu struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Mtu uint16 `binapi:"u16,name=mtu" json:"mtu,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Mtu uint16 `binapi:"u16,name=mtu" json:"mtu,omitempty"`
}
func (m *HwInterfaceSetMtu) Reset() { *m = HwInterfaceSetMtu{} }
pos := 0
_ = pos
// field[1] m.SwIfIndex
- m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.Mtu
m.Mtu = uint16(o.Uint16(tmp[pos : pos+2]))
// InterfaceNameRenumber represents VPP binary API message 'interface_name_renumber'.
type InterfaceNameRenumber struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- NewShowDevInstance uint32 `binapi:"u32,name=new_show_dev_instance" json:"new_show_dev_instance,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ NewShowDevInstance uint32 `binapi:"u32,name=new_show_dev_instance" json:"new_show_dev_instance,omitempty"`
}
func (m *InterfaceNameRenumber) Reset() { *m = InterfaceNameRenumber{} }
pos := 0
_ = pos
// field[1] m.SwIfIndex
- m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.NewShowDevInstance
m.NewShowDevInstance = uint32(o.Uint32(tmp[pos : pos+4]))
// SwInterfaceAddDelAddress represents VPP binary API message 'sw_interface_add_del_address'.
type SwInterfaceAddDelAddress struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- DelAll bool `binapi:"bool,name=del_all" json:"del_all,omitempty"`
- Prefix AddressWithPrefix `binapi:"address_with_prefix,name=prefix" json:"prefix,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
+ DelAll bool `binapi:"bool,name=del_all" json:"del_all,omitempty"`
+ Prefix ip_types.AddressWithPrefix `binapi:"address_with_prefix,name=prefix" json:"prefix,omitempty"`
}
func (m *SwInterfaceAddDelAddress) Reset() { *m = SwInterfaceAddDelAddress{} }
pos := 0
_ = pos
// field[1] m.SwIfIndex
- m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.IsAdd
m.IsAdd = tmp[pos] != 0
// field[1] m.Prefix
// field[2] m.Prefix.Address
// field[3] m.Prefix.Address.Af
- m.Prefix.Address.Af = AddressFamily(tmp[pos])
+ m.Prefix.Address.Af = ip_types.AddressFamily(tmp[pos])
pos += 1
// field[3] m.Prefix.Address.Un
copy(m.Prefix.Address.Un.XXX_UnionData[:], tmp[pos:pos+16])
// SwInterfaceClearStats represents VPP binary API message 'sw_interface_clear_stats'.
type SwInterfaceClearStats struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}
func (m *SwInterfaceClearStats) Reset() { *m = SwInterfaceClearStats{} }
pos := 0
_ = pos
// field[1] m.SwIfIndex
- m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
return nil
}
// SwInterfaceDetails represents VPP binary API message 'sw_interface_details'.
type SwInterfaceDetails struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- SupSwIfIndex uint32 `binapi:"u32,name=sup_sw_if_index" json:"sup_sw_if_index,omitempty"`
- L2Address MacAddress `binapi:"mac_address,name=l2_address" json:"l2_address,omitempty"`
- Flags IfStatusFlags `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
- Type IfType `binapi:"if_type,name=type" json:"type,omitempty"`
- LinkDuplex LinkDuplex `binapi:"link_duplex,name=link_duplex" json:"link_duplex,omitempty"`
- LinkSpeed uint32 `binapi:"u32,name=link_speed" json:"link_speed,omitempty"`
- LinkMtu uint16 `binapi:"u16,name=link_mtu" json:"link_mtu,omitempty"`
- Mtu []uint32 `binapi:"u32[4],name=mtu" json:"mtu,omitempty" struc:"[4]uint32"`
- SubID uint32 `binapi:"u32,name=sub_id" json:"sub_id,omitempty"`
- SubNumberOfTags uint8 `binapi:"u8,name=sub_number_of_tags" json:"sub_number_of_tags,omitempty"`
- SubOuterVlanID uint16 `binapi:"u16,name=sub_outer_vlan_id" json:"sub_outer_vlan_id,omitempty"`
- SubInnerVlanID uint16 `binapi:"u16,name=sub_inner_vlan_id" json:"sub_inner_vlan_id,omitempty"`
- SubIfFlags SubIfFlags `binapi:"sub_if_flags,name=sub_if_flags" json:"sub_if_flags,omitempty"`
- VtrOp uint32 `binapi:"u32,name=vtr_op" json:"vtr_op,omitempty"`
- VtrPushDot1q uint32 `binapi:"u32,name=vtr_push_dot1q" json:"vtr_push_dot1q,omitempty"`
- VtrTag1 uint32 `binapi:"u32,name=vtr_tag1" json:"vtr_tag1,omitempty"`
- VtrTag2 uint32 `binapi:"u32,name=vtr_tag2" json:"vtr_tag2,omitempty"`
- OuterTag uint16 `binapi:"u16,name=outer_tag" json:"outer_tag,omitempty"`
- BDmac MacAddress `binapi:"mac_address,name=b_dmac" json:"b_dmac,omitempty"`
- BSmac MacAddress `binapi:"mac_address,name=b_smac" json:"b_smac,omitempty"`
- BVlanid uint16 `binapi:"u16,name=b_vlanid" json:"b_vlanid,omitempty"`
- ISid uint32 `binapi:"u32,name=i_sid" json:"i_sid,omitempty"`
- InterfaceName string `binapi:"string[64],name=interface_name" json:"interface_name,omitempty" struc:"[64]byte"`
- InterfaceDevType string `binapi:"string[64],name=interface_dev_type" json:"interface_dev_type,omitempty" struc:"[64]byte"`
- Tag string `binapi:"string[64],name=tag" json:"tag,omitempty" struc:"[64]byte"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ SupSwIfIndex uint32 `binapi:"u32,name=sup_sw_if_index" json:"sup_sw_if_index,omitempty"`
+ L2Address MacAddress `binapi:"mac_address,name=l2_address" json:"l2_address,omitempty"`
+ Flags interface_types.IfStatusFlags `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
+ Type interface_types.IfType `binapi:"if_type,name=type" json:"type,omitempty"`
+ LinkDuplex interface_types.LinkDuplex `binapi:"link_duplex,name=link_duplex" json:"link_duplex,omitempty"`
+ LinkSpeed uint32 `binapi:"u32,name=link_speed" json:"link_speed,omitempty"`
+ LinkMtu uint16 `binapi:"u16,name=link_mtu" json:"link_mtu,omitempty"`
+ Mtu []uint32 `binapi:"u32[4],name=mtu" json:"mtu,omitempty" struc:"[4]uint32"`
+ SubID uint32 `binapi:"u32,name=sub_id" json:"sub_id,omitempty"`
+ SubNumberOfTags uint8 `binapi:"u8,name=sub_number_of_tags" json:"sub_number_of_tags,omitempty"`
+ SubOuterVlanID uint16 `binapi:"u16,name=sub_outer_vlan_id" json:"sub_outer_vlan_id,omitempty"`
+ SubInnerVlanID uint16 `binapi:"u16,name=sub_inner_vlan_id" json:"sub_inner_vlan_id,omitempty"`
+ SubIfFlags interface_types.SubIfFlags `binapi:"sub_if_flags,name=sub_if_flags" json:"sub_if_flags,omitempty"`
+ VtrOp uint32 `binapi:"u32,name=vtr_op" json:"vtr_op,omitempty"`
+ VtrPushDot1q uint32 `binapi:"u32,name=vtr_push_dot1q" json:"vtr_push_dot1q,omitempty"`
+ VtrTag1 uint32 `binapi:"u32,name=vtr_tag1" json:"vtr_tag1,omitempty"`
+ VtrTag2 uint32 `binapi:"u32,name=vtr_tag2" json:"vtr_tag2,omitempty"`
+ OuterTag uint16 `binapi:"u16,name=outer_tag" json:"outer_tag,omitempty"`
+ BDmac MacAddress `binapi:"mac_address,name=b_dmac" json:"b_dmac,omitempty"`
+ BSmac MacAddress `binapi:"mac_address,name=b_smac" json:"b_smac,omitempty"`
+ BVlanid uint16 `binapi:"u16,name=b_vlanid" json:"b_vlanid,omitempty"`
+ ISid uint32 `binapi:"u32,name=i_sid" json:"i_sid,omitempty"`
+ InterfaceName string `binapi:"string[64],name=interface_name" json:"interface_name,omitempty" struc:"[64]byte"`
+ InterfaceDevType string `binapi:"string[64],name=interface_dev_type" json:"interface_dev_type,omitempty" struc:"[64]byte"`
+ Tag string `binapi:"string[64],name=tag" json:"tag,omitempty" struc:"[64]byte"`
}
func (m *SwInterfaceDetails) Reset() { *m = SwInterfaceDetails{} }
pos := 0
_ = pos
// field[1] m.SwIfIndex
- m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.SupSwIfIndex
m.SupSwIfIndex = uint32(o.Uint32(tmp[pos : pos+4]))
pos += 1
}
// field[1] m.Flags
- m.Flags = IfStatusFlags(o.Uint32(tmp[pos : pos+4]))
+ m.Flags = interface_types.IfStatusFlags(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.Type
- m.Type = IfType(o.Uint32(tmp[pos : pos+4]))
+ m.Type = interface_types.IfType(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.LinkDuplex
- m.LinkDuplex = LinkDuplex(o.Uint32(tmp[pos : pos+4]))
+ m.LinkDuplex = interface_types.LinkDuplex(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.LinkSpeed
m.LinkSpeed = uint32(o.Uint32(tmp[pos : pos+4]))
m.SubInnerVlanID = uint16(o.Uint16(tmp[pos : pos+2]))
pos += 2
// field[1] m.SubIfFlags
- m.SubIfFlags = SubIfFlags(o.Uint32(tmp[pos : pos+4]))
+ m.SubIfFlags = interface_types.SubIfFlags(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.VtrOp
m.VtrOp = uint32(o.Uint32(tmp[pos : pos+4]))
// SwInterfaceDump represents VPP binary API message 'sw_interface_dump'.
type SwInterfaceDump struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
- NameFilterValid bool `binapi:"bool,name=name_filter_valid" json:"name_filter_valid,omitempty"`
- XXX_NameFilterLen uint32 `struc:"sizeof=NameFilter"`
- NameFilter string `json:"name_filter,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4.294967295e+09" json:"sw_if_index,omitempty"`
+ NameFilterValid bool `binapi:"bool,name=name_filter_valid" json:"name_filter_valid,omitempty"`
+ XXX_NameFilterLen uint32 `struc:"sizeof=NameFilter"`
+ NameFilter string `json:"name_filter,omitempty"`
}
func (m *SwInterfaceDump) Reset() { *m = SwInterfaceDump{} }
pos := 0
_ = pos
// field[1] m.SwIfIndex
- m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.NameFilterValid
m.NameFilterValid = tmp[pos] != 0
// SwInterfaceEvent represents VPP binary API message 'sw_interface_event'.
type SwInterfaceEvent struct {
- PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Flags IfStatusFlags `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
- Deleted bool `binapi:"bool,name=deleted" json:"deleted,omitempty"`
+ PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Flags interface_types.IfStatusFlags `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
+ Deleted bool `binapi:"bool,name=deleted" json:"deleted,omitempty"`
}
func (m *SwInterfaceEvent) Reset() { *m = SwInterfaceEvent{} }
m.PID = uint32(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.SwIfIndex
- m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.Flags
- m.Flags = IfStatusFlags(o.Uint32(tmp[pos : pos+4]))
+ m.Flags = interface_types.IfStatusFlags(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.Deleted
m.Deleted = tmp[pos] != 0
// SwInterfaceGetMacAddress represents VPP binary API message 'sw_interface_get_mac_address'.
type SwInterfaceGetMacAddress struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}
func (m *SwInterfaceGetMacAddress) Reset() { *m = SwInterfaceGetMacAddress{} }
pos := 0
_ = pos
// field[1] m.SwIfIndex
- m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
return nil
}
// SwInterfaceGetTable represents VPP binary API message 'sw_interface_get_table'.
type SwInterfaceGetTable struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
}
func (m *SwInterfaceGetTable) Reset() { *m = SwInterfaceGetTable{} }
pos := 0
_ = pos
// field[1] m.SwIfIndex
- m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.IsIPv6
m.IsIPv6 = tmp[pos] != 0
// SwInterfaceRxPlacementDetails represents VPP binary API message 'sw_interface_rx_placement_details'.
type SwInterfaceRxPlacementDetails struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
- WorkerID uint32 `binapi:"u32,name=worker_id" json:"worker_id,omitempty"`
- Mode RxMode `binapi:"rx_mode,name=mode" json:"mode,omitempty"`
+ 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"`
+ WorkerID uint32 `binapi:"u32,name=worker_id" json:"worker_id,omitempty"`
+ Mode interface_types.RxMode `binapi:"rx_mode,name=mode" json:"mode,omitempty"`
}
func (m *SwInterfaceRxPlacementDetails) Reset() { *m = SwInterfaceRxPlacementDetails{} }
pos := 0
_ = pos
// field[1] m.SwIfIndex
- m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.QueueID
m.QueueID = uint32(o.Uint32(tmp[pos : pos+4]))
m.WorkerID = uint32(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.Mode
- m.Mode = RxMode(o.Uint32(tmp[pos : pos+4]))
+ m.Mode = interface_types.RxMode(o.Uint32(tmp[pos : pos+4]))
pos += 4
return nil
}
// SwInterfaceRxPlacementDump represents VPP binary API message 'sw_interface_rx_placement_dump'.
type SwInterfaceRxPlacementDump struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}
func (m *SwInterfaceRxPlacementDump) Reset() { *m = SwInterfaceRxPlacementDump{} }
pos := 0
_ = pos
// field[1] m.SwIfIndex
- m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
return nil
}
// SwInterfaceSetFlags represents VPP binary API message 'sw_interface_set_flags'.
type SwInterfaceSetFlags struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Flags IfStatusFlags `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Flags interface_types.IfStatusFlags `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
}
func (m *SwInterfaceSetFlags) Reset() { *m = SwInterfaceSetFlags{} }
pos := 0
_ = pos
// field[1] m.SwIfIndex
- m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.Flags
- m.Flags = IfStatusFlags(o.Uint32(tmp[pos : pos+4]))
+ m.Flags = interface_types.IfStatusFlags(o.Uint32(tmp[pos : pos+4]))
pos += 4
return nil
}
// SwInterfaceSetIPDirectedBroadcast represents VPP binary API message 'sw_interface_set_ip_directed_broadcast'.
type SwInterfaceSetIPDirectedBroadcast struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
}
func (m *SwInterfaceSetIPDirectedBroadcast) Reset() { *m = SwInterfaceSetIPDirectedBroadcast{} }
pos := 0
_ = pos
// field[1] m.SwIfIndex
- m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.Enable
m.Enable = tmp[pos] != 0
// SwInterfaceSetMacAddress represents VPP binary API message 'sw_interface_set_mac_address'.
type SwInterfaceSetMacAddress struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- MacAddress MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ MacAddress MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
}
func (m *SwInterfaceSetMacAddress) Reset() { *m = SwInterfaceSetMacAddress{} }
pos := 0
_ = pos
// field[1] m.SwIfIndex
- m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.MacAddress
for i := 0; i < len(m.MacAddress); i++ {
// SwInterfaceSetMtu represents VPP binary API message 'sw_interface_set_mtu'.
type SwInterfaceSetMtu struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Mtu []uint32 `binapi:"u32[4],name=mtu" json:"mtu,omitempty" struc:"[4]uint32"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Mtu []uint32 `binapi:"u32[4],name=mtu" json:"mtu,omitempty" struc:"[4]uint32"`
}
func (m *SwInterfaceSetMtu) Reset() { *m = SwInterfaceSetMtu{} }
pos := 0
_ = pos
// field[1] m.SwIfIndex
- m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.Mtu
m.Mtu = make([]uint32, 4)
// SwInterfaceSetRxMode represents VPP binary API message 'sw_interface_set_rx_mode'.
type SwInterfaceSetRxMode struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- QueueIDValid bool `binapi:"bool,name=queue_id_valid" json:"queue_id_valid,omitempty"`
- QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
- Mode RxMode `binapi:"rx_mode,name=mode" json:"mode,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ QueueIDValid bool `binapi:"bool,name=queue_id_valid" json:"queue_id_valid,omitempty"`
+ QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
+ Mode interface_types.RxMode `binapi:"rx_mode,name=mode" json:"mode,omitempty"`
}
func (m *SwInterfaceSetRxMode) Reset() { *m = SwInterfaceSetRxMode{} }
pos := 0
_ = pos
// field[1] m.SwIfIndex
- m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.QueueIDValid
m.QueueIDValid = tmp[pos] != 0
m.QueueID = uint32(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.Mode
- m.Mode = RxMode(o.Uint32(tmp[pos : pos+4]))
+ m.Mode = interface_types.RxMode(o.Uint32(tmp[pos : pos+4]))
pos += 4
return nil
}
// SwInterfaceSetRxPlacement represents VPP binary API message 'sw_interface_set_rx_placement'.
type SwInterfaceSetRxPlacement struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
- WorkerID uint32 `binapi:"u32,name=worker_id" json:"worker_id,omitempty"`
- IsMain bool `binapi:"bool,name=is_main" json:"is_main,omitempty"`
+ 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"`
+ WorkerID uint32 `binapi:"u32,name=worker_id" json:"worker_id,omitempty"`
+ IsMain bool `binapi:"bool,name=is_main" json:"is_main,omitempty"`
}
func (m *SwInterfaceSetRxPlacement) Reset() { *m = SwInterfaceSetRxPlacement{} }
pos := 0
_ = pos
// field[1] m.SwIfIndex
- m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.QueueID
m.QueueID = uint32(o.Uint32(tmp[pos : pos+4]))
// SwInterfaceSetTable represents VPP binary API message 'sw_interface_set_table'.
type SwInterfaceSetTable struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
+ VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
}
func (m *SwInterfaceSetTable) Reset() { *m = SwInterfaceSetTable{} }
pos := 0
_ = pos
// field[1] m.SwIfIndex
- m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.IsIPv6
m.IsIPv6 = tmp[pos] != 0
// SwInterfaceSetUnnumbered represents VPP binary API message 'sw_interface_set_unnumbered'.
type SwInterfaceSetUnnumbered struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- UnnumberedSwIfIndex InterfaceIndex `binapi:"interface_index,name=unnumbered_sw_if_index" json:"unnumbered_sw_if_index,omitempty"`
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ UnnumberedSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=unnumbered_sw_if_index" json:"unnumbered_sw_if_index,omitempty"`
+ IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
}
func (m *SwInterfaceSetUnnumbered) Reset() { *m = SwInterfaceSetUnnumbered{} }
pos := 0
_ = pos
// field[1] m.SwIfIndex
- m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.UnnumberedSwIfIndex
- m.UnnumberedSwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.UnnumberedSwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.IsAdd
m.IsAdd = tmp[pos] != 0
// SwInterfaceTagAddDel represents VPP binary API message 'sw_interface_tag_add_del'.
type SwInterfaceTagAddDel struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Tag string `binapi:"string[64],name=tag" json:"tag,omitempty" struc:"[64]byte"`
+ IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Tag string `binapi:"string[64],name=tag" json:"tag,omitempty" struc:"[64]byte"`
}
func (m *SwInterfaceTagAddDel) Reset() { *m = SwInterfaceTagAddDel{} }
m.IsAdd = tmp[pos] != 0
pos += 1
// field[1] m.SwIfIndex
- m.SwIfIndex = InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
+ m.SwIfIndex = interface_types.InterfaceIndex(o.Uint32(tmp[pos : pos+4]))
pos += 4
// field[1] m.Tag
{
var _ = context.Background
var _ = io.Copy
var _ = strconv.Itoa
+var _ = strings.Contains
var _ = struc.Pack
var _ = binary.BigEndian
var _ = math.Float32bits
+var _ = net.ParseIP
+var _ = fmt.Errorf