MCPcopy Create free account
hub / github.com/ElementsProject/elements / LookupHost

Function LookupHost

src/netbase.cpp:170–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170bool LookupHost(const std::string& name, std::vector<CNetAddr>& vIP, unsigned int nMaxSolutions, bool fAllowLookup, DNSLookupFn dns_lookup_function)
171{
172 if (!ValidAsCString(name)) {
173 return false;
174 }
175 std::string strHost = name;
176 if (strHost.empty())
177 return false;
178 if (strHost.front() == '[' && strHost.back() == ']') {
179 strHost = strHost.substr(1, strHost.size() - 2);
180 }
181
182 return LookupIntern(strHost, vIP, nMaxSolutions, fAllowLookup, dns_lookup_function);
183}
184
185bool LookupHost(const std::string& name, CNetAddr& addr, bool fAllowLookup, DNSLookupFn dns_lookup_function)
186{

Callers 15

InitHTTPAllowListFunction · 0.85
HTTPBindAddressesFunction · 0.85
LookupSubNetFunction · 0.85
ProcessUpnpFunction · 0.85
ThreadDNSAddressSeedMethod · 0.85
DiscoverFunction · 0.85
IsZMQAddressIPV6Function · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
ResolveIPFunction · 0.85
MakeCorruptPeersDatFunction · 0.85
ResolveIPFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 4

ValidAsCStringFunction · 0.85
LookupInternFunction · 0.85
emptyMethod · 0.45
sizeMethod · 0.45

Tested by 6

BOOST_AUTO_TEST_CASEFunction · 0.68
ResolveIPFunction · 0.68
MakeCorruptPeersDatFunction · 0.68
ResolveIPFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
FUZZ_TARGETFunction · 0.68