Packet EtherFrame

File: src/inet/linklayer/ethernet/EtherFrame.msg

C++ definition

Common base class for classes representing Ethernet II and 802.3 frame types, containing their common header fields.

This class should never be instantiated by the models, only specific subclasses: EthernetIIFrame, EtherFrameWithLLC and EtherFrameWithSNAP.

Source and destination MAC address are stored in data members. Packet length includes Etherner header, payload, padding and FCS. Payload length can be accessed as getEncapsulatedPacket()->getByteLength().

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.

Known subclasses:

Name Type Description
EtherFrameWithLLC packet

Ethernet frame with 802.3 LLC header.

EthernetIIFrame packet

Ethernet II headers contain a 16-bit EtherType to identify the encapsulated protocol.

EtherPauseFrame packet

Ethernet frame used by the PAUSE protocol

Fields:

Name Type Description
dest MACAddress
src MACAddress

Source code:

//
// Common base class for classes representing Ethernet II and 802.3 frame types,
// containing their common header fields.
//
// This class should never be instantiated by the models, only specific
// subclasses: ~EthernetIIFrame, ~EtherFrameWithLLC and ~EtherFrameWithSNAP.
//
// Source and destination MAC address are stored in data members.
// Packet length includes Etherner header, payload, padding and FCS.
// Payload length can be accessed as getEncapsulatedPacket()->getByteLength().
//
packet EtherFrame
{
    MACAddress dest;
    MACAddress src;
}