Repository : ssh://git@open-mesh.org/batctl
On branch : master
commit ae5497b6144076ce8fbc00f4b966aaaf2d00196a Author: Sven Eckelmann sven@narfation.org Date: Sat Jun 29 10:28:17 2019 +0200
batctl: tcpdump: Add support for MCASTv2 RTR(4|6) flags
The batman-adv commit 0a7733468f95 ("batman-adv: mcast: detect, distribute and maintain multicast router presence") added support for two new flags BATADV_MCAST_WANT_NO_RTR4 and BATADV_MCAST_WANT_NO_RTR6. These are announced in IV_OGM and OGMv2.
batctl's tcpdump requires support for it to make debugging of router-to-router multicast problems in networks easier.
Signed-off-by: Sven Eckelmann sven@narfation.org
ae5497b6144076ce8fbc00f4b966aaaf2d00196a tcpdump.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tcpdump.c b/tcpdump.c index 158b82e..0e2ae8e 100644 --- a/tcpdump.c +++ b/tcpdump.c @@ -230,10 +230,12 @@ static void batctl_tvlv_parse_mcast_v2(void *buff, ssize_t buff_len)
flags = tvlv->flags;
- printf("\tTVLV MCASTv2: [%c%c%c]\n", + printf("\tTVLV MCASTv2: [%c%c%c%s%s]\n", flags & BATADV_MCAST_WANT_ALL_UNSNOOPABLES ? 'U' : '.', flags & BATADV_MCAST_WANT_ALL_IPV4 ? '4' : '.', - flags & BATADV_MCAST_WANT_ALL_IPV6 ? '6' : '.'); + flags & BATADV_MCAST_WANT_ALL_IPV6 ? '6' : '.', + !(flags & BATADV_MCAST_WANT_NO_RTR4) ? "R4" : ". ", + !(flags & BATADV_MCAST_WANT_NO_RTR6) ? "R6" : ". "); }
typedef void (*batctl_tvlv_parser_t)(void *buff, ssize_t buff_len);