diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-05-30 22:11:47 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-06-06 19:59:07 +0200 |
commit | 16fed825d60ca1efa57d0b9231842cda9aae7a68 (patch) | |
tree | f6ced70b32a666143b3852f2afafba90edcfa10a /src/systemd/sd-lldp.h | |
parent | e475d10c1be86f3c060cee86ddd6e1617608bdd8 (diff) | |
download | systemd-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/systemd/sd-lldp.h')
-rw-r--r-- | src/systemd/sd-lldp.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/systemd/sd-lldp.h b/src/systemd/sd-lldp.h index 5772d5794a..617e0f1e17 100644 --- a/src/systemd/sd-lldp.h +++ b/src/systemd/sd-lldp.h @@ -145,6 +145,7 @@ sd_lldp_neighbor *sd_lldp_neighbor_unref(sd_lldp_neighbor *n); /* Access to LLDP frame metadata */ int sd_lldp_neighbor_get_source_address(sd_lldp_neighbor *n, struct ether_addr* address); int sd_lldp_neighbor_get_destination_address(sd_lldp_neighbor *n, struct ether_addr* address); +int sd_lldp_neighbor_get_timestamp(sd_lldp_neighbor *n, clockid_t clock, uint64_t *ret); int sd_lldp_neighbor_get_raw(sd_lldp_neighbor *n, const void **ret, size_t *size); /* High-level, direct, parsed out field access. These fields exist at most once, hence may be queried directly. */ |