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__
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
,
34 NTSTATUS
ads_dns_lookup_srv_recv(struct tevent_req
*req
,
36 struct dns_rr_srv
**srvs
,
38 NTSTATUS
ads_dns_lookup_srv(TALLOC_CTX
*ctx
,
40 struct dns_rr_srv
**dclist
,
42 struct tevent_req
*ads_dns_lookup_ns_send(TALLOC_CTX
*mem_ctx
,
43 struct tevent_context
*ev
,
45 NTSTATUS
ads_dns_lookup_ns_recv(struct tevent_req
*req
,
47 struct dns_rr_ns
**nss
,
49 NTSTATUS
ads_dns_lookup_ns(TALLOC_CTX
*ctx
,
50 const char *dnsdomain
,
51 struct dns_rr_ns
**nslist
,
53 struct tevent_req
*ads_dns_lookup_a_send(TALLOC_CTX
*mem_ctx
,
54 struct tevent_context
*ev
,
56 NTSTATUS
ads_dns_lookup_a_recv(struct tevent_req
*req
,
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
,
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
,
71 NTSTATUS
ads_dns_lookup_aaaa_recv(struct tevent_req
*req
,
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
,
79 size_t *num_names_out
,
80 char ***hostnames_out
,
81 struct samba_sockaddr
**addrs_out
);
84 #endif /* __LIB_ADDNS_DNSQUERY_H__ */