192 |
/* remember offered address */ |
/* remember offered address */ |
193 |
ip_addr_set(&dhcp->offered_ip_addr, (struct ip_addr *)&dhcp->msg_in->yiaddr); |
ip_addr_set(&dhcp->offered_ip_addr, (struct ip_addr *)&dhcp->msg_in->yiaddr); |
194 |
LWIP_DEBUGF(DHCP_DEBUG | DBG_STATE, ("dhcp_handle_offer(): offer for 0x%08lx\n", dhcp->offered_ip_addr.addr)); |
LWIP_DEBUGF(DHCP_DEBUG | DBG_STATE, ("dhcp_handle_offer(): offer for 0x%08lx\n", dhcp->offered_ip_addr.addr)); |
195 |
|
|
196 |
dhcp_select(netif); |
dhcp_select(netif); |
197 |
} |
} |
198 |
} |
} |
647 |
dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); |
dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); |
648 |
dhcp_option_short(dhcp, 576); |
dhcp_option_short(dhcp, 576); |
649 |
|
|
650 |
|
dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); |
651 |
|
dhcp_option_long(dhcp, ntohl(dhcp->offered_ip_addr.addr)); |
652 |
|
|
653 |
dhcp_option_trailer(dhcp); |
dhcp_option_trailer(dhcp); |
654 |
/* resize pbuf to reflect true size of options */ |
/* resize pbuf to reflect true size of options */ |
655 |
pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); |
pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); |