mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-06 05:21:22 +03:00
add 1 more IPAddress constructor for IPv6 (#5551)
This commit is contained in:
parent
8049543e98
commit
da7ffdaa28
@ -187,6 +187,11 @@ const IPAddress INADDR_NONE(255,255,255,255);
|
||||
|
||||
#if LWIP_IPV6
|
||||
|
||||
IPAddress::IPAddress(const ip_addr_t* from)
|
||||
{
|
||||
ip_addr_copy(_ip, *from);
|
||||
}
|
||||
|
||||
bool IPAddress::fromString6(const char *address) {
|
||||
// TODO: test test test
|
||||
|
||||
|
@ -163,6 +163,8 @@ class IPAddress: public Printable {
|
||||
|
||||
#if LWIP_IPV6
|
||||
|
||||
IPAddress(const ip_addr_t* from);
|
||||
|
||||
uint16_t* raw6()
|
||||
{
|
||||
setV6();
|
||||
|
@ -98,7 +98,11 @@ void setup() {
|
||||
Serial.println();
|
||||
Serial.println(ESP.getFullVersion());
|
||||
|
||||
Serial.printf("IPV6 is%s enabled\n", LWIP_IPV6 ? emptyString.c_str() : " NOT");
|
||||
#if LWIP_IPV6
|
||||
Serial.printf("IPV6 is enabled\n");
|
||||
#else
|
||||
Serial.printf("IPV6 is not enabled\n");
|
||||
#endif
|
||||
|
||||
WiFi.mode(WIFI_STA);
|
||||
WiFi.begin(STASSID, STAPSK);
|
||||
|
Loading…
x
Reference in New Issue
Block a user