Package: inet.networklayer.generic
GenericNetworkLayer
compound moduleThis module provides the generic network layer.
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 |
|---|---|---|---|
| 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 |
|---|---|---|---|
| gnp.interfaceTableModule | string |
The path to the InterfaceTable module |
|
| gnp.routingTableModule | string | ||
| gnp.arpModule | string | ||
| gnp.procDelay | double | 0s | |
| gnp.hopLimit | int | 32 | |
| arp.interfaceTableModule | string |
The path to the InterfaceTable module |
Source code
// // This module provides the generic network layer. // module GenericNetworkLayer like INetworkLayer { parameters: string interfaceTableModule; string routingTableModule; *.interfaceTableModule = default(absPath(this.interfaceTableModule)); *.routingTableModule = default(absPath(this.routingTableModule)); *.arpModule = default(absPath(".arp")); @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: gnp: GenericNetworkProtocol { parameters: @display("p=85,95;q=queue"); gates: queueIn[sizeof(parent.ifIn)]; queueOut[sizeof(parent.ifOut)]; } echo: EchoProtocol { parameters: @display("p=160,63"); } arp: GenericARP { parameters: @display("p=202,142;q=pendingQueue"); } connections allowunconnected: for i=0..sizeof(transportIn)-1 { transportIn[i] --> { @display("m=n"); } --> gnp.transportIn++; } for i=0..sizeof(transportOut)-1 { gnp.transportOut++ --> { @display("m=n"); } --> transportOut[i]; } gnp.transportOut++ --> echo.localIn; gnp.transportIn++ <-- echo.sendOut; for i=0..sizeof(pingOut)-1 { echo.pingOut++ --> { @display("m=n"); } --> pingOut[i]; } for i=0..sizeof(pingIn)-1 { echo.pingIn++ <-- { @display("m=n"); } <-- pingIn[i]; } gnp.arpOut --> arp.netwIn; gnp.arpIn <-- arp.netwOut; for i=0..sizeof(ifIn)-1 { ifIn[i] --> { @display("m=s"); } --> gnp.queueIn[i]; } for i=0..sizeof(ifOut)-1 { gnp.queueOut[i] --> { @display("m=s"); } --> ifOut[i]; } }File: src/inet/networklayer/generic/GenericNetworkLayer.ned