Imported Upstream version 20070115
[aiccu.git] / common / resolver.h
blobba5e52052140cc76bb5ab0b3da8149a19a328b5c
1 /**********************************************************
2 SixXS - Automatic IPv6 Connectivity Configuration Utility
3 ***********************************************************
4 Copyright 2003-2005 SixXS - http://www.sixxs.net
5 ***********************************************************
6 common/resolver.h - Simple DNS RR lookup function
7 ***********************************************************
8 $Author: jeroen $
9 $Id: resolver.h,v 1.2 2006-07-13 19:33:39 jeroen Exp $
10 $Date: 2006-07-13 19:33:39 $
11 **********************************************************/
13 #ifndef RESOLVER_H
14 #define RESOLVER_H "H5K7:W3NDY5UU5N1K1N1C0l3"
16 #include "common.h"
18 int getrrs(const char *label, int type, void gotrec(unsigned int num, int type, const char *record));
20 #ifdef _WIN32
22 * Windows doesn't have these, there they are named DNS_TYPE_*
23 * but the identical values so we can use them here too.
24 * Looted from arpa/nameser.h which has a BSD license for UC & ISC
27 * Currently defined type values for resources and queries.
29 typedef enum __ns_type {
30 ns_t_invalid = 0, /* Cookie. */
31 ns_t_a = 1, /* Host address. */
32 ns_t_ns = 2, /* Authoritative server. */
33 ns_t_md = 3, /* Mail destination. */
34 ns_t_mf = 4, /* Mail forwarder. */
35 ns_t_cname = 5, /* Canonical name. */
36 ns_t_soa = 6, /* Start of authority zone. */
37 ns_t_mb = 7, /* Mailbox domain name. */
38 ns_t_mg = 8, /* Mail group member. */
39 ns_t_mr = 9, /* Mail rename name. */
40 ns_t_null = 10, /* Null resource record. */
41 ns_t_wks = 11, /* Well known service. */
42 ns_t_ptr = 12, /* Domain name pointer. */
43 ns_t_hinfo = 13, /* Host information. */
44 ns_t_minfo = 14, /* Mailbox information. */
45 ns_t_mx = 15, /* Mail routing information. */
46 ns_t_txt = 16, /* Text strings. */
47 ns_t_rp = 17, /* Responsible person. */
48 ns_t_afsdb = 18, /* AFS cell database. */
49 ns_t_x25 = 19, /* X_25 calling address. */
50 ns_t_isdn = 20, /* ISDN calling address. */
51 ns_t_rt = 21, /* Router. */
52 ns_t_nsap = 22, /* NSAP address. */
53 ns_t_nsap_ptr = 23, /* Reverse NSAP lookup (deprecated). */
54 ns_t_sig = 24, /* Security signature. */
55 ns_t_key = 25, /* Security key. */
56 ns_t_px = 26, /* X.400 mail mapping. */
57 ns_t_gpos = 27, /* Geographical position (withdrawn). */
58 ns_t_aaaa = 28, /* Ip6 Address. */
59 ns_t_loc = 29, /* Location Information. */
60 ns_t_nxt = 30, /* Next domain (security). */
61 ns_t_eid = 31, /* Endpoint identifier. */
62 ns_t_nimloc = 32, /* Nimrod Locator. */
63 ns_t_srv = 33, /* Server Selection. */
64 ns_t_atma = 34, /* ATM Address */
65 ns_t_naptr = 35, /* Naming Authority PoinTeR */
66 ns_t_kx = 36, /* Key Exchange */
67 ns_t_cert = 37, /* Certification record */
68 ns_t_a6 = 38, /* IPv6 address (deprecates AAAA) */
69 ns_t_dname = 39, /* Non-terminal DNAME (for IPv6) */
70 ns_t_sink = 40, /* Kitchen sink (experimentatl) */
71 ns_t_opt = 41, /* EDNS0 option (meta-RR) */
72 ns_t_tsig = 250, /* Transaction signature. */
73 ns_t_ixfr = 251, /* Incremental zone transfer. */
74 ns_t_axfr = 252, /* Transfer zone of authority. */
75 ns_t_mailb = 253, /* Transfer mailbox records. */
76 ns_t_maila = 254, /* Transfer mail agent records. */
77 ns_t_any = 255, /* Wildcard match. */
78 ns_t_zxfr = 256, /* BIND-specific, nonstandard. */
79 ns_t_max = 65536
80 } ns_type;
81 #endif
83 #endif /* RESOLVER_H */