InterfaceService¶
Package: inet.protocolelement.service
compound module InterfaceService
(no description)
Usage diagram¶
Inheritance diagram¶
Extends¶
Name |
Type |
Description |
|---|---|---|
compound module |
Serves as the base module for all network interfaces. |
Parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
displayStringTextFormat |
string |
“%a (%i)\n%m” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
recordPcap |
bool |
false |
|
numPcapRecorders |
int |
recordPcap ? 1 : 0 |
|
interfaceTableModule |
string |
||
protocol |
string |
Properties¶
Name |
Value |
Description |
|---|---|---|
class |
inet::NetworkInterface |
|
display |
i=block/ifcard |
|
lifecycleSupport |
||
networkInterface |
Gates¶
Name |
Direction |
Size |
Description |
|---|---|---|---|
upperLayerIn |
input |
||
upperLayerOut |
output |
||
phys |
inout |
Signals¶
Name |
Type |
Unit |
Description |
|---|---|---|---|
packetDropped |
Statistics¶
Name |
Title |
Source |
Record |
Unit |
Interpolation Mode |
Description |
|---|---|---|---|---|---|---|
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.displayStringTextFormat |
string |
“rec: %n pks” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
pcapRecorder.verbose |
bool |
true |
Whether to log packets on the module output |
pcapRecorder.recordEmptyPackets |
bool |
true |
Specifies if zero length packets are recorded or not |
pcapRecorder.enableConvertingPackets |
bool |
true |
Specifies if converting packets to link type is allowed or not |
pcapRecorder.pcapFile |
string |
“” |
The PCAP file to be written, suggested value: pcapFile = “${resultdir}/${configname}-#${runnumber}” + fullpath() + “.pcap” |
pcapRecorder.fileFormat |
string |
“pcapng” |
|
pcapRecorder.snaplen |
int |
65535 |
Maximum number of bytes to record per packet |
pcapRecorder.timePrecision |
int |
6 |
Time precision in recorded file. pcap supports only 6 (usec) or 9 (nanosec), pcapng supports more values (see ‘if_tsresol’ option in pcapng file format). |
pcapRecorder.dumpBadFrames |
bool |
true |
Enable dump of frames with hasBitError |
pcapRecorder.sendingSignalNames |
string |
“transmissionEnded” |
Space-separated list of outbound packet signals to subscribe to |
pcapRecorder.receivingSignalNames |
string |
“receptionEnded” |
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 |
pcapRecorder.alwaysFlush |
bool |
false |
Flush the pcapFile after each write to ensure that all packets are captured in case of a crash |
sendToMacAddress.displayStringTextFormat |
string |
“” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
sendToMacAddress.address |
string |
“” |
|
resending.displayStringTextFormat |
string |
“processed {numProcessedPackets} pk ({processedTotalLength})” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
resending.numRetries |
int |
||
sendWithAcknowledge.displayStringTextFormat |
string |
“” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
sendWithAcknowledge.acknowledgeTimeout |
double |
||
m1.displayStringTextFormat |
string |
“passed %p pk (%l)” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
m1.forwardServiceRegistration |
bool |
true |
|
m1.forwardProtocolRegistration |
bool |
true |
|
sendWithProtocol.displayStringTextFormat |
string |
“” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
crcInserter.displayStringTextFormat |
string |
“processed {numProcessedPackets} pk ({processedTotalLength})” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
crcInserter.checksumMode |
string |
“declared” |
|
crcInserter.headerPosition |
string |
“front” |
|
transmitter.displayStringTextFormat |
string |
“processed {numProcessedPackets} pk ({processedTotalLength})” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
transmitter.clockModule |
string |
“” |
Relative path of a module that implements IClock(1,:ref:2 <neddoc-msg-inet-iclock>); optional |
transmitter.datarate |
double |
||
receiveAtMacAddress.displayStringTextFormat |
string |
“” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
receiveAtMacAddress.address |
string |
||
receiveWithAcknowledge.displayStringTextFormat |
string |
“” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
d1.displayStringTextFormat |
string |
“processed {numProcessedPackets} pk ({processedTotalLength})” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
d1.interfaceTableModule |
string |
Module path to the InterfaceTable module |
|
d1.forwardServiceRegistration |
bool |
true |
|
d1.forwardProtocolRegistration |
bool |
true |
|
d1.interfaceMapping |
object |
{} |
Maps network interface names to connected submodule names (e.g. {“eth0”: “bridging”}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default |
d1.serviceMapping |
object |
{} |
Maps protocols to connected submodule names (e.g. {“ethernetmac”: “bridging”}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default |
d1.protocolMapping |
object |
{} |
Maps protocols to connected submodule names (e.g. {“ipv4”: “bridging”}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default |
receiveWithProtocol.displayStringTextFormat |
string |
“” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
crcChecker.displayStringTextFormat |
string |
“dropped {numDroppedPackets}/{numProcessedPackets} pk ({droppedTotalLength}/{processedTotalLength})” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
crcChecker.backpressure |
bool |
false |
|
crcChecker.headerPosition |
string |
“front” |
Source code¶
module InterfaceService extends NetworkInterface
{
parameters:
string interfaceTableModule;
string protocol;
@class(inet::NetworkInterface);
@display("i=block/ifcard");
gates:
input upperLayerIn @loose;
output upperLayerOut @loose;
inout phys;
submodules:
sendToMacAddress: SendToMacAddress {
@display("p=300,100");
}
resending: Resending {
@display("p=300,200");
}
sendWithAcknowledge: SendWithAcknowledge {
@display("p=300,300");
}
m1: PacketMultiplexer {
@display("p=300,400");
}
sendWithProtocol: SendWithProtocol {
@display("p=300,500");
}
crcInserter: EthernetFcsHeaderInserter {
@display("p=300,600");
}
transmitter: PacketTransmitter {
@display("p=300,700");
}
receiveAtMacAddress: ReceiveAtMacAddress {
@display("p=600,100");
}
receiveWithAcknowledge: ReceiveWithAcknowledge {
@display("p=600,200");
}
d1: MessageDispatcher {
@display("p=600,300");
}
receiveWithProtocol: ReceiveWithProtocol {
@display("p=600,400");
}
crcChecker: EthernetFcsHeaderChecker {
@display("p=600,500");
}
connections:
upperLayerIn --> { @display("m=n"); } --> sendToMacAddress.in;
sendToMacAddress.out --> resending.in;
resending.out --> sendWithAcknowledge.in;
sendWithAcknowledge.out --> m1.in++;
m1.out --> sendWithProtocol.in;
sendWithProtocol.out --> crcInserter.in;
crcInserter.out --> transmitter.in;
transmitter.out --> { @display("m=s"); } --> phys$o;
phys$i --> { @display("m=s"); } --> crcChecker.in;
crcChecker.out --> receiveWithProtocol.in;
receiveWithProtocol.out --> d1.in++;
d1.out++ --> receiveWithAcknowledge.in;
receiveWithAcknowledge.out --> receiveAtMacAddress.in;
receiveWithAcknowledge.ackOut --> m1.in++;
d1.out++ --> sendWithAcknowledge.ackIn;
receiveAtMacAddress.out --> { @display("m=n"); } --> upperLayerOut;
}