summaryrefslogtreecommitdiff
path: root/doc/api/os.md
diff options
context:
space:
mode:
authorMudit Ameta <zeusdeux@gmail.com>2017-07-16 11:51:44 -0400
committerRefael Ackermann <refack@gmail.com>2017-08-14 15:43:10 -0400
commit4a6b678070f5e2ba0f0200a1a4b9a31dd0b60dac (patch)
tree72f08286273aebed7d634ab5a9933c2438487144 /doc/api/os.md
parentafe68c18682579d19a0cc37566e2edda73481dc6 (diff)
downloadandroid-node-v8-4a6b678070f5e2ba0f0200a1a4b9a31dd0b60dac.tar.gz
android-node-v8-4a6b678070f5e2ba0f0200a1a4b9a31dd0b60dac.tar.bz2
android-node-v8-4a6b678070f5e2ba0f0200a1a4b9a31dd0b60dac.zip
os: add CIDR support
This patch adds support for CIDR notation to the output of the `networkInterfaces()` method PR-URL: https://github.com/nodejs/node/pull/14307 Fixes: https://github.com/nodejs/node/issues/14006 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Diffstat (limited to 'doc/api/os.md')
-rw-r--r--doc/api/os.md15
1 files changed, 11 insertions, 4 deletions
diff --git a/doc/api/os.md b/doc/api/os.md
index 3b4b9526cb..9dc0fcf308 100644
--- a/doc/api/os.md
+++ b/doc/api/os.md
@@ -253,6 +253,9 @@ The properties available on the assigned network address object include:
similar interface that is not remotely accessible; otherwise `false`
* `scopeid` {number} The numeric IPv6 scope ID (only specified when `family`
is `IPv6`)
+* `cidr` {string} The assigned IPv4 or IPv6 address with the routing prefix
+ in CIDR notation. If the `netmask` is invalid, this property is set
+ to `null`
<!-- eslint-skip -->
```js
@@ -263,14 +266,16 @@ The properties available on the assigned network address object include:
netmask: '255.0.0.0',
family: 'IPv4',
mac: '00:00:00:00:00:00',
- internal: true
+ internal: true,
+ cidr: '127.0.0.1/8'
},
{
address: '::1',
netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff',
family: 'IPv6',
mac: '00:00:00:00:00:00',
- internal: true
+ internal: true,
+ cidr: '::1/128'
}
],
eth0: [
@@ -279,14 +284,16 @@ The properties available on the assigned network address object include:
netmask: '255.255.255.0',
family: 'IPv4',
mac: '01:02:03:0a:0b:0c',
- internal: false
+ internal: false,
+ cidr: '192.168.1.108/24'
},
{
address: 'fe80::a00:27ff:fe4e:66a1',
netmask: 'ffff:ffff:ffff:ffff::',
family: 'IPv6',
mac: '01:02:03:0a:0b:0c',
- internal: false
+ internal: false,
+ cidr: 'fe80::a00:27ff:fe4e:66a1/64'
}
]
}