All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] batctl: neighbor: Fix print neighbors table header
@ 2024-09-08 17:44 noahbpeterson1997
  2024-09-08 18:12 ` Sven Eckelmann
  0 siblings, 1 reply; 4+ messages in thread
From: noahbpeterson1997 @ 2024-09-08 17:44 UTC (permalink / raw)
  To: b.a.t.m.a.n

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);
 }

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-09-09  9:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-08 17:44 [PATCH] batctl: neighbor: Fix print neighbors table header noahbpeterson1997
2024-09-08 18:12 ` Sven Eckelmann
2024-09-08 19:47   ` noahbpeterson1997
2024-09-09  9:29     ` Sven Eckelmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.