unix, win: add netmask to uv_interface_address #705

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@wanderview

Include the netmask when returning information about the OS network
interfaces. The end goal is to get this back to node's os.networkInterfaces()
function.

This commit provides implementations for windows and those unix platforms
using getifaddrs().

AIX was not implemented because it requires the use ioctls and I do not
have an AIX development/test environment. The windows code was developed
using mingw on winxp as I do not have access to visual studio.

Tested on darwin (ipv4/ipv6) and winxp (ipv4 only). Needs testing on
newer windows using ipv6 and other unix platforms.

@wanderview wanderview unix, win: add netmask to uv_interface_address
Include the netmask when returning information about the OS network
interfaces.

This commit provides implementations for windows and those unix platforms
using getifaddrs().

AIX was not implemented because it requires the use ioctls and I do not
have an AIX development/test environment.  The windows code was developed
using mingw on winxp as I do not have access to visual studio.

Tested on darwin (ipv4/ipv6) and winxp (ipv4 only).  Needs testing on
newer windows using ipv6 and other unix platforms.
d681546
@wanderview wanderview added a commit to wanderview/node that referenced this pull request Feb 10, 2013
@wanderview wanderview Include netmask in os.networkInterfaces()
This commit depends on joyent/libuv#705 in order to compile.  The libuv
changes are not included here as I assume dependencies are incorporated
under a separate process.

This is a partial fix for #3765.
fd89d93
@wanderview wanderview referenced this pull request in nodejs/node-v0.x-archive Feb 10, 2013
Closed

Include netmask in os.networkInterfaces() #4743

@bnoordhuis

UNIX side of things LGTM.

@piscisaureus will have to sign off on the Windows changes but he probably won't be around for the next few days.

@wanderview

Thanks for the review. Note, I'd be willing to look at AIX if there was a VM or server I could use. How do you normally test AIX?

@bnoordhuis

We don't test AIX at all. Someone else wrote the port, we don't really support it.

@wanderview

@bnoordhuis If the windows code will take longer to review, would it make sense to just zero the values for now as you suggested in #730?

@wanderview

Ping @piscisaureus and @bnoordhuis now that we've gotten past the push for node v0.10.0. Willing to do more work on this if requested.

Thanks!

@bnoordhuis

Thanks Ben, landed in 14aa615.

@bnoordhuis bnoordhuis closed this Apr 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment