XINU
include
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
[];
udpentry::udremport
uint16 udremport
Definition:
udp.h:24
udpentry::udhead
int32 udhead
Definition:
udp.h:26
udpentry::udqueue
struct netpacket * udqueue[UDP_QSIZ]
Definition:
udp.h:30
udpentry::udremip
uint32 udremip
Definition:
udp.h:22
udpentry::udcount
int32 udcount
Definition:
udp.h:28
udpentry::udtail
int32 udtail
Definition:
udp.h:27
udpentry::udpid
pid32 udpid
Definition:
udp.h:29
udpentry
Definition:
udp.h:20
UDP_QSIZ
#define UDP_QSIZ
Definition:
udp.h:4
int32
int int32
符号あり32ビット整数(int)
Definition:
kernel.h:11
udpentry::udlocport
uint16 udlocport
Definition:
udp.h:25
udptab
struct udpentry udptab[]
Definition:
udp.c:6
uint16
unsigned short uint16
符号なし16ビット整数(unsigned short)
Definition:
kernel.h:17
udpentry::udstate
int32 udstate
Definition:
udp.h:21
netpacket
Definition:
net.h:16
pid32
int32 pid32
プロセスID
Definition:
kernel.h:26
uint32
unsigned int uint32
符号なし32ビット整数(unsigned int)
Definition:
kernel.h:15
Generated by
1.8.13