summaryrefslogtreecommitdiff
path: root/src/systemd/sd-lldp.h
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2015-07-27 18:04:46 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2015-10-02 17:39:22 +0200
commit4fc6de5df31c81ae35e82ed91d0a2ee515edad41 (patch)
tree28eafab32619e68f35a179b196a7f3813687a9f5 /src/systemd/sd-lldp.h
parent7434883c40f3623372044f88cdde3eda49ba9758 (diff)
downloadsystemd-4fc6de5df31c81ae35e82ed91d0a2ee515edad41.tar.gz
lldp: add sd_lldp_tlv_packet_get_destination_type()
It can be useful to know the destination address of a LLDP frame because it determines the scope of propagation of the frame and thus this information be used to know whether the neighbor is connected to the same physical link. See clause 7.1 of IEEE Std 802.1AB-2009.
Diffstat (limited to 'src/systemd/sd-lldp.h')
-rw-r--r--src/systemd/sd-lldp.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/systemd/sd-lldp.h b/src/systemd/sd-lldp.h
index e472cbece9..bf6dfc1ee0 100644
--- a/src/systemd/sd-lldp.h
+++ b/src/systemd/sd-lldp.h
@@ -28,6 +28,12 @@ enum {
SD_LLDP_EVENT_UPDATE_INFO = 0,
};
+enum {
+ SD_LLDP_DESTINATION_TYPE_NEAREST_BRIDGE,
+ SD_LLDP_DESTINATION_TYPE_NEAREST_NON_TPMR_BRIDGE,
+ SD_LLDP_DESTINATION_TYPE_NEAREST_CUSTOMER_BRIDGE,
+};
+
typedef struct sd_lldp sd_lldp;
typedef struct tlv_packet sd_lldp_packet;
@@ -56,4 +62,6 @@ int sd_lldp_packet_read_port_description(sd_lldp_packet *tlv, char **data, uint1
sd_lldp_packet *sd_lldp_packet_ref(sd_lldp_packet *tlv);
sd_lldp_packet *sd_lldp_packet_unref(sd_lldp_packet *tlv);
+int sd_lldp_packet_get_destination_type(sd_lldp_packet *tlv, int *dest);
+
int sd_lldp_get_packets(sd_lldp *lldp, sd_lldp_packet ***tlvs);