FD.io VPP  v17.07-30-g839fa73
Vector Packet Processing
lldp_protocol.h File Reference

LLDP protocol declarations. More...

+ Include dependency graph for lldp_protocol.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  lldp_tlv_head
 

Macros

#define foreach_lldp_optional_tlv_type(F)
 
#define foreach_lldp_tlv_type(F)
 
#define LLDP_TLV_NAME(t)   LLDP_TLV_##t
 
#define F(n, t, s)   LLDP_TLV_NAME (t) = n,
 
#define foreach_chassis_id_subtype(F)
 
#define LLDP_CHASS_ID_SUBTYPE_NAME(t)   LLDP_CHASS_ID_SUBTYPE_##t
 
#define LLDP_MIN_CHASS_ID_LEN   (1)
 
#define LLDP_MAX_CHASS_ID_LEN   (255)
 
#define F(n, t, s)   LLDP_CHASS_ID_SUBTYPE_NAME (t) = n,
 
#define foreach_port_id_subtype(F)
 
#define LLDP_PORT_ID_SUBTYPE_NAME(t)   LLDP_PORT_ID_SUBTYPE_##t
 
#define LLDP_MIN_PORT_ID_LEN   (1)
 
#define LLDP_MAX_PORT_ID_LEN   (255)
 
#define F(n, t, s)   LLDP_PORT_ID_SUBTYPE_NAME (t) = n,
 

Enumerations

enum  lldp_tlv_code_t { foreach_lldp_tlv_type =(F) }
 
enum  lldp_chassis_id_subtype_t { foreach_chassis_id_subtype =(F) }
 
enum  lldp_port_id_subtype_t { foreach_port_id_subtype =(F) }
 

Functions

typedef CLIB_PACKED (struct{struct lldp_tlv_head head;u8 v[0];}) lldp_tlv_t
 
lldp_tlv_code_t lldp_tlv_get_code (const lldp_tlv_t *tlv)
 
void lldp_tlv_set_code (lldp_tlv_t *tlv, lldp_tlv_code_t code)
 
u16 lldp_tlv_get_length (const lldp_tlv_t *tlv)
 
void lldp_tlv_set_length (lldp_tlv_t *tlv, u16 length)
 
typedef CLIB_PACKED (struct{struct lldp_tlv_head head;u8 subtype;u8 id[0];}) lldp_chassis_id_tlv_t
 
typedef CLIB_PACKED (struct{struct lldp_tlv_head head;u16 ttl;}) lldp_ttl_tlv_t
 

Detailed Description

LLDP protocol declarations.

Definition in file lldp_protocol.h.

Macro Definition Documentation

#define F (   n,
  t,
 
)    LLDP_TLV_NAME (t) = n,

Definition at line 116 of file lldp_protocol.h.

#define F (   n,
  t,
 
)    LLDP_CHASS_ID_SUBTYPE_NAME (t) = n,

Definition at line 116 of file lldp_protocol.h.

#define F (   n,
  t,
 
)    LLDP_PORT_ID_SUBTYPE_NAME (t) = n,

Definition at line 116 of file lldp_protocol.h.

#define foreach_chassis_id_subtype (   F)
Value:
F (0, reserved, "Reserved") \
F (1, chassis_comp, "Chassis component") \
F (2, intf_alias, "Interface alias") \
F (3, port_comp, "Port component") \
F (4, mac_addr, "MAC address") \
F (5, net_addr, "Network address") \
F (6, intf_name, "Interface name") \
F (7, local, "Locally assigned")
#define F(n, t, s)

Definition at line 71 of file lldp_protocol.h.

#define foreach_lldp_optional_tlv_type (   F)
Value:
F (4, port_desc, "Port Description") \
F (5, sys_name, "System name") \
F (6, sys_desc, "System Description") \
F (7, sys_caps, "System Capabilities") \
F (8, mgmt_addr, "Management Address") \
F (127, org_spec, "Organizationally Specific TLV")
#define F(n, t, s)

Definition at line 26 of file lldp_protocol.h.

#define foreach_lldp_tlv_type (   F)
Value:
F (0, pdu_end, "End of LLDPDU") \
F (1, chassis_id, "Chassis ID") \
F (2, port_id, "Port ID") \
F (3, ttl, "Time To Live") \
#define foreach_lldp_optional_tlv_type(F)
Definition: lldp_protocol.h:26
#define F(n, t, s)

Definition at line 37 of file lldp_protocol.h.

#define foreach_port_id_subtype (   F)
Value:
F (0, reserved, "Reserved") \
F (1, intf_alias, "Interface alias") \
F (2, port_comp, "Port component") \
F (3, mac_addr, "MAC address") \
F (4, net_addr, "Network address") \
F (5, intf_name, "Interface name") \
F (6, agent_circuit_id, "Agent circuit ID") \
F (7, local, "Locally assigned")
#define F(n, t, s)

Definition at line 100 of file lldp_protocol.h.

#define LLDP_CHASS_ID_SUBTYPE_NAME (   t)    LLDP_CHASS_ID_SUBTYPE_##t

Definition at line 81 of file lldp_protocol.h.

#define LLDP_MAX_CHASS_ID_LEN   (255)

Definition at line 83 of file lldp_protocol.h.

#define LLDP_MAX_PORT_ID_LEN   (255)

Definition at line 112 of file lldp_protocol.h.

#define LLDP_MIN_CHASS_ID_LEN   (1)

Definition at line 82 of file lldp_protocol.h.

#define LLDP_MIN_PORT_ID_LEN   (1)

Definition at line 111 of file lldp_protocol.h.

#define LLDP_PORT_ID_SUBTYPE_NAME (   t)    LLDP_PORT_ID_SUBTYPE_##t

Definition at line 110 of file lldp_protocol.h.

#define LLDP_TLV_NAME (   t)    LLDP_TLV_##t

Definition at line 44 of file lldp_protocol.h.

Enumeration Type Documentation

Enumerator
foreach_chassis_id_subtype 

Definition at line 85 of file lldp_protocol.h.

Enumerator
foreach_port_id_subtype 

Definition at line 114 of file lldp_protocol.h.

Enumerator
foreach_lldp_tlv_type 

Definition at line 46 of file lldp_protocol.h.

Function Documentation

typedef CLIB_PACKED ( struct{struct lldp_tlv_head head;u8 v[0];}  )
typedef CLIB_PACKED ( struct{struct lldp_tlv_head head;u8 subtype;u8 id[0];}  )
typedef CLIB_PACKED ( struct{struct lldp_tlv_head head;u16 ttl;}  )
lldp_tlv_code_t lldp_tlv_get_code ( const lldp_tlv_t *  tlv)

Definition at line 86 of file lldp_input.c.

+ Here is the caller graph for this function:

u16 lldp_tlv_get_length ( const lldp_tlv_t *  tlv)

Definition at line 98 of file lldp_input.c.

+ Here is the caller graph for this function:

void lldp_tlv_set_code ( lldp_tlv_t *  tlv,
lldp_tlv_code_t  code 
)

Definition at line 92 of file lldp_input.c.

+ Here is the caller graph for this function:

void lldp_tlv_set_length ( lldp_tlv_t *  tlv,
u16  length 
)

Definition at line 104 of file lldp_input.c.

+ Here is the caller graph for this function: