Icmp

Package: inet.networklayer.ipv4

Icmp

simple module

ICMP 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 tofunctioninfo
MessageDispatcherinet::MessageDispatcher::arrivedarrived
MessageDispatcherinet::MessageDispatcher::handleRegisterProtocolhandleRegisterProtocol
MessageDispatcherinet::MessageDispatcher::handleRegisterServicehandleRegisterService
Ipv4RoutingTableinet::Ipv4RoutingTable::isLocalBroadcastAddressisLocalBroadcastAddress(%u.%u.%u.%u)

Called methods (observed)

functioninfocall from
inet::Icmp::handleRegisterProtocolhandleRegisterProtocolMessageDispatcher
inet::Icmp::handleRegisterServicehandleRegisterServiceMessageDispatcher
inet::Icmp::sendErrorMessagesendErrorMessage(datagram, type=%d, code=%d)Ipv4, Udp

Incoming messages (observed)

gatemsgkindctrlsrcModuletags
ipInPacket0Ipv4DispatchProtocolReq, 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)

gatemsgkindctrldestModuletags
ipOutPacket0Ipv4DispatchProtocolReq, L3AddressReq, PacketProtocolTag
transportOutPacket0TcpDispatchProtocolReq, DscpInd, EcnInd, HopLimitInd, InterfaceInd, L3AddressInd, NetworkProtocolInd, PacketProtocolTag, TosInd
transportOutPacket0UdpDispatchProtocolReq, L3AddressInd, PacketProtocolTag, DscpInd?, EcnInd?, HopLimitInd?, InterfaceInd?, MacAddressInd?, NetworkProtocolInd?, TosInd?

Packet operations (observed)

chunkTypepacketAction
peekData, peekDataAsBytes, peekDataAt
BitsChunkinsertAtBack
ByteCountChunkinsertAtBack
BytesChunkinsertAtBack
IcmpEchoReplyinsertAtFront
IcmpEchoRequestpopAtFront
IcmpHeaderinsertAtFront, peekAtFront, peekDataAt
Ipv4HeaderpeekAtFront, peekDataAt
SequenceChunkinsertAtBack

Shared Tagging operations (observed)

tagTypetagAction
DispatchProtocolReqaddTagIfAbsent
L3AddressIndaddTag, getTag
L3AddressReqaddTag, addTagIfAbsent
PacketProtocolTagaddTag, addTagIfAbsent

Tagging operations (observed)

tagTypetagAction
inet::Ipv4InterfaceDatafindTag

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