Ieee80211DataFrame

Namespace inet::ieee80211

Ieee80211DataFrame

packet

Format of the 802.11 data frame

Extends

Name Type Description
Ieee80211DataOrMgmtFrame (unknown -- not in documented files)

Fields

Name Type Description
byteLength

The presence of the Address 4 field is determined by the setting of the To DS and From DS subfields of the Frame Control field (see below). The QoS Control field is present when the QoS subfield of the Subtype field is set to 1 (8.3.2.1 Data frame format) FIXME: byteLength is not a constant value (DATAFRAME_HEADER_MINLENGTH / 8 = 28). For example, with Address 4 and without QoS the correct length is 34 bytes. Without Address 4 and QoS the correct value is indeed 28. With Address 4 and QoS the correct value is indeed 36.

type

or ST_DATA_WITH_QOS

address4 MACAddress

optional field, exists when toDS and fromDS are true

qos uint16

TODO nobody uses this currently, only its parts like tid below...

ackPolicy int

FIXME in real life this is part of the optional qos field above...

tid uint8

FIXME in real life this is part of the optional qos field above...

aMsduPresent bool

8.2.4.5.9 A-MSDU Present subfield FIXME in real life this is part of the optional qos field above...

Source code

//
// Format of the 802.11 data frame
//
packet Ieee80211DataFrame extends Ieee80211DataOrMgmtFrame
{
    //  The presence of the Address 4 field is determined by the setting of the To DS and From DS subfields of
    //  the Frame Control field (see below). The QoS Control field is present when the QoS subfield of the Subtype
    //  field is set to 1 (8.3.2.1 Data frame format)
    //  FIXME: byteLength is not a constant value (DATAFRAME_HEADER_MINLENGTH / 8 = 28).
    //  For example, with Address 4 and without QoS the correct length is 34 bytes.
    //  Without Address 4 and QoS the correct value is indeed 28.
    //  With Address 4 and QoS the correct value is indeed 36.
    byteLength = DATAFRAME_HEADER_MINLENGTH / 8;
    type = ST_DATA;         // or ST_DATA_WITH_QOS
    MACAddress address4;    // optional field, exists when toDS and fromDS are true
    uint16 qos;             // TODO nobody uses this currently, only its parts like tid below... 
    int ackPolicy @enum(AckPolicy); //FIXME in real life this is part of the optional qos field above...
    uint8 tid; //FIXME in real life this is part of the optional qos field above...
    bool aMsduPresent = false; // 8.2.4.5.9 A-MSDU Present subfield FIXME in real life this is part of the optional qos field above...
}

//TODO this can be introduced when the SNAP header 
//packet Ieee80211QoSDataFrame extends Ieee80211DataFrame
//{
//    type = ST_DATA_WITH_QOS;
//    byteLength = (DATAFRAME_HEADER_MINLENGTH + QOSCONTROL_BITS) / 8;
//    int ackPolicy @enum(AckPolicy); //FIXME in real life this is part of the optional qos field above...
//    uint8 tid;
//    // TODO: other QoS control field parts
//}

File: src/inet/linklayer/ieee80211/mac/Ieee80211Frame.msg