ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] 802.11 whdrs array needed?

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Thu, 25 Jan 2007 11:43:30 -0800
Gerald Combs wrote:
The 802.11 dissector has the following code:

  wlan_hdr *volatile whdr;
  static wlan_hdr whdrs[4];

  whdr= &whdrs[0];

It looks like whdrs[1] through whdrs[3] are never used.  Should the code
be modified to rotate through each member of whdrs, similar to the
fmtbuf arrays in strutil.c?

Yes, although this would probably make a difference only if you have 802.11 frames encapsulated inside 802.11 frames.

Is there a reason *not* to use ep_ allocation for structures passed to taps, rather than using fixed-size arrays and rotating through them?