1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-26 05:03:15 +00:00

Added 'index' to networkInterfaces() on windows

Added missing #define
Added IPAddress helper
This commit is contained in:
Bryan Roe
2019-09-08 19:30:31 -07:00
parent f75e2514a9
commit da6cf39dd2
4 changed files with 24 additions and 3 deletions

View File

@@ -1515,6 +1515,8 @@ duk_ret_t ILibDuktape_ScriptContainer_OS_networkInterfaces(duk_context *ctx)
duk_push_string(ctx, padapters->PhysicalAddressLength>0 ? util_tohex2(padapters->PhysicalAddress, padapters->PhysicalAddressLength, ILibScratchPad) : "00:00:00:00:00:00");
duk_put_prop_string(ctx, -2, "mac");
duk_push_int(ctx, padapters->IfIndex); duk_put_prop_string(ctx, -2, "index");
duk_push_string(ctx, padapters->OperStatus == IfOperStatusUp ? "up" : "down");
duk_put_prop_string(ctx, -2, "status");