Changeset d4c8a518


Ignore:
Timestamp:
12/07/06 15:49:22 (14 years ago)
Author:
Scott Raynel <smr26@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
48589ca
Parents:
120540d
Message:

Minor tidy-up of get_payload_from_80211, though it looks like this
function (and possibly the 802.11 frame struct that libtrace provides)
will need to change to accomodate 3 and 4 address formats nicely.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/protocols.c

    r33d83d4 rd4c8a518  
    120120        libtrace_80211_t *wifi;
    121121        libtrace_802_11_payload_t *eth;
    122         uint8_t extra; /* how many QoS bytes to skip */
     122        uint8_t extra = 0; /* how many QoS bytes to skip */
    123123       
    124124        if (remaining && *remaining < sizeof(libtrace_80211_t))
     
    132132        }
    133133
    134         /* Check for WME */
    135         if (wifi->subtype & 0x8) {
    136                 /* indicates two octets of QoS before payload,
    137                  * see IEEE802.11e-2005 pg 21
    138                  * */
    139                 extra = 2;
    140         } else
    141                 extra = 0;
     134        /* Indicates QoS field present, see IEEE802.11e-2005 pg 21 */
     135        if (wifi->subtype & 0x8)
     136                extra += 2;
    142137
    143138        if (remaining && *remaining < sizeof(*eth))
Note: See TracChangeset for help on using the changeset viewer.