mirror of
https://github.com/samba-team/samba.git
synced 2025-08-26 01:49:31 +03:00
s3-libsmb: put namequery headers to nmblib.h
We might find a better name for it and merge other namequery related things as well here... Guenther
This commit is contained in:
@ -34,6 +34,7 @@
|
||||
#include "system/select.h"
|
||||
#include "libsmb/clirap.h"
|
||||
#include "trans2.h"
|
||||
#include "libsmb/nmblib.h"
|
||||
|
||||
#ifndef REGISTER
|
||||
#define REGISTER 0
|
||||
|
@ -539,7 +539,6 @@ typedef char fstring[FSTRING_LEN];
|
||||
#include "locking.h"
|
||||
#include "smb_perfcount.h"
|
||||
#include "smb.h"
|
||||
#include "nameserv.h"
|
||||
#include "../lib/util/byteorder.h"
|
||||
|
||||
#include "auth.h"
|
||||
|
@ -2325,30 +2325,6 @@ bool get_dc_name(const char *domain,
|
||||
fstring srv_name,
|
||||
struct sockaddr_storage *ss_out);
|
||||
|
||||
/* The following definitions come from libsmb/nmblib.c */
|
||||
|
||||
void debug_nmb_packet(struct packet_struct *p);
|
||||
void put_name(char *dest, const char *name, int pad, unsigned int name_type);
|
||||
char *nmb_namestr(const struct nmb_name *n);
|
||||
struct packet_struct *copy_packet(struct packet_struct *packet);
|
||||
void free_packet(struct packet_struct *packet);
|
||||
int packet_trn_id(struct packet_struct *p);
|
||||
struct packet_struct *parse_packet(char *buf,int length,
|
||||
enum packet_type packet_type,
|
||||
struct in_addr ip,
|
||||
int port);
|
||||
struct packet_struct *read_packet(int fd,enum packet_type packet_type);
|
||||
void make_nmb_name( struct nmb_name *n, const char *name, int type);
|
||||
bool nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2);
|
||||
int build_packet(char *buf, size_t buflen, struct packet_struct *p);
|
||||
bool send_packet(struct packet_struct *p);
|
||||
bool match_mailslot_name(struct packet_struct *p, const char *mailslot_name);
|
||||
int matching_len_bits(unsigned char *p1, unsigned char *p2, size_t len);
|
||||
void sort_query_replies(char *data, int n, struct in_addr ip);
|
||||
char *name_mangle(TALLOC_CTX *mem_ctx, const char *In, char name_type);
|
||||
int name_extract(unsigned char *buf,size_t buf_len, unsigned int ofs, fstring name);
|
||||
int name_len(unsigned char *s1, size_t buf_len);
|
||||
|
||||
/* The following definitions come from libsmb/nterr.c */
|
||||
|
||||
const char *nt_errstr(NTSTATUS nt_code);
|
||||
@ -2464,30 +2440,6 @@ bool enumerate_domain_trusts( TALLOC_CTX *mem_ctx, const char *domain,
|
||||
struct dom_sid **sids );
|
||||
NTSTATUS change_trust_account_password( const char *domain, const char *remote_machine);
|
||||
|
||||
/* The following definitions come from libsmb/unexpected.c */
|
||||
|
||||
struct nb_packet_server;
|
||||
struct nb_packet_reader;
|
||||
|
||||
NTSTATUS nb_packet_server_create(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
int max_clients,
|
||||
struct nb_packet_server **presult);
|
||||
void nb_packet_dispatch(struct nb_packet_server *server,
|
||||
struct packet_struct *p);
|
||||
struct tevent_req *nb_packet_reader_send(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
enum packet_type type,
|
||||
int trn_id,
|
||||
const char *mailslot_name);
|
||||
NTSTATUS nb_packet_reader_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
|
||||
struct nb_packet_reader **preader);
|
||||
struct tevent_req *nb_packet_read_send(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
struct nb_packet_reader *reader);
|
||||
NTSTATUS nb_packet_read_recv(struct tevent_req *req,
|
||||
struct packet_struct **ppacket);
|
||||
|
||||
/* The following definitions come from modules/vfs_default.c */
|
||||
|
||||
ssize_t vfswrap_llistxattr(struct vfs_handle_struct *handle, const char *path, char *list, size_t size);
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "../lib/async_req/async_sock.h"
|
||||
#include "async_smb.h"
|
||||
#include "smb_crypt.h"
|
||||
#include "libsmb/nmblib.h"
|
||||
|
||||
/*
|
||||
* Read an smb packet asynchronously, discard keepalives
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "libads/kerberos_proto.h"
|
||||
#include "krb5_env.h"
|
||||
#include "async_smb.h"
|
||||
#include "libsmb/nmblib.h"
|
||||
|
||||
static const struct {
|
||||
int prot;
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "libsmb/clirap.h"
|
||||
#include "msdfs.h"
|
||||
#include "trans2.h"
|
||||
#include "libsmb/nmblib.h"
|
||||
|
||||
/********************************************************************
|
||||
Important point.
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "includes.h"
|
||||
#include "librpc/gen_ndr/messaging.h"
|
||||
#include "libsmb/clidgram.h"
|
||||
#include "libsmb/nmblib.h"
|
||||
|
||||
/*
|
||||
* cli_send_mailslot, send a mailslot for client code ...
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "smb_krb5.h"
|
||||
#include "../librpc/gen_ndr/krb5pac.h"
|
||||
#include "../lib/util/asn1.h"
|
||||
#include "libsmb/nmblib.h"
|
||||
|
||||
#ifndef KRB5_AUTHDATA_WIN2K_PAC
|
||||
#define KRB5_AUTHDATA_WIN2K_PAC 128
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "libsmb_internal.h"
|
||||
#include "rpc_client/cli_pipe.h"
|
||||
#include "../librpc/gen_ndr/ndr_srvsvc_c.h"
|
||||
#include "libsmb/nmblib.h"
|
||||
|
||||
/*
|
||||
* Routine to open a directory
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "rpc_client/cli_pipe.h"
|
||||
#include "rpc_client/cli_lsarpc.h"
|
||||
#include "libcli/security/security.h"
|
||||
#include "libsmb/nmblib.h"
|
||||
|
||||
/*
|
||||
* Check a server for being alive and well.
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "../libcli/netlogon/netlogon.h"
|
||||
#include "librpc/gen_ndr/messaging.h"
|
||||
#include "lib/async_req/async_sock.h"
|
||||
#include "libsmb/nmblib.h"
|
||||
|
||||
/* nmbd.c sets this to True. */
|
||||
bool global_in_nmbd = False;
|
||||
|
@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "libsmb/nmblib.h"
|
||||
|
||||
static const struct opcode_names {
|
||||
const char *nmb_opcode_name;
|
||||
|
49
source3/libsmb/nmblib.h
Normal file
49
source3/libsmb/nmblib.h
Normal file
@ -0,0 +1,49 @@
|
||||
/* The following definitions come from libsmb/unexpected.c */
|
||||
|
||||
#include "nameserv.h"
|
||||
|
||||
struct nb_packet_server;
|
||||
struct nb_packet_reader;
|
||||
|
||||
NTSTATUS nb_packet_server_create(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
int max_clients,
|
||||
struct nb_packet_server **presult);
|
||||
void nb_packet_dispatch(struct nb_packet_server *server,
|
||||
struct packet_struct *p);
|
||||
struct tevent_req *nb_packet_reader_send(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
enum packet_type type,
|
||||
int trn_id,
|
||||
const char *mailslot_name);
|
||||
NTSTATUS nb_packet_reader_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
|
||||
struct nb_packet_reader **preader);
|
||||
struct tevent_req *nb_packet_read_send(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_context *ev,
|
||||
struct nb_packet_reader *reader);
|
||||
NTSTATUS nb_packet_read_recv(struct tevent_req *req,
|
||||
struct packet_struct **ppacket);
|
||||
|
||||
/* The following definitions come from libsmb/nmblib.c */
|
||||
|
||||
void debug_nmb_packet(struct packet_struct *p);
|
||||
void put_name(char *dest, const char *name, int pad, unsigned int name_type);
|
||||
char *nmb_namestr(const struct nmb_name *n);
|
||||
struct packet_struct *copy_packet(struct packet_struct *packet);
|
||||
void free_packet(struct packet_struct *packet);
|
||||
int packet_trn_id(struct packet_struct *p);
|
||||
struct packet_struct *parse_packet(char *buf,int length,
|
||||
enum packet_type packet_type,
|
||||
struct in_addr ip,
|
||||
int port);
|
||||
struct packet_struct *read_packet(int fd,enum packet_type packet_type);
|
||||
void make_nmb_name( struct nmb_name *n, const char *name, int type);
|
||||
bool nmb_name_equal(struct nmb_name *n1, struct nmb_name *n2);
|
||||
int build_packet(char *buf, size_t buflen, struct packet_struct *p);
|
||||
bool send_packet(struct packet_struct *p);
|
||||
bool match_mailslot_name(struct packet_struct *p, const char *mailslot_name);
|
||||
int matching_len_bits(unsigned char *p1, unsigned char *p2, size_t len);
|
||||
void sort_query_replies(char *data, int n, struct in_addr ip);
|
||||
char *name_mangle(TALLOC_CTX *mem_ctx, const char *In, char name_type);
|
||||
int name_extract(unsigned char *buf,size_t buf_len, unsigned int ofs, fstring name);
|
||||
int name_len(unsigned char *s1, size_t buf_len);
|
@ -22,6 +22,7 @@
|
||||
#include "rpc_client/cli_pipe.h"
|
||||
#include "rpc_client/cli_samr.h"
|
||||
#include "libsmb/clirap.h"
|
||||
#include "libsmb/nmblib.h"
|
||||
|
||||
/*************************************************************
|
||||
Change a password on a remote machine using IPC calls.
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "includes.h"
|
||||
#include "../lib/async_req/async_sock.h"
|
||||
#include "async_smb.h"
|
||||
#include "libsmb/nmblib.h"
|
||||
|
||||
struct nb_connect_state {
|
||||
struct tevent_context *ev;
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "lib/async_req/async_sock.h"
|
||||
#include "libsmb/nmblib.h"
|
||||
|
||||
static const char *nmbd_socket_dir(void)
|
||||
{
|
||||
|
@ -2,4 +2,5 @@
|
||||
#define SYNC_DNS 1
|
||||
#endif
|
||||
|
||||
#include "libsmb/nmblib.h"
|
||||
#include "nmbd/nmbd_proto.h"
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "rpc_client/init_spoolss.h"
|
||||
#include "rpc_server/rpc_ncacn_np.h"
|
||||
#include "libcli/security/security.h"
|
||||
#include "libsmb/nmblib.h"
|
||||
|
||||
/****************************************************************************
|
||||
Ensure we check the path in *exactly* the same way as W2K for a findfirst/findnext
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "includes.h"
|
||||
#include "system/filesys.h"
|
||||
#include "locking/proto.h"
|
||||
#include "libsmb/nmblib.h"
|
||||
|
||||
static fstring password[2];
|
||||
static fstring username[2];
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "includes.h"
|
||||
#include "system/filesys.h"
|
||||
#include "trans2.h"
|
||||
#include "libsmb/nmblib.h"
|
||||
|
||||
static fstring password;
|
||||
static fstring username;
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include "async_smb.h"
|
||||
#include "libsmb/clirap.h"
|
||||
#include "trans2.h"
|
||||
#include "libsmb/nmblib.h"
|
||||
|
||||
extern char *optarg;
|
||||
extern int optind;
|
||||
|
@ -18,6 +18,7 @@
|
||||
*/
|
||||
#include "includes.h"
|
||||
#include "utils/net.h"
|
||||
#include "libsmb/nmblib.h"
|
||||
|
||||
/*
|
||||
return the time on a server. This does not require any authentication
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "popt_common.h"
|
||||
#include "libsmb/nmblib.h"
|
||||
|
||||
static bool give_flags = false;
|
||||
static bool use_bcast = true;
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "librpc/gen_ndr/spoolss.h"
|
||||
#include "nt_printing.h"
|
||||
#include "printing/notify.h"
|
||||
#include "libsmb/nmblib.h"
|
||||
|
||||
#if HAVE_LIBUNWIND_H
|
||||
#include <libunwind.h>
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "system/filesys.h"
|
||||
#include "system/select.h"
|
||||
#include "../lib/util/select.h"
|
||||
#include "libsmb/nmblib.h"
|
||||
|
||||
#define SECURITY_MASK 0
|
||||
#define SECURITY_SET 0
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "winbindd.h"
|
||||
#include "libsmb/nmblib.h"
|
||||
|
||||
#undef DBGC_CLASS
|
||||
#define DBGC_CLASS DBGC_WINBIND
|
||||
|
Reference in New Issue
Block a user