diff options
author | Antoine du Hamel <duhamelantoine1995@gmail.com> | 2022-04-22 01:31:09 +0300 |
---|---|---|
committer | Michaƫl Zasso <targos@protonmail.com> | 2022-04-28 07:57:21 +0300 |
commit | d9f3f05cabecfeff7c267b9193f21b71013679b0 (patch) | |
tree | 704edb957962f0864a52982e4a698bbac63ef274 /doc/api/os.md | |
parent | 6fa080cb4874f4a459b862c81bca3132ad042e67 (diff) |
doc: fix outdated documentation for `family` property
Refs: https://github.com/nodejs/node/pull/41431
Fixes: https://github.com/nodejs/node/issues/42787
PR-URL: https://github.com/nodejs/node/pull/42789
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Diffstat (limited to 'doc/api/os.md')
-rw-r--r-- | doc/api/os.md | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/doc/api/os.md b/doc/api/os.md index d0bef604d96..ad4d082d94d 100644 --- a/doc/api/os.md +++ b/doc/api/os.md @@ -224,6 +224,10 @@ always `[0, 0, 0]`. <!-- YAML added: v0.6.0 +changes: + - version: v18.0.0 + pr-url: https://github.com/nodejs/node/pull/41431 + description: The `family` property now returns a number instead of a string. --> * Returns: {Object} @@ -238,12 +242,12 @@ The properties available on the assigned network address object include: * `address` {string} The assigned IPv4 or IPv6 address * `netmask` {string} The IPv4 or IPv6 network mask -* `family` {string} Either `IPv4` or `IPv6` +* `family` {number} Either `4` (for IPv4) or `6` (for IPv6) * `mac` {string} The MAC address of the network interface * `internal` {boolean} `true` if the network interface is a loopback or similar interface that is not remotely accessible; otherwise `false` * `scopeid` {number} The numeric IPv6 scope ID (only specified when `family` - is `IPv6`) + is `6`) * `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`. @@ -256,7 +260,7 @@ The properties available on the assigned network address object include: { address: '127.0.0.1', netmask: '255.0.0.0', - family: 'IPv4', + family: 4, mac: '00:00:00:00:00:00', internal: true, cidr: '127.0.0.1/8' @@ -264,7 +268,7 @@ The properties available on the assigned network address object include: { address: '::1', netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff', - family: 'IPv6', + family: 6, mac: '00:00:00:00:00:00', scopeid: 0, internal: true, @@ -275,7 +279,7 @@ The properties available on the assigned network address object include: { address: '192.168.1.108', netmask: '255.255.255.0', - family: 'IPv4', + family: 4, mac: '01:02:03:0a:0b:0c', internal: false, cidr: '192.168.1.108/24' @@ -283,7 +287,7 @@ The properties available on the assigned network address object include: { address: 'fe80::a00:27ff:fe4e:66a1', netmask: 'ffff:ffff:ffff:ffff::', - family: 'IPv6', + family: 6, mac: '01:02:03:0a:0b:0c', scopeid: 1, internal: false, |