Module for LLDP (Link Layer Discovery Protocol).
This module is in BETA. APIs that we expose here are subject to change in future minor and patch releases. Feedback is greatly appreciated.
LLDP is a link layer protocol that sends “TLVs” across the link, allowing devices to advertise their identities and properties over a network. The protocol is uni-directional (no acks).
This module provides access to information learned from neighbors directly connected via Ethernet interfaces. It can also provide proprietary information to those neighbors via “Organizationally defined TLVs”. The mandatory info exchanged over the link are the interface’s name, the chassis ID, the system name and the management port address (over which more information can be gleaned via protocols such as SNMP). The protocol has to be enabled per interface and per direction. On EOS, LLDP is disabled by default, but once enabled (cli: “lldp run”), all interfaces are enabled bi-directionally by default.
The type of an LLDP TLV is composed of a 24 bit organization (vendor/manufacturer) number assigned by IEEE (also called OUI: organizationally unique identifier), and a subtype which is managed by that organization. That’s the lldp_tlv_type_t. When you add the payload (of 0-507 octets) you get a TLV.
When enabled, EOS transmits these TLVS on an interface (if they apply)
Handler class to notify of changes in LLDP. In the handler context, “tlv” means received tlv.
Public Functions
Called when a neighbor starts sending LLDP information. `intf` refers to the local interface that this information was received on.
Called when a neighbor’s LLDP information ages out (or is disconnected).
Called when the remote information has changed and all has been updated; this can be used as an alternative to reacting to each single callback provided below.
Called when the remote’s “chassis ID” changed (mandatory TLV).
Called when the remote’s “interface ID” changed (mandatory TLV).
Called when the remote’s “system name” changed.
Called when the remote’s “system description” changed.
Called when the remote’s “interface description” changed.
Called when the remote’s “default vlan” changed.
Called when the remote’s “management vlan” changed.
Called when the remote’s “maximum transmission unit” changed.
Called when the remote’s “management address” changed.
Called when the remote’s “link aggregation config/status” changed.
Called when the remote’s “phy negotiation config/status” changed.
Called when a new TLV type is received, or its content has changed.
Called when a TLV type previously received is now absent from advertisements.
Called when a transmission timer value change became effective.
Called when a hold timer value change became effective.
Called when an LLDP interface status change became effective.
A manager for LLDP information.
Create one of these via sdk.get_lldp_mgr() prior to starting the agent main loop. When your eos::agent_handler::on_initialized virtual function is called, the manager is valid for use. In manager context, “tlv” means received tlv. What is sent it called tx_tlv.
Public Functions
Enable LLDP on an interface – on by default. LLDP is unidirectional, so enablement can be split by direction.
The LLDP transmit timer specifies how often TLVs are sent (aka “refreshed”), in seconds, default 30s, range 5-32768
The LLDP holding time determines how long the recipient of our TLVs should keep them un-refreshed, in seconds, default 120s, range 10-65535. This is sent to the neighbor as the “ttl” value (this holding time limit is imposed on our neighbor, has no effect locally).
Get the chassisID of the remote interface (< 255 octets).
Get the port ID of the remote interface (< 255 octets).
interface description: max string size 255, empty if not rx-ed
sysname: max string size 255, empty if not rx-ed
sysdescr: max string size 255, empty if not rx-ed
system capabilities bitmap, ‘other’ if not rx-ed
The default vlan ID (vlan-id for untagged packets); 0 if none or not rx-ed.
The vlan-id on which the managment interface is available; 0 if none.
The max frame size on the link; 0 if not rx-ed.
Port-channel this interface is member of (and capability/status) !value returns false if this tlv was not received.
management info (address, snmp-ifindex, sysDescr-oid) !value returns false if this tlv was not received. The type of address (and its encoding) is described using IANA’s AddressFamilyNumbers, which is available here: http://www.iana.org/assignments/ianaaddressfamilynumbers-mib/ ianaaddressfamilynumbers-mib. In EOS’s case, the address family is an IPV4 address.
The mac phy config status info (auto-negotiation) !value returns false if this tlv was not received.
Send a/multiple application defined TLV on a interface. Transmission will occur every tx_timer until revoked.
Get en-block (there is no iterator, cannot be many given mtu limit this includes all “organizationnally defined TLVs” (owned by this app or not)
Protected Functions
Private Members
Friends
Warning
doxygenfile: Found multiple matches for file “eos/types/lldp.h