summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/lldp.h
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2015-07-27 23:37:07 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2015-10-02 17:39:22 +0200
commitd8c89d6198651e34786bc78df26f313eede9918b (patch)
tree3b4bceb42a2fc5fb1825ddaa6747c011e7b718e1 /src/libsystemd-network/lldp.h
parent11e8357164694d8307dea5bcae017c98c5f125ab (diff)
lldp: add support for organizationally specific TLVs
LLDP TLVs of type 127 are used to carry organizationally specific information and include additional fields to specify the OUI and subtype. Add support for parsing such fields and functions to access the most common IEEE 802.1 specific TLVs.
Diffstat (limited to 'src/libsystemd-network/lldp.h')
-rw-r--r--src/libsystemd-network/lldp.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libsystemd-network/lldp.h b/src/libsystemd-network/lldp.h
index 5e4b283e26..19e5cc5f41 100644
--- a/src/libsystemd-network/lldp.h
+++ b/src/libsystemd-network/lldp.h
@@ -113,3 +113,16 @@ typedef enum LLDPMedCapability {
LLDP_MED_CAPABILITY_MAX,
LLDP_MED_CAPABILITY_INVALID = -1,
} LLDPMedCapability;
+
+#define LLDP_OUI_802_1 (uint8_t[]) { 0x00, 0x80, 0xc2 }
+#define LLDP_OUI_802_3 (uint8_t[]) { 0x00, 0x12, 0x0f }
+
+enum {
+ LLDP_OUI_SUBTYPE_802_1_PORT_VLAN_ID = 1,
+ LLDP_OUI_SUBTYPE_802_1_PORT_PROTOCOL_VLAN_ID = 2,
+ LLDP_OUI_SUBTYPE_802_1_VLAN_NAME = 3,
+ LLDP_OUI_SUBTYPE_802_1_PROTOCOL_IDENTITY = 4,
+ LLDP_OUI_SUBTYPE_802_1_VID_USAGE_DIGEST = 5,
+ LLDP_OUI_SUBTYPE_802_1_MANAGEMENT_VID = 6,
+ LLDP_OUI_SUBTYPE_802_1_LINK_AGGREGATION = 7,
+};