Package: inet.networklayer.nexthop
NextHopForwarding
simple moduleThis 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 to | function | info |
---|---|---|
MessageDispatcher | inet::MessageDispatcher::arrived | arrived |
MessageDispatcher | inet::MessageDispatcher::handleRegisterProtocol | handleRegisterProtocol |
MessageDispatcher | inet::MessageDispatcher::handleRegisterService | handleRegisterService |
GlobalArp | inet::GlobalArp::resolveL3Address | resolveL3Address |
NextHopRoutingTable | inet::NextHopRoutingTable::findBestMatchingRoute | findBestMatchingRoute(%s) |
NextHopRoutingTable | inet::NextHopRoutingTable::getInterfaceByAddress | getInterfaceByAddress(%s) |
NextHopRoutingTable | inet::NextHopRoutingTable::isLocalAddress | isLocalAddress(%s) |
NextHopRoutingTable | inet::NextHopRoutingTable::isLocalMulticastAddress | isLocalMulticastAddress(%s) |
Dymo | inet::dymo::Dymo::datagramLocalOutHook | datagramLocalOutHook |
Dymo | inet::dymo::Dymo::datagramPreRoutingHook | datagramPreRoutingHook |
Gpsr | inet::Gpsr::datagramLocalOutHook | datagramLocalOutHook |
Gpsr | inet::Gpsr::datagramPreRoutingHook | datagramPreRoutingHook |
Called methods (observed)
function | info | call from |
---|---|---|
inet::NextHopForwarding::handleOperationStage | handleOperationStage | ScenarioManager |
inet::NextHopForwarding::handleRegisterProtocol | handleRegisterProtocol | MessageDispatcher |
inet::NextHopForwarding::handleRegisterService | handleRegisterService | MessageDispatcher |
inet::NextHopForwarding::registerHook | registerHook() | Dymo, Gpsr |
inet::NextHopForwarding::reinjectQueuedDatagram | reinjectDatagram() | Dymo |
Incoming messages (observed)
gate | msg | kind | ctrl | srcModule | tags |
---|---|---|---|---|---|
queueIn | Packet | 0 | EthernetEncapsulation | DispatchProtocolReq, InterfaceInd, MacAddressInd, PacketProtocolTag | |
queueIn | Packet | 0 | Ieee80211LlcLpd | DispatchProtocolReq, ErrorRateInd, Ieee802SapInd, InterfaceInd, MacAddressInd, PacketProtocolTag, SignalPowerInd, SignalTimeInd, SnirInd, Ieee80211ChannelInd, Ieee80211ModeInd | |
transportIn | Packet | 0 | PingApp | DispatchProtocolReq, L3AddressReq, PacketProtocolTag, SocketReq | |
transportIn | Packet | 0 | EchoProtocol | DispatchProtocolReq, L3AddressReq, PacketProtocolTag | |
transportIn | Packet | 0 | Dymo | DispatchProtocolReq, HopLimitReq, L3AddressReq, PacketProtocolTag, InterfaceReq? | |
transportIn | Packet | 0 | Gpsr | DispatchProtocolReq, HopLimitReq, L3AddressReq, PacketProtocolTag | |
transportIn | Packet | 0 | Udp | DispatchProtocolReq, L3AddressReq, MulticastReq, PacketProtocolTag, TransportProtocolInd | |
transportIn | Request | 1 | L3SocketBindCommand | PingApp | DispatchProtocolReq, SocketReq |
Outgoing messages (observed)
Packet operations (observed)
chunkType | packetAction |
---|---|
setBackOffset, trim, trimFront | |
NextHopForwardingHeader | insertAtFront, peekAtFront, popAtFront, removeAtFront |
Shared Tagging operations (observed)
tagType | tagAction |
---|---|
DispatchProtocolInd | addTagIfAbsent |
DispatchProtocolReq | addTagIfAbsent, removeTagIfPresent |
HopLimitInd | addTagIfAbsent |
HopLimitReq | removeTagIfPresent |
InterfaceInd | addTagIfAbsent, findTag, getTag |
InterfaceReq | addTagIfAbsent, findTag |
L3AddressInd | addTagIfAbsent |
L3AddressReq | removeTag |
MacAddressReq | addTagIfAbsent |
NetworkProtocolInd | addTagIfAbsent, removeTagIfPresent |
NextHopAddressReq | findTag |
PacketProtocolTag | addTagIfAbsent, getTag, removeTagIfPresent |
SocketInd | addTagIfAbsent |
SocketReq | getTag |
Tagging operations (observed)
tagType | tagAction |
---|---|
inet::NextHopInterfaceData | getTag |
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