• Home
  • Raw
  • Download

Lines Matching refs:IPAddress

114 class IPAddress {
116 static bool forString(const std::string& repr, IPAddress* ip);
117 static IPAddress forString(const std::string& repr) { in forString()
118 IPAddress ip; in forString()
119 if (!forString(repr, &ip)) return IPAddress(); in forString()
123 IPAddress() = default;
124 IPAddress(const IPAddress&) = default;
125 IPAddress(IPAddress&&) = default;
127 explicit IPAddress(const in_addr& ipv4) in IPAddress() function
129 explicit IPAddress(const in6_addr& ipv6) in IPAddress() function
131 IPAddress(const in6_addr& ipv6, uint32_t scope_id) in IPAddress() function
138 IPAddress(const IPAddress& ip, uint32_t scope_id) : IPAddress(ip) { in IPAddress() function
142 IPAddress& operator=(const IPAddress&) = default;
143 IPAddress& operator=(IPAddress&&) = default;
150 friend std::ostream& operator<<(std::ostream& os, const IPAddress& ip) {
154 friend bool operator==(const IPAddress& a, const IPAddress& b) { return (a.mData == b.mData); }
155 friend bool operator!=(const IPAddress& a, const IPAddress& b) { return (a.mData != b.mData); }
156 friend bool operator<(const IPAddress& a, const IPAddress& b) { return (a.mData < b.mData); }
157 friend bool operator>(const IPAddress& a, const IPAddress& b) { return (b.mData < a.mData); }
158 friend bool operator<=(const IPAddress& a, const IPAddress& b) { return (a < b) || (a == b); }
159 friend bool operator>=(const IPAddress& a, const IPAddress& b) { return (b < a) || (a == b); }
165 explicit IPAddress(const internal_::compact_ipdata& ipdata) : mData(ipdata) { in IPAddress() function
194 explicit IPPrefix(const IPAddress& ip) : mData(ip.mData) {} in IPPrefix()
199 IPPrefix(const IPAddress& ip, int length);
205 IPAddress ip() const noexcept { return IPAddress(mData); } in ip()
239 explicit IPSockAddr(const IPAddress& ip) : mData(ip.mData) {} in IPSockAddr()
240 IPSockAddr(const IPAddress& ip, in_port_t port) : mData(ip.mData) { mData.port = port; } in IPSockAddr()
242 : IPSockAddr(IPAddress(ipv4sa.sin_addr), ntohs(ipv4sa.sin_port)) {} in IPSockAddr()
244 : IPSockAddr(IPAddress(ipv6sa.sin6_addr, ipv6sa.sin6_scope_id), ntohs(ipv6sa.sin6_port)) {} in IPSockAddr()
250 IPAddress ip() const noexcept { return IPAddress(mData); } in ip()