EthernetMacHeader

Namespace inet

EthernetMacHeader

class

This class represents an IEEE 802.3 Ethernet MAC header as defined in the section 3.2 Elements of the MAC frame and packet of the IEEE Std 802.3-2018, IEEE Standard for Ethernet.

0 1 2 3 4 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 +-----------------------------------------------------------------------------------------------+ | Destination Address | +-----------------------------------------------------------------------------------------------+ | Source Address | +-------------------------------+---------------------------------------------------------------+ | EtherType | +-------------------------------+

Extends

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

Fields

Name Type Description
chunkLength

B(6) + B(6) + B(2)

typeOrLength uint16_t

This two-octet field takes one of two meanings, depending on its numeric value. For numerical evaluation, the first octet is the most significant octet of this field. a) If the value of this field is less than or equal to 1500 decimal (05DC hexadecimal), then the Length/ Type field indicates the number of MAC client data octets contained in the subsequent MAC Client Data field of the basic frame (Length interpretation). b) If the value of this field is greater than or equal to 1536 decimal (0600 hexadecimal), then the Length/Type field indicates the Ethertype of the MAC client protocol (Type interpretation).

Packet operations (observed)

actionmodule
insertAtFrontPcapRecorder, EthernetEncapsulation, EthernetMacHeaderInserter, Ieee80211Portal
peekAtGptp
peekAtFrontEthernetCsmaMac, EthernetMac, EthernetFrameClassifier, EthernetQueue, EthernetMacHeaderChecker
peekDataAtDscpMarker, RedDropper
popAtFrontPcapRecorder, EthernetEncapsulation, EthernetCutthroughSource, EthernetMacHeaderChecker, Ieee80211Portal, MultiFieldClassifier, StreamThroughReceiver

Source code

//
// This class represents an IEEE 802.3 Ethernet MAC header as defined in the
// section 3.2 Elements of the MAC frame and packet of the IEEE Std 802.3-2018,
// IEEE Standard for Ethernet.
//
//  0                   1                   2                   3                   4
//  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7
// +-----------------------------------------------------------------------------------------------+
// |                                      Destination Address                                      |
// +-----------------------------------------------------------------------------------------------+
// |                                        Source Address                                         |
// +-------------------------------+---------------------------------------------------------------+
// |           EtherType           |
// +-------------------------------+
//
class EthernetMacHeader extends EthernetMacAddressFields
{
    chunkLength = B(14); // B(6) + B(6) + B(2)
    uint16_t typeOrLength; // This two-octet field takes one of two meanings, depending on its numeric value. For numerical evaluation,
                           // the first octet is the most significant octet of this field.
                           // a) If the value of this field is less than or equal to 1500 decimal (05DC hexadecimal), then the Length/
                           //    Type field indicates the number of MAC client data octets contained in the subsequent MAC Client
                           //    Data field of the basic frame (Length interpretation).
                           // b) If the value of this field is greater than or equal to 1536 decimal (0600 hexadecimal), then the
                           //    Length/Type field indicates the Ethertype of the MAC client protocol (Type interpretation).
}

File: src/inet/linklayer/ethernet/common/EthernetMacHeader.msg