XINU
udp.h
Go to the documentation of this file.
1 /* udp.h - Declarations pertaining to User Datagram Protocol (UDP) */
2 
3 #define UDP_SLOTS 6 /* Number of open UDP endpoints */
4 #define UDP_QSIZ 8 /* Packets enqueued per endpoint*/
5 
6 #define UDP_DHCP_CPORT 68 /* Port number for DHCP client */
7 #define UDP_DHCP_SPORT 67 /* Port number for DHCP server */
8 
9 /* Constants for the state of an entry */
10 
11 #define UDP_FREE 0 /* Entry is unused */
12 #define UDP_USED 1 /* Entry is being used */
13 #define UDP_RECV 2 /* Entry has a process waiting */
14 
15 #define UDP_ANYIF -2 /* Register an endpoint for any */
16  /* interface on the machine */
17 
18 #define UDP_HDR_LEN 8 /* Bytes in a UDP header */
19 
20 struct udpentry { /* Entry in the UDP endpoint tbl*/
21  int32 udstate; /* State of entry: free/used */
22  uint32 udremip; /* Remote IP address (zero */
23  /* means "don't care") */
24  uint16 udremport; /* Remote protocol port number */
25  uint16 udlocport; /* Local protocol port number */
26  int32 udhead; /* Index of next packet to read */
27  int32 udtail; /* Index of next slot to insert */
28  int32 udcount; /* Count of packets enqueued */
29  pid32 udpid; /* ID of waiting process */
30  struct netpacket *udqueue[UDP_QSIZ];/* Circular packet queue */
31 };
32 
33 extern struct udpentry udptab[];
uint16 udremport
Definition: udp.h:24
int32 udhead
Definition: udp.h:26
struct netpacket * udqueue[UDP_QSIZ]
Definition: udp.h:30
uint32 udremip
Definition: udp.h:22
int32 udcount
Definition: udp.h:28
int32 udtail
Definition: udp.h:27
pid32 udpid
Definition: udp.h:29
Definition: udp.h:20
#define UDP_QSIZ
Definition: udp.h:4
int int32
符号あり32ビット整数(int)
Definition: kernel.h:11
uint16 udlocport
Definition: udp.h:25
struct udpentry udptab[]
Definition: udp.c:6
unsigned short uint16
符号なし16ビット整数(unsigned short)
Definition: kernel.h:17
int32 udstate
Definition: udp.h:21
Definition: net.h:16
int32 pid32
プロセスID
Definition: kernel.h:26
unsigned int uint32
符号なし32ビット整数(unsigned int)
Definition: kernel.h:15