batctl: Add noflood command
PATCH v2 1/1 batctl: Add noflood command
Adds support for the new 'noflood' setting in batman-adv.
Signed-off-by Linus Lüssing <[email protected]>
---
Changelog v2:
* added noflood.c
--- Makefile | 1 + README.rst | 10 +++++ batman_adv.h | 10 +++++ man/batctl.8 | 7 ++++ noflood.c | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 129 insertions(+) create mode 100644 noflood.c
Makefile +1 -0
@@ -61,6 +61,7 @@ $(eval $(call add_command,multicast_mode,y)) $(eval $(call add_command,nc_nodes,y)) $(eval $(call add_command,neighbors,y)) $(eval $(call add_command,network_coding,y)) +$(eval $(call add_command,noflood,y)) $(eval $(call add_command,orig_interval,y)) $(eval $(call add_command,originators,y)) $(eval $(call add_command,ping,y))
README.rst +10 -0
@@ -571,6 +571,16 @@ Usage:: * Example 4: ``batctl mark 0x0f`` +batctl noflood +======================= + +display or modify noflood setting (<disabled>|<cautious>|<aggressive>) + +Usage:: + + batctl noflood|nf [0|1|2] + + batctl translocal =================
batman_adv.h +10 -0
@@ -480,6 +480,16 @@ enum batadv_nl_attrs {*/ BATADV_ATTR_MULTICAST_FANOUT , +/** +* @BATADV_ATTR_NOFLOOD: defines if and how strictly flooding prevention +* is configured. If the value is 0 then flood prevention is disabled. +* If the value is 1 then flood prevention is enabled for all multicast +* /broadcast packets excluding ICMPv6 and IGMP (cautious mode). If set +* to 2 then flood prevention is enabled for all multicast/broadcast +* packets (aggressive mode). +*/ + BATADV_ATTR_NOFLOOD, +/* add attributes above here, update the policy in netlink.c */ /**
man/batctl.8 +7 -0
@@ -116,6 +116,13 @@ If no parameter is given the current multicast fanout setting is displayed. Othe the multicast fanout. The multicast fanout defines the maximum number of packet copies that may be generated for a multicast-to-unicast conversion. Once this limit is exceeded distribution will fall back to broadcast. .br +.IP "\fBnoflood\fP|\fBnf\fP [\fB0|1|2\fP]" +If no parameter is given the current noflood setting is displayed. Otherwise the parameter is used to set the +the noflood option. The noflood option defines if and how strictly flooding prevention is configured. If the value is +0 then flood prevention is disabled. If the value is 1 then flood prevention is enabled for all multicast/broadcast +packets excluding ICMPv6 and IGMP (cautious mode). If set to 2 then flood prevention is enabled for all multicast/broadcast +packets (aggressive mode). +.br .IP "\fBloglevel\fP|\fBll\fP [\fBlevel\fP[ \fBlevel\fP[ \fBlevel\fP]] \fB...\fP]" If no parameter is given the current log level settings are displayed otherwise the parameter(s) is/are used to set the log level. Level 'none' disables all verbose logging. Level 'batman' enables messages related to routing / flooding / broadcasting.
noflood.c new file +101 -0
101 lines not on this page · raw message
Signature · 1 line
2.20.1