Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9f4980e6 authored by Simon Wunderlich's avatar Simon Wunderlich Committed by Antonio Quartulli
Browse files

batman-adv: remove vis functionality



This is replaced by a userspace program, we don't need this
functionality to bloat the kernel.

Signed-off-by: default avatarSimon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: default avatarMarek Lindner <lindner_marek@yahoo.de>
Signed-off-by: default avatarAntonio Quartulli <antonio@meshcoding.com>
parent 0035f97e
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -88,14 +88,3 @@ Contact: Marek Lindner <lindner_marek@yahoo.de>
Description:
                Defines the routing procotol this mesh instance
                uses to find the optimal paths through the mesh.

What:           /sys/class/net/<mesh_iface>/mesh/vis_mode
Date:           May 2010
Contact:        Marek Lindner <lindner_marek@yahoo.de>
Description:
                Each batman node only maintains information about its
                own local neighborhood, therefore generating graphs
                showing the topology of the entire mesh is not easily
                feasible without having a central instance to collect
                the local topologies from all nodes. This file allows
                to activate the collecting (server) mode.
+2 −48
Original line number Diff line number Diff line
@@ -69,8 +69,7 @@ folder:
# aggregated_ogms        gw_bandwidth           log_level
# ap_isolation           gw_mode                orig_interval
# bonding                gw_sel_class           routing_algo
# bridge_loop_avoidance  hop_penalty            vis_mode
# fragmentation
# bridge_loop_avoidance  hop_penalty            fragmentation


There is a special folder for debugging information:
@@ -78,7 +77,7 @@ There is a special folder for debugging information:
# ls /sys/kernel/debug/batman_adv/bat0/
# bla_backbone_table  log                 transtable_global
# bla_claim_table     originators         transtable_local
# gateways            socket              vis_data
# gateways            socket

Some of the files contain all sort of status information  regard-
ing  the  mesh  network.  For  example, you can view the table of
@@ -127,51 +126,6 @@ ously assigned to interfaces now used by batman advanced, e.g.
# ifconfig eth0 0.0.0.0


VISUALIZATION
-------------

If you want topology visualization, at least one mesh  node  must
be configured as VIS-server:

# echo "server" > /sys/class/net/bat0/mesh/vis_mode

Each  node  is  either configured as "server" or as "client" (de-
fault: "client").  Clients send their topology data to the server
next to them, and server synchronize with other servers. If there
is no server configured (default) within the  mesh,  no  topology
information   will  be  transmitted.  With  these  "synchronizing
servers", there can be 1 or more vis servers sharing the same (or
at least very similar) data.

When  configured  as  server,  you can get a topology snapshot of
your mesh:

# cat /sys/kernel/debug/batman_adv/bat0/vis_data

This raw output is intended to be easily parsable and convertable
with  other tools. Have a look at the batctl README if you want a
vis output in dot or json format for instance and how those  out-
puts could then be visualised in an image.

The raw format consists of comma separated values per entry where
each entry is giving information about a  certain  source  inter-
face.  Each  entry can/has to have the following values:
-> "mac" - mac address of an originator's source interface
           (each line begins with it)
-> "TQ mac  value"  -  src mac's link quality towards mac address
                       of a neighbor originator's interface which
                       is being used for routing
-> "TT mac" - TT announced by source mac
-> "PRIMARY" - this  is a primary interface
-> "SEC mac" - secondary mac address of source
               (requires preceding PRIMARY)

The TQ value has a range from 4 to 255 with 255 being  the  best.
The TT entries are showing which hosts are connected to the mesh
via bat0 or being bridged into the mesh network.  The PRIMARY/SEC
values are only applied on primary interfaces


LOGGING/DEBUGGING
-----------------

+0 −1
Original line number Diff line number Diff line
@@ -38,4 +38,3 @@ batman-adv-y += soft-interface.o
batman-adv-y += sysfs.o
batman-adv-y += translation-table.o
batman-adv-y += unicast.o
batman-adv-y += vis.o
+0 −8
Original line number Diff line number Diff line
@@ -687,11 +687,9 @@ static void batadv_iv_ogm_schedule(struct batadv_hard_iface *hard_iface)
	struct batadv_ogm_packet *batadv_ogm_packet;
	struct batadv_hard_iface *primary_if;
	int *ogm_buff_len = &hard_iface->bat_iv.ogm_buff_len;
	int vis_server;
	uint32_t seqno;
	uint16_t tvlv_len = 0;

	vis_server = atomic_read(&bat_priv->vis_mode);
	primary_if = batadv_primary_if_get_selected(bat_priv);

	if (hard_iface == primary_if) {
@@ -712,11 +710,6 @@ static void batadv_iv_ogm_schedule(struct batadv_hard_iface *hard_iface)
	batadv_ogm_packet->seqno = htonl(seqno);
	atomic_inc(&hard_iface->bat_iv.ogm_seqno);

	if (vis_server == BATADV_VIS_TYPE_SERVER_SYNC)
		batadv_ogm_packet->flags |= BATADV_VIS_SERVER;
	else
		batadv_ogm_packet->flags &= ~BATADV_VIS_SERVER;

	batadv_iv_ogm_slide_own_bcast_window(hard_iface);
	batadv_iv_ogm_queue_add(bat_priv, hard_iface->bat_iv.ogm_buff,
				hard_iface->bat_iv.ogm_buff_len, hard_iface, 1,
@@ -790,7 +783,6 @@ batadv_iv_ogm_orig_update(struct batadv_priv *bat_priv,

	rcu_read_unlock();

	orig_node->flags = batadv_ogm_packet->flags;
	neigh_node->last_seen = jiffies;

	spin_lock_bh(&neigh_node->lq_update_lock);
+0 −9
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@
#include "gateway_common.h"
#include "gateway_client.h"
#include "soft-interface.h"
#include "vis.h"
#include "icmp_socket.h"
#include "bridge_loop_avoidance.h"
#include "distributed-arp-table.h"
@@ -300,12 +299,6 @@ static int batadv_transtable_local_open(struct inode *inode, struct file *file)
	return single_open(file, batadv_tt_local_seq_print_text, net_dev);
}

static int batadv_vis_data_open(struct inode *inode, struct file *file)
{
	struct net_device *net_dev = (struct net_device *)inode->i_private;
	return single_open(file, batadv_vis_seq_print_text, net_dev);
}

struct batadv_debuginfo {
	struct attribute attr;
	const struct file_operations fops;
@@ -356,7 +349,6 @@ static BATADV_DEBUGINFO(dat_cache, S_IRUGO, batadv_dat_cache_open);
#endif
static BATADV_DEBUGINFO(transtable_local, S_IRUGO,
			batadv_transtable_local_open);
static BATADV_DEBUGINFO(vis_data, S_IRUGO, batadv_vis_data_open);
#ifdef CONFIG_BATMAN_ADV_NC
static BATADV_DEBUGINFO(nc_nodes, S_IRUGO, batadv_nc_nodes_open);
#endif
@@ -373,7 +365,6 @@ static struct batadv_debuginfo *batadv_mesh_debuginfos[] = {
	&batadv_debuginfo_dat_cache,
#endif
	&batadv_debuginfo_transtable_local,
	&batadv_debuginfo_vis_data,
#ifdef CONFIG_BATMAN_ADV_NC
	&batadv_debuginfo_nc_nodes,
#endif
Loading