MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / LookupHost

Function LookupHost

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

Source from the content-addressed store, hash-verified

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

Callers 15

InitHTTPAllowListFunction · 0.85
LookupSubNetFunction · 0.85
ThreadDNSAddressSeedMethod · 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
banman.cppFile · 0.85
FUZZ_TARGETFunction · 0.85

Calls 6

ContainsNoNULFunction · 0.85
LookupInternFunction · 0.85
emptyMethod · 0.45
frontMethod · 0.45
backMethod · 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