summaryrefslogtreecommitdiff
path: root/usr.sbin/tcpdump
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/tcpdump')
-rw-r--r--usr.sbin/tcpdump/print-frag6.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/usr.sbin/tcpdump/print-frag6.c b/usr.sbin/tcpdump/print-frag6.c
index 816a31d7213..5df71e3f402 100644
--- a/usr.sbin/tcpdump/print-frag6.c
+++ b/usr.sbin/tcpdump/print-frag6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-frag6.c,v 1.4 2009/10/27 23:59:55 deraadt Exp $ */
+/* $OpenBSD: print-frag6.c,v 1.5 2011/09/22 21:27:06 bluhm Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1993, 1994
@@ -64,21 +64,14 @@ frag6_print(register const u_char *bp, register const u_char *bp2)
/* 'ep' points to the end of avaible data. */
ep = snapend;
- TCHECK(dp->ip6f_offlg);
+ TCHECK(dp->ip6f_ident);
- if (vflag) {
- TCHECK(dp->ip6f_ident);
- printf("frag (0x%08x:%d|%ld)",
- ntohl(dp->ip6f_ident),
- ntohs(dp->ip6f_offlg & IP6F_OFF_MASK),
- sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen) -
- (long)(bp - bp2) - sizeof(struct ip6_frag));
- } else {
- printf("frag (%d|%ld)",
- ntohs(dp->ip6f_offlg & IP6F_OFF_MASK),
- sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen) -
- (long)(bp - bp2) - sizeof(struct ip6_frag));
- }
+ printf("frag (0x%08x:%ld@%d%s)",
+ ntohl(dp->ip6f_ident),
+ sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen) -
+ (long)(bp - bp2) - sizeof(struct ip6_frag),
+ ntohs(dp->ip6f_offlg & IP6F_OFF_MASK),
+ (dp->ip6f_offlg & IP6F_MORE_FRAG) ? "+" : "");
/* it is meaningless to decode non-first fragment */
if (ntohs(dp->ip6f_offlg & IP6F_OFF_MASK) != 0)