Package: inet.applications.ethernet
EthernetSocketIo
simple moduleThis module provides Ethernet socket handling for generic applications.
Used in compound modules
Name | Type | Description |
---|---|---|
EthernetApp | compound module |
This module generates traffic as an Ethernet application. The traffic source and traffic sink modules can be built from queueing model elements. |
Parameters
Name | Type | Default value | Description |
---|---|---|---|
interfaceTableModule | string |
relative module path of the interface table |
|
interface | string | "" |
network interface name |
localAddress | string | "" |
local Ethernet MAC address |
remoteAddress | string | "" |
remove Ethernet MAC address |
stopOperationExtraTime | double | -1s |
extra time after lifecycle stop operation finished |
stopOperationTimeout | double | 2s |
timeout value for lifecycle stop operation |
Properties
Name | Value | Description |
---|---|---|
lifecycleSupport | ||
display | i=block/socket |
Gates
Name | Direction | Size | Description |
---|---|---|---|
trafficIn | input | ||
trafficOut | output | ||
socketIn | input | ||
socketOut | output |
Signals
Name | Type | Unit |
---|---|---|
packetReceived | inet::Packet | |
packetSent | inet::Packet |
Statistics
Name | Title | Source | Record | Unit | Interpolation Mode |
---|---|---|---|---|---|
packetReceived | packets received | packetReceived | count, sum(packetBytes), vector(packetBytes) | none | |
packetSent | packets sent | packetSent | count, sum(packetBytes), vector(packetBytes) | none |
Direct method calls (observed)
call to | function | info |
---|---|---|
MessageDispatcher | inet::MessageDispatcher::arrived | arrived |
Incoming messages (observed)
gate | msg | kind | ctrl | srcModule | tags |
---|---|---|---|---|---|
trafficIn | Packet | 0 | ActivePacketSource | DirectionTag, PacketProtocolTag |
Outgoing messages (observed)
gate | msg | kind | ctrl | destModule | tags |
---|---|---|---|---|---|
socketOut | Packet | 0 | PacketMultiplexer | DirectionTag, DispatchProtocolReq, EncapsulationProtocolReq, MacAddressReq, PacketProtocolTag, SocketReq |
Shared Tagging operations (observed)
tagType | tagAction |
---|---|
DispatchProtocolReq | addTagIfAbsent |
EncapsulationProtocolReq | addTagIfAbsent, findTagForUpdate |
MacAddressReq | addTag |
PacketProtocolTag | findTag |
SocketInd | findTag |
SocketReq | addTagIfAbsent |
Source code
// // This module provides Ethernet socket handling for generic applications. // simple EthernetSocketIo { parameters: string interfaceTableModule; // relative module path of the interface table string interface = default(""); // network interface name string localAddress = default(""); // local Ethernet MAC address string remoteAddress = default(""); // remove Ethernet MAC address double stopOperationExtraTime @unit(s) = default(-1s); // extra time after lifecycle stop operation finished double stopOperationTimeout @unit(s) = default(2s); // timeout value for lifecycle stop operation @lifecycleSupport(); @display("i=block/socket"); @signal[packetSent](type=inet::Packet); @signal[packetReceived](type=inet::Packet); @statistic[packetSent](title="packets sent"; source=packetSent; record=count,"sum(packetBytes)","vector(packetBytes)"; interpolationmode=none); @statistic[packetReceived](title="packets received"; source=packetReceived; record=count,"sum(packetBytes)","vector(packetBytes)"; interpolationmode=none); gates: input trafficIn; output trafficOut; input socketIn; output socketOut; }File: src/inet/applications/ethernet/EthernetSocketIo.ned