Re: [lwip-users] Set IP address as none

2018-03-13 Thread goldsi...@gmx.de

On 13.03.2018 16:21, Giuseppe Modugno wrote:

I have ip4_addr_t and I want to set it to a "null"/invalid value. Is it
better to use IPADDR_NONE or IPADDR_ANY?


ANY! NONE is all ones and is only used in parsing functions returning 
"this is not a valid IP address".


This is derived from INADDR_ANY and INADDR_NONE, so it's not really 
lwIP-specific, just slightly changed names.


Simon

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users


[lwip-users] Set IP address as none

2018-03-13 Thread Giuseppe Modugno
I have ip4_addr_t and I want to set it to a "null"/invalid value. Is it 
better to use IPADDR_NONE or IPADDR_ANY?


At first, I thought IPADDR_NONE was the best choice, but I found that 
dns.c uses IPADDR_ANY to flag a DNS server as invalid.


Moreover, there are ip4_addr_isany() and ip4_addr_set_any() macros, 
while there aren't ip4_addr_isnone() and ip4_addr_set_none().






___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users