1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-13 13:01:55 +03:00
This commit is contained in:
Ivan Grokhotkov
2015-07-06 12:22:30 +03:00
parent 93f954d363
commit a82796f83f
3 changed files with 11 additions and 21 deletions

View File

@ -10,11 +10,17 @@ struct ip_addr {
typedef struct ip_addr ip_addr_t;
struct ip_info {
ip_addr_t ip;
ip_addr_t netmask;
ip_addr_t gw;
struct ip_addr ip;
struct ip_addr netmask;
struct ip_addr gw;
};
#define IP4_ADDR(ipaddr, a,b,c,d) \
(ipaddr)->addr = ((uint32)((d) & 0xff) << 24) | \
((uint32)((c) & 0xff) << 16) | \
((uint32)((b) & 0xff) << 8) | \
(uint32)((a) & 0xff)
/**
* Determine if two address are on the same network.
*