tdb: Harden tdb_rec_read
[Samba.git] / libcli / dns / libdns.h
blob15ca257c0b38bf09d8bb4298ebce020101ba295a
1 /*
2 Unix SMB/CIFS implementation.
4 Small async DNS library for Samba with socketwrapper support
6 Copyright (C) 2012 Kai Blin <kai@samba.org>
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef __LIBDNS_H__
23 #define __LIBDNS_H__
25 #include "lib/util/data_blob.h"
26 #include "lib/util/time.h"
27 #include "librpc/gen_ndr/dns.h"
30 * DNS request with fallback to TCP on truncation
33 struct tevent_req *dns_cli_request_send(TALLOC_CTX *mem_ctx,
34 struct tevent_context *ev,
35 const char *nameserver,
36 const char *name,
37 enum dns_qclass qclass,
38 enum dns_qtype qtype);
39 int dns_cli_request_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
40 struct dns_name_packet **reply);
43 #endif /*__LIBDNS_H__*/