addns: Async ads_dns_lookup_srv
[nivanova/samba-autobuild/.git] / lib / addns / dnsquery.h
1 /*
2  *  Unix SMB/CIFS implementation.
3  *  Internal DNS query structures
4  *  Copyright (C) Gerald Carter                2006.
5  *
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.
10  *
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.
15  *
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/>.
18  */
19
20 #ifndef _ADS_DNS_H
21 #define _ADS_DNS_H
22
23 #include "replace.h"
24 #include <tevent.h>
25 #include "libcli/dns/dns.h"
26
27 /* The following definitions come from libads/dns.c  */
28
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                                 int *numdcs);
40 NTSTATUS ads_dns_lookup_ns(TALLOC_CTX *ctx,
41                                 const char *dnsdomain,
42                                 struct dns_rr_ns **nslist,
43                                 int *numns);
44 NTSTATUS ads_dns_query_dcs(TALLOC_CTX *ctx,
45                            const char *realm,
46                            const char *sitename,
47                            struct dns_rr_srv **dclist,
48                            int *numdcs );
49 NTSTATUS ads_dns_query_gcs(TALLOC_CTX *ctx,
50                            const char *realm,
51                            const char *sitename,
52                            struct dns_rr_srv **dclist,
53                            int *numdcs );
54 NTSTATUS ads_dns_query_kdcs(TALLOC_CTX *ctx,
55                             const char *dns_forest_name,
56                             const char *sitename,
57                             struct dns_rr_srv **dclist,
58                             int *numdcs );
59 NTSTATUS ads_dns_query_pdc(TALLOC_CTX *ctx,
60                            const char *dns_domain_name,
61                            struct dns_rr_srv **dclist,
62                            int *numdcs );
63 NTSTATUS ads_dns_query_dcs_guid(TALLOC_CTX *ctx,
64                                 const char *dns_forest_name,
65                                 const char *domain_guid,
66                                 struct dns_rr_srv **dclist,
67                                 int *numdcs );
68 #endif  /* _ADS_DNS_H */