public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH 1/3] batman-adv: print the VID in the dat_cache output
@ 2013-08-22  7:21 Antonio Quartulli
  2013-08-22  7:21 ` [B.A.T.M.A.N.] [PATCH 2/3] batman-adv: fix ARP header parsing in DAT Antonio Quartulli
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Antonio Quartulli @ 2013-08-22  7:21 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Antonio Quartulli

Now that DAT is vlan aware, it should also print the VID
along with the MAC address of each cached entry.

Introduced by: 3e26722bc9f248ec4316749fc1957365c0fa5e4b
("batman-adv: make the Distributed ARP Table vlan aware")

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
 distributed-arp-table.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/distributed-arp-table.c b/distributed-arp-table.c
index df65f8c..c825d76 100644
--- a/distributed-arp-table.c
+++ b/distributed-arp-table.c
@@ -761,8 +761,8 @@ int batadv_dat_cache_seq_print_text(struct seq_file *seq, void *offset)
 		goto out;
 
 	seq_printf(seq, "Distributed ARP Table (%s):\n", net_dev->name);
-	seq_printf(seq, "          %-7s          %-13s %5s\n", "IPv4", "MAC",
-		   "last-seen");
+	seq_printf(seq, "          %-7s          %-9s %4s %11s\n", "IPv4",
+		   "MAC", "VID", "last-seen");
 
 	for (i = 0; i < hash->size; i++) {
 		head = &hash->table[i];
@@ -775,8 +775,9 @@ int batadv_dat_cache_seq_print_text(struct seq_file *seq, void *offset)
 			last_seen_msecs = last_seen_msecs % 60000;
 			last_seen_secs = last_seen_msecs / 1000;
 
-			seq_printf(seq, " * %15pI4 %14pM %6i:%02i\n",
+			seq_printf(seq, " * %15pI4 %14pM %4i %6i:%02i\n",
 				   &dat_entry->ip, dat_entry->mac_addr,
+				   BATADV_PRINT_VID(dat_entry->vid),
 				   last_seen_mins, last_seen_secs);
 		}
 		rcu_read_unlock();
-- 
1.8.1.5


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

end of thread, other threads:[~2013-08-25  7:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-22  7:21 [B.A.T.M.A.N.] [PATCH 1/3] batman-adv: print the VID in the dat_cache output Antonio Quartulli
2013-08-22  7:21 ` [B.A.T.M.A.N.] [PATCH 2/3] batman-adv: fix ARP header parsing in DAT Antonio Quartulli
2013-08-25  6:56   ` Marek Lindner
2013-08-22  7:21 ` [B.A.T.M.A.N.] [PATCH 3/3] batman-adv: tag locally generated ARP reply if needed Antonio Quartulli
2013-08-25  7:06   ` Marek Lindner
2013-08-22  7:52 ` [B.A.T.M.A.N.] [PATCH 1/3] batman-adv: print the VID in the dat_cache output Marek Lindner
2013-08-22  8:45   ` Antonio Quartulli
2013-08-25  6:53 ` Marek Lindner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox