summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-02 20:34:23 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-02 20:34:23 +0000
commita4b78330738ac8fdc3d4ac0f0a5791082677eb6a (patch)
tree84b68dc3e1fcdc035e66bcfbe8a488fb0d658bf8 /include
parentc0526f1dc2782a5333b6ffffa6c9f6fae6290f19 (diff)
Move more stuff into private members of class DNS
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4654 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/dns.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/include/dns.h b/include/dns.h
index 5ef3f60e5..4b5d5df37 100644
--- a/include/dns.h
+++ b/include/dns.h
@@ -57,6 +57,13 @@ enum ResolverError
class DNSRequest;
class DNSHeader;
+class ResourceRecord;
+
+/* A set of requests keyed by request id */
+typedef std::map<int,DNSRequest*> requestlist;
+
+/* An iterator into a set of requests */
+typedef requestlist::iterator requestlist_iter;
/**
* The Resolver class is a high-level abstraction for resolving DNS entries.
@@ -144,17 +151,26 @@ class Resolver : public Extensible
class DNS : public Extensible
{
private:
+
+ requestlist requests;
insp_inaddr myserver;
static int MasterSocket;
Resolver* Classes[65536];
+ int MakePayload(const char * const name, const unsigned short rr, const unsigned short rr_class, unsigned char * const payload);
+
public:
+
+ static void FillResourceRecord(ResourceRecord* rr, const unsigned char *input);
+ static void FillHeader(DNSHeader *header, const unsigned char *input, const int length);
+ static void EmptyHeader(unsigned char *output, const DNSHeader *header, const int length);
static int GetMasterSocket();
+
int GetIP(const char* name);
int GetName(const insp_inaddr* ip);
DNSResult GetResult();
void MarshallReads(int fd);
bool AddResolverClass(Resolver* r);
- DNSRequest* DNSAddQuery(DNSHeader *header, int &id);
+ DNSRequest* AddQuery(DNSHeader *header, int &id);
DNS();
~DNS();
};