Lines Matching refs:ip
40 const in_addr v4 = mData.ip.v4; in toString()
45 const in6_addr v6 = mData.ip.v6; in toString()
60 bool IPAddress::forString(const std::string& repr, IPAddress* ip) { in forString() argument
75 if (ip) *ip = IPAddress(sin->sin_addr); in forString()
80 if (ip) *ip = IPAddress(sin6->sin6_addr, sin6->sin6_scope_id); in forString()
91 IPPrefix::IPPrefix(const IPAddress& ip, int length) : IPPrefix(ip) { in IPPrefix() argument
102 mData.ip.v4.s_addr &= htonl(mask); in IPPrefix()
110 mData.ip.v6.s6_addr[which] &= mask; in IPPrefix()
112 mData.ip.v6.s6_addr[i] = 0U; in IPPrefix()
133 IPAddress ip; in forString() local
134 if (!IPAddress::forString(repr.substr(0, index), &ip)) return false; in forString()
143 uint8_t maxlen = (ip.family() == AF_INET) ? 32 : 128; in forString()
146 *prefix = IPPrefix(ip, prefixlen); in forString()
151 return StringPrintf("%s/%d", ip().toString().c_str(), mData.cidrlen); in toString()
157 return StringPrintf("[%s]:%u", ip().toString().c_str(), mData.port); in toString()
159 return StringPrintf("%s:%u", ip().toString().c_str(), mData.port); in toString()