| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #if defined(WEBRTC_ANDROID) | 11 #if defined(WEBRTC_ANDROID) |
| 12 #include "webrtc/base/ifaddrs-android.h" | 12 #include "webrtc/rtc_base/ifaddrs-android.h" |
| 13 #include <stdlib.h> | |
| 14 #include <string.h> | |
| 15 #include <sys/types.h> | |
| 16 #include <sys/socket.h> | |
| 17 #include <sys/utsname.h> | |
| 18 #include <sys/ioctl.h> | |
| 19 #include <netinet/in.h> | |
| 20 #include <net/if.h> | |
| 21 #include <unistd.h> | |
| 22 #include <errno.h> | 13 #include <errno.h> |
| 23 #include <linux/netlink.h> | 14 #include <linux/netlink.h> |
| 24 #include <linux/rtnetlink.h> | 15 #include <linux/rtnetlink.h> |
| 16 #include <net/if.h> |
| 17 #include <netinet/in.h> |
| 18 #include <stdlib.h> |
| 19 #include <string.h> |
| 20 #include <sys/ioctl.h> |
| 21 #include <sys/socket.h> |
| 22 #include <sys/types.h> |
| 23 #include <sys/utsname.h> |
| 24 #include <unistd.h> |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 struct netlinkrequest { | 28 struct netlinkrequest { |
| 29 nlmsghdr header; | 29 nlmsghdr header; |
| 30 ifaddrmsg msg; | 30 ifaddrmsg msg; |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 const int kMaxReadSize = 4096; | 33 const int kMaxReadSize = 4096; |
| 34 | 34 |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 delete cursor->ifa_addr; | 214 delete cursor->ifa_addr; |
| 215 delete cursor->ifa_netmask; | 215 delete cursor->ifa_netmask; |
| 216 last = cursor; | 216 last = cursor; |
| 217 cursor = cursor->ifa_next; | 217 cursor = cursor->ifa_next; |
| 218 delete last; | 218 delete last; |
| 219 } | 219 } |
| 220 } | 220 } |
| 221 | 221 |
| 222 } // namespace rtc | 222 } // namespace rtc |
| 223 #endif // defined(WEBRTC_ANDROID) | 223 #endif // defined(WEBRTC_ANDROID) |
| OLD | NEW |