Lines Matching refs:ip
38 const in_addr v4 = mData.ip.v4; in toString()
43 const in6_addr v6 = mData.ip.v6; in toString()
58 bool IPAddress::forString(const std::string& repr, IPAddress* ip) { in forString() argument
74 if (ip) *ip = IPAddress(sin->sin_addr); in forString()
79 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()
129 return StringPrintf("%s/%d", ip().toString().c_str(), mData.cidrlen); in toString()
135 return StringPrintf("[%s]:%u", ip().toString().c_str(), mData.port); in toString()
137 return StringPrintf("%s:%u", ip().toString().c_str(), mData.port); in toString()