getNetworkInterfaces将提供所有接口但我仍然无法从 networkIfaceArray 过滤网络接口
chrome.system.network.getNetworkInterfaces(function( networkIfaceArray ) {
}
请帮助,Sarath s
答案 0 :(得分:1)
也许是这样的?只需遍历返回的接口并从每个接口获取数据?
chrome.system.network.getNetworkInterfaces(function(networkIfaceArray){
for(var i = 0; i < networkIfaceArray.length; i++){
var iface = networkIfaceArray[i];
console.log("name : "+iface.name+
" ; address : "+iface.address+
" ; prefixLength : "+iface.prefixLength);
}
});