[commits] [batctl] master: batctl: add support for the DAT local table (167c37a)

postmaster at open-mesh.org postmaster at open-mesh.org
Sun Oct 14 17:01:39 CEST 2012


Repository : ssh://git@open-mesh.org/batctl

On branch  : master

>---------------------------------------------------------------

commit 167c37add861a1f7c1641df078e0cdbf32556945
Author: Antonio Quartulli <ordex at autistici.org>
Date:   Sun Oct 14 16:54:31 2012 +0200

    batctl: add support for the DAT local table
    
    With the introduction of DAT in batman-adv, another table is now exported
    through debugfs. This patch adds the possibility to print it
    
    Signed-off-by: Antonio Quartulli <ordex at autistici.org>
    Signed-off-by: Marek Lindner <lindner_marek at yahoo.de>


>---------------------------------------------------------------

167c37add861a1f7c1641df078e0cdbf32556945
 README       |   18 ++++++++++++++++++
 debug.c      |    5 +++++
 debug.h      |    1 +
 functions.c  |    1 +
 man/batctl.8 |    3 +++
 5 files changed, 28 insertions(+)

diff --git a/README b/README
index 03d36c4..5e58452 100644
--- a/README
+++ b/README
@@ -408,6 +408,24 @@ where:
 
 If any of the flags is not enabled, a '.' will substitute its symbol.
 
+batctl dat_cache
+=================
+
+display the local D.A.T. cache
+
+Usage batctl dat_cache|dc
+
+Example:
+
+Distributed ARP Table (bat0):
+          IPv4             MAC           last-seen
+ *     172.100.0.1 b6:9b:d0:ea:b1:13      0:00
+
+where:
+- IPv4 is the IP address of a client in the mesh network
+- MAC is the MAC address associated to that IP
+- last-seen is the amount of time since last refresh of this entry
+
 batctl vis_mode
 =================
 
diff --git a/debug.c b/debug.c
index 9b5146f..a230a12 100644
--- a/debug.c
+++ b/debug.c
@@ -64,6 +64,11 @@ const struct debug_table_data batctl_debug_tables[BATCTL_TABLE_NUM] = {
 		.opt_short = "bbt",
 		.debugfs_name = "bla_backbone_table",
 	},
+	{
+		.opt_long = "dat_cache",
+		.opt_short = "dc",
+		.debugfs_name = "dat_cache",
+	},
 };
 
 void debug_table_usage(int debug_table)
diff --git a/debug.h b/debug.h
index 6068c2c..4e935cb 100644
--- a/debug.h
+++ b/debug.h
@@ -31,6 +31,7 @@ enum batctl_debug_tables {
 	BATCTL_TABLE_TRANSGLOBAL,
 	BATCTL_TABLE_BLA_CLAIMS,
 	BATCTL_TABLE_BLA_BACKBONES,
+	BATCTL_TABLE_DAT,
 	BATCTL_TABLE_NUM,
 };
 
diff --git a/functions.c b/functions.c
index e095fd0..0d88137 100644
--- a/functions.c
+++ b/functions.c
@@ -48,6 +48,7 @@ const char *fs_compile_out_param[] = {
 	batctl_settings[BATCTL_SETTINGS_BLA].sysfs_name,
 	batctl_debug_tables[BATCTL_TABLE_BLA_CLAIMS].debugfs_name,
 	batctl_debug_tables[BATCTL_TABLE_BLA_BACKBONES].debugfs_name,
+	batctl_debug_tables[BATCTL_TABLE_DAT].debugfs_name,
 	NULL,
 };
 
diff --git a/man/batctl.8 b/man/batctl.8
index ab02e9a..310b43f 100644
--- a/man/batctl.8
+++ b/man/batctl.8
@@ -187,6 +187,9 @@ List of debug tables:
 .RS 10
 \- backbonetable|bbt (compile time option)
 .RE
+.RS 10
+\- datcache|dc (compile time option)
+.RE
 .RE
 .br
 .IP "\fBstatistics\fP|\fBs\fP"



More information about the commits mailing list