netlink_print_neighbors() now prints the correct header to match what batman-advanced currently outputs.
The examples in the README.rst are updated too.
Signed-off-by: Noah Peterson noahbpeterson1997@gmail.com --- README.rst | 6 +++--- neighbors.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/README.rst b/README.rst index 3495fba..5eda1d3 100644 --- a/README.rst +++ b/README.rst @@ -376,9 +376,9 @@ Usage::
Example::
- IF Neighbor last-seen - enp0s1 16:7b:3c:c2:bf:b8 4.612s - enp0s1 ae:1b:bf:52:25:58 0.740s + Neighbor last-seen speed IF + 16:7b:3c:c2:bf:b8 4.612s ( 1000.0) [ enp0s1] + ae:1b:bf:52:25:58 0.740s ( 1000.0) [ enp0s1]
batctl originators diff --git a/neighbors.c b/neighbors.c index 3102b0e..9dcdb81 100644 --- a/neighbors.c +++ b/neighbors.c @@ -121,7 +121,7 @@ static int netlink_print_neighbors(struct state *state, char *orig_iface, { return netlink_print_common(state, orig_iface, read_opts, orig_timeout, watch_interval, - "IF Neighbor last-seen\n", + " Neighbor last-seen speed IF\n", BATADV_CMD_GET_NEIGHBORS, neighbors_callback); }