Documentation
¶
Overview ¶
Package p2p_ethernet contains generated bindings for API file p2p_ethernet.api.
Contents:
2 aliases 6 enums 4 messages
Index ¶
- Constants
- Variables
- func AllMessages() []api.Message
- type IfStatusFlags
- type IfType
- type InterfaceIndex
- type LinkDuplex
- type MacAddress
- type MtuProto
- type P2pEthernetAdd
- func (*P2pEthernetAdd) GetCrcString() string
- func (*P2pEthernetAdd) GetMessageName() string
- func (*P2pEthernetAdd) GetMessageType() api.MessageType
- func (m *P2pEthernetAdd) Marshal(b []byte) ([]byte, error)
- func (m *P2pEthernetAdd) Reset()
- func (m *P2pEthernetAdd) Size() (size int)
- func (m *P2pEthernetAdd) Unmarshal(b []byte) error
- type P2pEthernetAddReply
- func (*P2pEthernetAddReply) GetCrcString() string
- func (*P2pEthernetAddReply) GetMessageName() string
- func (*P2pEthernetAddReply) GetMessageType() api.MessageType
- func (m *P2pEthernetAddReply) Marshal(b []byte) ([]byte, error)
- func (m *P2pEthernetAddReply) Reset()
- func (m *P2pEthernetAddReply) Size() (size int)
- func (m *P2pEthernetAddReply) Unmarshal(b []byte) error
- type P2pEthernetDel
- func (*P2pEthernetDel) GetCrcString() string
- func (*P2pEthernetDel) GetMessageName() string
- func (*P2pEthernetDel) GetMessageType() api.MessageType
- func (m *P2pEthernetDel) Marshal(b []byte) ([]byte, error)
- func (m *P2pEthernetDel) Reset()
- func (m *P2pEthernetDel) Size() (size int)
- func (m *P2pEthernetDel) Unmarshal(b []byte) error
- type P2pEthernetDelReply
- func (*P2pEthernetDelReply) GetCrcString() string
- func (*P2pEthernetDelReply) GetMessageName() string
- func (*P2pEthernetDelReply) GetMessageType() api.MessageType
- func (m *P2pEthernetDelReply) Marshal(b []byte) ([]byte, error)
- func (m *P2pEthernetDelReply) Reset()
- func (m *P2pEthernetDelReply) Size() (size int)
- func (m *P2pEthernetDelReply) Unmarshal(b []byte) error
- type RPCService
- type RxMode
- type SubIfFlags
Constants ¶
View Source
const ( APIFile = "p2p_ethernet" APIVersion = "1.0.0" VersionCrc = 0x282f1ed1 )
Variables ¶
View Source
var ( IfStatusFlags_name = map[uint32]string{ 1: "IF_STATUS_API_FLAG_ADMIN_UP", 2: "IF_STATUS_API_FLAG_LINK_UP", } IfStatusFlags_value = map[string]uint32{ "IF_STATUS_API_FLAG_ADMIN_UP": 1, "IF_STATUS_API_FLAG_LINK_UP": 2, } )
View Source
var ( IfType_name = map[uint32]string{ 1: "IF_API_TYPE_HARDWARE", 2: "IF_API_TYPE_SUB", 3: "IF_API_TYPE_P2P", 4: "IF_API_TYPE_PIPE", } IfType_value = map[string]uint32{ "IF_API_TYPE_HARDWARE": 1, "IF_API_TYPE_SUB": 2, "IF_API_TYPE_P2P": 3, "IF_API_TYPE_PIPE": 4, } )
View Source
var ( LinkDuplex_name = map[uint32]string{ 0: "LINK_DUPLEX_API_UNKNOWN", 1: "LINK_DUPLEX_API_HALF", 2: "LINK_DUPLEX_API_FULL", } LinkDuplex_value = map[string]uint32{ "LINK_DUPLEX_API_UNKNOWN": 0, "LINK_DUPLEX_API_HALF": 1, "LINK_DUPLEX_API_FULL": 2, } )
View Source
var ( MtuProto_name = map[uint32]string{ 1: "MTU_PROTO_API_L3", 2: "MTU_PROTO_API_IP4", 3: "MTU_PROTO_API_IP6", 4: "MTU_PROTO_API_MPLS", 5: "MTU_PROTO_API_N", } MtuProto_value = map[string]uint32{ "MTU_PROTO_API_L3": 1, "MTU_PROTO_API_IP4": 2, "MTU_PROTO_API_IP6": 3, "MTU_PROTO_API_MPLS": 4, "MTU_PROTO_API_N": 5, } )
View Source
var ( RxMode_name = map[uint32]string{ 0: "RX_MODE_API_UNKNOWN", 1: "RX_MODE_API_POLLING", 2: "RX_MODE_API_INTERRUPT", 3: "RX_MODE_API_ADAPTIVE", 4: "RX_MODE_API_DEFAULT", } RxMode_value = map[string]uint32{ "RX_MODE_API_UNKNOWN": 0, "RX_MODE_API_POLLING": 1, "RX_MODE_API_INTERRUPT": 2, "RX_MODE_API_ADAPTIVE": 3, "RX_MODE_API_DEFAULT": 4, } )
View Source
var ( SubIfFlags_name = map[uint32]string{ 1: "SUB_IF_API_FLAG_NO_TAGS", 2: "SUB_IF_API_FLAG_ONE_TAG", 4: "SUB_IF_API_FLAG_TWO_TAGS", 8: "SUB_IF_API_FLAG_DOT1AD", 16: "SUB_IF_API_FLAG_EXACT_MATCH", 32: "SUB_IF_API_FLAG_DEFAULT", 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY", 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY", 254: "SUB_IF_API_FLAG_MASK_VNET", 256: "SUB_IF_API_FLAG_DOT1AH", } SubIfFlags_value = map[string]uint32{ "SUB_IF_API_FLAG_NO_TAGS": 1, "SUB_IF_API_FLAG_ONE_TAG": 2, "SUB_IF_API_FLAG_TWO_TAGS": 4, "SUB_IF_API_FLAG_DOT1AD": 8, "SUB_IF_API_FLAG_EXACT_MATCH": 16, "SUB_IF_API_FLAG_DEFAULT": 32, "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64, "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128, "SUB_IF_API_FLAG_MASK_VNET": 254, "SUB_IF_API_FLAG_DOT1AH": 256, } )
Functions ¶
func AllMessages ¶
Messages returns list of all messages in this module.
Types ¶
type IfStatusFlags ¶
type IfStatusFlags uint32
IfStatusFlags defines enum 'if_status_flags'.
const ( IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1 IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2 )
func (IfStatusFlags) String ¶
func (x IfStatusFlags) String() string
type LinkDuplex ¶
type LinkDuplex uint32
LinkDuplex defines enum 'link_duplex'.
const ( LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0 LINK_DUPLEX_API_HALF LinkDuplex = 1 LINK_DUPLEX_API_FULL LinkDuplex = 2 )
func (LinkDuplex) String ¶
func (x LinkDuplex) String() string
type MacAddress ¶
type MacAddress [6]uint8
MacAddress defines alias 'mac_address'.
func ParseMacAddress ¶
func ParseMacAddress(s string) (MacAddress, error)
func (*MacAddress) MarshalText ¶
func (x *MacAddress) MarshalText() ([]byte, error)
func (MacAddress) String ¶
func (x MacAddress) String() string
func (MacAddress) ToMAC ¶
func (x MacAddress) ToMAC() net.HardwareAddr
func (*MacAddress) UnmarshalText ¶
func (x *MacAddress) UnmarshalText(text []byte) error
type P2pEthernetAdd ¶
type P2pEthernetAdd struct { ParentIfIndex InterfaceIndex `binapi:"interface_index,name=parent_if_index" json:"parent_if_index,omitempty"` SubifID uint32 `binapi:"u32,name=subif_id" json:"subif_id,omitempty"` RemoteMac MacAddress `binapi:"mac_address,name=remote_mac" json:"remote_mac,omitempty"` }
P2pEthernetAdd defines message 'p2p_ethernet_add'.
func (*P2pEthernetAdd) GetCrcString ¶
func (*P2pEthernetAdd) GetCrcString() string
func (*P2pEthernetAdd) GetMessageName ¶
func (*P2pEthernetAdd) GetMessageName() string
func (*P2pEthernetAdd) GetMessageType ¶
func (*P2pEthernetAdd) GetMessageType() api.MessageType
func (*P2pEthernetAdd) Reset ¶
func (m *P2pEthernetAdd) Reset()
func (*P2pEthernetAdd) Size ¶
func (m *P2pEthernetAdd) Size() (size int)
func (*P2pEthernetAdd) Unmarshal ¶
func (m *P2pEthernetAdd) Unmarshal(b []byte) error
type P2pEthernetAddReply ¶
type P2pEthernetAddReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` }
P2pEthernetAddReply defines message 'p2p_ethernet_add_reply'.
func (*P2pEthernetAddReply) GetCrcString ¶
func (*P2pEthernetAddReply) GetCrcString() string
func (*P2pEthernetAddReply) GetMessageName ¶
func (*P2pEthernetAddReply) GetMessageName() string
func (*P2pEthernetAddReply) GetMessageType ¶
func (*P2pEthernetAddReply) GetMessageType() api.MessageType
func (*P2pEthernetAddReply) Marshal ¶
func (m *P2pEthernetAddReply) Marshal(b []byte) ([]byte, error)
func (*P2pEthernetAddReply) Reset ¶
func (m *P2pEthernetAddReply) Reset()
func (*P2pEthernetAddReply) Size ¶
func (m *P2pEthernetAddReply) Size() (size int)
func (*P2pEthernetAddReply) Unmarshal ¶
func (m *P2pEthernetAddReply) Unmarshal(b []byte) error
type P2pEthernetDel ¶
type P2pEthernetDel struct { ParentIfIndex InterfaceIndex `binapi:"interface_index,name=parent_if_index" json:"parent_if_index,omitempty"` RemoteMac MacAddress `binapi:"mac_address,name=remote_mac" json:"remote_mac,omitempty"` }
P2pEthernetDel defines message 'p2p_ethernet_del'.
func (*P2pEthernetDel) GetCrcString ¶
func (*P2pEthernetDel) GetCrcString() string
func (*P2pEthernetDel) GetMessageName ¶
func (*P2pEthernetDel) GetMessageName() string
func (*P2pEthernetDel) GetMessageType ¶
func (*P2pEthernetDel) GetMessageType() api.MessageType
func (*P2pEthernetDel) Reset ¶
func (m *P2pEthernetDel) Reset()
func (*P2pEthernetDel) Size ¶
func (m *P2pEthernetDel) Size() (size int)
func (*P2pEthernetDel) Unmarshal ¶
func (m *P2pEthernetDel) Unmarshal(b []byte) error
type P2pEthernetDelReply ¶
type P2pEthernetDelReply struct {
Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
P2pEthernetDelReply defines message 'p2p_ethernet_del_reply'.
func (*P2pEthernetDelReply) GetCrcString ¶
func (*P2pEthernetDelReply) GetCrcString() string
func (*P2pEthernetDelReply) GetMessageName ¶
func (*P2pEthernetDelReply) GetMessageName() string
func (*P2pEthernetDelReply) GetMessageType ¶
func (*P2pEthernetDelReply) GetMessageType() api.MessageType
func (*P2pEthernetDelReply) Marshal ¶
func (m *P2pEthernetDelReply) Marshal(b []byte) ([]byte, error)
func (*P2pEthernetDelReply) Reset ¶
func (m *P2pEthernetDelReply) Reset()
func (*P2pEthernetDelReply) Size ¶
func (m *P2pEthernetDelReply) Size() (size int)
func (*P2pEthernetDelReply) Unmarshal ¶
func (m *P2pEthernetDelReply) Unmarshal(b []byte) error
type RPCService ¶
type RPCService interface { P2pEthernetAdd(ctx context.Context, in *P2pEthernetAdd) (*P2pEthernetAddReply, error) P2pEthernetDel(ctx context.Context, in *P2pEthernetDel) (*P2pEthernetDelReply, error) }
RPCService defines RPC service p2p_ethernet.
func NewServiceClient ¶
func NewServiceClient(conn api.Connection) RPCService
type SubIfFlags ¶
type SubIfFlags uint32
SubIfFlags defines enum 'sub_if_flags'.
const ( SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1 SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2 SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4 SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8 SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16 SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32 SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64 SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128 SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254 SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256 )
func (SubIfFlags) String ¶
func (x SubIfFlags) String() string
Click to show internal directories.
Click to hide internal directories.