-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
EthernetCompat - static IP auto gw,mask,dns as in Arduino libraries #9024
Conversation
9f632bb
to
20c47fe
Compare
20c47fe
to
2fabf13
Compare
We already have a logic reordering network parameters and it is used in Did you check if the operations are similar ? Also, |
this doesn't do a reordering. with no param entered it creates arduino ordering, which is then reordered in the mentioned funtion IPAddress with IPv6 is not copyable? |
They are copyable, but when IPv6 is enabled they are bigger than a single reference or a single IPv4. |
OK I misread it. Why are you not doing this in our global |
https://www.arduino.cc/reference/en/libraries/ethernet/ethernet.begin/ I am not sure about this in WiFi.config. EthernetCompat is relatively new and aimed to be compatible. I can prepare a separate PR as an alternative to this PR. There I do the auto values in ipAddressReorder. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a step towards API coherence & compatibility
thanks
The parameters of
begin
in EthernetCompat.h are optional but automatic values for gw IP, mask and DNS IP were not calculated.In the
begin(mac, local_ip, arg1)
, arg1 is assumed to be the DNS IP, because it can be an address outside of the local network. Automatic gw IP based on local_ip with .1 at the end is more likely to be a right auto value than DNS IP. Basically this is the reason for the Arduino ordering of begin parameters.