Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

ICMP
[Protocols]

RFC 792 Internet Control Message Protocol. More...

Functions

void NutIcmpInput (NUTDEVICE *dev, NETBUF *nb)
 Handle incoming ICMP packets.

int NutIcmpOutput (u_char type, u_long dest, NETBUF *nb)
 Send an ICMP datagram.

int NutIcmpReply (u_char type, u_char code, u_long spec, u_long dest, NETBUF *nb)
 Send an ICMP message to a given destination.


Detailed Description

RFC 792 Internet Control Message Protocol.

Provides routing, diagnostic and error functionality for IP. Although ICMP messages are encapsulated within IP datagrams, ICMP processing is considered to be part of the IP layer.


Function Documentation

void NutIcmpInput NUTDEVICE   dev,
NETBUF   nb
 

Handle incoming ICMP packets.

Note:
This routine is called by the IP layer on incoming ICMP datagrams. Applications typically do not call this function.
Parameters:
dev Identifies the device that received the packet.
nb Pointer to a network buffer structure containing the ICMP datagram.

int NutIcmpOutput u_char    type,
u_long    dest,
NETBUF   nb
 

Send an ICMP datagram.

Known ICMP types are:

Parameters:
type Type of the ICMP message.
dest Destination IP address.
nb Network buffer structure containing the datagram.
Returns:
0 on success, -1 otherwise.

int NutIcmpReply u_char    type,
u_char    code,
u_long    spec,
u_long    dest,
NETBUF   nb
 

Send an ICMP message to a given destination.

Parameters:
type Type of the ICMP message. See NutIcmpOutput() for a list of valid types.
code Type subcode.
spec Type specific data item.
dest IP address of the target.
nb Network buffer structure containing the meesage to be sent. The structure must have been allocated by a previous call NutNetBufAlloc() and will be freed if this function returns with an error.
Returns:
0 on success, -1 otherwise.


© 2000-2003 by egnite Software GmbH - visit http://www.ethernut.de/