NextHopForwarding

Package: inet.networklayer.nexthop

NextHopForwarding

simple module

This module is a simplified next hop forwarding that routes datagrams using different kind of network addresses.

Used in compound modules

Name Type Description
NextHopNetworkLayer compound module

This module provides a network layer for the next hop forwarding.

Parameters

Name Type Default value Description
interfaceTableModule string

The path to the InterfaceTable module

routingTableModule string
arpModule string
procDelay double 0s
hopLimit int 32
headerLength int 10B

Properties

Name Value Description
display i=block/routing

Gates

Name Direction Size Description
transportIn input
transportOut output
queueIn input
queueOut output

Signals

Name Type Unit
packetDropped inet::Packet
packetSentToUpper inet::Packet

Direct method calls (observed)

call tofunctioninfo
MessageDispatcherinet::MessageDispatcher::arrivedarrived
MessageDispatcherinet::MessageDispatcher::handleRegisterProtocolhandleRegisterProtocol
MessageDispatcherinet::MessageDispatcher::handleRegisterServicehandleRegisterService
GlobalArpinet::GlobalArp::resolveL3AddressresolveL3Address
NextHopRoutingTableinet::NextHopRoutingTable::findBestMatchingRoutefindBestMatchingRoute(%s)
NextHopRoutingTableinet::NextHopRoutingTable::getInterfaceByAddressgetInterfaceByAddress(%s)
NextHopRoutingTableinet::NextHopRoutingTable::isLocalAddressisLocalAddress(%s)
NextHopRoutingTableinet::NextHopRoutingTable::isLocalMulticastAddressisLocalMulticastAddress(%s)
Dymoinet::dymo::Dymo::datagramLocalOutHookdatagramLocalOutHook
Dymoinet::dymo::Dymo::datagramPreRoutingHookdatagramPreRoutingHook
Gpsrinet::Gpsr::datagramLocalOutHookdatagramLocalOutHook
Gpsrinet::Gpsr::datagramPreRoutingHookdatagramPreRoutingHook

Called methods (observed)

functioninfocall from
inet::NextHopForwarding::handleOperationStagehandleOperationStageScenarioManager
inet::NextHopForwarding::handleRegisterProtocolhandleRegisterProtocolMessageDispatcher
inet::NextHopForwarding::handleRegisterServicehandleRegisterServiceMessageDispatcher
inet::NextHopForwarding::registerHookregisterHook()Dymo, Gpsr
inet::NextHopForwarding::reinjectQueuedDatagramreinjectDatagram()Dymo

Incoming messages (observed)

gatemsgkindctrlsrcModuletags
queueInPacket0EthernetEncapsulationDispatchProtocolReq, InterfaceInd, MacAddressInd, PacketProtocolTag
queueInPacket0Ieee80211LlcLpdDispatchProtocolReq, ErrorRateInd, Ieee802SapInd, InterfaceInd, MacAddressInd, PacketProtocolTag, SignalPowerInd, SignalTimeInd, SnirInd, Ieee80211ChannelInd, Ieee80211ModeInd
transportInPacket0PingAppDispatchProtocolReq, L3AddressReq, PacketProtocolTag, SocketReq
transportInPacket0EchoProtocolDispatchProtocolReq, L3AddressReq, PacketProtocolTag
transportInPacket0DymoDispatchProtocolReq, HopLimitReq, L3AddressReq, PacketProtocolTag, InterfaceReq?
transportInPacket0GpsrDispatchProtocolReq, HopLimitReq, L3AddressReq, PacketProtocolTag
transportInPacket0UdpDispatchProtocolReq, L3AddressReq, MulticastReq, PacketProtocolTag, TransportProtocolInd
transportInRequest1L3SocketBindCommandPingAppDispatchProtocolReq, SocketReq

Outgoing messages (observed)

gatemsgkindctrldestModuletags
queueOutPacket0EthernetEncapsulationDispatchProtocolInd, DispatchProtocolReq, InterfaceReq, MacAddressReq, NetworkProtocolInd, PacketProtocolTag, InterfaceInd?, MacAddressInd?, SocketReq?
queueOutPacket0Ieee80211LlcLpdDispatchProtocolInd, InterfaceReq, MacAddressReq, NetworkProtocolInd, PacketProtocolTag, ErrorRateInd?, Ieee802SapInd?, InterfaceInd?, MacAddressInd?, NextHopAddressReq?, SignalPowerInd?, SignalTimeInd?, SnirInd?, SocketReq?, Ieee80211ChannelInd?, Ieee80211ModeInd?
transportOutPacket0PingAppDispatchProtocolReq, HopLimitInd, InterfaceInd, L3AddressInd, MacAddressInd, NetworkProtocolInd, PacketProtocolTag, SocketInd, ErrorRateInd?, Ieee802SapInd?, SignalPowerInd?, SignalTimeInd?, SnirInd?, Ieee80211ChannelInd?, Ieee80211ModeInd?
transportOutPacket0EchoProtocolDispatchProtocolReq, HopLimitInd, InterfaceInd, L3AddressInd, MacAddressInd, NetworkProtocolInd, PacketProtocolTag, ErrorRateInd?, Ieee802SapInd?, SignalPowerInd?, SignalTimeInd?, SnirInd?, Ieee80211ChannelInd?, Ieee80211ModeInd?
transportOutPacket0DymoDispatchProtocolReq, ErrorRateInd, HopLimitInd, Ieee802SapInd, InterfaceInd, L3AddressInd, MacAddressInd, NetworkProtocolInd, PacketProtocolTag, SignalPowerInd, SignalTimeInd, SnirInd, Ieee80211ChannelInd, Ieee80211ModeInd
transportOutPacket0GpsrDispatchProtocolReq, ErrorRateInd, HopLimitInd, Ieee802SapInd, InterfaceInd, L3AddressInd, MacAddressInd, NetworkProtocolInd, PacketProtocolTag, SignalPowerInd, SignalTimeInd, SnirInd, Ieee80211ChannelInd, Ieee80211ModeInd

Packet operations (observed)

chunkTypepacketAction
setBackOffset, trim, trimFront
NextHopForwardingHeaderinsertAtFront, peekAtFront, popAtFront, removeAtFront

Shared Tagging operations (observed)

tagTypetagAction
DispatchProtocolIndaddTagIfAbsent
DispatchProtocolReqaddTagIfAbsent, removeTagIfPresent
HopLimitIndaddTagIfAbsent
HopLimitReqremoveTagIfPresent
InterfaceIndaddTagIfAbsent, findTag, getTag
InterfaceReqaddTagIfAbsent, findTag
L3AddressIndaddTagIfAbsent
L3AddressReqremoveTag
MacAddressReqaddTagIfAbsent
NetworkProtocolIndaddTagIfAbsent, removeTagIfPresent
NextHopAddressReqfindTag
PacketProtocolTagaddTagIfAbsent, getTag, removeTagIfPresent
SocketIndaddTagIfAbsent
SocketReqgetTag

Tagging operations (observed)

tagTypetagAction
inet::NextHopInterfaceDatagetTag

Source code

//
// This module is a simplified next hop forwarding that routes
// datagrams using different kind of network addresses.
//
simple NextHopForwarding
{
    parameters:
        string interfaceTableModule;   // The path to the InterfaceTable module
        string routingTableModule;
        string arpModule;
        double procDelay @unit(s) = default(0s);
        int hopLimit = default(32);
        int headerLength @unit(B) = default(10B);
        @display("i=block/routing");
        @signal[packetDropped](type=inet::Packet);
        @signal[packetSentToUpper](type=inet::Packet);
    gates:
        input transportIn @labels(TcpHeader,UdpHeader);
        output transportOut @labels(TcpHeader,UdpHeader);
        input queueIn @labels(NextHopDatagram);
        output queueOut @labels(NextHopDatagram);
}

File: src/inet/networklayer/nexthop/NextHopForwarding.ned