This module provides GPSR routing for multiple network protocols simultaneously.
The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Name | Type | Default value | Description |
---|---|---|---|
enableIPv4 | bool | true | |
enableIPv6 | bool | true | |
enableGeneric | bool | true | |
interfaceTableModule | string |
The path to the InterfaceTable module |
|
routingTableModule | string |
Name | Value | Description |
---|---|---|
display | i=block/table |
Name | Direction | Size | Description |
---|---|---|---|
ipIn | input | ||
ipOut | output |
Name | Type | Default value | Description |
---|---|---|---|
ipv4.interfaceTableModule | string |
context parameters |
|
ipv4.routingTableModule | string | ||
ipv4.networkProtocolModule | string | "^.networkLayer.ip" | |
ipv4.outputInterface | string | "wlan0" | |
ipv4.planarizationMode | int | 0 |
GPSR parameters |
ipv4.interfaces | string | "*" | |
ipv4.beaconInterval | double | 10s | |
ipv4.maxJitter | double | 1s | |
ipv4.neighborValidityInterval | double | 30s | |
ipv4.positionByteLength | int | 2 * 4B | |
ipv6.interfaceTableModule | string |
context parameters |
|
ipv6.routingTableModule | string | ||
ipv6.networkProtocolModule | string | "^.networkLayer.ip" | |
ipv6.outputInterface | string | "wlan0" | |
ipv6.planarizationMode | int | 0 |
GPSR parameters |
ipv6.interfaces | string | "*" | |
ipv6.beaconInterval | double | 10s | |
ipv6.maxJitter | double | 1s | |
ipv6.neighborValidityInterval | double | 30s | |
ipv6.positionByteLength | int | 2 * 4B | |
generic.interfaceTableModule | string |
context parameters |
|
generic.routingTableModule | string | ||
generic.networkProtocolModule | string | "^.networkLayer.ip" | |
generic.outputInterface | string | "wlan0" | |
generic.planarizationMode | int | 0 |
GPSR parameters |
generic.interfaces | string | "*" | |
generic.beaconInterval | double | 10s | |
generic.maxJitter | double | 1s | |
generic.neighborValidityInterval | double | 30s | |
generic.positionByteLength | int | 2 * 4B |
// // This module provides GPSR routing for multiple network protocols simultaneously. // module MultiGPSR like IGPSR { parameters: @display("i=block/table"); bool enableIPv4 = default(true); bool enableIPv6 = default(true); bool enableGeneric = default(true); string interfaceTableModule; // The path to the InterfaceTable module string routingTableModule; *.interfaceTableModule = default(absPath(interfaceTableModule)); ipv4.routingTableModule = default(absPath(routingTableModule) + ".ipv4"); ipv4.networkProtocolModule = default("^.^.networkLayer.ipv4.ip"); ipv6.routingTableModule = default(absPath(routingTableModule) + ".ipv6"); ipv6.networkProtocolModule = default("^.^.networkLayer.ipv6.ipv6"); generic.routingTableModule = default(absPath(routingTableModule) + ".generic"); generic.networkProtocolModule = default("^.^.networkLayer.generic.gnp"); gates: input ipIn; output ipOut; submodules: ipv4: GPSR if enableIPv4 { @display("p=100,100"); } ipv6: GPSR if enableIPv6 { @display("p=200,100"); } generic: GPSR if enableGeneric { @display("p=300,100"); } multiplexer: NetworkDatagramMultiplexer { @display("p=200,200"); } connections allowunconnected: multiplexer.upperOut --> ipOut; ipIn --> multiplexer.upperIn; multiplexer.lowerOut++ --> ipv4.ipIn if enableIPv4; ipv4.ipOut --> multiplexer.lowerIn++ if enableIPv4; multiplexer.lowerOut++ --> ipv6.ipIn if enableIPv6; ipv6.ipOut --> multiplexer.lowerIn++ if enableIPv6; multiplexer.lowerOut++ --> generic.ipIn if enableGeneric; generic.ipOut --> multiplexer.lowerIn++ if enableGeneric; }