batman-adv: export single hop neighbor list via debugfs
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
This commit is contained in:

committed by
Antonio Quartulli

parent
8248a4c7c8
commit
7587405ab9
@@ -262,6 +262,13 @@ static int batadv_algorithms_open(struct inode *inode, struct file *file)
|
||||
return single_open(file, batadv_algo_seq_print_text, NULL);
|
||||
}
|
||||
|
||||
static int neighbors_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
struct net_device *net_dev = (struct net_device *)inode->i_private;
|
||||
|
||||
return single_open(file, batadv_hardif_neigh_seq_print_text, net_dev);
|
||||
}
|
||||
|
||||
static int batadv_originators_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
struct net_device *net_dev = (struct net_device *)inode->i_private;
|
||||
@@ -375,6 +382,7 @@ static struct batadv_debuginfo *batadv_general_debuginfos[] = {
|
||||
};
|
||||
|
||||
/* The following attributes are per soft interface */
|
||||
static BATADV_DEBUGINFO(neighbors, S_IRUGO, neighbors_open);
|
||||
static BATADV_DEBUGINFO(originators, S_IRUGO, batadv_originators_open);
|
||||
static BATADV_DEBUGINFO(gateways, S_IRUGO, batadv_gateways_open);
|
||||
static BATADV_DEBUGINFO(transtable_global, S_IRUGO,
|
||||
@@ -394,6 +402,7 @@ static BATADV_DEBUGINFO(nc_nodes, S_IRUGO, batadv_nc_nodes_open);
|
||||
#endif
|
||||
|
||||
static struct batadv_debuginfo *batadv_mesh_debuginfos[] = {
|
||||
&batadv_debuginfo_neighbors,
|
||||
&batadv_debuginfo_originators,
|
||||
&batadv_debuginfo_gateways,
|
||||
&batadv_debuginfo_transtable_global,
|
||||
|
Reference in New Issue
Block a user