On Mon, Jun 28 2021, Stefan Sperling <[email protected]> wrote:
> tcpdump -e -v -y IEEE802_11_RADIO currently prints sequence number
> and fragment number as a combined decimal value.
>
> This patch makes tcpdump display these values separately which is a lot
> easier to follow along as packets scroll by.
>
> ok?

ok jca@

> diff 18a81a05d6e3098eadc4b5e23d6656377f87591a /usr/src
> blob - 7528f50e45765f83d5d719d831df2880838bc28c
> file + usr.sbin/tcpdump/print-802_11.c
> --- usr.sbin/tcpdump/print-802_11.c
> +++ usr.sbin/tcpdump/print-802_11.c
> @@ -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(": ");
>  
>

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to