#if defined(WEBRTC_POSIX)
#include <netinet/in.h>
#include <sys/socket.h>
#include "absl/strings/string_view.h"
#ifdef OPENBSD
#include <netinet/in_systm.h>
#endif
#ifndef __native_client__
#include <netinet/ip.h>
#endif
#include <netdb.h>
#endif
#include "rtc_base/byte_order.h"
#include "rtc_base/ip_address.h"
#include "rtc_base/net_helpers.h"
#include "rtc_base/string_utils.h"
#if defined(WEBRTC_WIN)
#include "rtc_base/win32.h"
#endif
namespace rtc {
static const in6_addr kV4MappedPrefix = …;
static const in6_addr k6To4Prefix = …;
static const in6_addr kTeredoPrefix = …;
static const in6_addr kV4CompatibilityPrefix = …;
static const in6_addr k6BonePrefix = …;
static const in6_addr kPrivateNetworkPrefix = …;
static bool IPIsHelper(const IPAddress& ip,
const in6_addr& tomatch,
int length);
static in_addr ExtractMappedAddress(const in6_addr& addr);
uint32_t IPAddress::v4AddressAsHostOrderInteger() const { … }
int IPAddress::overhead() const { … }
bool IPAddress::IsNil() const { … }
size_t IPAddress::Size() const { … }
bool IPAddress::operator==(const IPAddress& other) const { … }
bool IPAddress::operator!=(const IPAddress& other) const { … }
bool IPAddress::operator>(const IPAddress& other) const { … }
bool IPAddress::operator<(const IPAddress& other) const { … }
in6_addr IPAddress::ipv6_address() const { … }
in_addr IPAddress::ipv4_address() const { … }
std::string IPAddress::ToString() const { … }
std::string IPAddress::ToSensitiveString() const { … }
IPAddress IPAddress::Normalized() const { … }
IPAddress IPAddress::AsIPv6Address() const { … }
bool InterfaceAddress::operator==(const InterfaceAddress& other) const { … }
bool InterfaceAddress::operator!=(const InterfaceAddress& other) const { … }
const InterfaceAddress& InterfaceAddress::operator=(
const InterfaceAddress& other) { … }
std::string InterfaceAddress::ToString() const { … }
static bool IPIsPrivateNetworkV4(const IPAddress& ip) { … }
static bool IPIsPrivateNetworkV6(const IPAddress& ip) { … }
bool IPIsPrivateNetwork(const IPAddress& ip) { … }
static bool IPIsSharedNetworkV4(const IPAddress& ip) { … }
bool IPIsSharedNetwork(const IPAddress& ip) { … }
in_addr ExtractMappedAddress(const in6_addr& in6) { … }
bool IPFromAddrInfo(struct addrinfo* info, IPAddress* out) { … }
bool IPFromString(absl::string_view str, IPAddress* out) { … }
bool IPFromString(absl::string_view str, int flags, InterfaceAddress* out) { … }
bool IPIsAny(const IPAddress& ip) { … }
static bool IPIsLoopbackV4(const IPAddress& ip) { … }
static bool IPIsLoopbackV6(const IPAddress& ip) { … }
bool IPIsLoopback(const IPAddress& ip) { … }
bool IPIsPrivate(const IPAddress& ip) { … }
bool IPIsUnspec(const IPAddress& ip) { … }
size_t HashIP(const IPAddress& ip) { … }
IPAddress TruncateIP(const IPAddress& ip, int length) { … }
int CountIPMaskBits(const IPAddress& mask) { … }
bool IPIsHelper(const IPAddress& ip, const in6_addr& tomatch, int length) { … }
bool IPIs6Bone(const IPAddress& ip) { … }
bool IPIs6To4(const IPAddress& ip) { … }
static bool IPIsLinkLocalV4(const IPAddress& ip) { … }
static bool IPIsLinkLocalV6(const IPAddress& ip) { … }
bool IPIsLinkLocal(const IPAddress& ip) { … }
bool IPIsMacBased(const IPAddress& ip) { … }
bool IPIsSiteLocal(const IPAddress& ip) { … }
bool IPIsULA(const IPAddress& ip) { … }
bool IPIsTeredo(const IPAddress& ip) { … }
bool IPIsV4Compatibility(const IPAddress& ip) { … }
bool IPIsV4Mapped(const IPAddress& ip) { … }
int IPAddressPrecedence(const IPAddress& ip) { … }
IPAddress GetLoopbackIP(int family) { … }
IPAddress GetAnyIP(int family) { … }
}