- Timestamp:
- Sep 10, 2008 7:42:18 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 36416
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxService/VBoxVMInfoNet.cpp
r11982 r12372 36 36 } 37 37 38 char szPropPath [_MAX_PATH+1] = {0}; 39 char szTemp [_MAX_PATH+1] = {0}; 38 40 int nNumInterfaces = nBytesReturned / sizeof(INTERFACE_INFO); 39 Log(("vboxVMInfoThread: There are %d interfaces:\n", nNumInterfaces-1)); 41 42 RTStrPrintf(szPropPath, sizeof(szPropPath), "GuestInfo/Net/Count"); 43 vboxVMInfoWritePropInt(a_pCtx, szPropPath, nNumInterfaces); 40 44 41 45 dwCurIface = 0; … … 48 52 sockaddr_in *pAddress; 49 53 pAddress = (sockaddr_in *) & (InterfaceList[i].iiAddress); 50 Log((" %s", inet_ntoa(pAddress->sin_addr))); 54 RTStrPrintf(szPropPath, sizeof(szPropPath), "GuestInfo/Net/%d/V4/IP", i); 55 vboxVMInfoWriteProp(a_pCtx, szPropPath, inet_ntoa(pAddress->sin_addr)); 51 56 52 57 pAddress = (sockaddr_in *) & (InterfaceList[i].iiBroadcastAddress); 53 Log((" has bcast %s", inet_ntoa(pAddress->sin_addr))); 58 RTStrPrintf(szPropPath, sizeof(szPropPath), "GuestInfo/Net/%d/V4/Broadcast", i); 59 vboxVMInfoWriteProp(a_pCtx, szPropPath, inet_ntoa(pAddress->sin_addr)); 54 60 55 61 pAddress = (sockaddr_in *) & (InterfaceList[i].iiNetmask); 56 Log((" and netmask %s", inet_ntoa(pAddress->sin_addr))); 62 RTStrPrintf(szPropPath, sizeof(szPropPath), "GuestInfo/Net/%d/V4/Netmask", i); 63 vboxVMInfoWriteProp(a_pCtx, szPropPath, inet_ntoa(pAddress->sin_addr)); 57 64 58 Log((" Iface is "));59 65 u_long nFlags = InterfaceList[i].iiFlags; 60 if (nFlags & IFF_UP) Log(("up")); 61 else Log(("down")); 62 if (nFlags & IFF_POINTTOPOINT) Log((", is point-to-point")); 63 Log((", and can do: ")); 64 if (nFlags & IFF_BROADCAST) Log(("bcast " )); 65 if (nFlags & IFF_MULTICAST) Log(("multicast ")); 66 Log(("\n")); 66 if (nFlags & IFF_UP) 67 RTStrPrintf(szTemp, sizeof(szTemp), "Up"); 68 else 69 RTStrPrintf(szTemp, sizeof(szTemp), "Down"); 67 70 68 /** @todo Add more information & storage here! */ 71 RTStrPrintf(szPropPath, sizeof(szPropPath), "GuestInfo/Net/%d/Status", i); 72 vboxVMInfoWriteProp(a_pCtx, szPropPath, szTemp); 69 73 } 70 74
Note:
See TracChangeset
for help on using the changeset viewer.