From 16fed825d60ca1efa57d0b9231842cda9aae7a68 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 30 May 2016 22:11:47 +0200 Subject: 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. --- src/libsystemd-network/lldp-neighbor.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/libsystemd-network/lldp-neighbor.h') 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; -- cgit v1.2.3-54-g00ecf