Commit 8f05556a authored by Robert Foss's avatar Robert Foss
Browse files

Use #if instead of #ifdef.

parent 9e6c62aa
...@@ -108,7 +108,7 @@ static uint8_t* ICACHE_FLASH_ATTR add_offer_options(uint8_t *optptr) ...@@ -108,7 +108,7 @@ static uint8_t* ICACHE_FLASH_ATTR add_offer_options(uint8_t *optptr)
ipadd.addr = *( (uint32_t *) &server_address); ipadd.addr = *( (uint32_t *) &server_address);
#ifdef USE_CLASS_B_NET #if USE_CLASS_B_NET
*optptr++ = DHCP_OPTION_SUBNET_MASK; *optptr++ = DHCP_OPTION_SUBNET_MASK;
*optptr++ = 4; //length *optptr++ = 4; //length
*optptr++ = 255; *optptr++ = 255;
...@@ -145,7 +145,7 @@ static uint8_t* ICACHE_FLASH_ATTR add_offer_options(uint8_t *optptr) ...@@ -145,7 +145,7 @@ static uint8_t* ICACHE_FLASH_ATTR add_offer_options(uint8_t *optptr)
*optptr++ = ip4_addr3( &ipadd); *optptr++ = ip4_addr3( &ipadd);
*optptr++ = ip4_addr4( &ipadd); *optptr++ = ip4_addr4( &ipadd);
#ifdef USE_DNS #if USE_DNS
*optptr++ = DHCP_OPTION_DNS_SERVER; *optptr++ = DHCP_OPTION_DNS_SERVER;
*optptr++ = 4; *optptr++ = 4;
*optptr++ = ip4_addr1( &ipadd); *optptr++ = ip4_addr1( &ipadd);
...@@ -154,7 +154,7 @@ static uint8_t* ICACHE_FLASH_ATTR add_offer_options(uint8_t *optptr) ...@@ -154,7 +154,7 @@ static uint8_t* ICACHE_FLASH_ATTR add_offer_options(uint8_t *optptr)
*optptr++ = ip4_addr4( &ipadd); *optptr++ = ip4_addr4( &ipadd);
#endif #endif
#ifdef CLASS_B_NET #if USE_CLASS_B_NET
*optptr++ = DHCP_OPTION_BROADCAST_ADDRESS; *optptr++ = DHCP_OPTION_BROADCAST_ADDRESS;
*optptr++ = 4; *optptr++ = 4;
*optptr++ = ip4_addr1( &ipadd); *optptr++ = ip4_addr1( &ipadd);
...@@ -172,7 +172,7 @@ static uint8_t* ICACHE_FLASH_ATTR add_offer_options(uint8_t *optptr) ...@@ -172,7 +172,7 @@ static uint8_t* ICACHE_FLASH_ATTR add_offer_options(uint8_t *optptr)
*optptr++ = DHCP_OPTION_INTERFACE_MTU; *optptr++ = DHCP_OPTION_INTERFACE_MTU;
*optptr++ = 2; *optptr++ = 2;
#ifdef CLASS_B_NET #if USE_CLASS_B_NET
*optptr++ = 0x05; *optptr++ = 0x05;
*optptr++ = 0xdc; *optptr++ = 0xdc;
#else #else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment