mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-15 15:53:55 +00:00
Added gateway support to MeshAGent.NetInfo and OS.networkInterfaces() for macOS
This commit is contained in:
@@ -1486,6 +1486,7 @@ duk_ret_t ILibDuktape_MeshAgent_NetInfo(duk_context *ctx)
|
||||
if(ni[tmp[0]][i].family == 'IPv4')\
|
||||
{\
|
||||
var ret = {v4addr: ni[tmp[0]][i].address, v4mask: ni[tmp[0]][i].netmask, mac: ni[tmp[0]][i].mac.split(':').join(''), gatewaymac: tmp[1], name: tmp[0]};\
|
||||
if(ni[tmp[0]][i].gateway != null) { ret['gateway'] = ni[tmp[0]][i].gateway; }\
|
||||
if(dvname != '') {ret['desc'] = dvname;}\
|
||||
return({netif: {0: ret}});\
|
||||
}\
|
||||
|
||||
Reference in New Issue
Block a user