Skip to content

Commit

Permalink
Merge pull request #1413 from dbwiddis/master
Browse files Browse the repository at this point in the history
Handle macOS unsigned byte ifTypes
  • Loading branch information
dbwiddis authored Nov 15, 2020
2 parents 3c19c75 + 072c3b4 commit 4e0ef04
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* [#1409](https://github.com/oshi/oshi/pull/1409): Parse processor name on Orange Pi - [@dbwiddis](https://github.com/dbwiddis).
* [#1410](https://github.com/oshi/oshi/pull/1410): Adapt to macOS 11 version reverse compatibility - [@dbwiddis](https://github.com/dbwiddis).
* [#1411](https://github.com/oshi/oshi/pull/1411): Add mapping of device and volume to be used for getting uuid - [@tausiflife](https://github.com/tausiflife).
* [#1413](https://github.com/oshi/oshi/pull/1413): Handle macOS unsigned byte ifTypes - [@dbwiddis](https://github.com/dbwiddis).
* Your contribution here

# 5.3.0 (2020-10-11), 5.3.1 (2020-10-18), 5.3.2 (2020-10-25), 5.3.3 (2020-10-28), 5.3.4 (2020-11-01), 5.3.5 (2020-11-11)
Expand Down
8 changes: 4 additions & 4 deletions oshi-core/src/main/java/oshi/driver/mac/net/NetStat.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ public static Map<Integer, IFdata> queryIFdata(int index) {
if2m.read();
if (index < 0 || index == if2m.ifm_index) {
data.put((int) if2m.ifm_index,
new IFdata(if2m.ifm_data.ifi_type, if2m.ifm_data.ifi_opackets, if2m.ifm_data.ifi_ipackets,
if2m.ifm_data.ifi_obytes, if2m.ifm_data.ifi_ibytes, if2m.ifm_data.ifi_oerrors,
if2m.ifm_data.ifi_ierrors, if2m.ifm_data.ifi_collisions, if2m.ifm_data.ifi_iqdrops,
if2m.ifm_data.ifi_baudrate, now));
new IFdata(0xff & if2m.ifm_data.ifi_type, if2m.ifm_data.ifi_opackets,
if2m.ifm_data.ifi_ipackets, if2m.ifm_data.ifi_obytes, if2m.ifm_data.ifi_ibytes,
if2m.ifm_data.ifi_oerrors, if2m.ifm_data.ifi_ierrors, if2m.ifm_data.ifi_collisions,
if2m.ifm_data.ifi_iqdrops, if2m.ifm_data.ifi_baudrate, now));
if (index >= 0) {
return data;
}
Expand Down

0 comments on commit 4e0ef04

Please sign in to comment.