XINU
dhcp.h
Go to the documentation of this file.
1 /* dhcp.h - Definitions related to DHCP */
2 
3 #define DHCP
4 
5 #define DHCP_RETRY 5
6 
7 #define DHCP_PADDING 0
8 #define DHCP_SUBNET_MASK 1
9 #define DHCP_ROUTER 3
10 #define DHCP_DNS_SERVER 6
11 #define DHCP_DOMAIN_NAME 15
12 #define DHCP_VENDER_OPTIONS 43
13 #define DHCP_REQUESTED_IP 50
14 #define DHCP_IP_ADDR_LEASE_TIME 51
15 #define DHCP_OPTION_OVERLOAD 52
16 #define DHCP_MESSAGE_TYPE 53
17 #define DHCP_SERVER_ID 54
18 #define DHCP_PARAMETER_REQUEST_LIST 55
19 #define DHCP_MESSAGE 56
20 #define DHCP_MAXIMUM_DHCP_MESSAGE_SIZE 57
21 #define DHCP_RENEWAL_TIME_VALUE 58
22 #define DHCP_REBINDING_TIME_VALUE 59
23 #define DHCP_VENDOR_CLASS_ID 60
24 #define DHCP_CLIENT_ID 61
25 #define DHCP_TFTP_SERVER_NAME 66
26 #define DHCP_BOOTFILE_NAME 67
27 #define DHCP_CLIENT_SYS_ARCH 93
28 #define DHCP_CLIENT_NET_ID 94
29 #define DHCP_CLIENT_MACHINE_ID 97
30 #define DHCP_MESSAGE_END 255
31 
32 #pragma pack(2)
33 struct dhcpmsg {
34  byte dc_bop; /* DHCP bootp op 1=req 2=reply */
35  byte dc_htype; /* DHCP hardware type */
36  byte dc_hlen; /* DHCP hardware address length */
37  byte dc_hops; /* DHCP hop count */
38  uint32 dc_xid; /* DHCP xid */
39  uint16 dc_secs; /* DHCP seconds */
40  uint16 dc_flags; /* DHCP flags */
41  uint32 dc_cip; /* DHCP client IP address */
42  uint32 dc_yip; /* DHCP your IP address */
43  uint32 dc_sip; /* DHCP server IP address */
44  uint32 dc_gip; /* DHCP gateway IP address */
45  byte dc_chaddr[16]; /* DHCP client hardware address */
46  union {
47  byte dc_bootp[192]; /* DHCP bootp area (zero) */
48  struct {
49  byte sname[64]; /* TFTP Server Name */
50  byte bootfile[128]; /* TFTP File name */
51  };
52  };
53  uint32 dc_cookie; /* DHCP cookie */
54  byte dc_opt[1024]; /* DHCP options area (large */
55  /* enough to hold more than */
56  /* reasonable options */
57 };
58 #pragma pack()
byte sname[64]
Definition: dhcp.h:49
uint32 dc_gip
Definition: dhcp.h:44
unsigned char byte
符号なし8ビット値(unsigned char)
Definition: kernel.h:7
uint32 dc_yip
Definition: dhcp.h:42
byte dc_hops
Definition: dhcp.h:37
uint32 dc_xid
Definition: dhcp.h:38
byte bootfile[128]
Definition: dhcp.h:50
Definition: dhcp.h:33
uint16 dc_secs
Definition: dhcp.h:39
uint32 dc_cookie
Definition: dhcp.h:53
byte dc_bootp[192]
Definition: dhcp.h:47
byte dc_chaddr[16]
Definition: dhcp.h:45
uint32 dc_cip
Definition: dhcp.h:41
byte dc_opt[1024]
Definition: dhcp.h:54
uint16 dc_flags
Definition: dhcp.h:40
unsigned short uint16
符号なし16ビット整数(unsigned short)
Definition: kernel.h:17
byte dc_htype
Definition: dhcp.h:35
byte dc_bop
Definition: dhcp.h:34
byte dc_hlen
Definition: dhcp.h:36
unsigned int uint32
符号なし32ビット整数(unsigned int)
Definition: kernel.h:15
uint32 dc_sip
Definition: dhcp.h:43