|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
15 #ifndef __included_lldp_protocol_h__
16 #define __included_lldp_protocol_h__
26 #define foreach_lldp_optional_tlv_type(F) \
27 F (4, port_desc, "Port Description") \
28 F (5, sys_name, "System name") \
29 F (6, sys_desc, "System Description") \
30 F (7, sys_caps, "System Capabilities") \
31 F (8, mgmt_addr, "Management Address") \
32 F (127, org_spec, "Organizationally Specific TLV")
37 #define foreach_lldp_tlv_type(F) \
38 F (0, pdu_end, "End of LLDPDU") \
39 F (1, chassis_id, "Chassis ID") \
40 F (2, port_id, "Port ID") \
41 F (3, ttl, "Time To Live") \
42 foreach_lldp_optional_tlv_type (F)
44 #define LLDP_TLV_NAME(t) LLDP_TLV_##t
48 #define F(n, t, s) LLDP_TLV_NAME (t) = n,
71 #define foreach_chassis_id_subtype(F) \
72 F (0, reserved, "Reserved") \
73 F (1, chassis_comp, "Chassis component") \
74 F (2, intf_alias, "Interface alias") \
75 F (3, port_comp, "Port component") \
76 F (4, mac_addr, "MAC address") \
77 F (5, net_addr, "Network address") \
78 F (6, intf_name, "Interface name") \
79 F (7, local, "Locally assigned")
81 #define LLDP_CHASS_ID_SUBTYPE_NAME(t) LLDP_CHASS_ID_SUBTYPE_##t
82 #define LLDP_MIN_CHASS_ID_LEN (1)
83 #define LLDP_MAX_CHASS_ID_LEN (255)
87 #define F(n, t, s) LLDP_CHASS_ID_SUBTYPE_NAME (t) = n,
97 }) lldp_chassis_id_tlv_t;
100 #define foreach_port_id_subtype(F) \
101 F (0, reserved, "Reserved") \
102 F (1, intf_alias, "Interface alias") \
103 F (2, port_comp, "Port component") \
104 F (3, mac_addr, "MAC address") \
105 F (4, net_addr, "Network address") \
106 F (5, intf_name, "Interface name") \
107 F (6, agent_circuit_id, "Agent circuit ID") \
108 F (7, local, "Locally assigned")
110 #define LLDP_PORT_ID_SUBTYPE_NAME(t) LLDP_PORT_ID_SUBTYPE_##t
111 #define LLDP_MIN_PORT_ID_LEN (1)
112 #define LLDP_MAX_PORT_ID_LEN (255)
116 #define F(n, t, s) LLDP_PORT_ID_SUBTYPE_NAME (t) = n,
126 }) lldp_port_id_tlv_t;
void lldp_tlv_set_length(lldp_tlv_t *tlv, u16 length)
#define foreach_lldp_tlv_type(F)
void lldp_tlv_set_code(lldp_tlv_t *tlv, lldp_tlv_code_t code)
typedef CLIB_PACKED(struct { struct lldp_tlv_head head;u8 v[0];}) lldp_tlv_t
#define foreach_port_id_subtype(F)
u16 lldp_tlv_get_length(const lldp_tlv_t *tlv)
#define foreach_chassis_id_subtype(F)
lldp_chassis_id_subtype_t
lldp_tlv_code_t lldp_tlv_get_code(const lldp_tlv_t *tlv)