2 * InspIRCd -- Internet Relay Chat Daemon
4 * Copyright (C) 2013 Sadie Powell <sadie@witchery.services>
5 * Copyright (C) 2013 Attila Molnar <attilamolnar@hush.com>
6 * Copyright (C) 2013 Adam <Adam@anope.org>
7 * Copyright (C) 2012 Robby <robby@chatbelgie.be>
8 * Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
9 * Copyright (C) 2007, 2010 Craig Edwards <brain@inspircd.org>
10 * Copyright (C) 2007 Robin Burchell <robin+git@viroteck.net>
11 * Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
13 * This file is part of InspIRCd. InspIRCd is free software: you can
14 * redistribute it and/or modify it under the terms of the GNU General Public
15 * License as published by the Free Software Foundation, version 2.
17 * This program is distributed in the hope that it will be useful, but WITHOUT
18 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
22 * You should have received a copy of the GNU General Public License
23 * along with this program. If not, see <http://www.gnu.org/licenses/>.
30 #include "modules/dns.h"
35 /** Handle resolving of server IPs for the cache
37 class SecurityIPResolver : public DNS::Request
40 reference<Link> MyLink;
45 SecurityIPResolver(Module* me, DNS::Manager* mgr, const std::string& hostname, Link* x, DNS::QueryType qt);
46 void OnLookupComplete(const DNS::Query *r) CXX11_OVERRIDE;
47 void OnError(const DNS::Query *q) CXX11_OVERRIDE;
50 /** This class is used to resolve server hostnames during /connect and autoconnect.
51 * As of 1.1, the resolver system is separated out from BufferedSocket, so we must do this
52 * resolver step first ourselves if we need it. This is totally nonblocking, and will
53 * callback to OnLookupComplete or OnError when completed. Once it has completed we
54 * will have an IP address which we can then use to continue our connection.
56 class ServernameResolver : public DNS::Request
61 reference<Link> MyLink;
62 reference<Autoconnect> myautoconnect;
64 ServernameResolver(DNS::Manager* mgr, const std::string& hostname, Link* x, DNS::QueryType qt, Autoconnect* myac);
65 void OnLookupComplete(const DNS::Query *r) CXX11_OVERRIDE;
66 void OnError(const DNS::Query *q) CXX11_OVERRIDE;