Gpsr

Package: inet.routing.gpsr

Gpsr

simple module

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

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)

msgkindctrltagsmsgnamecontext
omnetpp::cMessage0BeaconTimer

Direct method calls (observed)

call tofunctioninfo
MessageDispatcherinet::MessageDispatcher::arrivedarrived
MessageDispatcherinet::MessageDispatcher::handleRegisterProtocolhandleRegisterProtocol
InterfaceTableinet::InterfaceTable::findInterfaceByNamefindInterfaceByName
InterfaceTableinet::InterfaceTable::interfaceChangedinterfaceChanged
Igmpv2inet::Igmpv2::receiveSignalipv4MulticastGroupJoined
Ipv4inet::Ipv4::registerHookregisterHook()
Ipv4RoutingTableinet::Ipv4RoutingTable::isLocalAddressisLocalAddress(%u.%u.%u.%u)
Ipv6inet::Ipv6::registerHookregisterHook()
Ipv6RoutingTableinet::Ipv6RoutingTable::isLocalAddressisLocalAddress(%s)
NextHopForwardinginet::NextHopForwarding::registerHookregisterHook()
NextHopRoutingTableinet::NextHopRoutingTable::isLocalAddressisLocalAddress(%s)

Called methods (observed)

functioninfocall from
inet::Gpsr::datagramLocalOutHookdatagramLocalOutHookIpv4, Ipv6, NextHopForwarding
inet::Gpsr::datagramPreRoutingHookdatagramPreRoutingHookIpv4, Ipv6, NextHopForwarding
inet::Gpsr::handleOperationStagehandleOperationStageScenarioManager
inet::Gpsr::receiveSignallinkBrokenDcf

Incoming messages (observed)

gatemsgkindctrlsrcModuletags
ipInPacket0Ipv4DispatchProtocolReq, DscpInd, EcnInd, ErrorRateInd, HopLimitInd, Ieee802SapInd, InterfaceInd, L3AddressInd, MacAddressInd, NetworkProtocolInd, PacketProtocolTag, SignalPowerInd, SignalTimeInd, SnirInd, TosInd, Ieee80211ChannelInd, Ieee80211ModeInd
ipInPacket0NextHopForwardingDispatchProtocolReq, ErrorRateInd, HopLimitInd, Ieee802SapInd, InterfaceInd, L3AddressInd, MacAddressInd, NetworkProtocolInd, PacketProtocolTag, SignalPowerInd, SignalTimeInd, SnirInd, Ieee80211ChannelInd, Ieee80211ModeInd

Outgoing messages (observed)

gatemsgkindctrldestModuletags
ipOutPacket0Ipv4DispatchProtocolReq, HopLimitReq, L3AddressReq, PacketProtocolTag
ipOutPacket0Ipv6DispatchProtocolReq, HopLimitReq, L3AddressReq, PacketProtocolTag
ipOutPacket0NextHopForwardingDispatchProtocolReq, HopLimitReq, L3AddressReq, PacketProtocolTag

Packet operations (observed)

chunkTypepacketAction
trim, trimFront
GpsrBeaconinsertAtBack, peekAtFront
Ipv4HeaderinsertAtFront, removeAtFront
Ipv6HeaderinsertAtFront, removeAtFront
NextHopForwardingHeaderinsertAtFront, removeAtFront
UdpHeaderinsertAtFront, popAtFront

Shared Tagging operations (observed)

tagTypetagAction
DispatchProtocolReqaddTag
HopLimitReqaddTag
InterfaceReqaddTagIfAbsent
L3AddressReqaddTag
NetworkProtocolIndaddTagIfAbsent, findTag, removeTagIfPresent
NextHopAddressReqaddTagIfAbsent
PacketProtocolTagaddTag, addTagIfAbsent, removeTagIfPresent

Tagging operations (observed)

tagTypetagAction
inet::Ipv4InterfaceDatagetTagForUpdate
inet::Ipv6InterfaceDatafindTag, getTagForUpdate
inet::NextHopInterfaceDatagetTagForUpdate

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