batctl: add isolation_mark support
PATCH v2 1/1 batctl: add isolation_mark support
From: Antonio Quartulli <[email protected]>
With this patch it is now possible to set/unset the value of the isolation_mark used by the Extended Isolation feature in batman-adv.
Signed-off-by Antonio Quartulli <[email protected]>
---
Change from v1:
- added section in man page
man/batctl.8 | 20 ++++++++++++++++++++ sys.c | 9 +++++++-- sys.h | 1 + 3 files changed, 28 insertions(+), 2 deletions(-)
man/batctl.8 +20 -0
@@ -151,6 +151,26 @@ least XX TQ better than the currently selected gateway (XX has to be a number be .RE .RE .br +.IP "\fBisolation_mark\fP|\fBmark\fP" +If no parameter is given the current isolation mark value is displayed. +Otherwise the parameter is used to set or unset the isolation mark used by the +Extended Isolation feature. +.br +The input is supposed to be of the form $value/$mask, where $value can be any +32bit long integer (expressed in decimal or hex base) and $mask is a generic +bitmask (expressed in hex base) that selects the bits to take into consideration +from $value. It is also possible to enter the input using only $value and in +this case the full bitmask is used by default. + +.br +.br +Example 1: 0x00000001/0xffffffff +.br +Example 2: 0x00040000/0xffff0000 +.br +Example 3: 16 or 0x0F +.br +.br .PP .I \fBdebug tables: .IP
sys.c +7 -2
@@ -96,8 +96,13 @@ const struct settings_data batctl_settings[BATCTL_SETTINGS_NUM] = { .opt_short = "nc", .sysfs_name = "network_coding", .params = sysfs_param_enable, - } - + }, + { + .opt_long = "isolation_mark", + .opt_short = "mark", + .sysfs_name = "isolation_mark", + .params = NULL, + }, };static void interface_usage (void )
sys.h +1 -0
@@ -46,6 +46,7 @@ enum batctl_settings_list {BATCTL_SETTINGS_BONDING ,BATCTL_SETTINGS_FRAGMENTATION ,BATCTL_SETTINGS_NETWORK_CODING , +BATCTL_SETTINGS_ISOLATION_MARK , BATCTL_SETTINGS_NUM, };
Signature · 1 line
1.8.4.5
Quoted 6 lines · Antonio Quartulli
From: Antonio Quartulli <[email protected]>
With this patch it is now possible to set/unset the value of the
isolation_markused by the Extended Isolation feature in batman-adv.
I just realised that I have to modify the README as well :)
v3 is coming!
Cheers,
Signature · 1 line
Antonio Quartulli