diff options
author | Antonio Quartulli <ordex@autistici.org> | 2012-06-30 20:01:19 +0200 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-11-07 20:00:20 +0100 |
commit | 2f1dfbe185075a50dc8f0490a136377af53a1c62 (patch) | |
tree | 45ade201ca4b63e4409fc21567db0f750abc8bc7 /net/batman-adv/debugfs.c | |
parent | batman-adv: Distributed ARP Table - create DHT helper functions (diff) | |
download | linux-2f1dfbe185075a50dc8f0490a136377af53a1c62.tar.xz linux-2f1dfbe185075a50dc8f0490a136377af53a1c62.zip |
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.c | 15 |
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 @@ #include "vis.h" #include "icmp_socket.h" #include "bridge_loop_avoidance.h" +#include "distributed-arp-table.h" static struct dentry *batadv_debugfs; @@ -280,6 +281,18 @@ static int batadv_bla_backbone_table_open(struct inode *inode, #endif +/** + * batadv_dat_cache_open - Prepare file handler for reads from dat_chache + * @inode: inode which was opened + * @file: file handle to be initialized + */ +static int batadv_dat_cache_open(struct inode *inode, struct file *file) +{ + struct net_device *net_dev = (struct net_device *)inode->i_private; + return single_open(file, batadv_dat_cache_seq_print_text, net_dev); +} + + static int batadv_transtable_local_open(struct inode *inode, struct file *file) { 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); static BATADV_DEBUGINFO(bla_backbone_table, S_IRUGO, batadv_bla_backbone_table_open); #endif +static BATADV_DEBUGINFO(dat_cache, S_IRUGO, batadv_dat_cache_open); static BATADV_DEBUGINFO(transtable_local, S_IRUGO, batadv_transtable_local_open); static BATADV_DEBUGINFO(vis_data, S_IRUGO, batadv_vis_data_open); @@ -331,6 +345,7 @@ static struct batadv_debuginfo *batadv_mesh_debuginfos[] = { &batadv_debuginfo_bla_claim_table, &batadv_debuginfo_bla_backbone_table, #endif + &batadv_debuginfo_dat_cache, &batadv_debuginfo_transtable_local, &batadv_debuginfo_vis_data, NULL, |