File: Applications/PingApp/PingApp.ned
C++ definition: click here
Generates ping requests and calculates the packet loss and round trip parameters of the replies.
Start/stop time, interval etc can be specified via parameters. To disable, specify empty destAddr or stopTime<=startTime.
Every ping request is sent out with a sequence number, and replies are expected to arrive in the same order. Whenever there's a jump in the in the received ping responses' sequence number (e.g. 1, 2, 3, 5), then the missing pings (number 4 in this example) is counted as lost. Then if it still arrives later (that is, a reply with a sequence number smaller than the largers one received so far) it will be counted as out-of-sequence arrival. So the number of really lost pings will be "lost" minus "out-of-order" (assuming there's no duplicate or bogus reply).
Uses PingPayload as payload for the ICMP(v6) Echo Request/Reply packets.
See also: PingPayload, ICMP, ICMPv6Core
The following diagram shows usage relationships between modules, networks and channels. Unresolved module (and channel) types are missing from the diagram. Click here to see the full picture.

If a module type shows up more than once, that means it has been defined in more than one NED file.
| StandardHost | |
| MobileHost | Models a mobile host with a wireless (802.11b) card. This module is a WirelessHost less the PPP and Ethernet interfaces, plus mobility support (BasicMobility). It is intended mainly for mobile ad-hoc networks. |
| WirelessHost2 | Models a host with zero, one or more wireless (802.11b) cards. This module is a variation of WirelessHost. |
| WirelessHost | Models a host with one wireless (802.11b) card. This module is basically a StandardHost with a Nic80211 added. |
| StandardHost6 |
| Name | Type | Description |
|---|---|---|
| destAddr | string | |
| srcAddr | string | |
| packetSize | numeric const | of ping payload, in bytes |
| interval | numeric | time to wait between pings (can be random) |
| hopLimit | numeric const | TTL or hopLimit for IP packets |
| count | numeric const | stop after count ping requests, 0 means continuously |
| startTime | numeric const | send first ping at startTime |
| stopTime | numeric const | send no pings after stopTime, 0 means forever |
| printPing | bool | dump on stdout |
| Name | Direction | Description |
|---|---|---|
| pingIn | input | |
| pingOut | output | |
| pingv6In | input | |
| pingv6Out | output |
simple PingApp parameters: destAddr: string, // destination IP or IPv6 address srcAddr: string, // source IP or IPv6 address (useful with multi-homing) packetSize: numeric const, // of ping payload, in bytes interval: numeric, // time to wait between pings (can be random) hopLimit: numeric const, // TTL or hopLimit for IP packets count: numeric const, // stop after count ping requests, 0 means continuously startTime: numeric const, // send first ping at startTime stopTime: numeric const, // send no pings after stopTime, 0 means forever printPing: bool; // dump on stdout gates: in: pingIn; out: pingOut; in: pingv6In; out: pingv6Out; endsimple