wb_queryuser: avoid idmap_child() and use idmap_child_handle() instead
[Samba.git] / lib / addns / dnsquery.h
blob777f1a7de6ae8720ef29d4260dafb3d2fde3c70a
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 _ADS_DNS_H
21 #define _ADS_DNS_H
23 #include "replace.h"
24 #include <tevent.h>
25 #include "libcli/dns/dns.h"
27 /* The following definitions come from libads/dns.c */
29 struct tevent_req *ads_dns_lookup_srv_send(TALLOC_CTX *mem_ctx,
30 struct tevent_context *ev,
31 const char *name);
32 NTSTATUS ads_dns_lookup_srv_recv(struct tevent_req *req,
33 TALLOC_CTX *mem_ctx,
34 struct dns_rr_srv **srvs,
35 size_t *num_srvs);
36 NTSTATUS ads_dns_lookup_srv(TALLOC_CTX *ctx,
37 const char *name,
38 struct dns_rr_srv **dclist,
39 size_t *numdcs);
40 struct tevent_req *ads_dns_lookup_ns_send(TALLOC_CTX *mem_ctx,
41 struct tevent_context *ev,
42 const char *name);
43 NTSTATUS ads_dns_lookup_ns_recv(struct tevent_req *req,
44 TALLOC_CTX *mem_ctx,
45 struct dns_rr_ns **nss,
46 size_t *num_nss);
47 NTSTATUS ads_dns_lookup_ns(TALLOC_CTX *ctx,
48 const char *dnsdomain,
49 struct dns_rr_ns **nslist,
50 size_t *numns);
51 struct tevent_req *ads_dns_lookup_a_send(TALLOC_CTX *mem_ctx,
52 struct tevent_context *ev,
53 const char *name);
54 NTSTATUS ads_dns_lookup_a_recv(struct tevent_req *req,
55 TALLOC_CTX *mem_ctx,
56 uint8_t *rcode_out,
57 size_t *num_names_out,
58 char ***hostnames_out,
59 struct samba_sockaddr **addrs_out);
60 NTSTATUS ads_dns_lookup_a(TALLOC_CTX *ctx,
61 const char *name_in,
62 size_t *num_names_out,
63 char ***hostnames_out,
64 struct samba_sockaddr **addrs_out);
65 #if defined(HAVE_IPV6)
66 struct tevent_req *ads_dns_lookup_aaaa_send(TALLOC_CTX *mem_ctx,
67 struct tevent_context *ev,
68 const char *name);
69 NTSTATUS ads_dns_lookup_aaaa_recv(struct tevent_req *req,
70 TALLOC_CTX *mem_ctx,
71 uint8_t *rcode_out,
72 size_t *num_names_out,
73 char ***hostnames_out,
74 struct samba_sockaddr **addrs_out);
75 NTSTATUS ads_dns_lookup_aaaa(TALLOC_CTX *ctx,
76 const char *name_in,
77 size_t *num_names_out,
78 char ***hostnames_out,
79 struct samba_sockaddr **addrs_out);
80 #endif
82 NTSTATUS ads_dns_query_dcs(TALLOC_CTX *ctx,
83 const char *realm,
84 const char *sitename,
85 struct dns_rr_srv **dclist,
86 size_t *numdcs );
87 NTSTATUS ads_dns_query_gcs(TALLOC_CTX *ctx,
88 const char *realm,
89 const char *sitename,
90 struct dns_rr_srv **dclist,
91 size_t *numdcs );
92 NTSTATUS ads_dns_query_kdcs(TALLOC_CTX *ctx,
93 const char *dns_forest_name,
94 const char *sitename,
95 struct dns_rr_srv **dclist,
96 size_t *numdcs );
97 NTSTATUS ads_dns_query_pdc(TALLOC_CTX *ctx,
98 const char *dns_domain_name,
99 struct dns_rr_srv **dclist,
100 size_t *numdcs );
101 NTSTATUS ads_dns_query_dcs_guid(TALLOC_CTX *ctx,
102 const char *dns_forest_name,
103 const char *domain_guid,
104 struct dns_rr_srv **dclist,
105 size_t *numdcs );
106 #endif /* _ADS_DNS_H */