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 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
105 // Returns this address as an IPv6 address. | 105 // Returns this address as an IPv6 address. |
106 // Maps v4 addresses (as ::ffff:a.b.c.d), returns v6 addresses unchanged. | 106 // Maps v4 addresses (as ::ffff:a.b.c.d), returns v6 addresses unchanged. |
107 IPAddress AsIPv6Address() const; | 107 IPAddress AsIPv6Address() const; |
108 | 108 |
109 // For socketaddress' benefit. Returns the IP in host byte order. | 109 // For socketaddress' benefit. Returns the IP in host byte order. |
110 uint32_t v4AddressAsHostOrderInteger() const; | 110 uint32_t v4AddressAsHostOrderInteger() const; |
111 | 111 |
112 // Whether this is an unspecified IP address. | 112 // Whether this is an unspecified IP address. |
113 bool IsNil() const; | 113 bool IsNil() const; |
114 | 114 |
115 static void set_strip_sensitive(bool enable); | |
pthatcher1
2015/11/25 23:08:23
This is going to break Chrome FYI bots, is it not?
pbos-webrtc
2015/11/25 23:09:52
I already broke them (due to nacl), this will help
| |
116 | |
117 private: | 115 private: |
118 int family_; | 116 int family_; |
119 union { | 117 union { |
120 in_addr ip4; | 118 in_addr ip4; |
121 in6_addr ip6; | 119 in6_addr ip6; |
122 } u_; | 120 } u_; |
123 | |
124 static bool strip_sensitive_; | |
125 }; | 121 }; |
126 | 122 |
127 // IP class which could represent IPv6 address flags which is only | 123 // IP class which could represent IPv6 address flags which is only |
128 // meaningful in IPv6 case. | 124 // meaningful in IPv6 case. |
129 class InterfaceAddress : public IPAddress { | 125 class InterfaceAddress : public IPAddress { |
130 public: | 126 public: |
131 InterfaceAddress() : ipv6_flags_(IPV6_ADDRESS_FLAG_NONE) {} | 127 InterfaceAddress() : ipv6_flags_(IPV6_ADDRESS_FLAG_NONE) {} |
132 | 128 |
133 InterfaceAddress(IPAddress ip) | 129 InterfaceAddress(IPAddress ip) |
134 : IPAddress(ip), ipv6_flags_(IPV6_ADDRESS_FLAG_NONE) {} | 130 : IPAddress(ip), ipv6_flags_(IPV6_ADDRESS_FLAG_NONE) {} |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
183 IPAddress GetAnyIP(int family); | 179 IPAddress GetAnyIP(int family); |
184 | 180 |
185 // 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 |
186 // 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 |
187 // counted. | 183 // counted. |
188 int CountIPMaskBits(IPAddress mask); | 184 int CountIPMaskBits(IPAddress mask); |
189 | 185 |
190 } // namespace rtc | 186 } // namespace rtc |
191 | 187 |
192 #endif // WEBRTC_BASE_IPADDRESS_H_ | 188 #endif // WEBRTC_BASE_IPADDRESS_H_ |
OLD | NEW |