Changeset 5757 for source/ariba
- Timestamp:
- Aug 7, 2009, 10:06:04 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/communication/networkinfo/AddressDiscovery.cpp
r5639 r5757 97 97 struct ifaddrs* tmpAddr = NULL; 98 98 void* tmpAddrPtr = NULL; 99 char straddr [INET_ADDRSTRLEN];100 99 101 100 int ret = getifaddrs( &ifaceBuffer ); … … 107 106 if(i == NULL) continue; 108 107 struct sockaddr* addr = i->ifa_addr; 108 if (addr==NULL) continue; 109 109 110 110 if (addr->sa_family == AF_INET) { 111 111 // look for ipv4 112 if (addr==NULL) continue;112 char straddr[INET_ADDRSTRLEN]; 113 113 tmpAddrPtr= &((struct sockaddr_in*)addr)->sin_addr; 114 114 inet_ntop( i->ifa_addr->sa_family, tmpAddrPtr, straddr, sizeof(straddr) ); … … 120 120 if (addr->sa_family == AF_INET6) { 121 121 // look for ipv6 122 if (addr==NULL) continue;122 char straddr[INET6_ADDRSTRLEN]; 123 123 tmpAddrPtr= &((struct sockaddr_in6*)addr)->sin6_addr; 124 124 inet_ntop( i->ifa_addr->sa_family, tmpAddrPtr, straddr, sizeof(straddr) );
Note:
See TracChangeset
for help on using the changeset viewer.