Go to the documentation of this file.
39 #define LLDP_OUI_SIZE 3
42 #define LLDP_MAX_TLV_INFO_LEN 511
44 #define LLDP_MAX_ORG_SPECIFIC_INFO_LEN 507
47 #define LLDP_MIN_CHASSIS_ID_LEN 1
49 #define LLDP_MAX_CHASSIS_ID_LEN 255
52 #define LLDP_MIN_PORT_ID_LEN 1
54 #define LLDP_MAX_PORT_ID_LEN 255
57 #define LLDP_MIN_PORT_DESC_LEN 1
59 #define LLDP_MAX_PORT_DESC_LEN 255
62 #define LLDP_MIN_SYS_NAME_LEN 1
64 #define LLDP_MAX_SYS_NAME_LEN 255
67 #define LLDP_MIN_SYS_DESC_LEN 1
69 #define LLDP_MAX_SYS_DESC_LEN 255
72 #define LLDP_MIN_MGMT_ADDR_LEN 1
74 #define LLDP_MAX_MGMT_ADDR_LEN 31
77 #define LLDP_MIN_OID_LEN 0
79 #define LLDP_MAX_OID_LEN 128
209 #if defined(__CCRX__)
211 #elif defined(__CWCC__) || defined(_WIN32)
212 #pragma pack(push, 1)
222 #if defined(_CPU_BIG_ENDIAN) && !defined(__ICCRX__)
242 uint8_t chassisIdSubtype;
253 uint8_t portIdSubtype;
274 uint16_t supportedCap;
297 uint8_t ifNumSubtype;
317 #if defined(__CCRX__)
319 #elif defined(__CWCC__) || defined(_WIN32)
@ LLDP_MGMT_ADDR_SUBTYPE_IPV4
IPv4 address.
@ LLDP_TLV_TYPE_SYS_CAP
System Capabilities.
@ LLDP_PORT_ID_SUBTYPE_PORT_COMPONENT
Port component.
@ LLDP_CHASSIS_ID_SUBTYPE_INTERFACE_ALIAS
Interface alias.
@ LLDP_SYS_CAP_BRIDGE
Bridge.
@ LLDP_CHASSIS_ID_SUBTYPE_NETWORK_ADDR
Network address.
@ LLDP_TLV_TYPE_MGMT_ADDR
Management Address.
@ LLDP_SYS_CAP_OTHER
Other.
@ LLDP_TLV_TYPE_ORG_DEFINED
Organizationally Specific TLVs.
error_t lldpDeleteOrgDefTlv(LldpDataUnit *lldpdu, uint32_t oui, uint8_t subtype, uint_t index)
Remove an organizationally specific TLV from a LLDPDU.
LldpTlvType
TLV type values.
LldpPortIdSubtype
Port ID subtypes.
@ LLDP_IF_NUM_SUBTYPE_SYS_PORT_NUM
System port number.
typedef __packed_struct
TLV header.
@ LLDP_CHASSIS_ID_SUBTYPE_INTERFACE_NAME
Interface name.
@ LLDP_PORT_ID_SUBTYPE_INTERFACE_NAME
Interface name.
@ LLDP_TLV_TYPE_END_OF_LLDPDU
End Of LLDPDU.
LldpOui
Organizationally unique identifiers.
@ LLDP_CHASSIS_ID_SUBTYPE_MAC_ADDR
MAC address.
@ LLDP_PORT_ID_SUBTYPE_RESERVED
Reserved.
@ LLDP_SYS_CAP_REPEATER
Repeater.
LldpIfNumSubtype
Interface numbering subtypes.
@ LLDP_PORT_ID_SUBTYPE_LOCALLY_ASSIGNED
Locally assigned.
@ LLDP_PORT_ID_SUBTYPE_MAC_ADDR
MAC address.
error_t lldpGetFirstTlv(LldpDataUnit *lldpdu, LldpTlv *tlv)
Extract the first TLV from an LLDPDU.
@ LLDP_SYS_CAP_DOCSIS_CABLE_DEVICE
DOCSIS cable device.
@ LLDP_SYS_CAP_ROUTER
Router.
@ LLDP_CHASSIS_ID_SUBTYPE_CHASSIS_COMPONENT
Chassis component.
error_t lldpSetTlv(LldpDataUnit *lldpdu, uint8_t type, uint_t index, const uint8_t *value, size_t length, bool_t replace)
Add or replace a TLV.
@ LLDP_IF_NUM_SUBTYPE_UNKNOWN
Unknown.
error_t lldpDecodeMgmtAddrTlv(const uint8_t *value, size_t length, const LldpMgmtAddrTlv1 **mgmtAddr1, const LldpMgmtAddrTlv2 **mgmtAddr2)
Decode the contents of a Management Address TLV.
@ LLDP_MGMT_ADDR_SUBTYPE_ALL_802
MAC address.
@ LLDP_DOT1_OUI
IEEE 802.1.
@ LLDP_PORT_ID_SUBTYPE_NETWORK_ADDR
Network address.
@ LLDP_TLV_TYPE_SYS_NAME
System Name.
@ LLDP_CHASSIS_ID_SUBTYPE_RESERVED
Reserved.
@ LLDP_TLV_TYPE_CHASSIS_ID
Chassis ID.
@ LLDP_IF_NUM_SUBTYPE_IF_INDEX
Interface index.
error_t lldpDeleteTlv(LldpDataUnit *lldpdu, uint8_t type, uint_t index)
Remove a TLV from a LLDPDU.
@ LLDP_TLV_TYPE_SYS_DESC
System Description.
@ LLDP_SYS_CAP_TELEPHONE
Telephone.
@ LLDP_DOT3_OUI
IEEE 802.3.
@ LLDP_PORT_ID_SUBTYPE_AGENT_CIRCUIT_ID
Agent circuit ID.
error_t lldpGetNextTlv(LldpDataUnit *lldpdu, LldpTlv *tlv)
Extract the next TLV from an LLDPDU.
LldpChassisIdSubtype
Chassis ID subtypes.
@ LLDP_SYS_CAP_WLAN_ACCESS_POINT
WLAN Access Point.
@ LLDP_CHASSIS_ID_SUBTYPE_LOCALLY_ASSIGNED
Locally assigned.
@ LLDP_MGMT_ADDR_SUBTYPE_OTHER
Other.
error_t lldpGetOrgDefTlv(LldpDataUnit *lldpdu, uint32_t oui, uint8_t subtype, uint_t index, const uint8_t **value, size_t *length)
Search an LLDPDU for an organizationally specific TLV.
@ LLDP_SYS_CAP_STATION_ONLY
Station Only.
@ LLDP_TLV_TYPE_PORT_ID
Port ID.
LLDP (Link Layer Discovery Protocol)
LldpMgmtAddrSubtype
Management address subtypes.
@ LLDP_TLV_TYPE_TIME_TO_LIVE
Time To Live.
error_t lldpGetTlv(LldpDataUnit *lldpdu, uint8_t type, uint_t index, const uint8_t **value, size_t *length)
Search a LLDPDU for a given TLV.
@ LLDP_TLV_TYPE_PORT_DESC
Port Description.
@ LLDP_CHASSIS_ID_SUBTYPE_PORT_COMPONENT
Port component.
@ LLDP_MGMT_ADDR_SUBTYPE_IPV6
IPv6 address.
@ LLDP_PORT_ID_SUBTYPE_INTERFACE_ALIAS
Interface alias.
LldpSysCap
System capabilities.
error_t lldpSetOrgDefTlv(LldpDataUnit *lldpdu, uint32_t oui, uint8_t subtype, uint_t index, const uint8_t *value, size_t length, bool_t replace)
Add or replace an organizationally specific TLV.