| 171 | } |
| 172 | |
| 173 | std::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 | |
| 185 | std::optional<CNetAddr> LookupHost(const std::string& name, bool fAllowLookup, DNSLookupFn dns_lookup_function) |
| 186 | { |