summaryrefslogtreecommitdiff
path: root/include/dns.h
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-02 21:06:44 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-02 21:06:44 +0000
commit79da8ad27e1fa50319e39c82d814b5f46ee219ca (patch)
tree3337995d9f49e8d823caefdc9e37513b54d4213c /include/dns.h
parentc47d3335e75a11904a96f086db7bd113dfb15196 (diff)
Change more names and types
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4657 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/dns.h')
-rw-r--r--include/dns.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/dns.h b/include/dns.h
index 4b5d5df37..f0ad8dd7a 100644
--- a/include/dns.h
+++ b/include/dns.h
@@ -143,6 +143,13 @@ class Resolver : public Extensible
int GetId();
};
+/* Query and resource record types */
+enum QueryType
+{
+ DNS_QUERY_A = 1, /* 'A' record: an IP address */
+ DNS_QUERY_PTR = 12 /* 'PTR' record: a hostname */
+};
+
/** DNS is a singleton class used by the core to dispatch dns
* requests to the dns server, and route incoming dns replies
* back to Resolver objects, based upon the request ID. You
@@ -156,11 +163,11 @@ class DNS : public Extensible
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);
+ int MakePayload(const char* name, const QueryType rr, const unsigned short rr_class, unsigned char* payload);
public:
- static void FillResourceRecord(ResourceRecord* rr, const unsigned char *input);
+ 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();