Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make IPv6 support compatible with ESP8266 implementation #7114

Closed
1 task done
sgryphon opened this issue Aug 11, 2022 · 2 comments
Closed
1 task done

Make IPv6 support compatible with ESP8266 implementation #7114

sgryphon opened this issue Aug 11, 2022 · 2 comments
Labels
Status: Solved Type: Feature request Feature request for Arduino ESP32
Milestone

Comments

@sgryphon
Copy link
Contributor

Related area

Networking support

Hardware specification

n/a

Is your feature request related to a problem?

The implementation of IPv6 as a separate type of address adds complexity.

Particularly for an Arduino-level user with limited experience, having to know which type of address to use complicates things. It would make a lot more sense if something like a DNS lookup simply returned an IP address, or checking the local address of a network connection, without knowing the type.

The implementation is also incompatible with the Arduino ESP8266 libraries, which are just a wrapper around lwIP ip_addr_t from the core Espressif libraries. https://github.com/esp8266/Arduino/blob/master/cores/esp8266/IPAddress.h

For example, a simple example that displays the current IP address for ESP8266 will work in IPv4-only, IPv6-only, and dual stack environments, with a single reference to IPAddress.

The example code would not work for ESP32, and ESP32 would require more complicated code to check both the IPAddress and IPv6Address, and decide which to show.

Describe the solution you'd like

Use an implementation similar (or the same as) ESP8266: https://github.com/esp8266/Arduino/blob/master/cores/esp8266/IPAddress.h

This has full backwards compatibility with IPv4 addresses, adds support for IPv6, does not complicate APIs by adding duplicate methods everywhere. It even preserves the smaller memory footprint (and implementation detail) when compiled without IPv6.

Describe alternatives you've considered

The existing IPv6Address adds complexity and is incompatible. It is not yet widely used, so would be easy to deprecated and change before merging the planned wider IPv6 support.

Additional context

No response

I have checked existing list of Feature requests and the Contribution Guide

  • I confirm I have checked existing list of Feature requests and Contribution Guide.
@sgryphon sgryphon added the Type: Feature request Feature request for Arduino ESP32 label Aug 11, 2022
@VojtechBartoska VojtechBartoska added this to the 2.1.0 milestone Aug 11, 2022
@VojtechBartoska VojtechBartoska added the Status: Needs investigation We need to do some research before taking next steps on this issue label Aug 11, 2022
@VojtechBartoska
Copy link
Contributor

Hello, adding this to 2.1.0 milestone. We will investigate in general IPv6 soon and consider your proposal.

@VojtechBartoska
Copy link
Contributor

VojtechBartoska commented Feb 20, 2024

Closing this ticket, ipv6 have been implemented here: #9016

@VojtechBartoska VojtechBartoska added Status: Solved and removed Status: Needs investigation We need to do some research before taking next steps on this issue labels Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Solved Type: Feature request Feature request for Arduino ESP32
Projects
Development

No branches or pull requests

2 participants