Icmp¶
Package: inet.networklayer.ipv4
simple module Icmp
ICMP implementation.
Author: Jochen Reber
Usage diagram¶
Inheritance diagram¶
Used in compound modules¶
Name |
Type |
Description |
|---|---|---|
compound module |
Network layer of an IPv4 node. |
Extends¶
Name |
Type |
Description |
|---|---|---|
simple module |
Base module for all INET simple modules. |
Parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
displayStringTextFormat |
string |
“” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
interfaceTableModule |
string |
The path to the InterfaceTable module |
|
routingTableModule |
string |
||
checksumMode |
string |
“declared” |
|
quoteLength |
int |
8B |
Number of bytes from original packet to quote in ICMP reply |
Properties¶
Name |
Value |
Description |
|---|---|---|
class |
Icmp |
|
display |
i=block/control |
Gates¶
Name |
Direction |
Size |
Description |
|---|---|---|---|
transportIn |
input |
||
transportOut |
output |
||
ipIn |
input |
Deliver ICMP packets |
|
ipOut |
output |
Towards the network |
Source code¶
//
// ICMP implementation.
//
// @author Jochen Reber
//
simple Icmp extends SimpleModule
{
parameters:
@class(Icmp);
string interfaceTableModule; // The path to the InterfaceTable module
string routingTableModule;
string checksumMode @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); // Deliver ICMP packets
output ipOut @labels(Ipv4ControlInfo/down); // Towards the network
}