-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
os.networkInterfaces
does not list all interfaces.
#498
Comments
|
It would require a (tedious) update to libuv, however. Tedious because it needs to be applied to all platforms and because it's an API change. Whoever wants to pursue that, please file a libuv issue first so we can hash out the details. |
+1 for I believe libuv would only need a single addition ( |
+1 for |
@piranna I don't believe there is a core workaround right now, unless there is an npm module somewhere. |
I don't know of any npm module about this... :-( |
This issue appears to be dormant and doesn't seem likely to get any traction any time soon because it depends on a significant feature appearing in libuv first. Would it be wrong-headed to close this and open something in nodejs/NG instead? |
@Trott Nah, this is still valid IMO. It's the kind of thing that we would add. |
Adding |
As workaround, I used undocumented function In this example, at least interface
Also Cap looks usable. it still needs libpcap installed, but should work on Windows as well. |
Are there any open tickets within |
There is libuv/libuv#158. I don't think anyone is actively working on it though. |
What's the current status on this? Is anyone working on this/it's libuv counterpart? /cc @nodejs/libuv @cjihrig |
@ryzokuken So there is this libuv/libuv#219 old PR which has been superseded by this libuv/libuv#1371 but unfortunately there has been no activity for almost a year now. It seems the implementation pretty much stalled. |
The upstream PR seems to be stalled, and I attempted to close it. Is this still an issue? We could reformat it so that someone else picks it up. |
Any other workaround besides pcap?, I tried npm network which uses wmic but opens a console to run the wmic command. Why is so hard to have something like this, for node: |
5 years and it's still an issue. Workaround is to rely on another npm package or parse ipconfig / ifconfig (or any other network cmd) yourself. |
This feature is still missing, how can we move it forward? |
The problem is to understand if libuv and/or glibly support it. |
Maybe we can implement the missing functionality there... |
There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment. For more information on how the project manages feature requests, please consult the feature request management document. |
This PR has been open for 8 years, and ask for a basic functionality. How can we help to move it forward? There's no npm modules that I know that implement it as an alternative, at least in a sane way... |
The libuv PR (or PRs - I think there were multiple) stalled, repeatedly. Someone would need to revive it but, honestly, I already spent enough time reviewing it. I don't cherish the thought of spending even more of my free time on it. |
@bnoordhuis I agree. Note for people reading this issue: Unless libuv lands the needed PR we cannot implement this, sorry. :( |
There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment. For more information on how the project manages feature requests, please consult the feature request management document. |
no-stale |
There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment. For more information on how the project manages feature requests, please consult the feature request management document. |
No stale. |
@manolopm I think that since you've find the place it needs to fixed, just try to move in on |
There has been no activity on this feature request for 5 months. To help maintain relevant open issues, please add the
never-stale
|
There has been no activity on this feature request and it is being closed. If you feel closing this issue is not the right thing to do, please leave a comment. For more information on how the project manages feature requests, please consult the feature request management document. |
This is a still needed issue, and should have the |
Adoption of nodejs/node-v0.x-archive#9029.
os.networkInterfaces()
does not list all interfaces, but only those that have addresses, excluding for example an unpluggedeth0
, which can be surprising.This happens because
os.networkInterfaces
is actually implemented in terms ofGetInterfaceAddresses
which calls intouv_interface_addresses
(which among other things filters out everything exceptAF_INET*
) makingnetworkInterfaces
a bit of a misnomer for what is basicallynetworkInterfaceAddresses
.Though
os
is at stability 4 already, this behavior can be a bit unexpected. Perhaps we could correct it somewhat without breaking the API, or at least document it. I can think of a few ways to work this out:os.networkInterfaceAddresses
, thus reflectingGetInterfaceAddresses
anduv_interface_addresses
; oruv_interfaces
and rebaseos.networkInterfaces()
on that anduv_interface_addresses
, preserving the current behavior, but listing all interfaces when given a flag.The text was updated successfully, but these errors were encountered: