Home
last modified time | relevance | path

Searched refs:forString (Results 1 – 4 of 4) sorted by relevance

/system/netd/libnetdutils/
DInternetAddressesTest.cpp152 TEST(IPAddressTest, forString) { in TEST() argument
155 EXPECT_FALSE(IPAddress::forString("not_an_ip", &ip)); in TEST()
156 EXPECT_FALSE(IPAddress::forString("not_an_ip", nullptr)); in TEST()
157 EXPECT_EQ(IPAddress(), IPAddress::forString("not_an_ip")); in TEST()
159 EXPECT_EQ(IPAddress(IPV4_ANY), IPAddress::forString("0.0.0.0")); in TEST()
160 EXPECT_EQ(IPAddress(IPV4_ONES), IPAddress::forString("255.255.255.255")); in TEST()
161 EXPECT_EQ(IPAddress(IPV4_LOOPBACK), IPAddress::forString("127.0.0.1")); in TEST()
163 EXPECT_EQ(IPAddress(IPV6_ANY), IPAddress::forString("::")); in TEST()
164 EXPECT_EQ(IPAddress(IPV6_ANY), IPAddress::forString("::0")); in TEST()
165 EXPECT_EQ(IPAddress(IPV6_ANY), IPAddress::forString("0::")); in TEST()
[all …]
DInternetAddresses.cpp60 bool IPAddress::forString(const std::string& repr, IPAddress* ip) { in forString() function in android::netdutils::IPAddress
128 bool IPPrefix::forString(const std::string& repr, IPPrefix* prefix) { in forString() function in android::netdutils::IPPrefix
134 if (!IPAddress::forString(repr.substr(0, index), &ip)) return false; in forString()
/system/netd/libnetdutils/include/netdutils/
DInternetAddresses.h126 static bool forString(const std::string& repr, IPAddress* ip);
127 static IPAddress forString(const std::string& repr) { in forString() function
129 if (!forString(repr, &ip)) return IPAddress(); in forString()
198 static bool forString(const std::string& repr, IPPrefix* prefix);
199 static IPPrefix forString(const std::string& repr) { in forString() function
201 if (!forString(repr, &prefix)) return IPPrefix(); in forString()
251 return IPSockAddr(IPAddress::forString(repr), port); in toIPSockAddr()
/system/netd/tests/
Dbinder_test.cpp2209 ASSERT_TRUE(IPAddress::forString("192.0.2.1", &addr1)); in TEST_F()
2210 ASSERT_TRUE(IPAddress::forString("192.0.2.2", &addr2)); in TEST_F()