File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ using v8::Context;
5050using v8::FunctionCallbackInfo;
5151using v8::Handle;
5252using v8::HandleScope;
53+ using v8::Integer;
5354using v8::Local;
5455using v8::Number;
5556using v8::Object;
@@ -272,6 +273,12 @@ static void GetInterfaceAddresses(const FunctionCallbackInfo<Value>& args) {
272273 o->Set (FIXED_ONE_BYTE_STRING (node_isolate, " mac" ),
273274 FIXED_ONE_BYTE_STRING (node_isolate, mac));
274275
276+ if (interfaces[i].address .address4 .sin_family == AF_INET6) {
277+ uint32_t scopeid = interfaces[i].address .address6 .sin6_scope_id ;
278+ o->Set (FIXED_ONE_BYTE_STRING (node_isolate, " scopeid" ),
279+ Integer::NewFromUnsigned (scopeid));
280+ }
281+
275282 const bool internal = interfaces[i].is_internal ;
276283 o->Set (FIXED_ONE_BYTE_STRING (node_isolate, " internal" ),
277284 internal ? True (node_isolate) : False (node_isolate));
You can’t perform that action at this time.
0 commit comments