@@ -18,10 +18,11 @@ #import "OFSystemInfo.h" #import "OFSystemInfo+NetworkInterfaces.h" #import "OFData.h" #import "OFDictionary.h" #import "OFLocale.h" +#import "OFNumber.h" #import "OFSocket.h" #import "OFString.h" #include #define interface struct @@ -67,10 +68,11 @@ } for (PIP_ADAPTER_INFO iter = adapterInfo; iter != NULL; iter = iter->Next) { OFString *name, *IPString; + OFNumber *index; OFMutableData *addresses; OFSocketAddress address; name = [OFString stringWithCString: iter->AdapterName encoding: encoding]; @@ -77,10 +79,14 @@ if ((interface = [ret objectForKey: name]) == nil) { interface = [OFMutableDictionary dictionary]; [ret setObject: interface forKey: name]; } + + index = [OFNumber numberWithUnsignedInt: iter->Index]; + [interface setObject: index + forKey: OFNetworkInterfaceIndex]; IPString = [OFString stringWithCString: iter->IpAddressList.IpAddress .String encoding: encoding];