Watt-32 tcp/ip  2.2 dev-rel.10
Data Structures | Typedefs | Functions | Variables
pcicmp.h File Reference

Go to the source code of this file.

Data Structures

struct  ICMP_unused
 
struct  ICMP_pointer
 
struct  ICMP_ip
 
struct  ICMP_echo
 
struct  ICMP_timestamp
 
struct  ICMP_info
 
struct  ICMP_addr_mask
 
struct  ICMP_traceroute
 
struct  ICMP_needfrag
 
union  ICMP_PKT
 
struct  ping_pkt
 

Typedefs

typedef union ICMP_PKT ICMP_PKT
 

Functions

void icmp_handler (const in_Header *ip, BOOL broadcast)
 Handler for incoming ICMP packets. More...
 
void icmp_doredirect (const char *value)
 Determine which protocols we shall act upon when ICMP redirect is received.
 
int icmp_send_timexceed (const in_Header *ip, const void *mac_dest)
 Send an "ICMP Time Exceeded" (reassebly timeout) back to 'ip->source'.
 
int icmp_send_unreach (const in_Header *ip, int code)
 Send an ICMP destination/protocol unreachable back to 'ip->source'. More...
 
int icmp_send_mask_req (void)
 

Variables

const char * icmp_type_str [ICMP_MAXTYPE+1]
 
const char * icmp_unreach_str [16]
 
const char * icmp_redirect_str [4]
 
const char * icmp_exceed_str [2]
 

Function Documentation

void icmp_handler ( const in_Header ip,
BOOL  broadcast 
)

Handler for incoming ICMP packets.

Todo:
Handle cancelling raw sockets
Todo:
!!
Todo:
!!

<

Todo:
send reply?

<

Todo:
should store

<

Todo:
send reply

<

Todo:
send reply upwards

Definition at line 376 of file pcicmp.c.

References _do_mask_req, _tcp_cancel(), _udp_cancel(), add_ping(), block_icmp, icmp_bogus(), icmp_redirect(), set_timeout(), and sin_mask.

int icmp_send_unreach ( const in_Header ip,
int  code 
)

Send an ICMP destination/protocol unreachable back to 'ip->source'.

Limit the rate of these to 20 per second. Ref. RFC-1812.

Definition at line 194 of file pcicmp.c.

References _eth_formatpacket(), chk_timeout(), icmp_check(), icmp_send(), and set_timeout().