tcpdump patch for batman-adv
Hi Folks
Attached is a patch for tcpdump which adds support for dissecting batman-adv messages. This patch is against:
git://github.com/mcr/tcpdump.git
It would be great if a few users could test it before i submit the patch upstream.
Thanks
Andrew
Quoted 2 lines
Attached is a patch for tcpdump which adds support for dissecting batman-adv messages.
I think you've forgot to attach it.
Best regards,
Sven
Quoted 3 lines · Sven Eckelmann
Quoted 2 lines
Attached is a patch for tcpdump which adds support for dissecting batman-adv messages.
I think you've forgot to attach it.
Grrr. I keep saying i will write an extension to mutt so that it searches for the pattern *[Aa]ttach* and complains if there is none...
Andrew
Makefile.in +2 -0
@@ -70,6 +70,7 @@ CSRC = addrtoname.c af.c checksum.c cpack.c gmpls.c oui.c gmt2local.c ipproto.c nlpid.c l2vpn.c machdep.c parsenfsfh.c \ print-802_11.c print-ap1394.c print-ah.c print-arcnet.c \ print-aodv.c print-arp.c print-ascii.c print-atalk.c print-atm.c \ + print-batman.c \ print-beep.c print-bfd.c print-bgp.c print-bootp.c print-bt.c \ print-cdp.c print-cfm.c print-chdlc.c print-cip.c print-cnfp.c \ print-dccp.c print-decnet.c \
@@ -115,6 +116,7 @@ HDR = \ arcnet.h \ atm.h \ atmuni31.h \ + batman.h \ bootp.h \ bgp.h \ chdlc.h \
batman.h new file +105 -0
105 lines not on this page · raw message
ethertype.h +3 -0
@@ -61,6 +61,9 @@#ifndef ETHERTYPE_TRAIL #define ETHERTYPE_TRAIL 0x1000#endif +#ifndef ETHERTYPE_BATMAN +#define ETHERTYPE_BATMAN 0x4305/* unofficial/not registered Ethertype */ +#endif #ifndef ETHERTYPE_MOPDL #define ETHERTYPE_MOPDL 0x6001#endif
interface.h +1 -0
@@ -323,6 +323,7 @@ extern void sip_print(const u_char *, u_int);extern void syslog_print (const u_char *,u_int );extern u_int bt_if_print (const struct pcap_pkthdr *,const u_char *);extern u_int usb_linux_print (const struct pcap_pkthdr *,const u_char *); +extern void batman_print (const u_char *,u_int );#ifdef INET6 extern void ip6_print (const u_char *,u_int );
print-batman.c new file +275 -0
275 lines not on this page · raw message
print-ether.c +5 -0
@@ -79,6 +79,7 @@ const struct tok ethertype_values[] = { { ETHERTYPE_CFM_OLD, "CFM (old)" }, { ETHERTYPE_CFM, "CFM" }, { ETHERTYPE_LLDP, "LLDP" }, + { ETHERTYPE_BATMAN, "BATMAN" }, { 0, NULL} };
@@ -335,6 +336,10 @@ ether_encap_print(u_short ether_type, const u_char *p,mpls_print (p, length);return (1 ); +case ETHERTYPE_BATMAN : +batman_print (p, length); +return (1 ); +case ETHERTYPE_LAT :case ETHERTYPE_SCA :case ETHERTYPE_MOPRC :