Commit Graph

6 Commits

Author SHA1 Message Date
Me No Dev
768719c68f
This is a continuation on the topic of adding IPv6 Support to ESP32 Arduino (#9016)
* IPv6 for Arduino 3.0.0

* Fix warning in WifiUdp

* remove comment / formating

* Add zone to IPAddress and update WiFiUDP and WiFiGeneric

* Add from ip_addr_t conversion and better toString implementation

* Use constant for IPAddress offset

@sgryphon is this better?

* Combine hostByName to support both IPv6 and IPv4 results

* implement logic to use v6 dns only when global v6 address is assigned and remove IPv6Address

* Rename softAPenableIPv6

* Rename mDNS methods

* fix IPAddress method to work with const address

* Some cleanup and do not print zone in IPAddress

* rename WiFiMulti method

* Fix AP DHCPS not properly working on recent IDF

* Add option to print the zone at the end of IPv6

@TD-er

* remove log prints from hostByName

* Use correct array length for listing IPv6 addresses

* Implement some Tasmota requirements

Added constructor that takes `const ip_addr_t *`.
Added `addr_type()` getter
Organize header to highlight the Espressif additions to IPAddress

* add 'const' to IPAddress::addr_type()

* Fix WiFiUdp not updating mapped v4 address

* Update WiFiServer.cpp

---------

Co-authored-by: Jason2866 <24528715+Jason2866@users.noreply.github.com>
Co-authored-by: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
2024-01-15 15:24:34 +02:00
Sly Gryphon
44f83b0455
Add v6 support to IPAddress to match ArduinoCore-API (#7174)
* feat(ipaddress): add support for ipv6 type, following arduinocore api

* feat(ipaddress): align with latest arduinocore api

---------

Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
2023-12-18 14:19:12 +02:00
Rodrigo Garcia
ce2cd111a1
Fixes INADDR_NONE (#6659)
Description of Change

Fixes IPAddress INADDR_NONE declaration when using Arduino WiFi or ETH.
This symbol was defined as 0xffffffff by lwip /inet.h, making it impossible to use INADDR_NONE correctly.

This PR only works when <wifi-provisioning/wifi_config.h> has a modification to include <lwip/ip4_addr.h> instead of <lwip/inet.h>. This will be done directly to the sdk folder in the github structure and it has been fixed in IDF by a separated Merge Request. This will be reflected in the future, for good.

Tests scenarios

This PR was tested with all Arduino WiFi examples, including AsyncUDP. Also with ETH examples.
It was also tested for #6610 test cases.
Testing done for ESP32, ESP32-S2, ESP32-C3 and ESP32-S3.

Related links

fixes #6610
fixes #6247
fixes #4732
2022-04-29 11:13:07 +03:00
Victor Tseng
54b1b8b1d3 const correctness (#89)
make IPAddress.toString() const method, it doesn't modify anything
within the class.
2016-12-12 01:32:55 +02:00
Drake Youngkun Min
d8b2290313 Add 'fromString(const char*)', 'fromString(const String)' to IPAddress class (#68) 2016-11-24 09:46:11 +02:00
me-no-dev
5f3a205955 initial import 2016-10-06 07:09:44 -06:00