InterfaceService

Package: inet.protocolelement.service

InterfaceService

compound module

(no description)

pcapRecorder[numPcapRecorders] : PcapRecorder

Records PCAP traces of frames sent/received by other modules within the same host.

Source:
pcapRecorder[numPcapRecorders]: PcapRecorder {
    parameters:
        moduleNamePatterns = ".^";
        @display("p=100,100;is=s");
} clock : like IClock

IClock: This module interface is implemented by clock models.

Source:
clock: <default("")> like IClock if typename != "" {
    parameters:
        @display("p=100,200;is=s");
} sendToMacAddress : SendToMacAddress

Source:
sendToMacAddress: SendToMacAddress {
    @display("p=300,100");
} resending : Resending

Source:
resending: Resending {
    @display("p=300,200");
} sendWithAcknowledge : SendWithAcknowledge

Source:
sendWithAcknowledge: SendWithAcknowledge {
    @display("p=300,300");
} m1 : PacketMultiplexer

This module connects multiple packet producers to one packet consumer.

Source:
m1: PacketMultiplexer {
    @display("p=300,400");
} sendWithProtocol : SendWithProtocol

Source:
sendWithProtocol: SendWithProtocol {
    @display("p=300,500");
} crcInserter : CrcHeaderInserter

Source:
crcInserter: CrcHeaderInserter {
    @display("p=300,600");
} transmitter : PacketTransmitter

This module receives packets from the upper layer as a whole.

Source:
transmitter: PacketTransmitter {
    @display("p=300,700");
} receiveAtMacAddress : ReceiveAtMacAddress

Source:
receiveAtMacAddress: ReceiveAtMacAddress {
    @display("p=600,100");
} receiveWithAcknowledge : ReceiveWithAcknowledge

Source:
receiveWithAcknowledge: ReceiveWithAcknowledge {
    @display("p=600,200");
} d1 : MessageDispatcher

This module connects multiple applications, protocols and interfaces with each other and...

Source:
d1: MessageDispatcher {
    @display("p=600,300");
} receiveWithProtocol : ReceiveWithProtocol

Source:
receiveWithProtocol: ReceiveWithProtocol {
    @display("p=600,400");
} crcChecker : CrcHeaderChecker

Source:
crcChecker: CrcHeaderChecker {
    @display("p=600,500");
}

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

Properties

Name Value Description
networkInterface
lifecycleSupport
class inet::NetworkInterface
display i=block/ifcard

Gates

Name Direction Size Description
upperLayerIn input
upperLayerOut 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

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"
sendToMacAddress.address string ""
resending.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

resending.numRetries int
sendWithAcknowledge.acknowledgeTimeout double
m1.displayStringTextFormat string "passed %p pk (%l)"

determines the text that is written on top of the submodule

m1.forwardServiceRegistration bool true
m1.forwardProtocolRegistration bool true
crcInserter.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

crcInserter.crcMode string "declared"
crcInserter.headerPosition string "front"
transmitter.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

transmitter.clockModule string ""

relative path of a module that implements IClock; optional

transmitter.datarate double
receiveAtMacAddress.address string
d1.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

d1.forwardServiceRegistration bool true
d1.forwardProtocolRegistration bool true
crcChecker.displayStringTextFormat string "dropped %d/%p pk (%k/%l)"

determines the text that is written on top of the submodule

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: CrcHeaderInserter {
            @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: CrcHeaderChecker {
            @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;
}
File: src/inet/protocolelement/service/InterfaceService.ned