ExtLowerIpv4NetworkLayer

Package: inet.emulation.networklayer.ipv4

compound module ExtLowerIpv4NetworkLayer

Provides a simplified network layer for emulation that connects the simulation to a real network on the host computer. Uses ExtLowerIpv4 to send packets from the simulation to the real network and receive packets from the real network into the simulation using raw sockets.

Using this network layer in a host or router implies that layers above IPv4 are simulated, while layers below IPv4 are provided by the host operating system.

Usage diagram

Inheritance diagram

Properties

Name

Value

Description

display

i=block/fork

Gates

Name

Direction

Size

Description

ifIn

input

ifOut

output

transportIn

input

transportOut

output

Unassigned submodule parameters

Name

Type

Default value

Description

ip.encap.displayStringTextFormat

string

“”

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

ip.socket.displayStringTextFormat

string

“snt:{numSent} rcv:{numReceived}”

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

ip.socket.namespace

string

“”

ip.socket.packetName

string

“Ext-%p-%t-%n”

Source code

//
// Provides a simplified network layer for emulation that connects the simulation
// to a real network on the host computer. Uses ~ExtLowerIpv4 to send packets from
// the simulation to the real network and receive packets from the real network
// into the simulation using raw sockets.
//
// Using this network layer in a host or router implies that layers above IPv4
// are simulated, while layers below IPv4 are provided by the host operating system.
//
module ExtLowerIpv4NetworkLayer like INetworkLayer
{
    parameters:
        @display("i=block/fork");

    gates:
        input ifIn @labels(INetworkHeader);
        output ifOut @labels(INetworkHeader);
        input transportIn @labels(Ipv4ControlInfo/down);
        output transportOut @labels(Ipv4ControlInfo/up);

    submodules:
        ip: <default("ExtLowerIpv4")> like IIpv4 {
            parameters:
                @display("p=50,50");
        }

    connections allowunconnected:
        transportIn --> ip.transportIn;
        transportOut <-- ip.transportOut;
}

File: src/inet/emulation/networklayer/ipv4/ExtLowerIpv4NetworkLayer.ned