mirror of
https://github.com/nodemcu/nodemcu-firmware.git
synced 2025-01-16 20:52:57 +08:00
commit
c19596cae8
@ -51,6 +51,11 @@ typedef struct _list_node{
|
||||
#define DHCPS_SERVER_PORT 67
|
||||
#define DHCPS_CLIENT_PORT 68
|
||||
|
||||
/*
|
||||
* Advertise DNS capability in DHCP OFFER
|
||||
*/
|
||||
#define USE_DNS 0
|
||||
|
||||
#define DHCPDISCOVER 1
|
||||
#define DHCPOFFER 2
|
||||
#define DHCPREQUEST 3
|
||||
|
@ -138,20 +138,20 @@ static uint8_t* ICACHE_FLASH_ATTR add_offer_options(uint8_t *optptr)
|
||||
*optptr++ = ip4_addr3( &ipadd);
|
||||
*optptr++ = ip4_addr4( &ipadd);
|
||||
|
||||
*optptr++ = DHCP_OPTION_ROUTER;
|
||||
*optptr++ = 4;
|
||||
*optptr++ = ip4_addr1( &ipadd);
|
||||
*optptr++ = ip4_addr2( &ipadd);
|
||||
*optptr++ = ip4_addr3( &ipadd);
|
||||
*optptr++ = ip4_addr4( &ipadd);
|
||||
*optptr++ = DHCP_OPTION_ROUTER;
|
||||
*optptr++ = 4;
|
||||
*optptr++ = ip4_addr1( &ipadd);
|
||||
*optptr++ = ip4_addr2( &ipadd);
|
||||
*optptr++ = ip4_addr3( &ipadd);
|
||||
*optptr++ = ip4_addr4( &ipadd);
|
||||
|
||||
#ifdef USE_DNS
|
||||
*optptr++ = DHCP_OPTION_DNS_SERVER;
|
||||
*optptr++ = 4;
|
||||
*optptr++ = ip4_addr1( &ipadd);
|
||||
*optptr++ = ip4_addr2( &ipadd);
|
||||
*optptr++ = ip4_addr3( &ipadd);
|
||||
*optptr++ = ip4_addr4( &ipadd);
|
||||
*optptr++ = DHCP_OPTION_DNS_SERVER;
|
||||
*optptr++ = 4;
|
||||
*optptr++ = ip4_addr1( &ipadd);
|
||||
*optptr++ = ip4_addr2( &ipadd);
|
||||
*optptr++ = ip4_addr3( &ipadd);
|
||||
*optptr++ = ip4_addr4( &ipadd);
|
||||
#endif
|
||||
|
||||
#ifdef CLASS_B_NET
|
||||
|
Loading…
x
Reference in New Issue
Block a user