diff options
author | Andrew Tridgell <tridge@samba.org> | 2000-04-25 14:06:57 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2000-04-25 14:06:57 +0000 |
commit | d7cd7c88fdabb01d9e40ae8a657737907a21ac37 (patch) | |
tree | 5233f08ef9be2e9dac934a2d39c228318be56e1b | |
parent | 10c5470835b43116ed48b3137c3b9cc867a20989 (diff) | |
download | samba-d7cd7c88fdabb01d9e40ae8a657737907a21ac37.tar.gz |
moved trans2.h and nterr.h into includes.h with all our other includes
32 files changed, 97 insertions, 85 deletions
diff --git a/source/groupdb/aliasdb.c b/source/groupdb/aliasdb.c index e5e6ebfa53f..a6876d0afca 100644 --- a/source/groupdb/aliasdb.c +++ b/source/groupdb/aliasdb.c @@ -21,7 +21,6 @@ */ #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source/groupdb/groupdb.c b/source/groupdb/groupdb.c index b8952358fbc..1f773d9f153 100644 --- a/source/groupdb/groupdb.c +++ b/source/groupdb/groupdb.c @@ -21,7 +21,6 @@ */ #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source/include/includes.h b/source/include/includes.h index e19295834a6..b71a5ee3d3d 100644 --- a/source/include/includes.h +++ b/source/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 <fnmatch.h> @@ -867,4 +869,6 @@ int setresgid(gid_t rgid, gid_t egid, gid_t sgid); #include <dlfcn.h> #endif +extern int DEBUGLEVEL; + #endif /* _INCLUDES_H */ diff --git a/source/include/proto.h b/source/include/proto.h index 4564ac832c8..db50e12ab65 100644 --- a/source/include/proto.h +++ b/source/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 */ diff --git a/source/lib/msrpc_use.c b/source/lib/msrpc_use.c index 1d0df1872fb..e18b24ac17a 100644 --- a/source/lib/msrpc_use.c +++ b/source/lib/msrpc_use.c @@ -23,7 +23,6 @@ #define NO_SYSLOG #include "includes.h" -#include "trans2.h" extern int DEBUGLEVEL; extern pstring global_myname; diff --git a/source/libsmb/nterr.c b/source/libsmb/nterr.c index d2f9335000d..ef3fb4b8baf 100644 --- a/source/libsmb/nterr.c +++ b/source/libsmb/nterr.c @@ -1,7 +1,6 @@ /* NT error codes. please read nterr.h */ #include "includes.h" -#include "nterr.h" typedef struct { diff --git a/source/passdb/passdb.c b/source/passdb/passdb.c index f520a11157a..bb7bbcaa01b 100644 --- a/source/passdb/passdb.c +++ b/source/passdb/passdb.c @@ -21,7 +21,6 @@ */ #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source/passdb/passgrp.c b/source/passdb/passgrp.c index f578d9a20ea..399a45d8a9a 100644 --- a/source/passdb/passgrp.c +++ b/source/passdb/passgrp.c @@ -21,7 +21,6 @@ */ #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index faf660e92f7..0c9526b1ec6 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -21,7 +21,6 @@ */ #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source/rpc_client/cli_login.c b/source/rpc_client/cli_login.c index 5fe392f2148..7c7398243df 100644 --- a/source/rpc_client/cli_login.c +++ b/source/rpc_client/cli_login.c @@ -22,7 +22,6 @@ */ #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; extern fstring global_myworkgroup; diff --git a/source/rpc_client/cli_samr.c b/source/rpc_client/cli_samr.c index 8fccf6c7962..82608ebcc37 100644 --- a/source/rpc_client/cli_samr.c +++ b/source/rpc_client/cli_samr.c @@ -28,7 +28,6 @@ #endif #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source/rpc_client/ntclienttrust.c b/source/rpc_client/ntclienttrust.c index 8ef193fa893..9e1bcf2261e 100644 --- a/source/rpc_client/ntclienttrust.c +++ b/source/rpc_client/ntclienttrust.c @@ -25,7 +25,6 @@ #endif #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source/rpc_parse/parse_lsa.c b/source/rpc_parse/parse_lsa.c index 771e7c31d45..a8023bc640d 100644 --- a/source/rpc_parse/parse_lsa.c +++ b/source/rpc_parse/parse_lsa.c @@ -22,7 +22,6 @@ */ #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source/rpc_parse/parse_net.c b/source/rpc_parse/parse_net.c index 9588d1c53b3..002d7e56aaf 100644 --- a/source/rpc_parse/parse_net.c +++ b/source/rpc_parse/parse_net.c @@ -22,7 +22,6 @@ */ #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c index 6c62b662779..5f1f10521fc 100644 --- a/source/rpc_parse/parse_spoolss.c +++ b/source/rpc_parse/parse_spoolss.c @@ -23,7 +23,6 @@ #include "includes.h" -#include "nterr.h" #ifdef TNG #define prs_uint16 _prs_uint16 diff --git a/source/rpc_server/srv_lookup.c b/source/rpc_server/srv_lookup.c index 4041cd26604..274c68f18da 100644 --- a/source/rpc_server/srv_lookup.c +++ b/source/rpc_server/srv_lookup.c @@ -43,7 +43,6 @@ */ #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source/rpc_server/srv_pipe.c b/source/rpc_server/srv_pipe.c index fe78d48fa60..3637f68adfe 100644 --- a/source/rpc_server/srv_pipe.c +++ b/source/rpc_server/srv_pipe.c @@ -39,7 +39,6 @@ */ #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index d1ad0f62291..1121d5c2b10 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -23,7 +23,6 @@ #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; extern pstring global_myname; diff --git a/source/rpc_server/srv_srvsvc.c b/source/rpc_server/srv_srvsvc.c index c5307b264ee..51ba7e8a8f7 100644 --- a/source/rpc_server/srv_srvsvc.c +++ b/source/rpc_server/srv_srvsvc.c @@ -22,7 +22,6 @@ */ #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; extern pstring global_myname; diff --git a/source/rpcclient/cmd_lsarpc.c b/source/rpcclient/cmd_lsarpc.c index 731eda4437d..ee4d5803d53 100644 --- a/source/rpcclient/cmd_lsarpc.c +++ b/source/rpcclient/cmd_lsarpc.c @@ -27,7 +27,6 @@ #endif #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source/rpcclient/cmd_netlogon.c b/source/rpcclient/cmd_netlogon.c index 2c8514b43e8..944eda86b7c 100644 --- a/source/rpcclient/cmd_netlogon.c +++ b/source/rpcclient/cmd_netlogon.c @@ -27,7 +27,6 @@ #endif #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source/rpcclient/cmd_reg.c b/source/rpcclient/cmd_reg.c index fcc12c530cc..dfbfcf0cd1b 100644 --- a/source/rpcclient/cmd_reg.c +++ b/source/rpcclient/cmd_reg.c @@ -27,7 +27,6 @@ #endif #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source/rpcclient/cmd_samr.c b/source/rpcclient/cmd_samr.c index 023bf512e8a..b3c7be56e0d 100644 --- a/source/rpcclient/cmd_samr.c +++ b/source/rpcclient/cmd_samr.c @@ -27,7 +27,6 @@ #endif #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source/rpcclient/cmd_srvsvc.c b/source/rpcclient/cmd_srvsvc.c index 9deb9e801c6..e1d95af381f 100644 --- a/source/rpcclient/cmd_srvsvc.c +++ b/source/rpcclient/cmd_srvsvc.c @@ -27,7 +27,6 @@ #endif #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source/rpcclient/cmd_wkssvc.c b/source/rpcclient/cmd_wkssvc.c index 0b8f469af37..1e64f384aeb 100644 --- a/source/rpcclient/cmd_wkssvc.c +++ b/source/rpcclient/cmd_wkssvc.c @@ -27,7 +27,6 @@ #endif #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; diff --git a/source/smbd/ipc.c b/source/smbd/ipc.c index f87423c9cac..73addda086c 100644 --- a/source/smbd/ipc.c +++ b/source/smbd/ipc.c @@ -27,7 +27,6 @@ */ #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; extern int max_send; diff --git a/source/smbd/lanman.c b/source/smbd/lanman.c index aaf2bc017f6..9774305fc92 100644 --- a/source/smbd/lanman.c +++ b/source/smbd/lanman.c @@ -27,7 +27,6 @@ */ #include "includes.h" -#include "nterr.h" #ifdef CHECK_TYPES #undef CHECK_TYPES diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c index b4ae0f61a9a..98f5959c2dc 100644 --- a/source/smbd/nttrans.c +++ b/source/smbd/nttrans.c @@ -20,7 +20,6 @@ */ #include "includes.h" -#include "nterr.h" extern int DEBUGLEVEL; extern int Protocol; diff --git a/source/smbd/pipes.c b/source/smbd/pipes.c index 5d5c6a653a4..0cfe653d306 100644 --- a/source/smbd/pipes.c +++ b/source/smbd/pipes.c @@ -27,7 +27,6 @@ #include "includes.h" -#include "trans2.h" #define PIPE "\\PIPE\\" #define PIPELEN strlen(PIPE) diff --git a/source/smbd/reply.c b/source/smbd/reply.c index a020f5eb3b1..590dc4f4270 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -25,8 +25,6 @@ #include "includes.h" -#include "trans2.h" -#include "nterr.h" /* look in server.c for some explanation of these variables */ extern int Protocol; diff --git a/source/smbd/server.c b/source/smbd/server.c index 83c70a9e89a..8e4de78cbfa 100644 --- a/source/smbd/server.c +++ b/source/smbd/server.c @@ -20,7 +20,6 @@ */ #include "includes.h" -#include "trans2.h" pstring servicesf = CONFIGFILE; extern pstring debugf; diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index a30038a431e..4e502f767bd 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -22,7 +22,6 @@ */ #include "includes.h" -#include "trans2.h" extern int DEBUGLEVEL; extern int Protocol; |