OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 // For v6 addresses this means the address is ::1. | 134 // For v6 addresses this means the address is ::1. |
135 bool IsLoopbackIP() const; | 135 bool IsLoopbackIP() const; |
136 | 136 |
137 // Determines whether the IP address is in one of the private ranges: | 137 // Determines whether the IP address is in one of the private ranges: |
138 // For v4: 127.0.0.0/8 10.0.0.0/8 192.168.0.0/16 172.16.0.0/12. | 138 // For v4: 127.0.0.0/8 10.0.0.0/8 192.168.0.0/16 172.16.0.0/12. |
139 // For v6: FE80::/16 and ::1. | 139 // For v6: FE80::/16 and ::1. |
140 bool IsPrivateIP() const; | 140 bool IsPrivateIP() const; |
141 | 141 |
142 // Determines whether the hostname has been resolved to an IP. | 142 // Determines whether the hostname has been resolved to an IP. |
143 bool IsUnresolvedIP() const; | 143 bool IsUnresolvedIP() const; |
144 inline bool IsUnresolved() const { return IsUnresolvedIP(); } // deprecated | |
145 | 144 |
146 // Determines whether this address is identical to the given one. | 145 // Determines whether this address is identical to the given one. |
147 bool operator ==(const SocketAddress& addr) const; | 146 bool operator ==(const SocketAddress& addr) const; |
148 inline bool operator !=(const SocketAddress& addr) const { | 147 inline bool operator !=(const SocketAddress& addr) const { |
149 return !this->operator ==(addr); | 148 return !this->operator ==(addr); |
150 } | 149 } |
151 | 150 |
152 // Compares based on IP and then port. | 151 // Compares based on IP and then port. |
153 bool operator <(const SocketAddress& addr) const; | 152 bool operator <(const SocketAddress& addr) const; |
154 | 153 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 bool literal_; // Indicates that 'hostname_' contains a literal IP string. | 194 bool literal_; // Indicates that 'hostname_' contains a literal IP string. |
196 }; | 195 }; |
197 | 196 |
198 bool SocketAddressFromSockAddrStorage(const sockaddr_storage& saddr, | 197 bool SocketAddressFromSockAddrStorage(const sockaddr_storage& saddr, |
199 SocketAddress* out); | 198 SocketAddress* out); |
200 SocketAddress EmptySocketAddressWithFamily(int family); | 199 SocketAddress EmptySocketAddressWithFamily(int family); |
201 | 200 |
202 } // namespace rtc | 201 } // namespace rtc |
203 | 202 |
204 #endif // WEBRTC_BASE_SOCKETADDRESS_H_ | 203 #endif // WEBRTC_BASE_SOCKETADDRESS_H_ |
OLD | NEW |