Changeset 14283 in vbox
- Timestamp:
- Nov 18, 2008 10:31:24 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 39461
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/HostImpl.cpp
r14271 r14283 44 44 # include <errno.h> 45 45 # include <net/if.h> 46 # include <net/if_arp.h> 46 47 #endif /* RT_OS_LINUX */ 47 48 … … 1030 1031 for (struct ifreq *pReq = ifConf.ifc_req; (char*)pReq < pBuffer + ifConf.ifc_len; pReq++) 1031 1032 { 1032 RTUUID uuid; 1033 Assert(sizeof(uuid) <= sizeof(*pReq)); 1034 memcpy(&uuid, pReq, sizeof(uuid)); 1035 1036 ComObjPtr<HostNetworkInterface> IfObj; 1037 IfObj.createObject(); 1038 if (SUCCEEDED(IfObj->init(Bstr(pReq->ifr_name), Guid(uuid)))) 1039 list.push_back(IfObj); 1033 if (ioctl(sock, SIOCGIFHWADDR, pReq) >= 0) 1034 { 1035 if (pReq->ifr_hwaddr.sa_family == ARPHRD_ETHER) 1036 { 1037 RTUUID uuid; 1038 Assert(sizeof(uuid) <= sizeof(*pReq)); 1039 memcpy(&uuid, pReq, sizeof(uuid)); 1040 1041 ComObjPtr<HostNetworkInterface> IfObj; 1042 IfObj.createObject(); 1043 if (SUCCEEDED(IfObj->init(Bstr(pReq->ifr_name), Guid(uuid)))) 1044 list.push_back(IfObj); 1045 } 1046 } 1040 1047 } 1041 1048 }
Note:
See TracChangeset
for help on using the changeset viewer.