]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
added resolver.h
authorMiek Gieben <miekg@NLnetLabs.nl>
Tue, 11 Jan 2005 10:37:18 +0000 (10:37 +0000)
committerMiek Gieben <miekg@NLnetLabs.nl>
Tue, 11 Jan 2005 10:37:18 +0000 (10:37 +0000)
Started imp. of the Net::DNS::Resolver object
query funtions (to be written) should operate on this
structure and return a ldns_pkt

Makefile.in
ldns/resolver.h [new file with mode: 0644]

index 99c33135c1cfcae067f5329fd5bc398f48ad5248..6adceeeb90429c0f296432355b346fc09df3b822 100644 (file)
@@ -31,6 +31,7 @@ LIBDNS_HEADERS        =       ldns/error.h            \
                        ldns/host2str.h         \
                        ldns/str2host.h         \
                        ldns/buffer.h           \
+                       ldns/resolver.h         \
                        util.h
 LIBDNS_OBJECTS =       $(LIBDNS_SOURCES:.c=.o)
 
diff --git a/ldns/resolver.h b/ldns/resolver.h
new file mode 100644 (file)
index 0000000..103cc8a
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * resolver.h
+ *
+ * DNS Resolver definitions
+ *
+ * a Net::DNS like library for C
+ *
+ * (c) NLnet Labs, 2004
+ *
+ * See the file LICENSE for the license
+ */
+
+#ifndef _LDNS_RESOLVER_H
+#define _LDNS_RESOLVER_H
+
+#include <ldns/error.h>
+#include <ldns/common.h>
+#include <ldns/rr.h>
+#include <ldns/packet.h>
+
+/**
+ * \brief Structure of a dns resolver
+ *
+ * 
+ */
+struct ldns_struct_resolver
+{
+       /** \brief On which port to run */
+       uint16_t _port;
+
+       /** \brief List of nameservers to query */
+       ldns_rr_list _nameservers; 
+
+       /** \brief Wether or not to be recursive */
+       uint8_t _recursive;
+
+       /** \brief Print debug information */
+       uint8_t _debug;
+       
+       /* XXX both types below could be done better */
+       /** \brief Default domain to add */
+       ldns_rdf_type _domain; /* LDNS_RDF_TYPE_DNAME */
+
+       /** \brief Searchlist */
+       ldns_rdf_type _searchlist[3]; /* LDNS_RFD_TYPE_DNAME */
+
+       /** \brief How many retries */
+       uint8_t _retry;
+};
+       
+typedef struct ldns_struct_resolver ldns_resolver;
+
+#endif  /* !_LDNS_RESOLVER_H */