batctl: tcpdump - support LARGETAIL flag

Message ID 1296052113-5983-1-git-send-email-lindner_marek@yahoo.de (mailing list archive)
State Accepted, archived
Headers

Commit Message

Marek Lindner Jan. 26, 2011, 2:28 p.m. UTC
  Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
---
 batctl/tcpdump.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
  

Comments

Marek Lindner Jan. 28, 2011, 8:06 p.m. UTC | #1
On Wednesday 26 January 2011 15:28:33 Marek Lindner wrote:
> -	printf("%s: FRAG, seq %hu, ttl %hhu, flags [%c], ",
> +	printf("%s: FRAG, seq %hu, ttl %hhu, flags [%c%c], ",
>  	       get_name_by_macaddr((struct ether_addr
> *)unicast_frag_packet->dest, read_opt), ntohs(unicast_frag_packet->seqno),

Applied in revision 1917.

Regards,
Marek
  

Patch

diff --git a/batctl/tcpdump.c b/batctl/tcpdump.c
index bdf81bc..09a7e16 100644
--- a/batctl/tcpdump.c
+++ b/batctl/tcpdump.c
@@ -385,10 +385,11 @@  static void dump_batman_frag(unsigned char *packet_buff, ssize_t buff_len, int r
 	printf("BAT %s > ",
 	       get_name_by_macaddr((struct ether_addr *)unicast_frag_packet->orig, read_opt));
 
-	printf("%s: FRAG, seq %hu, ttl %hhu, flags [%c], ",
+	printf("%s: FRAG, seq %hu, ttl %hhu, flags [%c%c], ",
 	       get_name_by_macaddr((struct ether_addr *)unicast_frag_packet->dest, read_opt),
 	       ntohs(unicast_frag_packet->seqno), unicast_frag_packet->ttl,
-	       (unicast_frag_packet->flags & UNI_FRAG_HEAD ? 'H' : '.'));
+	       (unicast_frag_packet->flags & UNI_FRAG_HEAD ? 'H' : '.'),
+	       (unicast_frag_packet->flags & UNI_FRAG_LARGETAIL ? 'L' : '.'));
 
 	if (unicast_frag_packet->flags & UNI_FRAG_HEAD)
 		parse_eth_hdr(packet_buff + ETH_HLEN + sizeof(struct unicast_frag_packet),