NextHopNetworkLayer

Package: inet.networklayer.nexthop

NextHopNetworkLayer

compound module

This module provides a network layer for the next hop forwarding.

routingTable : NextHopRoutingTable

This module stores next hop routes used by the next hop forwarding protocol.

Source:
routingTable: NextHopRoutingTable {
    parameters:
        @display("p=100,100;is=s");
} echo : EchoProtocol

This module provides a mechanism to test network layer connectivity using echo request/response...

Source:
echo: EchoProtocol {
    parameters:
        @display("p=600,100");
} up : MessageDispatcher

This module connects multiple applications, protocols and interfaces with each other and...

Source:
up: MessageDispatcher {
    parameters:
        @display("p=450,200;b=480,5");
} arp : GlobalArp

This module provides global address resolution without exchanging packets.

Source:
arp: GlobalArp {
    parameters:
        @display("p=300,300;q=pendingQueue");
} nextHop : NextHopForwarding

This module is a simplified next hop forwarding that routes datagrams using different kind of...

Source:
nextHop: NextHopForwarding {
    parameters:
        @display("p=600,300;q=queue");
} lp : MessageDispatcher

This module connects multiple applications, protocols and interfaces with each other and...

Source:
lp: MessageDispatcher {
    parameters:
        @display("p=450,400;b=480,5");
}

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.

Parameters

Name Type Default value Description
forwarding bool false
multicastForwarding bool false
interfaceTableModule string

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
routingTable.interfaceTableModule string

The path to the InterfaceTable module

routingTable.addressType string "modulepath"
routingTable.routerId string "auto"

for routers, the router id using address dotted notation; specify "auto" to select the highest interface address; should be left empty ("") for hosts

routingTable.forwarding bool true

turns IP forwarding on/off

routingTable.multicastForwarding bool false

turns multicast forwarding on/off

up.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

up.forwardServiceRegistration bool true
up.forwardProtocolRegistration bool true
arp.interfaceTableModule string

path to the InterfaceTable module

arp.addressType string "ipv4"
nextHop.interfaceTableModule string

The path to the InterfaceTable module

nextHop.routingTableModule string
nextHop.arpModule string
nextHop.procDelay double 0s
nextHop.hopLimit int 32
nextHop.headerLength int 10B
lp.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

lp.forwardServiceRegistration bool true
lp.forwardProtocolRegistration bool true

Source code

//
// This module provides a network layer for the next hop forwarding.
//
module NextHopNetworkLayer like INetworkLayer
{
    parameters:
        bool forwarding = default(false);
        bool multicastForwarding = default(false);
        string interfaceTableModule;
        *.forwarding = this.forwarding;
        *.multicastForwarding = this.multicastForwarding;
        *.interfaceTableModule = default(absPath(this.interfaceTableModule));
        *.routingTableModule = default(absPath(".routingTable"));
        *.arpModule = default(absPath(".arp"));
        @display("i=block/fork");
    gates:
        input ifIn @labels(INetworkHeader);
        output ifOut @labels(INetworkHeader);
        input transportIn @labels(Ipv4ControlInfo/down);
        output transportOut @labels(Ipv4ControlInfo/up);

    submodules:
        routingTable: NextHopRoutingTable {
            parameters:
                @display("p=100,100;is=s");
        }
        echo: EchoProtocol {
            parameters:
                @display("p=600,100");
        }
        up: MessageDispatcher {
            parameters:
                @display("p=450,200;b=480,5");
        }
        arp: GlobalArp {
            parameters:
                @display("p=300,300;q=pendingQueue");
        }
        nextHop: NextHopForwarding {
            parameters:
                @display("p=600,300;q=queue");
        }
        lp: MessageDispatcher {
            parameters:
                @display("p=450,400;b=480,5");
        }

    connections allowunconnected:
        up.out++ --> { @display("m=n"); } --> transportOut;
        up.in++ <-- { @display("m=n"); } <-- transportIn;

        nextHop.transportOut --> up.in++;
        nextHop.transportIn <-- up.out++;

        up.out++ --> echo.ipIn;
        up.in++ <-- echo.ipOut;

        lp.out++ --> arp.ifIn;
        lp.in++ <-- arp.ifOut;

        lp.out++ --> nextHop.queueIn;
        lp.in++ <-- nextHop.queueOut;

        lp.in++ <-- { @display("m=s"); } <-- ifIn;
        lp.out++ --> { @display("m=s"); } --> ifOut;
}

File: src/inet/networklayer/nexthop/NextHopNetworkLayer.ned