librpc: Shorten dcerpc_binding_handle_call a bit
[Samba/bjacke.git] / source4 / libcli / resolve / resolve.h
blob8ace5740a95ea805fe7ff094d3a2abe5f2e0d29f
1 /*
2 Unix SMB/CIFS implementation.
4 general name resolution interface
6 Copyright (C) Andrew Tridgell 2005
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 __LIBCLI_RESOLVE_H__
23 #define __LIBCLI_RESOLVE_H__
25 struct socket_address;
26 struct tevent_context;
28 #include "../libcli/nbt/libnbt.h"
30 /* force that only NBT name resolution is used */
31 #define RESOLVE_NAME_FLAG_FORCE_NBT 0x00000001
32 /* force that only DNS name resolution is used */
33 #define RESOLVE_NAME_FLAG_FORCE_DNS 0x00000002
34 /* tell the dns resolver to do a DNS SRV lookup */
35 #define RESOLVE_NAME_FLAG_DNS_SRV 0x00000004
36 /* allow the resolver to overwrite the given port, e.g. for DNS SRV */
37 #define RESOLVE_NAME_FLAG_OVERWRITE_PORT 0x00000008
39 typedef struct composite_context *(*resolve_name_send_fn)(TALLOC_CTX *mem_ctx,
40 struct tevent_context *,
41 void *privdata,
42 uint32_t flags,
43 uint16_t port,
44 struct nbt_name *);
45 typedef NTSTATUS (*resolve_name_recv_fn)(struct composite_context *creq,
46 TALLOC_CTX *mem_ctx,
47 struct socket_address ***addrs,
48 char ***names);
49 #include "libcli/resolve/proto.h"
50 struct interface;
51 #include "libcli/resolve/lp_proto.h"
53 #endif /* __LIBCLI_RESOLVE_H__ */