From 474994bd20719ce94b457d4713aca873cae08a9f Mon Sep 17 00:00:00 2001 From: stsp Date: Mon, 28 Jun 2021 14:35:42 +0000 Subject: [PATCH] Have tcpdump split the 802.11 sequence number field into its sequence number and fragment number components instead of printing the whole field in decimal. ok sthen@ kn@ jca@ --- usr.sbin/tcpdump/print-802_11.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.sbin/tcpdump/print-802_11.c b/usr.sbin/tcpdump/print-802_11.c index 7528f50e457..4af7bdb9350 100644 --- a/usr.sbin/tcpdump/print-802_11.c +++ b/usr.sbin/tcpdump/print-802_11.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print-802_11.c,v 1.40 2017/09/01 14:04:49 stsp Exp $ */ +/* $OpenBSD: print-802_11.c,v 1.41 2021/06/28 14:35:42 stsp Exp $ */ /* * Copyright (c) 2005 Reyk Floeter @@ -162,7 +162,9 @@ ieee80211_hdr(struct ieee80211_frame *wh) u_int16_t seq; TCARR(wh->i_seq); bcopy(wh->i_seq, &seq, sizeof(u_int16_t)); - printf(" (seq %u): ", letoh16(seq)); + printf(" (seq %u frag %u): ", + letoh16(seq) >> IEEE80211_SEQ_SEQ_SHIFT, + letoh16(seq) & IEEE80211_SEQ_FRAG_MASK); } else printf(": "); -- 2.20.1