Lines Matching defs:IPAddress
50 class IPAddress {
52 IPAddress() : family_(AF_UNSPEC) {
56 explicit IPAddress(const in_addr& ip4) : family_(AF_INET) {
61 explicit IPAddress(const in6_addr& ip6) : family_(AF_INET6) {
65 explicit IPAddress(uint32 ip_in_host_byte_order) : family_(AF_INET) {
70 IPAddress(const IPAddress& other) : family_(other.family_) {
74 virtual ~IPAddress() {}
76 const IPAddress & operator=(const IPAddress& other) {
82 bool operator==(const IPAddress& other) const;
83 bool operator!=(const IPAddress& other) const;
84 bool operator <(const IPAddress& other) const;
85 bool operator >(const IPAddress& other) const;
86 friend std::ostream& operator<<(std::ostream& os, const IPAddress& addr);
103 IPAddress Normalized() const;
107 IPAddress AsIPv6Address() const;
126 class InterfaceAddress : public IPAddress {
130 InterfaceAddress(IPAddress ip)
131 : IPAddress(ip), ipv6_flags_(IPV6_ADDRESS_FLAG_NONE) {}
133 InterfaceAddress(IPAddress addr, int ipv6_flags)
134 : IPAddress(addr), ipv6_flags_(ipv6_flags) {}
137 : IPAddress(ip6), ipv6_flags_(ipv6_flags) {}
152 bool IPFromAddrInfo(struct addrinfo* info, IPAddress* out);
153 bool IPFromString(const std::string& str, IPAddress* out);
156 bool IPIsAny(const IPAddress& ip);
157 bool IPIsLoopback(const IPAddress& ip);
158 bool IPIsPrivate(const IPAddress& ip);
159 bool IPIsUnspec(const IPAddress& ip);
160 size_t HashIP(const IPAddress& ip);
163 bool IPIs6Bone(const IPAddress& ip);
164 bool IPIs6To4(const IPAddress& ip);
165 bool IPIsSiteLocal(const IPAddress& ip);
166 bool IPIsTeredo(const IPAddress& ip);
167 bool IPIsULA(const IPAddress& ip);
168 bool IPIsV4Compatibility(const IPAddress& ip);
169 bool IPIsV4Mapped(const IPAddress& ip);
172 int IPAddressPrecedence(const IPAddress& ip);
175 IPAddress TruncateIP(const IPAddress& ip, int length);
178 // byte order, in this IPAddress. Bits after the first 0 encountered are not
180 int CountIPMaskBits(IPAddress mask);