15 #define DHCP_OP_REQUEST 1
16 #define DHCP_OP_REPLY 2
20 #define DHCP_RETRANSMIT_COUNT 4
21 #define DHCP_RETRANSMIT_TIME 5000
24 #define DHCPC_STATE_INIT 0
25 #define DHCPC_STATE_SELECTING 1
26 #define DHCPC_STATE_REQUESTING 2
27 #define DHCPC_STATE_BOUND 3
28 #define DHCPC_STATE_RENEW 4
29 #define DHCPC_STATE_REBIND 5
32 #define DHCPDISCOVER 1
39 #define DHCP_TIMEOUT 0
42 #define DHCP_HDR_LEN 240
43 #define DHCP_OMSGTYPE_LEN 3
44 #define DHCP_MAGICCOOKIE 0x63825363
45 #define DHCP_HTYPE_ETHER 1
46 #define DHCP_BROADCAST 0x8000
49 #define DHCP_OPT_END 255
50 #define DHCP_OPT_PAD 0
51 #define DHCP_OPT_SUBNET 1
52 #define DHCP_OPT_GATEWAY 3
53 #define DHCP_OPT_DNS 6
54 #define DHCP_OPT_HNAME 12
55 #define DHCP_OPT_DOMAIN 15
56 #define DHCP_OPT_REQUEST 50
57 #define DHCP_OPT_LEASE 51
58 #define DHCP_OPT_MSGTYPE 53
59 #define DHCP_OPT_SERVER 54
60 #define DHCP_OPT_PARAMREQ 55
130 #ifdef ENABLE_DHCP_TRACE
133 # define DHCP_TRACE(format, ...) \
136 fprintf(stderr, "%s:%d (%d) ", __FILE__, __LINE__, gettid()); \
137 fprintf(stderr, format, ## __VA_ARGS__); \
138 fprintf(stderr, "\n"); \
141 # define DHCP_TRACE(format, ...)
147 syscall
dhcpRecvReply(
int descrp,
struct dhcpData *data, uint timeout);
syscall dhcpSendRequest(int descrp, struct dhcpData *data)
Definition: dhcpSendRequest.c:29
uint cookie
Definition: dhcp.h:123
uchar chaddr[16]
Definition: dhcp.h:119
uchar hops
Definition: dhcp.h:109
uchar op
Definition: dhcp.h:106
uint ciaddr
Definition: dhcp.h:115
uint siaddr
Definition: dhcp.h:117
uint xid
Definition: dhcp.h:111
ushort flags
Definition: dhcp.h:113
uint yiaddr
Definition: dhcp.h:116
uint giaddr
Definition: dhcp.h:118
syscall dhcpRecvReply(int descrp, struct dhcpData *data, uint timeout)
Definition: dhcpRecvReply.c:48
uchar hlen
Definition: dhcp.h:108
uchar htype
Definition: dhcp.h:107
char file[128]
Definition: dhcp.h:122
char sname[64]
Definition: dhcp.h:121
uchar opts[1]
Definition: dhcp.h:124
ushort secs
Definition: dhcp.h:112