Icmp
Package: inet.networklayer.ipv4

Icmp

simple module

ICMP implementation

Receive ICMP message from localDeliver and process it:

  • echo/timestamp reply: strip ICMP header and send to pingOut
  • echo/timestamp request: create reply and send to IPSend
  • destination unreachable: ignore/send to IPRouting (static)?
  • time exceeded: ignore ?
  • parameter problem: ignore ?
  • redirect ?

Receive echo/timestamp message from pingIn: encapsulate in ICMP header and send to IPSend

author: Jochen Reber date: 2.5.00, 9.5.00, 20.5.00, 9.6.00 redesign: Andras Varga 1.3.2004

Icmp

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"

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

Source code

//
// ICMP implementation
//
// Receive ICMP message from localDeliver and process it:
//   - echo/timestamp reply: strip ICMP header and send to pingOut
//   - echo/timestamp request: create reply and send to IPSend
//   - destination unreachable: ignore/send to IPRouting (static)?
//   - time exceeded: ignore ?
//   - parameter problem: ignore ?
//   - redirect ?
//#FIXME question marks above...
//
// Receive echo/timestamp message from pingIn: encapsulate in ICMP header
// and send to IPSend
//
// author: Jochen Reber
// date: 2.5.00, 9.5.00, 20.5.00, 9.6.00
// redesign: Andras Varga 1.3.2004
//
simple Icmp
{
    parameters:
        string interfaceTableModule;   // The path to the InterfaceTable module
        string routingTableModule;
        string crcMode @enum("declared","computed") = default("declared");
        @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