1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-09-06 19:08:12 +03:00

more compatibility fixes to IPAddress, restore INADDR_ANY, INADDR_NONE (#5416)

This commit is contained in:
david gauchard
2018-12-03 02:43:19 +01:00
committed by Develo
parent 324b3f9678
commit 773f306ef9
4 changed files with 13 additions and 8 deletions

View File

@@ -67,11 +67,15 @@ class IPAddress: public Printable {
return reinterpret_cast<const uint8_t*>(&v4());
}
void ctor32 (uint32_t);
public:
// Constructors
IPAddress();
IPAddress(uint8_t first_octet, uint8_t second_octet, uint8_t third_octet, uint8_t fourth_octet);
IPAddress(uint32_t address);
IPAddress(uint32_t address) { ctor32(address); }
IPAddress(u32_t address) { ctor32(address); }
IPAddress(int address) { ctor32(address); }
IPAddress(const uint8_t *address);
bool fromString(const char *address);
@@ -200,9 +204,9 @@ class IPAddress: public Printable {
};
extern CONST IPAddress IPNoAddress;
extern CONST IPAddress INADDR_ANY;
extern const IPAddress INADDR_NONE;
#include <lwip/inet.h> // bring definition of INADDR_NONE
#include <AddrList.h> // bring interface iterator
#endif