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

icmp.h File Reference

ICMP (Internet Control Message Protocol) layer header. More...

#include <net/ip.h>

Go to the source code of this file.

Data Structures

struct  icmp
 ICMP packet structure. More...

struct  icmp_ping
 ICMP::PING packet structure. More...


Defines

#define ICMP_ECHOREPLY   0
 Echo Reply.

#define ICMP_DEST_UNREACH   3
 Destination Unreachable.

#define ICMP_SOURCE_QUENCH   4
 Source Quench.

#define ICMP_REDIRECT   5
 Redirect (change route).

#define ICMP_ECHO   8
 Echo Request.

#define ICMP_TIME_EXCEEDED   11
 Time Exceeded.

#define ICMP_PARAMETERPROB   12
 Parameter Problem.

#define ICMP_TIMESTAMP   13
 Timestamp Request.

#define ICMP_TIMESTAMPREPLY   14
 Timestamp Reply.

#define ICMP_INFO_REQUEST   15
 Information Request.

#define ICMP_INFO_REPLY   16
 Information Reply.

#define ICMP_ADDRESS   17
 Address Mask Request.

#define ICMP_ADDRESSREPLY   18
 Address Mask Reply.

#define ICMP_NET_UNREACH   0
 Network Unreachable.

#define ICMP_HOST_UNREACH   1
 Host Unreachable.

#define ICMP_PROT_UNREACH   2
 Protocol Unreachable.

#define ICMP_PORT_UNREACH   3
 Port Unreachable.

#define ICMP_FRAG_NEEDED   4
 Fragmentation Needed/DF set.

#define ICMP_SR_FAILED   5
 Source Route failed.

#define ICMP_NET_UNKNOWN   6
 Network Unknown.

#define ICMP_HOST_UNKNOWN   7
 Host Unknown.

#define ICMP_HOST_ISOLATED   8
 Host isolated.

#define ICMP_NET_ANO   9
#define ICMP_HOST_ANO   10
#define ICMP_NET_UNR_TOS   11
#define ICMP_HOST_UNR_TOS   12
#define ICMP_PKT_FILTERED   13
 Packet Filtered.

#define ICMP_PREC_VIOLATION   14
 Precedence Violation.

#define ICMP_PREC_CUTOFF   15
 Precedence Cut Off.

#define ICMP_REDIR_NET   0
 Redirect Net.

#define ICMP_REDIR_HOST   1
 Redirect Host.

#define ICMP_REDIR_NETTOS   2
 Redirect Net for TOS.

#define ICMP_REDIR_HOSTTOS   3
 Redirect Host for TOS.

#define ICMP_EXC_TTL   0
 TTL cound exceeded.

#define ICMP_EXC_FRAGTIME   1
 Fragment Reass Time exceeeded.


Typedefs

typedef icmp icmp_t
 ICMP packet structure.

typedef icmp_ping icmp_ping_t
 ICMP::PING packet structure.


Functions

void to_icmp_layer (ip_t *packet)
 Process an ICMP packet received from the IP layer.
Parameters:
packet  The ICMP packet received.


int send_icmp_packet (in_addr_t ip_to, uint8_t message, uint8_t *data, size_t len)
 Send an ICMP packet.
Parameters:
ip_to  The IP destination address (in network format).
message  The ICMP message to send.
data  The data buffer to send into the ICMP packet.
len  The size of the data buffer.
Returns:
  • The number of bytes sent in case of success;
  • a negative value if an error occurs.


void ping (char *ip_dot)
 Send a ping to a destination host
Parameters:
ip_dot  The host IP destination expressed in numbers-and-dot notation.



Detailed Description

ICMP (Internet Control Message Protocol) layer header.

Author:
Andrea Righi <drizzt@inwind.it>
Date:
Last update: 2003-11-09
Note:
Copyright (©) 2003 Andrea Righi

Definition in file icmp.h.


Generated on Fri Feb 20 15:32:18 2004 for Minirighi by doxygen1.2.18