mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
libsmb: Give namequery.c its own header
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
6c1e75f6b9
commit
39bdd175e9
@ -713,96 +713,6 @@ bool namecache_status_fetch(const char *keyname,
|
||||
const struct sockaddr_storage *keyip,
|
||||
char *srvname_out);
|
||||
|
||||
/* The following definitions come from libsmb/namequery.c */
|
||||
|
||||
bool saf_store( const char *domain, const char *servername );
|
||||
bool saf_join_store( const char *domain, const char *servername );
|
||||
bool saf_delete( const char *domain );
|
||||
char *saf_fetch(TALLOC_CTX *mem_ctx, const char *domain );
|
||||
struct tevent_req *node_status_query_send(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
struct nmb_name *name,
|
||||
const struct sockaddr_storage *addr);
|
||||
NTSTATUS node_status_query_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
|
||||
struct node_status **pnode_status,
|
||||
int *pnum_names,
|
||||
struct node_status_extra *extra);
|
||||
NTSTATUS node_status_query(TALLOC_CTX *mem_ctx, struct nmb_name *name,
|
||||
const struct sockaddr_storage *addr,
|
||||
struct node_status **pnode_status,
|
||||
int *pnum_names,
|
||||
struct node_status_extra *extra);
|
||||
bool name_status_find(const char *q_name,
|
||||
int q_type,
|
||||
int type,
|
||||
const struct sockaddr_storage *to_ss,
|
||||
fstring name);
|
||||
int remove_duplicate_addrs2(struct ip_service *iplist, int count );
|
||||
struct tevent_req *name_query_send(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
const char *name, int name_type,
|
||||
bool bcast, bool recurse,
|
||||
const struct sockaddr_storage *addr);
|
||||
NTSTATUS name_query_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
|
||||
struct sockaddr_storage **addrs, int *num_addrs,
|
||||
uint8_t *flags);
|
||||
NTSTATUS name_query(const char *name, int name_type,
|
||||
bool bcast, bool recurse,
|
||||
const struct sockaddr_storage *to_ss,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct sockaddr_storage **addrs,
|
||||
int *num_addrs, uint8_t *flags);
|
||||
struct tevent_req *name_resolve_bcast_send(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
const char *name,
|
||||
int name_type);
|
||||
NTSTATUS name_resolve_bcast_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
|
||||
struct sockaddr_storage **addrs,
|
||||
int *num_addrs);
|
||||
NTSTATUS name_resolve_bcast(const char *name,
|
||||
int name_type,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct sockaddr_storage **return_iplist,
|
||||
int *return_count);
|
||||
struct tevent_req *resolve_wins_send(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
const char *name,
|
||||
int name_type);
|
||||
NTSTATUS resolve_wins_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
|
||||
struct sockaddr_storage **addrs,
|
||||
int *num_addrs, uint8_t *flags);
|
||||
NTSTATUS resolve_wins(const char *name,
|
||||
int name_type,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct sockaddr_storage **return_iplist,
|
||||
int *return_count);
|
||||
NTSTATUS internal_resolve_name(const char *name,
|
||||
int name_type,
|
||||
const char *sitename,
|
||||
struct ip_service **return_iplist,
|
||||
int *return_count,
|
||||
const char **resolve_order);
|
||||
bool resolve_name(const char *name,
|
||||
struct sockaddr_storage *return_ss,
|
||||
int name_type,
|
||||
bool prefer_ipv4);
|
||||
NTSTATUS resolve_name_list(TALLOC_CTX *ctx,
|
||||
const char *name,
|
||||
int name_type,
|
||||
struct sockaddr_storage **return_ss_arr,
|
||||
unsigned int *p_num_entries);
|
||||
bool find_master_ip(const char *group, struct sockaddr_storage *master_ss);
|
||||
bool get_pdc_ip(const char *domain, struct sockaddr_storage *pss);
|
||||
NTSTATUS get_sorted_dc_list( const char *domain,
|
||||
const char *sitename,
|
||||
struct ip_service **ip_list,
|
||||
int *count,
|
||||
bool ads_only );
|
||||
NTSTATUS get_kdc_list( const char *realm,
|
||||
const char *sitename,
|
||||
struct ip_service **ip_list,
|
||||
int *count);
|
||||
|
||||
/* The following definitions come from libsmb/namequery_dc.c */
|
||||
|
||||
bool get_dc_name(const char *domain,
|
||||
|
@ -22,6 +22,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "libsmb/namequery.h"
|
||||
#include "system/filesys.h"
|
||||
#include "smb_krb5.h"
|
||||
#include "../librpc/gen_ndr/ndr_misc.h"
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "../libcli/security/security.h"
|
||||
#include "../librpc/gen_ndr/netlogon.h"
|
||||
#include "lib/param/loadparm.h"
|
||||
#include "libsmb/namequery.h"
|
||||
|
||||
#ifdef HAVE_LDAP
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "ads.h"
|
||||
#include "libsmb/namequery.h"
|
||||
#include "librpc/gen_ndr/ndr_libnet_join.h"
|
||||
#include "libnet/libnet_join.h"
|
||||
#include "libcli/auth/libcli_auth.h"
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "libsmb/libsmb.h"
|
||||
#include "libsmb/namequery.h"
|
||||
#include "auth_info.h"
|
||||
#include "../libcli/auth/libcli_auth.h"
|
||||
#include "../libcli/auth/spnego.h"
|
||||
|
@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "libsmb/namequery.h"
|
||||
#include "libads/sitename_cache.h"
|
||||
#include "../librpc/gen_ndr/ndr_netlogon.h"
|
||||
#include "libads/cldap.h"
|
||||
|
@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "libsmb/namequery.h"
|
||||
#include "libsmb/libsmb.h"
|
||||
#include "auth_info.h"
|
||||
#include "libsmbclient.h"
|
||||
|
@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "libsmb/namequery.h"
|
||||
#include "../lib/util/tevent_ntstatus.h"
|
||||
#include "libads/sitename_cache.h"
|
||||
#include "../lib/addns/dnsquery.h"
|
||||
|
115
source3/libsmb/namequery.h
Normal file
115
source3/libsmb/namequery.h
Normal file
@ -0,0 +1,115 @@
|
||||
/*
|
||||
* Unix SMB/CIFS implementation.
|
||||
* Copyright (C) Volker Lendecke 2018
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (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
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LIBSMB_NAMEQUERY_H__
|
||||
#define __LIBSMB_NAMEQUERY_H__
|
||||
|
||||
#include "includes.h"
|
||||
#include <tevent.h>
|
||||
|
||||
/* The following definitions come from libsmb/namequery.c */
|
||||
|
||||
bool saf_store( const char *domain, const char *servername );
|
||||
bool saf_join_store( const char *domain, const char *servername );
|
||||
bool saf_delete( const char *domain );
|
||||
char *saf_fetch(TALLOC_CTX *mem_ctx, const char *domain );
|
||||
struct tevent_req *node_status_query_send(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
struct nmb_name *name,
|
||||
const struct sockaddr_storage *addr);
|
||||
NTSTATUS node_status_query_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
|
||||
struct node_status **pnode_status,
|
||||
int *pnum_names,
|
||||
struct node_status_extra *extra);
|
||||
NTSTATUS node_status_query(TALLOC_CTX *mem_ctx, struct nmb_name *name,
|
||||
const struct sockaddr_storage *addr,
|
||||
struct node_status **pnode_status,
|
||||
int *pnum_names,
|
||||
struct node_status_extra *extra);
|
||||
bool name_status_find(const char *q_name,
|
||||
int q_type,
|
||||
int type,
|
||||
const struct sockaddr_storage *to_ss,
|
||||
fstring name);
|
||||
int remove_duplicate_addrs2(struct ip_service *iplist, int count );
|
||||
struct tevent_req *name_query_send(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
const char *name, int name_type,
|
||||
bool bcast, bool recurse,
|
||||
const struct sockaddr_storage *addr);
|
||||
NTSTATUS name_query_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
|
||||
struct sockaddr_storage **addrs, int *num_addrs,
|
||||
uint8_t *flags);
|
||||
NTSTATUS name_query(const char *name, int name_type,
|
||||
bool bcast, bool recurse,
|
||||
const struct sockaddr_storage *to_ss,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct sockaddr_storage **addrs,
|
||||
int *num_addrs, uint8_t *flags);
|
||||
struct tevent_req *name_resolve_bcast_send(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
const char *name,
|
||||
int name_type);
|
||||
NTSTATUS name_resolve_bcast_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
|
||||
struct sockaddr_storage **addrs,
|
||||
int *num_addrs);
|
||||
NTSTATUS name_resolve_bcast(const char *name,
|
||||
int name_type,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct sockaddr_storage **return_iplist,
|
||||
int *return_count);
|
||||
struct tevent_req *resolve_wins_send(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
const char *name,
|
||||
int name_type);
|
||||
NTSTATUS resolve_wins_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
|
||||
struct sockaddr_storage **addrs,
|
||||
int *num_addrs, uint8_t *flags);
|
||||
NTSTATUS resolve_wins(const char *name,
|
||||
int name_type,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct sockaddr_storage **return_iplist,
|
||||
int *return_count);
|
||||
NTSTATUS internal_resolve_name(const char *name,
|
||||
int name_type,
|
||||
const char *sitename,
|
||||
struct ip_service **return_iplist,
|
||||
int *return_count,
|
||||
const char **resolve_order);
|
||||
bool resolve_name(const char *name,
|
||||
struct sockaddr_storage *return_ss,
|
||||
int name_type,
|
||||
bool prefer_ipv4);
|
||||
NTSTATUS resolve_name_list(TALLOC_CTX *ctx,
|
||||
const char *name,
|
||||
int name_type,
|
||||
struct sockaddr_storage **return_ss_arr,
|
||||
unsigned int *p_num_entries);
|
||||
bool find_master_ip(const char *group, struct sockaddr_storage *master_ss);
|
||||
bool get_pdc_ip(const char *domain, struct sockaddr_storage *pss);
|
||||
NTSTATUS get_sorted_dc_list( const char *domain,
|
||||
const char *sitename,
|
||||
struct ip_service **ip_list,
|
||||
int *count,
|
||||
bool ads_only );
|
||||
NTSTATUS get_kdc_list( const char *realm,
|
||||
const char *sitename,
|
||||
struct ip_service **ip_list,
|
||||
int *count);
|
||||
|
||||
#endif
|
@ -23,6 +23,7 @@
|
||||
|
||||
|
||||
#include "includes.h"
|
||||
#include "libsmb/namequery.h"
|
||||
#include "libads/sitename_cache.h"
|
||||
#include "ads.h"
|
||||
#include "../librpc/gen_ndr/nbt.h"
|
||||
|
@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "libsmb/namequery.h"
|
||||
#include "../lib/util/tevent_ntstatus.h"
|
||||
#include "librpc/gen_ndr/ndr_epmapper_c.h"
|
||||
#include "../librpc/gen_ndr/ndr_dssetup.h"
|
||||
|
@ -28,6 +28,7 @@
|
||||
up, all the errors returned are DOS errors, not NT status codes. */
|
||||
|
||||
#include "includes.h"
|
||||
#include "libsmb/namequery.h"
|
||||
#include "ntdomain.h"
|
||||
#include "nt_printing.h"
|
||||
#include "srv_spoolss_util.h"
|
||||
|
@ -25,6 +25,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "libsmb/namequery.h"
|
||||
#include "system/filesys.h"
|
||||
#include "printing.h"
|
||||
#include "smbd/smbd.h"
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "system/shmem.h"
|
||||
#include "libsmb/namequery.h"
|
||||
#include "wbc_async.h"
|
||||
#include "torture/proto.h"
|
||||
#include "libcli/security/security.h"
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "utils/net.h"
|
||||
#include "libsmb/namequery.h"
|
||||
#include "rpc_client/cli_pipe.h"
|
||||
#include "librpc/gen_ndr/ndr_krb5pac.h"
|
||||
#include "../librpc/gen_ndr/ndr_spoolss.h"
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "utils/net.h"
|
||||
#include "libsmb/namequery.h"
|
||||
#include "libads/sitename_cache.h"
|
||||
#include "../lib/addns/dnsquery.h"
|
||||
#include "../librpc/gen_ndr/ndr_netlogon.h"
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "utils/net.h"
|
||||
#include "libsmb/namequery.h"
|
||||
#include "rpc_client/cli_pipe.h"
|
||||
#include "../libcli/auth/libcli_auth.h"
|
||||
#include "../librpc/gen_ndr/ndr_samr_c.h"
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "includes.h"
|
||||
#include "utils/net.h"
|
||||
#include "libsmb/nmblib.h"
|
||||
#include "libsmb/namequery.h"
|
||||
#include "libsmb/libsmb.h"
|
||||
#include "../libcli/smb/smbXcli_base.h"
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "utils/net.h"
|
||||
#include "libsmb/namequery.h"
|
||||
#include "rpc_client/cli_pipe.h"
|
||||
#include "../librpc/gen_ndr/ndr_lsa_c.h"
|
||||
#include "rpc_client/cli_lsarpc.h"
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "includes.h"
|
||||
#include "popt_common.h"
|
||||
#include "libsmb/nmblib.h"
|
||||
#include "libsmb/namequery.h"
|
||||
|
||||
static bool give_flags = false;
|
||||
static bool use_bcast = true;
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "includes.h"
|
||||
#include "system/filesys.h"
|
||||
#include "system/select.h"
|
||||
#include "libsmb/namequery.h"
|
||||
#include "../lib/util/select.h"
|
||||
#include "libsmb/nmblib.h"
|
||||
#include "lib/util/sys_rw_data.h"
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "rpc_client/cli_pipe.h"
|
||||
#include "../librpc/gen_ndr/ndr_srvsvc_c.h"
|
||||
#include "libsmb/libsmb.h"
|
||||
#include "libsmb/namequery.h"
|
||||
#include "libsmb/clirap.h"
|
||||
|
||||
static int use_bcast;
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "winbindd.h"
|
||||
#include "libsmb/namequery.h"
|
||||
#include "idmap.h"
|
||||
#include "tldap_gensec_bind.h"
|
||||
#include "tldap_util.h"
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "includes.h"
|
||||
#include "winbindd.h"
|
||||
#include "winbindd_ads.h"
|
||||
#include "libsmb/namequery.h"
|
||||
#include "rpc_client/rpc_client.h"
|
||||
#include "../librpc/gen_ndr/ndr_netlogon_c.h"
|
||||
#include "../libds/common/flags.h"
|
||||
|
@ -60,6 +60,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "winbindd.h"
|
||||
#include "libsmb/namequery.h"
|
||||
#include "../libcli/auth/libcli_auth.h"
|
||||
#include "../librpc/gen_ndr/ndr_netlogon_c.h"
|
||||
#include "rpc_client/cli_pipe.h"
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "winbindd.h"
|
||||
#include "libsmb/namequery.h"
|
||||
#include "../libcli/auth/libcli_auth.h"
|
||||
#include "../librpc/gen_ndr/ndr_samr_c.h"
|
||||
#include "rpc_client/cli_pipe.h"
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "winbindd.h"
|
||||
#include "libsmb/namequery.h"
|
||||
#include "librpc/gen_ndr/ndr_winbind_c.h"
|
||||
#include "libsmb/nmblib.h"
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "winbindd.h"
|
||||
#include "libsmb/namequery.h"
|
||||
#include "librpc/gen_ndr/ndr_winbind_c.h"
|
||||
#include "libsmb/nmblib.h"
|
||||
#include "lib/util/string_wrappers.h"
|
||||
|
Loading…
Reference in New Issue
Block a user