Package: inet.linklayer.ethernet
EthernetInterface
compound moduleThis module represents an Ethernet network interface.
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 |
---|---|---|
NetworkInterface | compound module |
This module serves as the base module for all network interfaces. |
Parameters
Name | Type | Default value | Description |
---|---|---|---|
displayStringTextFormat | string | "%a (%i)\n%m" | |
recordPcap | bool | false | |
numPcapRecorders | int | recordPcap ? 1 : 0 | |
interfaceTableModule | string | ||
protocol | string | "ethernetmac" | |
address | string | "auto" |
MAC address as hex string (12 hex digits), or "auto". "auto" values will be replaced by a generated MAC address in init stage 0. |
duplexMode | bool | true |
selects full-duplex (true) or half-duplex (false) operation |
csmacdSupport | bool | !duplexMode |
by default CSMA/CD is turned off, so only point-to-point duplex links are supported. |
bitrate | double | 0 bps | |
fcsMode | string | "declared" |
Properties
Name | Value | Description |
---|---|---|
networkInterface | ||
lifecycleSupport | ||
class | NetworkInterface | |
display | i=block/ifcard |
Gates
Name | Direction | Size | Description |
---|---|---|---|
upperLayerIn | input | ||
upperLayerOut | output | ||
cutthroughIn | input | ||
cutthroughOut | output | ||
phys | inout |
Signals
Name | Type | Unit |
---|---|---|
packetDropped | inet::Packet |
Statistics
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 |
Direct method calls (observed)
call to | function | info |
---|---|---|
MessageDispatcher | inet::MessageDispatcher::handleRegisterInterface | handleRegisterInterface |
MessageDispatcher | inet::MessageDispatcher::pushPacket | pushPacket |
EthernetInterface | inet::NetworkInterface::receiveSignal | POST_MODEL_CHANGE |
InterfaceTable | inet::InterfaceTable::findInterfaceByName | findInterfaceByName |
InterfaceTable | inet::InterfaceTable::interfaceChanged | interfaceChanged |
NextHopRoutingTable | inet::NextHopRoutingTable::receiveSignal | interfaceCreated |
Called methods (observed)
function | info | call from |
---|---|---|
inet::NetworkInterface::handleOperationStage | handleOperationStage | ScenarioManager |
inet::NetworkInterface::pushPacket | pushPacket | DscpMarker, PacketMultiplexer |
inet::NetworkInterface::receiveSignal | POST_MODEL_CHANGE | -=Network=-, ScenarioManager, EthernetInterface, OmittedTrafficConditioner |
Push out messages (observed)
gate | msg | kind | ctrl | destModule | tags |
---|---|---|---|---|---|
upperLayerOut | Packet | 0 | MessageDispatcher | DispatchProtocolReq, InterfaceInd, MacAddressInd, PacketProtocolTag, NetworkProtocolInd? |
Shared Tagging operations (observed)
tagType | tagAction |
---|---|
InterfaceInd | addTagIfAbsent |
Tagging operations (observed)
tagType | tagAction |
---|---|
clearTags |
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" | |
mac.promiscuous | bool |
if true, all packets are received, otherwise only the ones with matching destination MAC address |
|
mac.duplexMode | bool |
selects full-duplex (true) or half-duplex (false) operation |
|
mac.mtu | int |
Source code
// // This module represents an Ethernet network interface. // module EthernetInterface extends NetworkInterface like IEthernetInterface { parameters: string interfaceTableModule; string protocol = default("ethernetmac"); string address @mutable = default("auto"); // MAC address as hex string (12 hex digits), or // "auto". "auto" values will be replaced by // a generated MAC address in init stage 0. bool duplexMode = default(true); // selects full-duplex (true) or half-duplex (false) operation bool csmacdSupport = default(!duplexMode); // by default CSMA/CD is turned off, so only point-to-point duplex links are supported. double bitrate @unit(bps) = default(0 bps); string fcsMode @enum("declared","computed") = default("declared"); *.interfaceTableModule = default(absPath(this.interfaceTableModule)); *.fcsMode = this.fcsMode; *.duplexMode = this.duplexMode; gates: input upperLayerIn; output upperLayerOut; input cutthroughIn @loose; output cutthroughOut @loose; inout phys @labels(EthernetSignal); submodules: egressTC: <default("")> like ITrafficConditioner { parameters: @display("p=300,100"); } ingressTC: <default("")> like ITrafficConditioner { parameters: @display("i=block/uparrow;p=700,100"); } queue: <default("EthernetQueue")> like IPacketQueue { parameters: packetCapacity = default(1000); @display("p=300,250"); } mac: <default(csmacdSupport ? "EthernetCsmaMac" : "EthernetMac")> like IEtherMac { parameters: @display("p=500,300"); } connections: upperLayerIn --> { @display("m=n"); } --> egressTC.in; egressTC.out --> queue.in; queue.out --> mac.upperLayerIn; mac.phys <--> { @display("m=s"); } <--> phys; mac.upperLayerOut --> ingressTC.in; ingressTC.out --> { @display("m=n"); } --> upperLayerOut; }File: src/inet/linklayer/ethernet/EthernetInterface.ned