Package: inet.emulation.linklayer.ethernet
ExtEthernetSocket
simple moduleThis module provides a bidirectional connection to an ethernet socket of the host computer which is running the simulation. It writes the packets arrived on 'upperLayerIn' gate to the specified real socket, and sends out packets arrived from the real socket on 'upperLayerOut' gate.
Used in compound modules
Name | Type | Description |
---|---|---|
ExtLowerEthernetInterface | compound module |
This module provides an Ethernet network interface suitable for emulation. The lower part of the network interface is realized in the real world using a real ethernet socket of the host computer which is running the simulation. |
Parameters
Name | Type | Default value | Description |
---|---|---|---|
device | string |
name of existing real ethernet device |
|
namespace | string | "" | |
packetNameFormat | string | "Ext-%p-%t-%n" |
name of received packets |
Properties
Name | Value | Description |
---|---|---|
display | i=block/rxtx |
Gates
Name | Direction | Size | Description |
---|---|---|---|
upperLayerIn | input | ||
upperLayerOut | output |
Signals
Name | Type | Unit |
---|---|---|
packetReceived | Packet | |
packetSent | Packet | |
packetReceivedFromUpper | Packet | |
packetSentToUpper | Packet |
Statistics
Name | Title | Source | Record | Unit | Interpolation Mode |
---|---|---|---|---|---|
packetReceived | packets received | packetReceived | count, sum(packetBytes), vector(packetBytes) | none | |
packetSentFromUpper | packets sent to higher layer | packetSentToUpper | count, sum(packetBytes), vector(packetBytes) | none | |
packetSent | packets sent | packetSent | count, sum(packetBytes), vector(packetBytes) | none | |
packetReceivedFromUpper | packets received from higher layer | packetReceivedFromUpper | count, sum(packetBytes), vector(packetBytes) | none |
Source code
// // This module provides a bidirectional connection to an ethernet socket of the // host computer which is running the simulation. It writes the packets arrived // on 'upperLayerIn' gate to the specified real socket, and sends out packets // arrived from the real socket on 'upperLayerOut' gate. // simple ExtEthernetSocket { parameters: string device; // name of existing real ethernet device string namespace = default(""); string packetNameFormat = default("Ext-%p-%t-%n"); // name of received packets @display("i=block/rxtx"); @signal[packetSentToUpper](type=Packet); @signal[packetReceivedFromUpper](type=Packet); @signal[packetSent](type=Packet); @signal[packetReceived](type=Packet); @statistic[packetSentFromUpper](title="packets sent to higher layer"; source=packetSentToUpper; record=count,"sum(packetBytes)","vector(packetBytes)"; interpolationmode=none); @statistic[packetReceivedFromUpper](title="packets received from higher layer"; source=packetReceivedFromUpper; record=count,"sum(packetBytes)","vector(packetBytes)"; interpolationmode=none); @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 upperLayerIn; output upperLayerOut @loose; }File: src/inet/emulation/linklayer/ethernet/ExtEthernetSocket.ned