From 79da8ad27e1fa50319e39c82d814b5f46ee219ca Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 2 Aug 2006 21:06:44 +0000 Subject: Change more names and types git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4657 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/dns.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'include/dns.h') 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(); -- cgit v1.2.3