Compound Module Router6

Package: oversim.underlay.inetunderlay.ipv6
File: src/underlay/inetunderlay/ipv6/Router6.ned

IP router.

NAMTraceWriter NotificationBoard InterfaceTable RoutingTable6 NetworkLayer6 PPPInterface EthernetInterface

Usage diagram:

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram. Click here to see the full picture.

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram. Click here to see the full picture.

Networks:

Name Type Description
InetUnderlayNetwork6 network

The InetUnderlay ned-file

See also: InetUnderlayConfigurator

Properties:

Name Value Description
node
display i=abstract/router

Gates:

Name Direction Size Description
pppg [ ] inout
ethg [ ] inout

Unassigned submodule parameters:

Name Type Default value Description
routingTable6.routingTableFile xml
networkLayer.ipv6.procDelay double 0s
ppp.ppp.mtu int 4470
eth.mac.promiscuous bool false

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

eth.mac.address string "auto"

MAC address as hex string (12 hex digits), or "auto". "auto" values will be replaced by a generated MAC address in init stage 0.

eth.mac.txrate double 100Mbps

maximum data rate supported by this station (bit/s); actually chosen speed may be lower due to auto- configuration. 0 means fully auto-configured.

eth.mac.duplexEnabled bool true

whether duplex mode can be enabled or not; whether MAC will actually use duplex mode depends on the result of the auto-configuration process (duplex is only possible with DTE-to-DTE connection).

eth.mac.mtu int 1500

Source code:

//
// \IP router.
//
module Router6
{
    parameters:
        @node();
        @display("i=abstract/router");
    gates:
        inout pppg[];
        inout ethg[];
    submodules:
        namTrace: NAMTraceWriter {
            parameters:
                namid = -1; // auto
                @display("p=330,60");
        }
        notificationBoard: NotificationBoard {
            parameters:
                @display("p=60,60");
        }
        interfaceTable: InterfaceTable {
            parameters:
                @display("p=150,60");
        }
        routingTable6: RoutingTable6 {
            parameters:
                isRouter = true;
                @display("p=240,60");
        }
        networkLayer: NetworkLayer6 {
            parameters:
                @display("p=200,141;q=queue");
            gates:
                ifIn[sizeof(pppg)+sizeof(ethg)];
                ifOut[sizeof(pppg)+sizeof(ethg)];
        }
        ppp[sizeof(pppg)]: PPPInterface {
            parameters:
                @display("p=90,257,row,110;q=l2queue");
        }
        eth[sizeof(ethg)]: EthernetInterface {
            parameters:
                @display("p=145,257,row,110;q=l2queue");
        }
    connections allowunconnected:
        // connections to network outside
        for i=0..sizeof(pppg)-1 {
            pppg[i] <--> ppp[i].phys;
            ppp[i].netwOut --> networkLayer.ifIn[i];
            ppp[i].netwIn <-- networkLayer.ifOut[i];
        }

        for i=0..sizeof(ethg)-1 {
            ethg[i] <--> eth[i].phys;
            eth[i].netwOut --> networkLayer.ifIn[sizeof(pppg)+i];
            eth[i].netwIn <-- networkLayer.ifOut[sizeof(pppg)+i];
        }
}