-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
docs: Update docs to replace ifconfig with ipconfig. #14140
Conversation
79f01be
to
a8e5c56
Compare
Thanks for writing these docs, definitely needed! But, Well, probably it would be better to implement |
These are the network interfaces that need
Some of those (eg stm32, mimxrt) are very easy. |
I can start working in these. I have all the boards needed for testing. |
Yes, @robert-hh, that would be very nice. I have none of these boards :). So I will not touch the networking code for the other ports, that you can do and test the necessary changes. |
@felixdoerre We can also co-operate in that you suggest changes and I will test them. |
To start with I suggest just implementing the IPv4 config options for |
So mimxrt and stm32 were indeed very easy. There others are more work, when they do not use the common LWIP stack. So the ipconfig() method has to be fully implemented, which will take a while. I'm not sure if it's worth the effort for the CC3200 port, since that one is due to be closed. |
I've started a PR (#14199) to update the configuration function for the other network interfaces. Their current state is also not too consistent. The lwip-variants should all be included in there. I am not sure how consistent we will be able to make the new
Judging from what is documented (and being a kind-of devil's advocate), we'd only need to implement the Regarding mpremote: note that this is just a configuration example. If this has |
@@ -56,16 +56,6 @@ Methods | |||
Returns ``True`` if the physical Ethernet link is connected and up. | |||
Returns ``False`` otherwise. | |||
|
|||
.. method:: WIZNET5K.ifconfig([(ip, subnet, gateway, dns)]) |
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.
This is being removed because it's documented in the AbstractNIC class, right?
Maybe there needs to be some note in this file that this class does extend the AbstractNIC type and so does have the ifconfig/ipconfig methods.
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.
Yes, also there is also .active
, and .status
neither are directly documented here and only implicitly inherited. Interestingly the wiznet5k-class does not implement all functions from AbstractNIC (like .scan
) but even before the change it implemented more than documented here.
To make it kind-of consistent we could remove the docs for WIZNET5K.isconnected
and then add a paragraph linking to AbstractNIC
for: isconnected, active, ifconfig (maybe leave that out to encourage ipconfig instead), ipconfig, config and status.
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.
To make it kind-of consistent we could remove the docs for
WIZNET5K.isconnected
and then add a paragraph linking toAbstractNIC
for: isconnected, active, ifconfig (maybe leave that out to encourage ipconfig instead), ipconfig, config and status.
Yes. But that sounds like something for a separate PR.
docs/library/network.rst
Outdated
AbstractNIC.ipconfig(param=value, ...) | ||
|
||
Get or set interface-specific ip-configuration interface parameters. | ||
Supported parameters are (availability subject to compile-time flags): |
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.
I suggest "(availability of a particular parameter depends on the port and the specific network interface)". Because users see the port/NIC and not so much which compile time flags are enabled.
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.
Looks like this wasn't changed?
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.
ooh yes, I changed the other occurrence. Now I should have both.
I think I've incorporated all suggestions and was a bit more thorough to remove |
635df06
to
8f34cff
Compare
docs/library/network.rst
Outdated
AbstractNIC.ipconfig(param=value, ...) | ||
|
||
Get or set interface-specific ip-configuration interface parameters. | ||
Supported parameters are (availability subject to compile-time flags): |
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.
Looks like this wasn't changed?
docs/library/network.rst
Outdated
* ``0x40`` The address is duplicated and can not be used. | ||
|
||
This method can be used to set a static IPv6 | ||
address. |
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.
I think this needs more detail on how to set the IPv6 address. Is the thing you set it to a 4 tuple in the same format as returned?
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.
I have an example immediately after the property name, but I'll add it again here. Setting the address as 4-tuple doesn't really make sense. State is not determined by configuration but by duplicate-address-detection and validity is infinite on static addresses by definition.
25a80cb
to
d6b76f3
Compare
Follow up to 1c6012b Signed-off-by: Felix Dörre <felix@dogcraft.de>
Thanks for updating, now merged. With this done we can now officially move forward with using Thanks for all your efforts on this @felixdoerre ! |
So, is it now time to enable ipv6 by default on some ports, e.g. pico-W? |
Yes! That would be a good idea. Feel free to make a PR for that, or otherwise I'll eventually get to it. |
Seems like in here, |
Follow up for #13689, to update the documentation to refer to
ipconfig
instead ofifconfig
where appropriate.I've left
wipy
out, because I couldn't find, which network stack it is using. Also, I am not sure which network stack exactlynetwork.WLAN
andnetwork.LAN
are referring to. Should I just copy the adjustments formnetwork.rst
over tonetwork.WLAN
/network.LAN
?