Ethernet Model Overview

Data packets and Ethernet frames

Ethernet frames carry data packets as encapsulated cPacket objects. Data packets can be of any message type (cPacket or cPacket subclass).

The model encapsulates data packets in Ethernet frames using the encapsulate() method of cPacket. Encapsulate() updates the length of the Ethernet frame too, so the model doesn't have to take care of that.

The models supports various Ethernet frame types: Ethernet II, 803.2 with LLC header, and 803.3 with LLC and SNAP headers. The corresponding classes are: EthernetIIFrame, EtherFrameWithLLC and EtherFrameWithSNAP. They all subclass from EtherFrame which only represents the basic MAC frame with source and destination addresses. EtherMAC and EtherMACFullDuplex only deal with EtherFrames, and do not care about the specific subclass.