#include "socket.h"
#include "base.h"
+using namespace std;
+using irc::sockets::insp_aton;
+using irc::sockets::insp_ntoa;
+using irc::sockets::insp_sockaddr;
+using irc::sockets::insp_inaddr;
+
+class InspIRCd;
+
/**
* Result status, used internally
*/
class Resolver : public Extensible
{
protected:
+ /**
+ * Pointer to creator
+ */
+ InspIRCd* ServerInstance;
/**
* The input data, either a host or an IP address
*/
* the network being down. This will also be thrown if an invalid IP address is
* passed when resolving a 'PTR' record.
*/
- Resolver(const std::string &source, QueryType qt);
+ Resolver(InspIRCd* Instance, const std::string &source, QueryType qt);
/**
* The default destructor does nothing.
*/
{
private:
+ InspIRCd* ServerInstance;
+
/**
* The maximum value of a dns request id,
* 16 bits wide, 0xFFFF.
*/
Resolver* Classes[MAX_REQUEST_ID];
+ /**
+ * We have to turn off a few checks on received packets
+ * when people are using 4in6 (e.g. ::ffff:xxxx). This is
+ * a temporary kludge, Please let me know if you know how
+ * to fix it.
+ */
+ bool ip6munge;
+
/**
* Build a dns packet payload
*/
* The constructor initialises the dns socket,
* and clears the request lists.
*/
- DNS();
+ DNS(InspIRCd* Instance);
/**
* Destructor