Packet Ieee80211DataFrame

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

C++ definition

Format of the 802.11 data frame

Usage diagram:

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Extends:

Name Type Description
Ieee80211DataOrMgmtFrame packet

Common base class for 802.11 data and management frames

Known subclasses:

Name Type Description
Ieee80211DataFrameWithSNAP packet

802.11 data frame with the 8-byte SNAP header (AA AA 03, 00 00 00, <2-byte EtherType>)

Fields:

Name Type Description
byteLength
type short

type and subtype

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...

address3 MACAddress
fragmentNumber short
sequenceNumber uint16
transmitterAddress MACAddress

aka address2

toDS bool
fromDS bool
retry bool
moreFragments bool
duration simtime_t

TODO: rename to durationField (levy)

AID short

"id" (Association ID) in the Duration/ID field (-1=no ID)

receiverAddress MACAddress

aka address1

MACArrive simtime_t

FIXME remove it, technical data, used inside of MAC module

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
//}