From 00e3fe132476fcaed0f4b9bbe74b0a6559c39df0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 25 Apr 2000 14:06:57 +0000 Subject: moved trans2.h and nterr.h into includes.h with all our other includes (This used to be commit d7cd7c88fdabb01d9e40ae8a657737907a21ac37) --- source3/include/includes.h | 4 ++ source3/include/proto.h | 147 ++++++++++++++++++++++++++++----------------- 2 files changed, 97 insertions(+), 54 deletions(-) (limited to 'source3/include') diff --git a/source3/include/includes.h b/source3/include/includes.h index e19295834a..b71a5ee3d3 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -605,6 +605,8 @@ extern int errno; #include "talloc.h" #include "interfaces.h" #include "hash.h" +#include "trans2.h" +#include "nterr.h" #ifdef HAVE_FNMATCH #include @@ -867,4 +869,6 @@ int setresgid(gid_t rgid, gid_t egid, gid_t sgid); #include #endif +extern int DEBUGLEVEL; + #endif /* _INCLUDES_H */ diff --git a/source3/include/proto.h b/source3/include/proto.h index 4564ac832c..db50e12ab6 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -568,25 +568,8 @@ void split_at_last_component_w(smb_ucs2_t *path, smb_ucs2_t *front, smb_ucs2_t s smb_ucs2_t *octal_string_w(int i); smb_ucs2_t *string_truncate_w(smb_ucs2_t *s, size_t length); -/*The following definitions come from libsmb/clientgen.c */ +/*The following definitions come from libsmb/cliconnect.c */ -int cli_set_port(struct cli_state *cli, int port); -char *cli_errstr(struct cli_state *cli); -BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, int pipe_name_len, - uint16 *setup, uint32 setup_count, uint32 max_setup_count, - char *params, uint32 param_count, uint32 max_param_count, - char *data, uint32 data_count, uint32 max_data_count, - char **rparam, uint32 *rparam_count, - char **rdata, uint32 *rdata_count); -BOOL cli_api(struct cli_state *cli, - char *param, int prcnt, int mprcnt, - char *data, int drcnt, int mdrcnt, - char **rparam, int *rprcnt, - char **rdata, int *rdrcnt); -BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); -int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *)); -BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, - void (*fn)(const char *, uint32, const char *)); BOOL cli_session_setup(struct cli_state *cli, char *user, char *pass, int passlen, @@ -596,6 +579,37 @@ BOOL cli_ulogoff(struct cli_state *cli); BOOL cli_send_tconX(struct cli_state *cli, char *share, char *dev, char *pass, int passlen); BOOL cli_tdis(struct cli_state *cli); +BOOL cli_negprot(struct cli_state *cli); +BOOL cli_session_request(struct cli_state *cli, + struct nmb_name *calling, struct nmb_name *called); +BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); +BOOL cli_reestablish_connection(struct cli_state *cli); +BOOL cli_establish_connection(struct cli_state *cli, + char *dest_host, struct in_addr *dest_ip, + struct nmb_name *calling, struct nmb_name *called, + char *service, char *service_type, + BOOL do_shutdown, BOOL do_tcon); +BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, + struct in_addr *pdest_ip); + +/*The following definitions come from libsmb/clientgen.c */ + +int cli_set_port(struct cli_state *cli, int port); +BOOL cli_receive_smb(struct cli_state *cli); +BOOL cli_send_smb(struct cli_state *cli); +void cli_setup_packet(struct cli_state *cli); +struct cli_state *cli_initialise(struct cli_state *cli); +void cli_shutdown(struct cli_state *cli); +void cli_sockopt(struct cli_state *cli, char *options); +uint16 cli_setpid(struct cli_state *cli, uint16 pid); + +/*The following definitions come from libsmb/clierror.c */ + +char *cli_errstr(struct cli_state *cli); +int cli_error(struct cli_state *cli, uint8 *eclass, uint32 *num, uint32 *nt_rpc_error); + +/*The following definitions come from libsmb/clifile.c */ + BOOL cli_rename(struct cli_state *cli, char *fname_src, char *fname_dst); BOOL cli_unlink(struct cli_state *cli, char *fname); BOOL cli_mkdir(struct cli_state *cli, char *dname); @@ -606,18 +620,52 @@ BOOL cli_close(struct cli_state *cli, int fnum); BOOL cli_lock(struct cli_state *cli, int fnum, uint32 offset, uint32 len, int timeout, enum brl_type lock_type); BOOL cli_unlock(struct cli_state *cli, int fnum, uint32 offset, uint32 len); -size_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); -ssize_t cli_write(struct cli_state *cli, - int fnum, uint16 write_mode, - char *buf, off_t offset, size_t size); -ssize_t cli_smbwrite(struct cli_state *cli, - int fnum, char *buf, off_t offset, size_t size1); BOOL cli_getattrE(struct cli_state *cli, int fd, uint16 *attr, size_t *size, time_t *c_time, time_t *a_time, time_t *m_time); BOOL cli_getatr(struct cli_state *cli, char *fname, uint16 *attr, size_t *size, time_t *t); BOOL cli_setatr(struct cli_state *cli, char *fname, uint16 attr, time_t t); +BOOL cli_chkpath(struct cli_state *cli, char *path); +BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); + +/*The following definitions come from libsmb/clilist.c */ + +int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, + void (*fn)(file_info *, const char *)); + +/*The following definitions come from libsmb/climessage.c */ + +BOOL cli_message_start(struct cli_state *cli, char *host, char *username, + int *grp); +BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); +BOOL cli_message_end(struct cli_state *cli, int grp); + +/*The following definitions come from libsmb/cliprint.c */ + +int cli_print_queue(struct cli_state *cli, + void (*fn)(struct print_job_info *)); +int cli_printjob_del(struct cli_state *cli, int job); + +/*The following definitions come from libsmb/clirap.c */ + +BOOL cli_api_pipe(struct cli_state *cli, char *pipe_name, int pipe_name_len, + uint16 *setup, uint32 setup_count, uint32 max_setup_count, + char *params, uint32 param_count, uint32 max_param_count, + char *data, uint32 data_count, uint32 max_data_count, + char **rparam, uint32 *rparam_count, + char **rdata, uint32 *rdata_count); +BOOL cli_api(struct cli_state *cli, + char *param, int prcnt, int mprcnt, + char *data, int drcnt, int mdrcnt, + char **rparam, int *rprcnt, + char **rdata, int *rdrcnt); +BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation); +int cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, const char *)); +BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, + void (*fn)(const char *, uint32, const char *)); +BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, + const char *old_password); BOOL cli_qpathinfo(struct cli_state *cli, const char *fname, time_t *c_time, time_t *a_time, time_t *m_time, size_t *size, uint16 *mode); @@ -629,36 +677,27 @@ BOOL cli_qfileinfo(struct cli_state *cli, int fnum, uint16 *mode, size_t *size, time_t *c_time, time_t *a_time, time_t *m_time, time_t *w_time, SMB_INO_T *ino); -int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute, - void (*fn)(file_info *, const char *)); -BOOL cli_oem_change_password(struct cli_state *cli, const char *user, const char *new_password, - const char *old_password); -BOOL cli_negprot(struct cli_state *cli); -BOOL cli_session_request(struct cli_state *cli, - struct nmb_name *calling, struct nmb_name *called); -BOOL cli_connect(struct cli_state *cli, const char *host, struct in_addr *ip); -struct cli_state *cli_initialise(struct cli_state *cli); -void cli_shutdown(struct cli_state *cli); -int cli_error(struct cli_state *cli, uint8 *eclass, uint32 *num, uint32 *nt_rpc_error); -void cli_sockopt(struct cli_state *cli, char *options); -uint16 cli_setpid(struct cli_state *cli, uint16 pid); -BOOL cli_reestablish_connection(struct cli_state *cli); -BOOL cli_establish_connection(struct cli_state *cli, - char *dest_host, struct in_addr *dest_ip, - struct nmb_name *calling, struct nmb_name *called, - char *service, char *service_type, - BOOL do_shutdown, BOOL do_tcon); -int cli_printjob_del(struct cli_state *cli, int job); -int cli_print_queue(struct cli_state *cli, - void (*fn)(struct print_job_info *)); -BOOL cli_chkpath(struct cli_state *cli, char *path); -BOOL cli_message_start(struct cli_state *cli, char *host, char *username, - int *grp); -BOOL cli_message_text(struct cli_state *cli, char *msg, int len, int grp); -BOOL cli_message_end(struct cli_state *cli, int grp); -BOOL cli_dskattr(struct cli_state *cli, int *bsize, int *total, int *avail); -BOOL attempt_netbios_session_request(struct cli_state *cli, char *srchost, char *desthost, - struct in_addr *pdest_ip); + +/*The following definitions come from libsmb/clireadwrite.c */ + +size_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_t size); +ssize_t cli_write(struct cli_state *cli, + int fnum, uint16 write_mode, + char *buf, off_t offset, size_t size); +ssize_t cli_smbwrite(struct cli_state *cli, + int fnum, char *buf, off_t offset, size_t size1); + +/*The following definitions come from libsmb/clitrans.c */ + +BOOL cli_send_trans(struct cli_state *cli, int trans, + char *name, int pipe_name_len, + int fid, int flags, + uint16 *setup, int lsetup, int msetup, + char *param, int lparam, int mparam, + char *data, int ldata, int mdata); +BOOL cli_receive_trans(struct cli_state *cli,int trans, + char **param, int *param_len, + char **data, int *data_len); /*The following definitions come from libsmb/credentials.c */ -- cgit