]> git.ipfire.org Git - thirdparty/lldpd.git/commit
Allow configuring tx-interval in milliseconds
authorJean-Pierre Tosoni <jp.tosoni@acksys.fr>
Wed, 15 Jan 2020 17:56:08 +0000 (18:56 +0100)
committerJean-Pierre Tosoni <jp.tosoni@acksys.fr>
Thu, 16 Jan 2020 08:36:09 +0000 (09:36 +0100)
commit74f55c2e029da5211642dd886856eac6d3301cd7
tree3394cec9d0b653149301c4ff5a50f167eb2ea77d
parentb2bd6c456edc7e8cb858651c6634d02ddc609a1b
Allow configuring tx-interval in milliseconds

This is a prerequisite for TTDP support.

Usage: add "ms" suffix to the delay value to force interpretation as a
milliseconds value:

 lldpcli configure lldp tx-interval 200ms

When computing a TTL (TTL = tx-interval * tx-hold), the result is rounded
up to the next second, as LLDP frames need a value in seconds.

A new tx-interval-ms item is added to the json output. The old tx-interval
is kept in seconds (rounded up) for compatibility.
src/client/conf-lldp.c
src/client/display.c
src/daemon/agent.c
src/daemon/client.c
src/daemon/event.c
src/daemon/lldpd.c
src/daemon/protocols/edp.c
src/daemon/protocols/sonmp.c
src/lib/atoms/config.c
src/lib/lldpctl.h
src/lldpd-structs.h