XINU
icmp.h
Go to the documentation of this file.
1 /* icmp.h - definintions for the Internet Control Message Protocol */
2 
3 #define ICMP_SLOTS 10 /* num. of open ICMP endpoints */
4 #define ICMP_QSIZ 8 /* incoming packets per slot */
5 
6 /* Constants for the state of an entry */
7 
8 #define ICMP_FREE 0 /* entry is unused */
9 #define ICMP_USED 1 /* entry is being used */
10 #define ICMP_RECV 2 /* entry has a process waiting */
11 
12 #define ICMP_HDR_LEN 8 /* bytes in an ICMP header */
13 
14 /* ICMP message types for ping */
15 
16 #define ICMP_ECHOREPLY 0 /* ICMP Echo Reply message */
17 #define ICMP_ECHOREQST 8 /* ICMP Echo Request message */
18 
19 /* table of processes that are waiting for ping replies */
20 
21 struct icmpentry { /* entry in the ICMP table */
22  int32 icstate; /* state of entry: free/used */
23  uint32 icremip; /* remote IP address */
24  int32 ichead; /* index of next packet to read */
25  int32 ictail; /* index of next slot to insert */
26  int32 iccount; /* count of packets enqueued */
27  pid32 icpid; /* ID of waiting process */
28  struct netpacket *icqueue[ICMP_QSIZ];/* circular packet queue */
29 };
30 
31 extern struct icmpentry icmptab[]; /* table of UDP endpoints */
struct netpacket * icqueue[ICMP_QSIZ]
Definition: icmp.h:28
uint32 icremip
Definition: icmp.h:23
#define ICMP_QSIZ
Definition: icmp.h:4
Definition: icmp.h:21
int32 ictail
Definition: icmp.h:25
int32 icstate
Definition: icmp.h:22
int32 ichead
Definition: icmp.h:24
struct icmpentry icmptab[]
Definition: icmp.c:6
int int32
符号あり32ビット整数(int)
Definition: kernel.h:11
int32 iccount
Definition: icmp.h:26
Definition: net.h:16
pid32 icpid
Definition: icmp.h:27
int32 pid32
プロセスID
Definition: kernel.h:26
unsigned int uint32
符号なし32ビット整数(unsigned int)
Definition: kernel.h:15