XINU
|
#include <xinu.h>
Go to the source code of this file.
Functions | |
uint16 | icmp_cksum (char *buf, int32 buflen) |
void | icmp_hton (struct netpacket *pktptr) |
void | icmp_in (struct netpacket *pkt) |
void | icmp_init (void) |
struct netpacket * | icmp_mkpkt (uint32 remip, uint16 type, uint16 ident, uint16 seq, char *buf, int32 len) |
void | icmp_ntoh (struct netpacket *pktptr) |
int32 | icmp_recv (int32 icmpid, char *buff, int32 len, uint32 timeout) |
int32 | icmp_register (uint32 remip) |
status | icmp_release (int32 icmpid) |
status | icmp_send (uint32 remip, uint16 type, uint16 ident, uint16 seq, char *buf, int32 len) |
Variables | |
struct icmpentry | icmptab [ICMP_SLOTS] |
void icmp_hton | ( | struct netpacket * | pktptr | ) |
Definition at line 394 of file icmp.c.
References htons, netpacket::net_iccksum, netpacket::net_icident, and netpacket::net_icseq.
Referenced by ip_out().
void icmp_in | ( | struct netpacket * | pkt | ) |
Definition at line 26 of file icmp.c.
References disable(), freebuf(), icmpentry::iccount, ICMP_ECHOREPLY, ICMP_ECHOREQST, ICMP_FREE, ICMP_HDR_LEN, icmp_mkpkt(), ICMP_QSIZ, ICMP_RECV, ICMP_SLOTS, ICMP_USED, icmptab, icmpentry::icpid, icmpentry::icqueue, icmpentry::icremip, icmpentry::icstate, icmpentry::ictail, ip_enqueue(), IP_HDR_LEN, netpacket::net_icdata, netpacket::net_icident, netpacket::net_icseq, netpacket::net_ictype, netpacket::net_iplen, netpacket::net_ipsrc, OK, restore(), send(), and SYSERR.
Referenced by ip_local().
void icmp_init | ( | void | ) |
Definition at line 12 of file icmp.c.
References ICMP_FREE, ICMP_SLOTS, icmptab, and icmpentry::icstate.
Referenced by net_init().
struct netpacket* icmp_mkpkt | ( | uint32 | remip, |
uint16 | type, | ||
uint16 | ident, | ||
uint16 | seq, | ||
char * | buf, | ||
int32 | len | ||
) |
Definition at line 259 of file icmp.c.
References ETH_ADDR_LEN, network::ethucast, getbuf(), ICMP_HDR_LEN, IP_HDR_LEN, IP_ICMP, network::ipucast, memcpy(), netpacket::net_ethsrc, netpacket::net_ethtype, netpacket::net_iccksum, netpacket::net_iccode, netpacket::net_icdata, netpacket::net_icident, netpacket::net_icseq, netpacket::net_ictype, netpacket::net_ipcksum, netpacket::net_ipdst, netpacket::net_ipfrag, netpacket::net_ipid, netpacket::net_iplen, netpacket::net_ipproto, netpacket::net_ipsrc, netpacket::net_iptos, netpacket::net_ipttl, netpacket::net_ipvh, netbufpool, NetData, panic(), and SYSERR.
Referenced by icmp_in(), and icmp_send().
void icmp_ntoh | ( | struct netpacket * | pktptr | ) |
Definition at line 408 of file icmp.c.
References netpacket::net_iccksum, netpacket::net_icident, netpacket::net_icseq, and ntohs.
Referenced by ip_in().
Definition at line 150 of file icmp.c.
References currpid, disable(), freebuf(), icmpentry::iccount, icmpentry::ichead, ICMP_HDR_LEN, ICMP_RECV, ICMP_SLOTS, ICMP_USED, icmptab, icmpentry::icpid, icmpentry::icqueue, icmpentry::icstate, IP_HDR_LEN, netpacket::net_icdata, netpacket::net_iplen, OK, recvclr(), recvtime(), restore(), SYSERR, and TIMEOUT.
Referenced by xsh_ping().
Definition at line 103 of file icmp.c.
References disable(), icmpentry::iccount, icmpentry::ichead, ICMP_FREE, ICMP_SLOTS, ICMP_USED, icmptab, icmpentry::icpid, icmpentry::icremip, icmpentry::icstate, icmpentry::ictail, restore(), and SYSERR.
Referenced by xsh_ping().
Definition at line 312 of file icmp.c.
References DEFER_START, DEFER_STOP, disable(), freebuf(), icmpentry::iccount, icmpentry::ichead, ICMP_FREE, ICMP_SLOTS, ICMP_USED, icmptab, icmpentry::icqueue, icmpentry::icstate, OK, resched_cntl(), restore(), and SYSERR.
Referenced by xsh_ping().
Definition at line 225 of file icmp.c.
References disable(), icmp_mkpkt(), ip_send(), restore(), and SYSERR.
Referenced by xsh_ping().
struct icmpentry icmptab[ICMP_SLOTS] |
Definition at line 6 of file icmp.c.
Referenced by icmp_in(), icmp_init(), icmp_recv(), icmp_register(), and icmp_release().