2006-03-18 15:42:57 +00:00
/*
Unix SMB / CIFS implementation .
general name resolution interface
Copyright ( C ) Andrew Tridgell 2005
This program is free software ; you can redistribute it and / or modify
it under the terms of the GNU General Public License as published by
2007-07-10 02:07:03 +00:00
the Free Software Foundation ; either version 3 of the License , or
2006-03-18 15:42:57 +00:00
( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU General Public License for more details .
You should have received a copy of the GNU General Public License
2007-07-10 02:07:03 +00:00
along with this program . If not , see < http : //www.gnu.org/licenses/>.
2006-03-18 15:42:57 +00:00
*/
2008-12-13 11:24:10 +01:00
# ifndef __LIBCLI_RESOLVE_H__
# define __LIBCLI_RESOLVE_H__
2006-03-18 15:42:57 +00:00
2008-12-11 15:43:47 +01:00
struct socket_address ;
2008-12-29 20:24:57 +01:00
struct tevent_context ;
2008-12-11 15:43:47 +01:00
2008-09-23 08:06:33 +02:00
# include "../libcli/nbt/libnbt.h"
2008-12-17 16:55:44 +01:00
/* force that only NBT name resolution is used */
# define RESOLVE_NAME_FLAG_FORCE_NBT 0x00000001
/* force that only DNS name resolution is used */
# define RESOLVE_NAME_FLAG_FORCE_DNS 0x00000002
/* tell the dns resolver to do a DNS SRV lookup */
# define RESOLVE_NAME_FLAG_DNS_SRV 0x00000004
/* allow the resolver to overwrite the given port, e.g. for DNS SRV */
# define RESOLVE_NAME_FLAG_OVERWRITE_PORT 0x00000008
2008-12-11 15:43:47 +01:00
typedef struct composite_context * ( * resolve_name_send_fn ) ( TALLOC_CTX * mem_ctx ,
2008-12-29 20:24:57 +01:00
struct tevent_context * ,
2008-12-11 15:43:47 +01:00
void * privdata ,
2008-12-13 11:03:52 +01:00
uint32_t flags ,
2008-12-17 17:25:40 +01:00
uint16_t port ,
2008-12-11 15:43:47 +01:00
struct nbt_name * ) ;
typedef NTSTATUS ( * resolve_name_recv_fn ) ( struct composite_context * creq ,
TALLOC_CTX * mem_ctx ,
2008-12-13 20:50:36 +01:00
struct socket_address * * * addrs ,
char * * * names ) ;
2006-03-18 15:42:57 +00:00
# include "libcli/resolve/proto.h"
2007-12-11 22:23:14 +01:00
struct interface ;
2007-12-11 13:38:54 +01:00
# include "libcli/resolve/lp_proto.h"
2006-03-18 15:42:57 +00:00
2008-12-13 11:24:10 +01:00
# endif /* __LIBCLI_RESOLVE_H__ */