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