38#ifndef LWIP_HDR_PROT_DHCP_H
39#define LWIP_HDR_PROT_DHCP_H
50#define DHCP_CHADDR_LEN 16U
51#define DHCP_SNAME_OFS 44U
52#define DHCP_SNAME_LEN 64U
53#define DHCP_FILE_OFS 108U
54#define DHCP_FILE_LEN 128U
55#define DHCP_MSG_LEN 236U
56#define DHCP_OPTIONS_OFS (DHCP_MSG_LEN + 4U)
58#ifdef PACK_STRUCT_USE_INCLUDES
80#define DHCP_MIN_OPTIONS_LEN 68U
82#if ((defined(DHCP_OPTIONS_LEN)) && (DHCP_OPTIONS_LEN < DHCP_MIN_OPTIONS_LEN))
83# undef DHCP_OPTIONS_LEN
86#if (!defined(DHCP_OPTIONS_LEN))
88# define DHCP_OPTIONS_LEN DHCP_MIN_OPTIONS_LEN
93#ifdef PACK_STRUCT_USE_INCLUDES
116#define DHCP_BOOTREQUEST 1
117#define DHCP_BOOTREPLY 2
120#define DHCP_DISCOVER 1
122#define DHCP_REQUEST 3
123#define DHCP_DECLINE 4
126#define DHCP_RELEASE 7
129#define DHCP_MAGIC_COOKIE 0x63825363UL
134#define DHCP_OPTION_PAD 0
135#define DHCP_OPTION_SUBNET_MASK 1
136#define DHCP_OPTION_ROUTER 3
137#define DHCP_OPTION_DNS_SERVER 6
138#define DHCP_OPTION_HOSTNAME 12
139#define DHCP_OPTION_IP_TTL 23
140#define DHCP_OPTION_MTU 26
141#define DHCP_OPTION_BROADCAST 28
142#define DHCP_OPTION_TCP_TTL 37
143#define DHCP_OPTION_NTP 42
144#define DHCP_OPTION_END 255
147#define DHCP_OPTION_REQUESTED_IP 50
148#define DHCP_OPTION_LEASE_TIME 51
149#define DHCP_OPTION_OVERLOAD 52
151#define DHCP_OPTION_MESSAGE_TYPE 53
152#define DHCP_OPTION_MESSAGE_TYPE_LEN 1
154#define DHCP_OPTION_SERVER_ID 54
155#define DHCP_OPTION_PARAMETER_REQUEST_LIST 55
157#define DHCP_OPTION_MAX_MSG_SIZE 57
158#define DHCP_OPTION_MAX_MSG_SIZE_LEN 2
160#define DHCP_OPTION_T1 58
161#define DHCP_OPTION_T2 59
162#define DHCP_OPTION_US 60
163#define DHCP_OPTION_CLIENT_ID 61
164#define DHCP_OPTION_TFTP_SERVERNAME 66
165#define DHCP_OPTION_BOOTFILE 67
168#define DHCP_OVERLOAD_NONE 0
169#define DHCP_OVERLOAD_FILE 1
170#define DHCP_OVERLOAD_SNAME 2
171#define DHCP_OVERLOAD_SNAME_FILE 3
PACK_STRUCT_BEGIN struct dhcp_msg PACK_STRUCT_STRUCT
#define PACK_STRUCT_BEGIN
typedefPACK_STRUCT_END struct ip4_addr_packed ip4_addr_p_t
PACK_STRUCT_FLD_8(u8_t file[DHCP_FILE_LEN])
PACK_STRUCT_FIELD(u16_t secs)
PACK_STRUCT_FLD_S(ip4_addr_p_t ciaddr)
PACK_STRUCT_FLD_8(u8_t hlen)
PACK_STRUCT_FLD_S(ip4_addr_p_t giaddr)
PACK_STRUCT_FLD_8(u8_t op)
PACK_STRUCT_FIELD(u32_t cookie)
PACK_STRUCT_FLD_8(u8_t options[DHCP_OPTIONS_LEN])
PACK_STRUCT_FLD_8(u8_t htype)
PACK_STRUCT_FLD_8(u8_t chaddr[DHCP_CHADDR_LEN])
PACK_STRUCT_FIELD(u16_t flags)
PACK_STRUCT_FLD_8(u8_t sname[DHCP_SNAME_LEN])
PACK_STRUCT_FIELD(u32_t xid)
PACK_STRUCT_FLD_S(ip4_addr_p_t siaddr)
PACK_STRUCT_FLD_S(ip4_addr_p_t yiaddr)
PACK_STRUCT_FLD_8(u8_t hops)