wscript: s/default/required/ _static_modules for the acl modules
[Samba.git] / lib / addns / dnsquery.h
blob51f6b8ff87bf4daae0324024a055c8607a805aad
1 /*
2 * Unix SMB/CIFS implementation.
3 * Internal DNS query structures
4 * Copyright (C) Gerald Carter 2006.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
20 #ifndef __LIB_ADDNS_DNSQUERY_H__
21 #define __LIB_ADDNS_DNSQUERY_H__
23 #include "replace.h"
24 #include <tevent.h>
25 #include "libcli/dns/dns.h"
26 #include "lib/util/util_net.h"
27 #include "libcli/util/ntstatus.h"
29 /* The following definitions come from libads/dns.c */
31 struct tevent_req *ads_dns_lookup_srv_send(TALLOC_CTX *mem_ctx,
32 struct tevent_context *ev,
33 const char *name);
34 NTSTATUS ads_dns_lookup_srv_recv(struct tevent_req *req,
35 TALLOC_CTX *mem_ctx,
36 struct dns_rr_srv **srvs,
37 size_t *num_srvs);
38 NTSTATUS ads_dns_lookup_srv(TALLOC_CTX *ctx,
39 const char *name,
40 struct dns_rr_srv **dclist,
41 size_t *numdcs);
42 struct tevent_req *ads_dns_lookup_ns_send(TALLOC_CTX *mem_ctx,
43 struct tevent_context *ev,
44 const char *name);
45 NTSTATUS ads_dns_lookup_ns_recv(struct tevent_req *req,
46 TALLOC_CTX *mem_ctx,
47 struct dns_rr_ns **nss,
48 size_t *num_nss);
49 NTSTATUS ads_dns_lookup_ns(TALLOC_CTX *ctx,
50 const char *dnsdomain,
51 struct dns_rr_ns **nslist,
52 size_t *numns);
53 struct tevent_req *ads_dns_lookup_a_send(TALLOC_CTX *mem_ctx,
54 struct tevent_context *ev,
55 const char *name);
56 NTSTATUS ads_dns_lookup_a_recv(struct tevent_req *req,
57 TALLOC_CTX *mem_ctx,
58 uint8_t *rcode_out,
59 size_t *num_names_out,
60 char ***hostnames_out,
61 struct samba_sockaddr **addrs_out);
62 NTSTATUS ads_dns_lookup_a(TALLOC_CTX *ctx,
63 const char *name_in,
64 size_t *num_names_out,
65 char ***hostnames_out,
66 struct samba_sockaddr **addrs_out);
67 #if defined(HAVE_IPV6)
68 struct tevent_req *ads_dns_lookup_aaaa_send(TALLOC_CTX *mem_ctx,
69 struct tevent_context *ev,
70 const char *name);
71 NTSTATUS ads_dns_lookup_aaaa_recv(struct tevent_req *req,
72 TALLOC_CTX *mem_ctx,
73 uint8_t *rcode_out,
74 size_t *num_names_out,
75 char ***hostnames_out,
76 struct samba_sockaddr **addrs_out);
77 NTSTATUS ads_dns_lookup_aaaa(TALLOC_CTX *ctx,
78 const char *name_in,
79 size_t *num_names_out,
80 char ***hostnames_out,
81 struct samba_sockaddr **addrs_out);
82 #endif
84 #endif /* __LIB_ADDNS_DNSQUERY_H__ */