3. The Generic Echo Function
The following section describes the echo function in a generic fashion. This memo defines an echo-request entity. The function of the echo-request entity is to accept an incoming echo-request packet, perform some processing, and generate an echo-response packet. The echo implementation may be thought of as an entity that coexists with the network layer. Subsequent sections will detail the implementation mechanism.
For the purposes of this memo, the term "ping" shall be used to mean the act of transmitting an echo-request packet to a remote system (with the expectation that an echo-response packet will be sent back to the transmitter).
3.1 The Echo-Request
When a system decides to ping a remote system, an echo-request is built. All fields of the packet header are assigned normal values (see implementation specific sections for more information). The address of the system to be pinged is inserted as the destination NSAP address. The rules of segmentation defined for a data (DT) packet also apply to the echo-request packet.
The echo-request is switched through the network toward its destination. (An echo packet must follow the same path as CLNP data packet with the same options in the CLNP header.) Upon reaching the destination system, the packet is processed according to normal processing rules. At the end of the input processing, the echo-request packet is delivered to the echo-request entity.
The echo-request entity will build and dispatch the echo-response packet. This is a new packet. Except as noted below, this second packet is built using the normal construction procedures. The destination address of the echo-response packet is taken from the source address of the echo-request packet. Most options present in the echo-request packet are copied into the echo-response packet (see implementation notes for more information).
3.2 The Echo-Response
The entire echo-request packet is included in the data portion of the echo-response packet. This includes the echo-request packet header as well as any data that accompanies the echo-request packet. The entire echo-request packet is included in the echo-response so that fields such as the echo-request lifetime may be examined when the response is received. After the echo-response packet is built, it is transmitted toward the new destination (the original source of the
echo-request). The rules of segmentation defined for a data packet also apply to the echo-response packet.
The echo-response packet is relayed through the network toward its destination. (A echo response packet must follow the same path as a CLNP data packet with the same options in the CLNP header.) Upon reaching its destination, it is processed by the packet input function and delivered to the entity that created the echo-request.