OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2011 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 #ifndef WEBRTC_RTC_BASE_IPADDRESS_H_ | 11 #ifndef WEBRTC_RTC_BASE_IPADDRESS_H_ |
12 #define WEBRTC_RTC_BASE_IPADDRESS_H_ | 12 #define WEBRTC_RTC_BASE_IPADDRESS_H_ |
13 | 13 |
14 #if defined(WEBRTC_POSIX) | 14 #if defined(WEBRTC_POSIX) |
15 #include <netinet/in.h> | 15 #include <netinet/in.h> |
16 #include <sys/socket.h> | 16 #include <sys/socket.h> |
17 #include <arpa/inet.h> | 17 #include <arpa/inet.h> |
18 #include <netdb.h> | 18 #include <netdb.h> |
19 #endif | 19 #endif |
20 #if defined(WEBRTC_WIN) | 20 #if defined(WEBRTC_WIN) |
21 #include <winsock2.h> | 21 #include <winsock2.h> |
22 #include <ws2tcpip.h> | 22 #include <ws2tcpip.h> |
23 #endif | 23 #endif |
24 #include <string.h> | 24 #include <string.h> |
25 #include <string> | 25 #include <string> |
26 #include <vector> | 26 #include <vector> |
27 | 27 |
28 #include "webrtc/base/basictypes.h" | 28 #include "webrtc/rtc_base/basictypes.h" |
29 #include "webrtc/base/byteorder.h" | 29 #include "webrtc/rtc_base/byteorder.h" |
30 #if defined(WEBRTC_WIN) | 30 #if defined(WEBRTC_WIN) |
31 #include "webrtc/base/win32.h" | 31 #include "webrtc/rtc_base/win32.h" |
32 #endif | 32 #endif |
33 | 33 |
34 namespace rtc { | 34 namespace rtc { |
35 | 35 |
36 enum IPv6AddressFlag { | 36 enum IPv6AddressFlag { |
37 IPV6_ADDRESS_FLAG_NONE = 0x00, | 37 IPV6_ADDRESS_FLAG_NONE = 0x00, |
38 | 38 |
39 // Temporary address is dynamic by nature and will not carry MAC | 39 // Temporary address is dynamic by nature and will not carry MAC |
40 // address. | 40 // address. |
41 IPV6_ADDRESS_FLAG_TEMPORARY = 1 << 0, | 41 IPV6_ADDRESS_FLAG_TEMPORARY = 1 << 0, |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 IPAddress GetAnyIP(int family); | 179 IPAddress GetAnyIP(int family); |
180 | 180 |
181 // Returns the number of contiguously set bits, counting from the MSB in network | 181 // Returns the number of contiguously set bits, counting from the MSB in network |
182 // byte order, in this IPAddress. Bits after the first 0 encountered are not | 182 // byte order, in this IPAddress. Bits after the first 0 encountered are not |
183 // counted. | 183 // counted. |
184 int CountIPMaskBits(IPAddress mask); | 184 int CountIPMaskBits(IPAddress mask); |
185 | 185 |
186 } // namespace rtc | 186 } // namespace rtc |
187 | 187 |
188 #endif // WEBRTC_RTC_BASE_IPADDRESS_H_ | 188 #endif // WEBRTC_RTC_BASE_IPADDRESS_H_ |
OLD | NEW |