From 73fda5d362f0dd7b9550badf364330b2fd4810db Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 3 Aug 2006 16:27:16 +0000 Subject: *.ip6.int PTR lookups. FUGLY AS FUCK. someone please help me tidy (backported from firedns) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4676 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/dns.h | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/dns.h b/include/dns.h index 7b96f792d..db058be9b 100644 --- a/include/dns.h +++ b/include/dns.h @@ -147,14 +147,21 @@ class Resolver : public Extensible * the object to go 'out of scope' and cause a segfault in the core if the result * arrives at a later time. * @param source The IP or hostname to resolve - * @param forward Set to true to perform a forward lookup (hostname to ip) or false - * to perform a reverse lookup (ip to hostname). Lookups on A records and PTR - * records are supported. CNAME and MX are not supported by this resolver. - * If InspIRCd is compiled with ipv6 support, lookups on AAAA records are preferred - * and supported over A records. + * @param qt The query type to perform. If you just want to perform a forward + * or reverse lookup, and you don't care wether you get ipv4 or ipv6, then use + * the constants DNS_QUERY_FORWARD and DNS_QUERY_REVERSE, which automatically + * select from 'A' record or 'AAAA' record lookups. However, if you want to resolve + * a specific record type, resolution of 'A', 'AAAA', 'PTR' and 'CNAME' records + * is supported. Use one of the QueryType enum values to initiate this type of + * lookup. Resolution of 'AAAA' ipv6 records is always supported, regardless of + * wether InspIRCd is built with ipv6 support. + * If you attempt to resolve a 'PTR' record and InspIRCd is built with ipv6 support, + * the 'PTR' record will be formatted to ipv6 specs, e.g. x.x.x.x.x....ip6.int. + * otherwise it will be formatted to ipv4 specs, e.g. x.x.x.x.in-addr.arpa. * @throw ModuleException This class may throw an instance of ModuleException, in the * event a lookup could not be allocated, or a similar hard error occurs such as - * the network being down. + * 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); /** -- cgit v1.2.3