diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9654157..75bcad7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -30,7 +30,8 @@ For major (breaking) changes - version 3 and 2 see end of page.
| Version | Date | Comment |
| -------------- | -------------- | -------- |
-| 4.16.0 | 2019-11-27 | `networkInterfaces()` bug fix (osx) |
+| 4.17.0 | 2020-01-04 | `networkInterfaces()` added dhcp, dnsSuffix, ieee8021xAuth, ieee8021xState |
+| 4.16.1 | 2020-01-02 | `networkInterfaces()` bug fix (osx) |
| 4.16.0 | 2019-11-27 | `networkGatewayDefault()` added |
| 4.15.3 | 2019-11-10 | type definitions and docs update |
| 4.15.2 | 2019-11-10 | `mem()` improved calculation linux |
diff --git a/README.md b/README.md
index 0fa7fe8..b7a974c 100644
--- a/README.md
+++ b/README.md
@@ -98,13 +98,13 @@ si.cpu()
(last 7 major and minor version releases)
+- Version 4.17.0: `networkInterfaces()` added dhcp, dnsSuffix, ieee8021xAuth, ieee8021xState
- Version 4.16.0: `networkGatewayDefault()` added
- Version 4.15.0: `cpu()` added governor (linux)
- Version 4.14.0: `processes()` added process path and params
- Version 4.13.0: `networkConnections()` added PID, process
- Version 4.12.0: `networkInterfaces()` added property virtual
- Version 4.11.0: `wifiNetworks()` added available wifi networks
-- Version 4.10.0: `graphics()` added windows multiple display support, added display size, connection, ...
- ...
You can find all changes here: [detailed changelog][changelog-url]
@@ -447,6 +447,14 @@ 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].dnsSuffix | X | | | X | | DNS suffix |
+| | [0].ieee8021xAuth | X | | | X | | IEEE 802.1x auth |
+| | [0].ieee8021xState | X | | | X | | IEEE 802.1x state |
+ dhcp: boolean;
+ dnsSuffix: string;
+ ieee8021xAuth: string;
+ ieee8021xState: string;
| | [0].carrierChanges | X | | | | | # changes up/down |
| si.networkInterfaceDefault(cb) | : string | X | X | X | X | X | get name of default network interface |
| si.networkGatewayDefault(cb) | : string | X | X | X | X | X | get default network gateway |
diff --git a/docs/history.html b/docs/history.html
index c3763a3..0829360 100644
--- a/docs/history.html
+++ b/docs/history.html
@@ -83,9 +83,14 @@
+
+ | 4.17.0 |
+ 2020-01-04 |
+ networkInterfaces() added dhcp, dnsSuffix, ieee8021xAuth, ieee8021xState |
+
| 4.16.1 |
- 2019-01-01 |
+ 2020-01-01 |
networkInterfaces() bug fix (osx) |
diff --git a/docs/index.html b/docs/index.html
index 54d70e9..87a1101 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -168,7 +168,7 @@
systeminformation
- Current Version: 4.16.1
+ Current Version: 4.17.0
@@ -191,7 +191,7 @@
-
9,471
+
9,756
Lines of code
@@ -199,7 +199,7 @@
Downloads last month
diff --git a/docs/network.html b/docs/network.html
index 89865b7..437c49a 100644
--- a/docs/network.html
+++ b/docs/network.html
@@ -195,6 +195,46 @@
|
Speed in Mbit / s |
+
+ |
+ [0].dhcp |
+ X |
+ |
+ |
+ X |
+ |
+ DHCP address |
+
+
+ |
+ [0].dnsSuffix |
+ X |
+ |
+ |
+ X |
+ |
+ DNS suffix |
+
+
+ |
+ [0].ieee8021xAuth |
+ X |
+ |
+ |
+ X |
+ |
+ IEEE 802.1x Auth |
+
+
+ |
+ [0].ieee8021xState |
+ X |
+ |
+ X |
+ X |
+ |
+ IEEE 802.1x State |
+
|
[0].carrierChanges |
diff --git a/lib/network.js b/lib/network.js
index a4dbff9..a708b92 100644
--- a/lib/network.js
+++ b/lib/network.js
@@ -336,9 +336,7 @@ function getWindowsIEEE8021x(connectionType, iface, ifaces) {
const iface8021xInfo = ifaces.find((element) => {
return element.includes(iface + '\r\n');
});
-
- const arrayIface8021xInfo = iface8021xInfo.split('\r\n')
-
+ const arrayIface8021xInfo = iface8021xInfo.split('\r\n');
const state8021x = arrayIface8021xInfo.find((element) => {
return element.includes('802.1x');
});
@@ -346,16 +344,13 @@ function getWindowsIEEE8021x(connectionType, iface, ifaces) {
if (state8021x.includes('Disabled')) {
i8021x.state = "Disabled";
i8021x.protocol = "Not defined";
-
} else if (state8021x.includes('Enabled')) {
const protocol8021x = arrayIface8021xInfo.find((element) => {
return element.includes('EAP');
});
-
i8021x.protocol = protocol8021x.split(':').pop();
i8021x.state = "Enabled";
}
-
} catch (error) {
// console.log('Error getting wired information:', error);
return i8021x;
@@ -493,6 +488,7 @@ function getLinuxIfaceConnectionName(interfaceName) {
}
function getLinuxIfaceDHCPstatus(connectionName) {
+ let result = false;
if (connectionName) {
const cmd = `nmcli connection show "${connectionName}" \| grep ipv4.method;`;
try {
@@ -502,19 +498,19 @@ function getLinuxIfaceDHCPstatus(connectionName) {
let dhcStatus = resultFormat.split(" ").slice(1).toString();
switch (dhcStatus) {
case 'auto':
- dhcStatus = true;
+ result = true;
break;
default:
- dhcStatus = false;
+ result = false;
break;
}
- return dhcStatus;
+ return result;
} catch (e) {
- return 'Unknown';
+ return result;
}
} else {
- return 'Unknown';
+ return result;
}
}