Compound Module IPv6NetworkLayer

Package: inet.networklayer.ipv6
File: src/inet/networklayer/ipv6/IPv6NetworkLayer.ned

Represents an IPv6 network layer (L3).

The module has ports to connect to a higher layer (TCP, UDP) and several network interfaces.

IPv6 ICMPv6 IPv6ErrorHandling IPv6NeighbourDiscovery IIPv6Tunneling IxMIPv6Support

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
xMIPv6Support bool false
interfaceTableModule string
routingTableModule string

Properties:

Name Value Description
display i=block/fork

Gates:

Name Direction Size Description
ifIn [ ] input
ifOut [ ] output
transportIn [ ] input
transportOut [ ] output
pingIn [ ] input
pingOut [ ] output

Unassigned submodule parameters:

Name Type Default value Description
ipv6.interfaceTableModule string

The path to the InterfaceTable module

ipv6.routingTableModule string
ipv6.ipv6NeighbourDiscoveryModule string
ipv6.icmpv6Module string
ipv6.ipv6TunnelingModule string
ipv6.procDelay double 0s
icmpv6.interfaceTableModule string

The path to the InterfaceTable module

neighbourDiscovery.interfaceTableModule string

The path to the InterfaceTable module

neighbourDiscovery.icmpv6Module string
neighbourDiscovery.xmipv6Module string
neighbourDiscovery.routingTableModule string
neighbourDiscovery.minIntervalBetweenRAs double 30ms

minRtrAdvInterval: 0.03 sec for MIPv6 , declared as parameter to facilitate testing without recompiling (Zarrar 15.07.07)

neighbourDiscovery.maxIntervalBetweenRAs double 70ms

MaxrtrAdvInterval: 0.07 sec for MIPv6, declared as parameter to facilitate testing without recompiling (Zarrar 15.07.07)

mipv6support.isHomeAgent bool
mipv6support.isMobileNode bool

Source code:

//
// Represents an IPv6 network layer (L3).
//
// The module has ports to connect to a higher layer (TCP, UDP) and
// several network interfaces.
//
module IPv6NetworkLayer like INetworkLayer
{
    parameters:
        bool xMIPv6Support = default(false);
        *.xmipv6Module = xMIPv6Support ? absPath(".mipv6support.xMobileIPv6") : "";
        string interfaceTableModule;
        string routingTableModule;
        *.interfaceTableModule = default(absPath(interfaceTableModule));
        *.routingTableModule = default(absPath(routingTableModule));
        *.ipv6NeighbourDiscoveryModule = default(absPath(".neighbourDiscovery"));
        *.icmpv6Module = default(absPath(".icmpv6"));
        *.ipv6TunnelingModule = default(absPath(".iptunneling"));
        @display("i=block/fork");
    gates:
        input ifIn[] @labels(INetworkDatagram);
        output ifOut[] @labels(INetworkDatagram);
        input transportIn[] @labels(IPv4ControlInfo/down);
        output transportOut[] @labels(IPv4ControlInfo/up);
        input pingIn[] @labels(PingPayload/down);
        output pingOut[] @labels(PingPayload/up);
    submodules:
        // TODO: rename to ip
        ipv6: IPv6 {
            parameters:
                @display("p=84,129");
            gates:
                queueIn[sizeof(ifIn)];
                queueOut[sizeof(ifIn)];
        }
        icmpv6: ICMPv6 {
            parameters:
                @display("p=189,79");
        }
        ipv6ErrorHandling: IPv6ErrorHandling {
            parameters:
                @display("p=280,79");
        }
        neighbourDiscovery: IPv6NeighbourDiscovery {
            parameters:
                @display("p=257,149");
        }
        iptunneling: <default(firstAvailable("IPv6Tunneling"))> like IIPv6Tunneling {
            parameters:
                @display("p=44,168");
        }
        mipv6support: <default("xMIPv6Support")> like IxMIPv6Support if xMIPv6Support {
            parameters:
                @display("p=44,79");
        }

    connections allowunconnected:  // FIXME remove 'nocheck'!
        for i=0..sizeof(transportIn)-1 {
            transportIn[i] --> { @display("m=n"); } --> ipv6.transportIn++;
        }
        for i=0..sizeof(transportOut)-1 {
            ipv6.transportOut++ --> { @display("m=n"); } --> transportOut[i];
        }

        // IPv6 to IPv6 Tunneling
        iptunneling.upperLayerIn <-- ipv6.upperTunnelingOut;
        iptunneling.upperLayerOut --> ipv6.upperTunnelingIn;
        iptunneling.linkLayerIn <-- ipv6.lowerTunnelingOut;
        iptunneling.linkLayerOut --> ipv6.lowerTunnelingIn;

        // IPv6 to ICMPv6
        ipv6.transportOut++ --> icmpv6.ipv6In;
        ipv6.transportIn++ <-- icmpv6.ipv6Out;

        // ICMPv6 to IPv6ErrorHandling
        icmpv6.errorOut --> ipv6ErrorHandling.in;

        // ICMPv6 to ping I/O
        for i=0..sizeof(pingOut)-1 {
            icmpv6.pingOut++ --> { @display("m=n"); } --> pingOut[i];
        }
        for i=0..sizeof(pingIn)-1 {
            icmpv6.pingIn++ <-- { @display("m=n"); } <-- pingIn[i];
        }

        // IPv6 to Neighbour Discovery
        ipv6.ndOut --> neighbourDiscovery.ipv6In;
        ipv6.ndIn <-- neighbourDiscovery.ipv6Out;

        //IPv6 to Mobile IPv6
        ipv6.xMIPv6Out --> mipv6support.fromIPv6 if xMIPv6Support;
        ipv6.xMIPv6In <-- mipv6support.toIPv6 if xMIPv6Support;

        // IPv6 to L2
        for i=0..sizeof(ifIn)-1 {
            ifIn[i] --> { @display("m=s"); } --> ipv6.queueIn[i];
        }
        for i=0..sizeof(ifOut)-1 {
            ipv6.queueOut[i] --> { @display("m=s"); } --> ifOut[i];
        }
}