2 * Unix SMB/CIFS implementation.
3 * Internal DNS query structures
4 * Copyright (C) Volker Lendecke 2018
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 __LIBCLI_DNS_DNS_LOOKUP_H__
21 #define __LIBCLI_DNS_DNS_LOOKUP_H__
24 #include "system/network.h"
26 #include "lib/util/data_blob.h"
27 #include "lib/util/time.h"
28 #include "librpc/gen_ndr/dns.h"
30 struct tevent_req
*dns_lookup_send(TALLOC_CTX
*mem_ctx
,
31 struct tevent_context
*ev
,
34 enum dns_qclass qclass
,
35 enum dns_qtype qtype
);
36 int dns_lookup_recv(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
,
37 struct dns_name_packet
**reply
);
38 int dns_lookup(FILE *resolv_conf_fp
,
40 enum dns_qclass qclass
,
43 struct dns_name_packet
**reply
);
45 bool dns_res_rec_get_sockaddr(const struct dns_res_rec
*rec
,
46 struct sockaddr_storage
*addr
);