1
0
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:
Bryan Roe
2020-03-18 16:41:21 -07:00
parent 3d88fd7539
commit a714468636
2 changed files with 12 additions and 1 deletions

View File

@@ -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}});\
}\