aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/debugfs.c
diff options
context:
space:
mode:
authorAntonio Quartulli <ordex@autistici.org>2012-06-30 14:01:19 -0400
committerAntonio Quartulli <ordex@autistici.org>2012-11-07 14:00:20 -0500
commit2f1dfbe185075a50dc8f0490a136377af53a1c62 (patch)
tree45ade201ca4b63e4409fc21567db0f750abc8bc7 /net/batman-adv/debugfs.c
parent785ea1144182c341b8b85b0f8180291839d176a8 (diff)
batman-adv: Distributed ARP Table - implement local storage
Since batman-adv cannot inter-operate with the host ARP table, this patch introduces a batman-adv private storage for ARP entries exchanged within DAT. This storage will represent the node local cache in the DAT protocol. Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Diffstat (limited to 'net/batman-adv/debugfs.c')
-rw-r--r--net/batman-adv/debugfs.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/net/batman-adv/debugfs.c b/net/batman-adv/debugfs.c
index bd032bc4e262..ebc5f4d1f53c 100644
--- a/net/batman-adv/debugfs.c
+++ b/net/batman-adv/debugfs.c
@@ -31,6 +31,7 @@
31#include "vis.h" 31#include "vis.h"
32#include "icmp_socket.h" 32#include "icmp_socket.h"
33#include "bridge_loop_avoidance.h" 33#include "bridge_loop_avoidance.h"
34#include "distributed-arp-table.h"
34 35
35static struct dentry *batadv_debugfs; 36static struct dentry *batadv_debugfs;
36 37
@@ -280,6 +281,18 @@ static int batadv_bla_backbone_table_open(struct inode *inode,
280 281
281#endif 282#endif
282 283
284/**
285 * batadv_dat_cache_open - Prepare file handler for reads from dat_chache
286 * @inode: inode which was opened
287 * @file: file handle to be initialized
288 */
289static int batadv_dat_cache_open(struct inode *inode, struct file *file)
290{
291 struct net_device *net_dev = (struct net_device *)inode->i_private;
292 return single_open(file, batadv_dat_cache_seq_print_text, net_dev);
293}
294
295
283static int batadv_transtable_local_open(struct inode *inode, struct file *file) 296static int batadv_transtable_local_open(struct inode *inode, struct file *file)
284{ 297{
285 struct net_device *net_dev = (struct net_device *)inode->i_private; 298 struct net_device *net_dev = (struct net_device *)inode->i_private;
@@ -319,6 +332,7 @@ static BATADV_DEBUGINFO(bla_claim_table, S_IRUGO, batadv_bla_claim_table_open);
319static BATADV_DEBUGINFO(bla_backbone_table, S_IRUGO, 332static BATADV_DEBUGINFO(bla_backbone_table, S_IRUGO,
320 batadv_bla_backbone_table_open); 333 batadv_bla_backbone_table_open);
321#endif 334#endif
335static BATADV_DEBUGINFO(dat_cache, S_IRUGO, batadv_dat_cache_open);
322static BATADV_DEBUGINFO(transtable_local, S_IRUGO, 336static BATADV_DEBUGINFO(transtable_local, S_IRUGO,
323 batadv_transtable_local_open); 337 batadv_transtable_local_open);
324static BATADV_DEBUGINFO(vis_data, S_IRUGO, batadv_vis_data_open); 338static BATADV_DEBUGINFO(vis_data, S_IRUGO, batadv_vis_data_open);
@@ -331,6 +345,7 @@ static struct batadv_debuginfo *batadv_mesh_debuginfos[] = {
331 &batadv_debuginfo_bla_claim_table, 345 &batadv_debuginfo_bla_claim_table,
332 &batadv_debuginfo_bla_backbone_table, 346 &batadv_debuginfo_bla_backbone_table,
333#endif 347#endif
348 &batadv_debuginfo_dat_cache,
334 &batadv_debuginfo_transtable_local, 349 &batadv_debuginfo_transtable_local,
335 &batadv_debuginfo_vis_data, 350 &batadv_debuginfo_vis_data,
336 NULL, 351 NULL,