diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e140ee..248bfb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page. | Version | Date | Comment | | -------------- | -------------- | -------- | +| 4.18.0 | 2020-01-07 | `networkInterfaces()` added dhcp for mac os, added dhcp linux fallback | | 4.17.3 | 2020-01-05 | code cleanup | | 4.17.2 | 2020-01-05 | `cpu().speed` AMD base frequency and fix (0.00) | | 4.17.1 | 2020-01-04 | `fsSize()` alpine linux support | diff --git a/README.md b/README.md index 972a540..bd683cd 100644 --- a/README.md +++ b/README.md @@ -447,7 +447,7 @@ I also created a nice little command line tool called [mmon][mmon-github-url] ( | | [0].duplex | X | | X | | | duplex | | | [0].mtu | X | | X | | | maximum transmission unit | | | [0].speed | X | | X | X | | speed in MBit / s | -| | [0].dhcp | X | | | X | | DHCP address | +| | [0].dhcp | X | | X | X | | IP address obtained by DHCP | | | [0].dnsSuffix | X | | | X | | DNS suffix | | | [0].ieee8021xAuth | X | | | X | | IEEE 802.1x auth | | | [0].ieee8021xState | X | | | X | | IEEE 802.1x state | diff --git a/docs/history.html b/docs/history.html index eb01a43..7c55791 100644 --- a/docs/history.html +++ b/docs/history.html @@ -83,6 +83,11 @@ + + 4.18.0 + 2020-01-07 + networkInterfaces() added dhcp for mac OS, added dhcp linux fallback + 4.17.3 2020-01-05 @@ -106,7 +111,7 @@ 4.16.1 2020-01-01 - networkInterfaces() bug fix (osx) + networkInterfaces() bug fix (mac OS) 4.16.0 @@ -231,7 +236,7 @@ 4.13.1 2019-07-01 - versions() gcc fix macos + versions() gcc fix mac OS 4.13.0 @@ -246,7 +251,7 @@ 4.12.1 2019-06-24 - networkInterface() virtual interfaces macos
+ networkInterface() virtual interfaces mac OS
networkInterfaceDefault() optimization windows @@ -347,7 +352,7 @@ 4.7.1 2019-05-29 - memLayout() fix macos mojave + memLayout() fix mac OS mojave 4.7.0 diff --git a/docs/index.html b/docs/index.html index 2edf613..94eaba7 100644 --- a/docs/index.html +++ b/docs/index.html @@ -168,7 +168,7 @@
systeminformation
-
Current Version: 4.17.3
+
Current Version: 4.18.0
@@ -191,7 +191,7 @@
-
9,756
+
9,949
Lines of code
@@ -199,7 +199,7 @@
Downloads last month
-
233
+
234
Dependends
diff --git a/docs/network.html b/docs/network.html index e6dcdd7..c1443b1 100644 --- a/docs/network.html +++ b/docs/network.html @@ -200,10 +200,10 @@ [0].dhcp X - + X X - DHCP address + IP address obtained by DHCP diff --git a/lib/network.js b/lib/network.js index abab9bf..f0b0673 100644 --- a/lib/network.js +++ b/lib/network.js @@ -503,7 +503,7 @@ function getLinuxDHCPNics() { lines.forEach(line => { const parts = line.replace(/\s+/g, ' ').trim().split(' '); if (parts.length >=4) { - if (line.toLowerCase().indexOf('dynamic') >= 0) { + if (line.toLowerCase().indexOf(' inet ') >= 0 && line.toLowerCase().indexOf('dhcp') >= 0) { result.push(parts[1]); } } @@ -559,7 +559,7 @@ function getLinuxIfaceDHCPstatus(iface, connectionName, DHCPNics) { return (DHCPNics.indexOf(iface) >= 0); } } else { - return result; + return (DHCPNics.indexOf(iface) >= 0); } }