ExtUpperEthernetInterface

Package: inet.emulation.linklayer.ethernet

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.

ExtEthernetTapDevice IEtherMac

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
ExtInterface compound module

This module provides a base module for external network interfaces.

Parameters

Name Type Default value Description
displayStringTextFormat string "%a (%i)\n%m"
interfaceTableModule string
device string
namespace string ""
copyConfiguration string ""
address string "auto"
broadcast bool true
multicast bool true
pointToPoint bool false
mtu int 4470B
csmacdSupport bool false

by default CSMA/CD is turned off, so only point-to-point duplex links are supported.

Properties

Name Value Description
class ExtInterface
display i=block/ifcard

Gates

Name Direction Size Description
upperLayerIn input
upperLayerOut output
phys inout

Unassigned submodule parameters

Name Type Default value Description
tap.device string

name of existing real tap interface

tap.namespace string ""
tap.packetNameFormat string "Ext-%p-%t-%n"
mac.promiscuous bool

if true, all packets are received, otherwise only the ones with matching destination MAC address

mac.duplexMode bool

selects full-duplex (true) or half-duplex (false) operation

mac.mtu int

Source code

//
// 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.
//
module ExtUpperEthernetInterface extends ExtInterface like IEthernetInterface
{
    parameters:
        bool csmacdSupport = default(false);  // by default CSMA/CD is turned off, so only point-to-point duplex links are supported.
        @display("i=block/ifcard");
    gates:
        inout phys @labels(EtherFrame);
    submodules:
        tap: ExtEthernetTapDevice {
            parameters:
                @display("p=100,100");
        }
        mac: <default(csmacdSupport ? "EtherMac" : "EtherMacFullDuplex")> like IEtherMac {
            parameters:
                queue.packetCapacity = 10000;
                @display("p=200,400");
        }
    connections allowunconnected:
        tap.lowerLayerOut --> { @display("m=s"); } --> mac.upperLayerIn;
        tap.lowerLayerIn <-- { @display("m=s"); } <-- mac.upperLayerOut;
        mac.phys <--> { @display("m=s"); } <--> phys;
}
File: src/inet/emulation/linklayer/ethernet/ExtUpperEthernetInterface.ned