Embedded Xinu Operating System
An ongoing research project and educational operating system.
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Groups Pages
Functions
icmpEchoReply.c File Reference
#include <icmp.h>
#include <network.h>
#include <ipv4.h>
#include <string.h>

Functions

syscall icmpEchoReply (struct packet *pkt)
 

Function Documentation

syscall icmpEchoReply ( struct packet *  pkt)

Send an ICMP Echo Reply in response to the specified ICMP Echo Request.

Parameters
pktPointer to the packet for an ICMP echo request. This packet buffer is re-used for sending the reply. pkt->curr must point to the beginning of the the ICMP header, whereas pkt->len must be the length of the entire packet including link-level header. These members will be updated by this function, and the ICMP type field and checksum will be modified; however, ownership of the packet is not taken and it still must be freed by the caller.
Returns
::OK if packet was successfully sent; otherwise ::SYSERR or another error code returned by icmpSend().