Package: inet.linklayer.ethernet.modular


compound module

This module represents an Ethernet network interface with cut-through support.

PcapRecorder IClock IEthernetMacLayer EthernetCutthroughLayer IEthernetPhyLayer

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.


Name Type Description
NetworkInterface compound module

This module serves as the base module for all network interfaces.


Name Type Default value Description
displayStringTextFormat string "%a (%i)\n%m"
recordPcap bool false
numPcapRecorders int recordPcap ? 1 : 0
protocol string "ethernetmac"
broadcast bool true
multicast bool true
address string "auto"
bitrate double
interfaceTableModule string
macTableModule string


Name Value Description
class EthernetCutthroughInterface
display i=block/ifcard


Name Direction Size Description
upperLayerIn input
upperLayerOut output
cutthroughIn input
cutthroughOut output
phys inout


Name Type Unit
packetDropped inet::Packet


Name Title Source Record Unit Interpolation Mode
packetDropInterfaceDown packet drops: interface down packetDropReasonIsInterfaceDown(packetDropped) count, sum(packetBytes), vector(packetBytes) none
packetDropNoCarrier packet drops: no carrier packetDropReasonIsNoCarrier(packetDropped) count, sum(packetBytes), vector(packetBytes) none

Unassigned submodule parameters

Name Type Default value Description
pcapRecorder.verbose bool true

whether to log packets on the module output

pcapRecorder.pcapFile string ""

the PCAP file to be written

pcapRecorder.fileFormat string "pcapng"
pcapRecorder.snaplen int 65535

maximum number of bytes to record per packet

pcapRecorder.dumpBadFrames bool true

enable dump of frames with hasBitError

pcapRecorder.sendingSignalNames string "packetSentToLower"

space-separated list of outbound packet signals to subscribe to

pcapRecorder.receivingSignalNames string "packetReceivedFromLower"

space-separated list of inbound packet signals to subscribe to

pcapRecorder.dumpProtocols string "ethernetmac ppp ieee80211mac"

space-separated list of protocol names as defined in the Protocol class

pcapRecorder.packetFilter object "*"

which packets are considered, matches all packets by default

pcapRecorder.helpers string ""

usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype currently available: "inet::AckingMacToEthernetPcapRecorderHelper"

pcapRecorder.alwaysFlush bool false

flush the pcapFile after each write to ensure that all packets are captured in case of a crash

pcapRecorder.displayStringTextFormat string "rec: %n pks"
cutthroughLayer.cutthroughSink.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

cutthroughLayer.cutthroughSink.clockModule string ""

relative path of a module that implements IClock; optional

cutthroughLayer.cutthroughSink.datarate double nan bps
cutthroughLayer.cutthroughSource.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

cutthroughLayer.cutthroughSource.datarate double nan bps
cutthroughLayer.cutthroughSource.macTableModule string

Source code

// This module represents an Ethernet network interface with cut-through support.
module EthernetCutthroughInterface extends NetworkInterface like IEthernetInterface
        string protocol = default("ethernetmac");
        bool broadcast = default(true);
        bool multicast = default(true);
        string address @mutable = default("auto");
        double bitrate @unit(bps);
        string interfaceTableModule;
        string macTableModule;
        *.bitrate = default(this.bitrate);
        *.macTableModule = default(this.macTableModule);
        input upperLayerIn;
        output upperLayerOut;
        input cutthroughIn;
        output cutthroughOut;
        inout phys @labels(EthernetSignal);
        macLayer: <default("EthernetMacLayer")> like IEthernetMacLayer {
        cutthroughLayer: EthernetCutthroughLayer {
        phyLayer: <default("EthernetStreamThroughPhyLayer")> like IEthernetPhyLayer {
        upperLayerIn --> { @display("m=n"); } --> macLayer.upperLayerIn;
        macLayer.lowerLayerOut --> cutthroughLayer.upperLayerIn;
        cutthroughLayer.lowerLayerOut --> phyLayer.upperLayerIn;
        phyLayer.lowerLayerOut --> { @display("m=s"); } --> phys$o;

        phys$i --> { @display("m=s"); } --> phyLayer.lowerLayerIn;
        phyLayer.upperLayerOut --> cutthroughLayer.lowerLayerIn;
        cutthroughLayer.upperLayerOut --> macLayer.lowerLayerIn;
        macLayer.upperLayerOut --> { @display("m=n"); } --> upperLayerOut;

        cutthroughLayer.cutthroughOut --> { @display("m=e"); } --> cutthroughOut;
        cutthroughIn --> { @display("m=w"); } --> cutthroughLayer.cutthroughIn;

File: src/inet/linklayer/ethernet/modular/EthernetCutthroughInterface.ned