Package: inet.routing.gpsr
Gpsr
simple moduleThis module provides Greedy Perimeter Stateless Routing for Wireless Networks. The implementation supports both GG and RNG planarization algorithms.
For more information on the routing algorithm, see the GPSR paper http://www.eecs.harvard.edu/~htk/publication/2000-mobi-karp-kung.pdf
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Used in compound modules
Name | Type | Description |
---|---|---|
GpsrRouter | compound module | (no description) |
Parameters
Name | Type | Default value | Description |
---|---|---|---|
interfaceTableModule | string |
context parameters |
|
routingTableModule | string | "^.ipv4.routingTable" | |
networkProtocolModule | string | "^.ipv4.ip" | |
outputInterface | string | "wlan0" | |
planarizationMode | string | "GG" |
GPSR parameters |
interfaces | string | "*" | |
beaconInterval | double | 10s | |
maxJitter | double | 0.5 * beaconInterval | |
neighborValidityInterval | double | 4.5 * beaconInterval | |
positionByteLength | int | 2 * 4B | |
displayBubbles | bool | false |
visualization parameters |
Properties
Name | Value | Description |
---|---|---|
display | i=block/routing |
properties |
Gates
Name | Direction | Size | Description |
---|---|---|---|
ipIn | input | ||
ipOut | output |
Scheduled messages (observed)
msg | kind | ctrl | tags | msgname | context |
---|---|---|---|---|---|
omnetpp::cMessage | 0 | BeaconTimer |
Direct method calls (observed)
call to | function | info |
---|---|---|
MessageDispatcher | inet::MessageDispatcher::arrived | arrived |
MessageDispatcher | inet::MessageDispatcher::handleRegisterProtocol | handleRegisterProtocol |
InterfaceTable | inet::InterfaceTable::findInterfaceByName | findInterfaceByName |
InterfaceTable | inet::InterfaceTable::interfaceChanged | interfaceChanged |
Igmpv2 | inet::Igmpv2::receiveSignal | ipv4MulticastGroupJoined |
Ipv4 | inet::Ipv4::registerHook | registerHook() |
Ipv4RoutingTable | inet::Ipv4RoutingTable::isLocalAddress | isLocalAddress(%u.%u.%u.%u) |
Ipv6 | inet::Ipv6::registerHook | registerHook() |
Ipv6RoutingTable | inet::Ipv6RoutingTable::isLocalAddress | isLocalAddress(%s) |
NextHopForwarding | inet::NextHopForwarding::registerHook | registerHook() |
NextHopRoutingTable | inet::NextHopRoutingTable::isLocalAddress | isLocalAddress(%s) |
Called methods (observed)
function | info | call from |
---|---|---|
inet::Gpsr::datagramLocalOutHook | datagramLocalOutHook | Ipv4, Ipv6, NextHopForwarding |
inet::Gpsr::datagramPreRoutingHook | datagramPreRoutingHook | Ipv4, Ipv6, NextHopForwarding |
inet::Gpsr::handleOperationStage | handleOperationStage | ScenarioManager |
inet::Gpsr::receiveSignal | linkBroken | Dcf |
Incoming messages (observed)
Outgoing messages (observed)
gate | msg | kind | ctrl | destModule | tags |
---|---|---|---|---|---|
ipOut | Packet | 0 | Ipv4 | DispatchProtocolReq, HopLimitReq, L3AddressReq, PacketProtocolTag | |
ipOut | Packet | 0 | Ipv6 | DispatchProtocolReq, HopLimitReq, L3AddressReq, PacketProtocolTag | |
ipOut | Packet | 0 | NextHopForwarding | DispatchProtocolReq, HopLimitReq, L3AddressReq, PacketProtocolTag |
Packet operations (observed)
chunkType | packetAction |
---|---|
trim, trimFront | |
GpsrBeacon | insertAtBack, peekAtFront |
Ipv4Header | insertAtFront, removeAtFront |
Ipv6Header | insertAtFront, removeAtFront |
NextHopForwardingHeader | insertAtFront, removeAtFront |
UdpHeader | insertAtFront, popAtFront |
Shared Tagging operations (observed)
tagType | tagAction |
---|---|
DispatchProtocolReq | addTag |
HopLimitReq | addTag |
InterfaceReq | addTagIfAbsent |
L3AddressReq | addTag |
NetworkProtocolInd | addTagIfAbsent, findTag, removeTagIfPresent |
NextHopAddressReq | addTagIfAbsent |
PacketProtocolTag | addTag, addTagIfAbsent, removeTagIfPresent |
Tagging operations (observed)
tagType | tagAction |
---|---|
inet::Ipv4InterfaceData | getTagForUpdate |
inet::Ipv6InterfaceData | findTag, getTagForUpdate |
inet::NextHopInterfaceData | getTagForUpdate |
Source code
// // This module provides Greedy Perimeter Stateless Routing for Wireless Networks. // The implementation supports both GG and RNG planarization algorithms. // // For more information on the routing algorithm, see the GPSR paper // http://www.eecs.harvard.edu/~~htk/publication/2000-mobi-karp-kung.pdf // simple Gpsr like IManetRouting { parameters: // properties @display("i=block/routing"); // context parameters string interfaceTableModule; // The path to the InterfaceTable module string routingTableModule = default("^.ipv4.routingTable"); string networkProtocolModule = default("^.ipv4.ip"); string outputInterface = default("wlan0"); // GPSR parameters string planarizationMode @enum("","GG","RNG") = default("GG"); string interfaces = default("*"); double beaconInterval @unit(s) = default(10s); double maxJitter @unit(s) = default(0.5 * beaconInterval); double neighborValidityInterval @unit(s) = default(4.5 * beaconInterval); int positionByteLength @unit(B) = default(2 * 4B); // visualization parameters bool displayBubbles = default(false); // display bubble messages about changes in routing state for packets gates: input ipIn; output ipOut; }File: src/inet/routing/gpsr/Gpsr.ned