Package: inet.networklayer.ipv4
Icmp
simple moduleICMP implementation.
Author: Jochen Reber
Used in compound modules
Name | Type | Description |
---|---|---|
Ipv4NetworkLayer | compound module |
Network layer of an IPv4 node. |
Parameters
Name | Type | Default value | Description |
---|---|---|---|
interfaceTableModule | string |
The path to the InterfaceTable module |
|
routingTableModule | string | ||
crcMode | string | "declared" | |
quoteLength | int | 8B |
Number of bytes from original packet to quote in ICMP reply |
Properties
Name | Value | Description |
---|---|---|
display | i=block/control |
Gates
Name | Direction | Size | Description |
---|---|---|---|
transportIn | input | ||
transportOut | output | ||
ipIn | input |
delivered ICMP packets |
|
ipOut | output |
towards network |
Direct method calls (observed)
call to | function | info |
---|---|---|
MessageDispatcher | inet::MessageDispatcher::arrived | arrived |
MessageDispatcher | inet::MessageDispatcher::handleRegisterProtocol | handleRegisterProtocol |
MessageDispatcher | inet::MessageDispatcher::handleRegisterService | handleRegisterService |
Ipv4RoutingTable | inet::Ipv4RoutingTable::isLocalBroadcastAddress | isLocalBroadcastAddress(%u.%u.%u.%u) |
Called methods (observed)
function | info | call from |
---|---|---|
inet::Icmp::handleRegisterProtocol | handleRegisterProtocol | MessageDispatcher |
inet::Icmp::handleRegisterService | handleRegisterService | MessageDispatcher |
inet::Icmp::sendErrorMessage | sendErrorMessage(datagram, type=%d, code=%d) | Ipv4, Udp |
Incoming messages (observed)
gate | msg | kind | ctrl | srcModule | tags |
---|---|---|---|---|---|
ipIn | Packet | 0 | Ipv4 | DispatchProtocolReq, DscpInd, EcnInd, HopLimitInd, InterfaceInd, L3AddressInd, NetworkProtocolInd, PacketProtocolTag, TosInd, DispatchProtocolInd?, ErrorRateInd?, Ieee802SapInd?, InterfaceReq?, MacAddressInd?, MacAddressReq?, SignalPowerInd?, SignalTimeInd?, SnirInd?, SocketReq?, UserPriorityInd?, LlcProtocolTag?, Ieee80211ChannelInd?, Ieee80211ModeInd?, Ieee80211ModeReq? |
Outgoing messages (observed)
gate | msg | kind | ctrl | destModule | tags |
---|---|---|---|---|---|
ipOut | Packet | 0 | Ipv4 | DispatchProtocolReq, L3AddressReq, PacketProtocolTag | |
transportOut | Packet | 0 | Tcp | DispatchProtocolReq, DscpInd, EcnInd, HopLimitInd, InterfaceInd, L3AddressInd, NetworkProtocolInd, PacketProtocolTag, TosInd | |
transportOut | Packet | 0 | Udp | DispatchProtocolReq, L3AddressInd, PacketProtocolTag, DscpInd?, EcnInd?, HopLimitInd?, InterfaceInd?, MacAddressInd?, NetworkProtocolInd?, TosInd? |
Packet operations (observed)
chunkType | packetAction |
---|---|
peekData, peekDataAsBytes, peekDataAt | |
BitsChunk | insertAtBack |
ByteCountChunk | insertAtBack |
BytesChunk | insertAtBack |
IcmpEchoReply | insertAtFront |
IcmpEchoRequest | popAtFront |
IcmpHeader | insertAtFront, peekAtFront, peekDataAt |
Ipv4Header | peekAtFront, peekDataAt |
SequenceChunk | insertAtBack |
Shared Tagging operations (observed)
tagType | tagAction |
---|---|
DispatchProtocolReq | addTagIfAbsent |
L3AddressInd | addTag, getTag |
L3AddressReq | addTag, addTagIfAbsent |
PacketProtocolTag | addTag, addTagIfAbsent |
Tagging operations (observed)
tagType | tagAction |
---|---|
inet::Ipv4InterfaceData | findTag |
Source code
// // ICMP implementation. // // @author Jochen Reber // simple Icmp { parameters: string interfaceTableModule; // The path to the InterfaceTable module string routingTableModule; string crcMode @mutable @enum("declared","computed") = default("declared"); int quoteLength @mutable @unit(B) = default(8B); // Number of bytes from original packet to quote in ICMP reply @display("i=block/control"); gates: input transportIn; output transportOut; input ipIn @labels(Ipv4ControlInfo/up); // delivered ICMP packets output ipOut @labels(Ipv4ControlInfo/down); // towards network }File: src/inet/networklayer/ipv4/Icmp.ned