4 #ifndef __LWIP_DHCP_H__ 5 #define __LWIP_DHCP_H__ 12 #define DHCP_COARSE_TIMER_SECS 60 14 #define DHCP_FINE_TIMER_MSECS 500 46 #define DHCP_MAX_DNS 2 63 #ifdef PACK_STRUCT_USE_INCLUDES 64 # include "arch/bpstruct.h" 81 #define DHCP_CHADDR_LEN 16U 83 #define DHCP_SNAME_LEN 64U 85 #define DHCP_FILE_LEN 128U 88 #define DHCP_MIN_OPTIONS_LEN 68U 90 #if ((defined(DHCP_OPTIONS_LEN)) && (DHCP_OPTIONS_LEN < DHCP_MIN_OPTIONS_LEN)) 91 # undef DHCP_OPTIONS_LEN 94 #if (!defined(DHCP_OPTIONS_LEN)) 96 # define DHCP_OPTIONS_LEN DHCP_MIN_OPTIONS_LEN 101 #ifdef PACK_STRUCT_USE_INCLUDES 102 # include "arch/epstruct.h" 117 #if DHCP_DOES_ARP_CHECK 127 #define DHCP_MSG_OFS (UDP_DATA_OFS) 128 #define DHCP_OP_OFS (DHCP_MSG_OFS + 0) 129 #define DHCP_HTYPE_OFS (DHCP_MSG_OFS + 1) 130 #define DHCP_HLEN_OFS (DHCP_MSG_OFS + 2) 131 #define DHCP_HOPS_OFS (DHCP_MSG_OFS + 3) 132 #define DHCP_XID_OFS (DHCP_MSG_OFS + 4) 133 #define DHCP_SECS_OFS (DHCP_MSG_OFS + 8) 134 #define DHCP_FLAGS_OFS (DHCP_MSG_OFS + 10) 135 #define DHCP_CIADDR_OFS (DHCP_MSG_OFS + 12) 136 #define DHCP_YIADDR_OFS (DHCP_MSG_OFS + 16) 137 #define DHCP_SIADDR_OFS (DHCP_MSG_OFS + 20) 138 #define DHCP_GIADDR_OFS (DHCP_MSG_OFS + 24) 139 #define DHCP_CHADDR_OFS (DHCP_MSG_OFS + 28) 140 #define DHCP_SNAME_OFS (DHCP_MSG_OFS + 44) 141 #define DHCP_FILE_OFS (DHCP_MSG_OFS + 108) 142 #define DHCP_MSG_LEN 236 144 #define DHCP_COOKIE_OFS (DHCP_MSG_OFS + DHCP_MSG_LEN) 145 #define DHCP_OPTIONS_OFS (DHCP_MSG_OFS + DHCP_MSG_LEN + 4) 147 #define DHCP_CLIENT_PORT 68 148 #define DHCP_SERVER_PORT 67 151 #define DHCP_REQUESTING 1 153 #define DHCP_REBOOTING 3 154 #define DHCP_REBINDING 4 155 #define DHCP_RENEWING 5 156 #define DHCP_SELECTING 6 157 #define DHCP_INFORMING 7 158 #define DHCP_CHECKING 8 159 #define DHCP_PERMANENT 9 160 #define DHCP_BOUND 10 162 #define DHCP_BACKING_OFF 12 165 #define DHCP_BOOTREQUEST 1 166 #define DHCP_BOOTREPLY 2 168 #define DHCP_DISCOVER 1 170 #define DHCP_REQUEST 3 171 #define DHCP_DECLINE 4 174 #define DHCP_RELEASE 7 175 #define DHCP_INFORM 8 177 #define DHCP_HTYPE_ETH 1 179 #define DHCP_HLEN_ETH 6 181 #define DHCP_BROADCAST_FLAG 15 182 #define DHCP_BROADCAST_MASK (1 << DHCP_FLAG_BROADCAST) 185 #define DHCP_OPTION_PAD 0 186 #define DHCP_OPTION_SUBNET_MASK 1 187 #define DHCP_OPTION_ROUTER 3 188 #define DHCP_OPTION_DNS_SERVER 6 189 #define DHCP_OPTION_HOSTNAME 12 190 #define DHCP_OPTION_IP_TTL 23 191 #define DHCP_OPTION_MTU 26 192 #define DHCP_OPTION_BROADCAST 28 193 #define DHCP_OPTION_TCP_TTL 37 194 #define DHCP_OPTION_END 255 197 #define DHCP_OPTION_REQUESTED_IP 50 198 #define DHCP_OPTION_LEASE_TIME 51 199 #define DHCP_OPTION_OVERLOAD 52 201 #define DHCP_OPTION_MESSAGE_TYPE 53 202 #define DHCP_OPTION_MESSAGE_TYPE_LEN 1 205 #define DHCP_OPTION_SERVER_ID 54 206 #define DHCP_OPTION_PARAMETER_REQUEST_LIST 55 208 #define DHCP_OPTION_MAX_MSG_SIZE 57 209 #define DHCP_OPTION_MAX_MSG_SIZE_LEN 2 211 #define DHCP_OPTION_T1 58 212 #define DHCP_OPTION_T2 59 213 #define DHCP_OPTION_CLIENT_ID 61 214 #define DHCP_OPTION_TFTP_SERVERNAME 66 215 #define DHCP_OPTION_BOOTFILE 67 218 #define DHCP_OVERLOAD_NONE 0 219 #define DHCP_OVERLOAD_FILE 1 220 #define DHCP_OVERLOAD_SNAME 2 221 #define DHCP_OVERLOAD_SNAME_FILE 3 s8_t err_t
Definition: err.h:39
set set set set set set set macro pixldst1 op
Definition: pixman-arm-neon-asm.h:54
u8_t tries
Definition: dhcp.h:21
struct pbuf * p
Definition: dhcp.h:27
#define PACK_STRUCT_BEGIN
Definition: arch.h:46
#define DHCP_SNAME_LEN
Definition: dhcp.h:83
u32_t xid
Definition: dhcp.h:23
#define DHCP_CHADDR_LEN
Definition: dhcp.h:81
PACK_STRUCT_BEGIN struct dhcp_msg PACK_STRUCT_STRUCT
u16_t request_timeout
Definition: dhcp.h:38
struct dhcp_msg * msg_in
Definition: dhcp.h:29
struct ip_addr server_ip_addr
Definition: dhcp.h:41
struct ip_addr offered_gw_addr
Definition: dhcp.h:44
struct ip_addr offered_sn_mask
Definition: dhcp.h:43
GLenum const GLvoid * addr
Definition: glext.h:10528
err_t dhcp_renew(struct netif *netif)
struct pbuf * p_out
Definition: dhcp.h:35
err_t dhcp_release(struct netif *netif)
u32_t dns_count
Definition: dhcp.h:47
u32_t offered_t0_lease
Definition: dhcp.h:50
struct ip_addr offered_bc_addr
Definition: dhcp.h:45
void dhcp_coarse_tmr(void)
#define PACK_STRUCT_END
Definition: arch.h:50
u8 u8_t
Definition: cc.h:43
struct ip_addr offered_dns_addr[DHCP_MAX_DNS]
Definition: dhcp.h:48
struct dhcp_msg * options_in
Definition: dhcp.h:31
PACK_STRUCT_FIELD(u8_t op)
u16_t t1_timeout
Definition: dhcp.h:39
void dhcp_inform(struct netif *netif)
#define DHCP_FILE_LEN
Definition: dhcp.h:85
u32_t offered_t2_rebind
Definition: dhcp.h:52
#define DHCP_OPTIONS_LEN
Definition: dhcp.h:96
struct dhcp_msg * msg_out
Definition: dhcp.h:36
u32_t offered_t1_renew
Definition: dhcp.h:51
u32 u32_t
Definition: cc.h:47
u16_t options_out_len
Definition: dhcp.h:37
struct ip_addr offered_ip_addr
Definition: dhcp.h:42
PACK_STRUCT_END err_t dhcp_start(struct netif *netif)
u16_t t2_timeout
Definition: dhcp.h:40
void dhcp_stop(struct netif *netif)
Definition: civetweb.c:1024
GLbitfield flags
Definition: glext.h:7828
struct udp_pcb * pcb
Definition: dhcp.h:25
u8_t state
Definition: dhcp.h:19
bf_uint8_t options
Definition: connect_ps4.c:78
u16_t options_in_len
Definition: dhcp.h:33
u16 u16_t
Definition: cc.h:45
#define DHCP_MAX_DNS
Definition: dhcp.h:46