java.net.NetworkInterface.getNetworkInterfaces() not listing all interfaces for OS X

蹲街弑〆低调 提交于 2019-12-11 06:38:03

问题


https://stackoverflow.com/a/17719579/2619129 provides a solution for Linux. I am looking for a similar solution for OS X, but not sure which files to read to get the list of Interfaces (file /proc/net/dev in linux) and then their HardwareAddresses (file /sys/class/net/devicename/address in linux).

My ultimate goal is to list Mac-Addresses of all the NetworkInterfaces (which gets listed as result of ifconfig command) on OS X implemented in pure Java.

来源:https://stackoverflow.com/questions/53618361/java-net-networkinterface-getnetworkinterfaces-not-listing-all-interfaces-for

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!