summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/lldp-neighbor.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-05-30 22:11:47 +0200
committerLennart Poettering <lennart@poettering.net>2016-06-06 19:59:07 +0200
commit16fed825d60ca1efa57d0b9231842cda9aae7a68 (patch)
treef6ced70b32a666143b3852f2afafba90edcfa10a /src/libsystemd-network/lldp-neighbor.h
parente475d10c1be86f3c060cee86ddd6e1617608bdd8 (diff)
downloadsystemd-16fed825d60ca1efa57d0b9231842cda9aae7a68.tar.gz
sd-lldp: take triple timestamp when reading LLDP packets
It's a good idea to store away the recption time of LLDP packets in the neighbor object, simply because the LLDP data only has a validity of a certain amount of time. Hence, let's record the timestamp when we receive the datagram and expose an API for it. Also, automatically expire LLDP neighbors based on this new timestamp.
Diffstat (limited to 'src/libsystemd-network/lldp-neighbor.h')
-rw-r--r--src/libsystemd-network/lldp-neighbor.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsystemd-network/lldp-neighbor.h b/src/libsystemd-network/lldp-neighbor.h
index f203bfa604..27a27055f1 100644
--- a/src/libsystemd-network/lldp-neighbor.h
+++ b/src/libsystemd-network/lldp-neighbor.h
@@ -43,6 +43,8 @@ struct sd_lldp_neighbor {
sd_lldp *lldp;
unsigned n_ref;
+ triple_timestamp timestamp;
+
usec_t until;
unsigned prioq_idx;