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

Get all the network interfaces in Deno #8137

Closed
mayankchoubey1 opened this issue Oct 27, 2020 · 5 comments · Fixed by #13475
Closed

Get all the network interfaces in Deno #8137

mayankchoubey1 opened this issue Oct 27, 2020 · 5 comments · Fixed by #13475
Assignees
Labels
cli related to cli/ dir public API related to "Deno" namespace in JS suggestion suggestions for new features (yet to be agreed)

Comments

@mayankchoubey1
Copy link

Add a method Deno.networkInterfaces() to get the list of all network interfaces with some details like:

  • MAC address
  • up or down
  • IP Addresses
@mayankchoubey1
Copy link
Author

mayankchoubey1 commented Oct 27, 2020

@bartlomieju : I've submitted this enhancement request today. Do you think this will be useful? Is it okay if I assign it to myself and work on it?

@mayankchoubey1 mayankchoubey1 changed the title Get all the network interfaces in Denbo Get all the network interfaces in Deno Oct 27, 2020
@lucacasonato lucacasonato added cli related to cli/ dir public API related to "Deno" namespace in JS suggestion suggestions for new features (yet to be agreed) labels Oct 27, 2020
@eliassjogreen
Copy link
Contributor

It should probably provide pretty much the same properties as in node if that is possible.

@silverwind
Copy link

silverwind commented Oct 29, 2020

netmask and possibly also address can probably be ommited in favor of cidr.

@rektide
Copy link

rektide commented Aug 14, 2021

It'd be lovely to be able to get changes to the network interfaces too.

Ideally that covers both a change in what interfaces there are, and changes in status of an interface.

There's addons like https://github.com/JacobFischer/netlinkwrapper for node. There's a subfeature required to do this well in Linux: one communicates with a netlink socket over UDP. libuv has a wip pr to enable non AF_INET{,6} communication, for example.

@bartlomieju
Copy link
Member

@bnoordhuis is working on this feature.

bnoordhuis added a commit to bnoordhuis/deno that referenced this issue Dec 2, 2021
Add an op to list the network interfaces on the system.

Prep work for denoland#8137 and `os.networkInterfaces()` Node compat in std.

Refs denoland/deno_std#1436.
bnoordhuis added a commit to bnoordhuis/deno that referenced this issue Dec 13, 2021
Add an op to list the network interfaces on the system.

Prep work for denoland#8137 and `os.networkInterfaces()` Node compat in std.

Refs denoland/deno_std#1436.
bnoordhuis added a commit to bnoordhuis/deno that referenced this issue Dec 22, 2021
Add an op to list the network interfaces on the system.

Prep work for denoland#8137 and `os.networkInterfaces()` Node compat in std.

Refs denoland/deno_std#1436.
bnoordhuis added a commit that referenced this issue Dec 22, 2021
Add an op to list the network interfaces on the system.

Prep work for #8137 and `os.networkInterfaces()` Node compat in std.

Refs denoland/deno_std#1436.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli related to cli/ dir public API related to "Deno" namespace in JS suggestion suggestions for new features (yet to be agreed)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants