1.0.3 • Published 2 months ago

network-interfaces-plus v1.0.3

Weekly downloads
3
License
MIT
Repository
gitlab
Last release
2 months ago

Network-interfaces-plus

This module provides a single function networkInterfaces() that is a clone of Node.js’ built-in os.networkInterfaces(), enhanced to provide more information about IPv6 addresses.

In addition to the properties documented for os.networkInterfaces(), address objects where family is IPv6 get the following properties:

  • temporary (boolean): true if the address is a temporary one according to RFC 4941, otherwise false
  • preferred_lifetime (number): the time in seconds from now after which the address will become deprecated, 0 if expired already, 0xFFFFFFFF if infinite
  • valid_lifetime (number): the time in seconds from now after which the address will become invalid, 0 if expired already, 0xFFFFFFFF if infinite

Tested on macOS, Linux, and Windows with Node.js 8.16 – 20.11. May work on other BSDs with little effort.

Most of the code is taken with minimal modification from Node.js and libuv.

License

Copyright Indel AG, Joyent, Inc. and other Node contributors.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

1.0.3

2 months ago

1.0.2

5 years ago

1.0.1

6 years ago

1.0.0

7 years ago