Documentation ¶
Overview ¶
Package lldp contains generated bindings for API file lldp.api.
Contents: - 2 enums - 7 messages
Index ¶
- Constants
- Variables
- func AllMessages() []api.Message
- type ChassisIDSubtype
- type LldpConfig
- func (*LldpConfig) GetCrcString() string
- func (*LldpConfig) GetMessageName() string
- func (*LldpConfig) GetMessageType() api.MessageType
- func (m *LldpConfig) Marshal(b []byte) ([]byte, error)
- func (m *LldpConfig) Reset()
- func (m *LldpConfig) Size() (size int)
- func (m *LldpConfig) Unmarshal(b []byte) error
- type LldpConfigReply
- func (*LldpConfigReply) GetCrcString() string
- func (*LldpConfigReply) GetMessageName() string
- func (*LldpConfigReply) GetMessageType() api.MessageType
- func (m *LldpConfigReply) Marshal(b []byte) ([]byte, error)
- func (m *LldpConfigReply) Reset()
- func (m *LldpConfigReply) Size() (size int)
- func (m *LldpConfigReply) Unmarshal(b []byte) error
- type LldpDetails
- func (*LldpDetails) GetCrcString() string
- func (*LldpDetails) GetMessageName() string
- func (*LldpDetails) GetMessageType() api.MessageType
- func (m *LldpDetails) Marshal(b []byte) ([]byte, error)
- func (m *LldpDetails) Reset()
- func (m *LldpDetails) Size() (size int)
- func (m *LldpDetails) Unmarshal(b []byte) error
- type LldpDump
- type LldpDumpReply
- func (*LldpDumpReply) GetCrcString() string
- func (*LldpDumpReply) GetMessageName() string
- func (*LldpDumpReply) GetMessageType() api.MessageType
- func (m *LldpDumpReply) Marshal(b []byte) ([]byte, error)
- func (m *LldpDumpReply) Reset()
- func (m *LldpDumpReply) Size() (size int)
- func (m *LldpDumpReply) Unmarshal(b []byte) error
- type PortIDSubtype
- type RPCService
- type RPCService_LldpDumpClient
- type SwInterfaceSetLldp
- func (*SwInterfaceSetLldp) GetCrcString() string
- func (*SwInterfaceSetLldp) GetMessageName() string
- func (*SwInterfaceSetLldp) GetMessageType() api.MessageType
- func (m *SwInterfaceSetLldp) Marshal(b []byte) ([]byte, error)
- func (m *SwInterfaceSetLldp) Reset()
- func (m *SwInterfaceSetLldp) Size() (size int)
- func (m *SwInterfaceSetLldp) Unmarshal(b []byte) error
- type SwInterfaceSetLldpReply
- func (*SwInterfaceSetLldpReply) GetCrcString() string
- func (*SwInterfaceSetLldpReply) GetMessageName() string
- func (*SwInterfaceSetLldpReply) GetMessageType() api.MessageType
- func (m *SwInterfaceSetLldpReply) Marshal(b []byte) ([]byte, error)
- func (m *SwInterfaceSetLldpReply) Reset()
- func (m *SwInterfaceSetLldpReply) Size() (size int)
- func (m *SwInterfaceSetLldpReply) Unmarshal(b []byte) error
Constants ¶
const ( APIFile = "lldp" APIVersion = "2.0.0" VersionCrc = 0xc26a6a68 )
Variables ¶
var ( ChassisIDSubtype_name = map[uint32]string{ 0: "CHASSIS_ID_SUBTYPE_RESERVED", 1: "CHASSIS_ID_SUBTYPE_CHASSIS_COMP", 2: "CHASSIS_ID_SUBTYPE_INTF_ALIAS", 3: "CHASSIS_ID_SUBTYPE_PORT_COMP", 4: "CHASSIS_ID_SUBTYPE_MAC_ADDR", 5: "CHASSIS_ID_SUBTYPE_NET_ADDR", 6: "CHASSIS_ID_SUBTYPE_INTF_NAME", 7: "CHASSIS_ID_SUBTYPE_LOCAL", } ChassisIDSubtype_value = map[string]uint32{ "CHASSIS_ID_SUBTYPE_RESERVED": 0, "CHASSIS_ID_SUBTYPE_CHASSIS_COMP": 1, "CHASSIS_ID_SUBTYPE_INTF_ALIAS": 2, "CHASSIS_ID_SUBTYPE_PORT_COMP": 3, "CHASSIS_ID_SUBTYPE_MAC_ADDR": 4, "CHASSIS_ID_SUBTYPE_NET_ADDR": 5, "CHASSIS_ID_SUBTYPE_INTF_NAME": 6, "CHASSIS_ID_SUBTYPE_LOCAL": 7, } )
var ( PortIDSubtype_name = map[uint32]string{ 0: "PORT_ID_SUBTYPE_RESERVED", 1: "PORT_ID_SUBTYPE_INTF_ALIAS", 2: "PORT_ID_SUBTYPE_PORT_COMP", 3: "PORT_ID_SUBTYPE_MAC_ADDR", 4: "PORT_ID_SUBTYPE_NET_ADDR", 5: "PORT_ID_SUBTYPE_INTF_NAME", 6: "PORT_ID_SUBTYPE_AGENT_CIRCUIT_ID", 7: "PORT_ID_SUBTYPE_LOCAL", } PortIDSubtype_value = map[string]uint32{ "PORT_ID_SUBTYPE_RESERVED": 0, "PORT_ID_SUBTYPE_INTF_ALIAS": 1, "PORT_ID_SUBTYPE_PORT_COMP": 2, "PORT_ID_SUBTYPE_MAC_ADDR": 3, "PORT_ID_SUBTYPE_NET_ADDR": 4, "PORT_ID_SUBTYPE_INTF_NAME": 5, "PORT_ID_SUBTYPE_AGENT_CIRCUIT_ID": 6, "PORT_ID_SUBTYPE_LOCAL": 7, } )
Functions ¶
func AllMessages ¶
Messages returns list of all messages in this module.
Types ¶
type ChassisIDSubtype ¶
type ChassisIDSubtype uint32
ChassisIDSubtype defines enum 'chassis_id_subtype'.
const ( CHASSIS_ID_SUBTYPE_RESERVED ChassisIDSubtype = 0 CHASSIS_ID_SUBTYPE_CHASSIS_COMP ChassisIDSubtype = 1 CHASSIS_ID_SUBTYPE_INTF_ALIAS ChassisIDSubtype = 2 CHASSIS_ID_SUBTYPE_PORT_COMP ChassisIDSubtype = 3 CHASSIS_ID_SUBTYPE_MAC_ADDR ChassisIDSubtype = 4 CHASSIS_ID_SUBTYPE_NET_ADDR ChassisIDSubtype = 5 CHASSIS_ID_SUBTYPE_INTF_NAME ChassisIDSubtype = 6 CHASSIS_ID_SUBTYPE_LOCAL ChassisIDSubtype = 7 )
func (ChassisIDSubtype) String ¶
func (x ChassisIDSubtype) String() string
type LldpConfig ¶
type LldpConfig struct { TxHold uint32 `binapi:"u32,name=tx_hold" json:"tx_hold,omitempty"` TxInterval uint32 `binapi:"u32,name=tx_interval" json:"tx_interval,omitempty"` SystemName string `binapi:"string[],name=system_name" json:"system_name,omitempty"` }
configure global parameter for LLDP
- system_name - VPP system name
- tx_hold - multiplier for tx_interval when setting time-to-live (TTL) value in the LLDP packets
- tx_interval - time interval, in seconds, between each LLDP frames
LldpConfig defines message 'lldp_config'.
func (*LldpConfig) GetCrcString ¶
func (*LldpConfig) GetCrcString() string
func (*LldpConfig) GetMessageName ¶
func (*LldpConfig) GetMessageName() string
func (*LldpConfig) GetMessageType ¶
func (*LldpConfig) GetMessageType() api.MessageType
func (*LldpConfig) Reset ¶
func (m *LldpConfig) Reset()
func (*LldpConfig) Size ¶
func (m *LldpConfig) Size() (size int)
func (*LldpConfig) Unmarshal ¶
func (m *LldpConfig) Unmarshal(b []byte) error
type LldpConfigReply ¶
type LldpConfigReply struct {
Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
LldpConfigReply defines message 'lldp_config_reply'.
func (*LldpConfigReply) GetCrcString ¶
func (*LldpConfigReply) GetCrcString() string
func (*LldpConfigReply) GetMessageName ¶
func (*LldpConfigReply) GetMessageName() string
func (*LldpConfigReply) GetMessageType ¶
func (*LldpConfigReply) GetMessageType() api.MessageType
func (*LldpConfigReply) Reset ¶
func (m *LldpConfigReply) Reset()
func (*LldpConfigReply) Size ¶
func (m *LldpConfigReply) Size() (size int)
func (*LldpConfigReply) Unmarshal ¶
func (m *LldpConfigReply) Unmarshal(b []byte) error
type LldpDetails ¶
type LldpDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` LastHeard float64 `binapi:"f64,name=last_heard" json:"last_heard,omitempty"` LastSent float64 `binapi:"f64,name=last_sent" json:"last_sent,omitempty"` ChassisID []byte `binapi:"u8[64],name=chassis_id" json:"chassis_id,omitempty"` ChassisIDLen uint8 `binapi:"u8,name=chassis_id_len" json:"chassis_id_len,omitempty"` PortID []byte `binapi:"u8[64],name=port_id" json:"port_id,omitempty"` PortIDLen uint8 `binapi:"u8,name=port_id_len" json:"port_id_len,omitempty"` TTL uint16 `binapi:"u16,name=ttl" json:"ttl,omitempty"` PortIDSubtype PortIDSubtype `binapi:"port_id_subtype,name=port_id_subtype" json:"port_id_subtype,omitempty"` ChassisIDSubtype ChassisIDSubtype `binapi:"chassis_id_subtype,name=chassis_id_subtype" json:"chassis_id_subtype,omitempty"` }
Details about neighbor
- sw_if_index - interface where neighbor was discovered
- last_heard - last heard time
- last_sent - last sent time
- chassis_id - chassis id value
- chassis_id_len - length for chassis id
- port_id - port id value
- port_id_len - length for port id
- ttl - time to length for the neighbour
- port_id_subtype - subtype for port_id
- chassis_id_sybtype - sybtype for chassis_id
LldpDetails defines message 'lldp_details'. InProgress: the message form may change in the future versions
func (*LldpDetails) GetCrcString ¶
func (*LldpDetails) GetCrcString() string
func (*LldpDetails) GetMessageName ¶
func (*LldpDetails) GetMessageName() string
func (*LldpDetails) GetMessageType ¶
func (*LldpDetails) GetMessageType() api.MessageType
func (*LldpDetails) Reset ¶
func (m *LldpDetails) Reset()
func (*LldpDetails) Size ¶
func (m *LldpDetails) Size() (size int)
func (*LldpDetails) Unmarshal ¶
func (m *LldpDetails) Unmarshal(b []byte) error
type LldpDump ¶
type LldpDump struct {
Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"`
}
Dump lldp neighbors LldpDump defines message 'lldp_dump'.
func (*LldpDump) GetCrcString ¶
func (*LldpDump) GetMessageName ¶
func (*LldpDump) GetMessageType ¶
func (*LldpDump) GetMessageType() api.MessageType
type LldpDumpReply ¶
type LldpDumpReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"` }
LldpDumpReply defines message 'lldp_dump_reply'.
func (*LldpDumpReply) GetCrcString ¶
func (*LldpDumpReply) GetCrcString() string
func (*LldpDumpReply) GetMessageName ¶
func (*LldpDumpReply) GetMessageName() string
func (*LldpDumpReply) GetMessageType ¶
func (*LldpDumpReply) GetMessageType() api.MessageType
func (*LldpDumpReply) Reset ¶
func (m *LldpDumpReply) Reset()
func (*LldpDumpReply) Size ¶
func (m *LldpDumpReply) Size() (size int)
func (*LldpDumpReply) Unmarshal ¶
func (m *LldpDumpReply) Unmarshal(b []byte) error
type PortIDSubtype ¶
type PortIDSubtype uint32
PortIDSubtype defines enum 'port_id_subtype'.
const ( PORT_ID_SUBTYPE_RESERVED PortIDSubtype = 0 PORT_ID_SUBTYPE_INTF_ALIAS PortIDSubtype = 1 PORT_ID_SUBTYPE_PORT_COMP PortIDSubtype = 2 PORT_ID_SUBTYPE_MAC_ADDR PortIDSubtype = 3 PORT_ID_SUBTYPE_NET_ADDR PortIDSubtype = 4 PORT_ID_SUBTYPE_INTF_NAME PortIDSubtype = 5 PORT_ID_SUBTYPE_AGENT_CIRCUIT_ID PortIDSubtype = 6 PORT_ID_SUBTYPE_LOCAL PortIDSubtype = 7 )
func (PortIDSubtype) String ¶
func (x PortIDSubtype) String() string
type RPCService ¶
type RPCService interface { LldpConfig(ctx context.Context, in *LldpConfig) (*LldpConfigReply, error) LldpDump(ctx context.Context, in *LldpDump) (RPCService_LldpDumpClient, error) SwInterfaceSetLldp(ctx context.Context, in *SwInterfaceSetLldp) (*SwInterfaceSetLldpReply, error) }
RPCService defines RPC service lldp.
func NewServiceClient ¶
func NewServiceClient(conn api.Connection) RPCService
type RPCService_LldpDumpClient ¶
type RPCService_LldpDumpClient interface { Recv() (*LldpDetails, *LldpDumpReply, error) api.Stream }
type SwInterfaceSetLldp ¶
type SwInterfaceSetLldp struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` MgmtIP4 ip_types.IP4Address `binapi:"ip4_address,name=mgmt_ip4" json:"mgmt_ip4,omitempty"` MgmtIP6 ip_types.IP6Address `binapi:"ip6_address,name=mgmt_ip6" json:"mgmt_ip6,omitempty"` MgmtOid []byte `binapi:"u8[128],name=mgmt_oid" json:"mgmt_oid,omitempty"` Enable bool `binapi:"bool,name=enable,default=true" json:"enable,omitempty"` PortDesc string `binapi:"string[],name=port_desc" json:"port_desc,omitempty"` }
Interface set LLDP request
- sw_if_index - interface for which to enable/disable LLDP
- mgmt_ip4_addr - management ip4 address of the interface
- mgmt_ip6_addr - management ip6 address of the interface
- mgmt_oid - OID(Object Identifier) of the interface
- enable - if non-zero enable, else disable
- port_desc - local port description
SwInterfaceSetLldp defines message 'sw_interface_set_lldp'.
func (*SwInterfaceSetLldp) GetCrcString ¶
func (*SwInterfaceSetLldp) GetCrcString() string
func (*SwInterfaceSetLldp) GetMessageName ¶
func (*SwInterfaceSetLldp) GetMessageName() string
func (*SwInterfaceSetLldp) GetMessageType ¶
func (*SwInterfaceSetLldp) GetMessageType() api.MessageType
func (*SwInterfaceSetLldp) Reset ¶
func (m *SwInterfaceSetLldp) Reset()
func (*SwInterfaceSetLldp) Size ¶
func (m *SwInterfaceSetLldp) Size() (size int)
func (*SwInterfaceSetLldp) Unmarshal ¶
func (m *SwInterfaceSetLldp) Unmarshal(b []byte) error
type SwInterfaceSetLldpReply ¶
type SwInterfaceSetLldpReply struct {
Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
SwInterfaceSetLldpReply defines message 'sw_interface_set_lldp_reply'.
func (*SwInterfaceSetLldpReply) GetCrcString ¶
func (*SwInterfaceSetLldpReply) GetCrcString() string
func (*SwInterfaceSetLldpReply) GetMessageName ¶
func (*SwInterfaceSetLldpReply) GetMessageName() string
func (*SwInterfaceSetLldpReply) GetMessageType ¶
func (*SwInterfaceSetLldpReply) GetMessageType() api.MessageType
func (*SwInterfaceSetLldpReply) Marshal ¶
func (m *SwInterfaceSetLldpReply) Marshal(b []byte) ([]byte, error)
func (*SwInterfaceSetLldpReply) Reset ¶
func (m *SwInterfaceSetLldpReply) Reset()
func (*SwInterfaceSetLldpReply) Size ¶
func (m *SwInterfaceSetLldpReply) Size() (size int)
func (*SwInterfaceSetLldpReply) Unmarshal ¶
func (m *SwInterfaceSetLldpReply) Unmarshal(b []byte) error