1 | /* |
---|
2 | * includes/daemon_proto.h |
---|
3 | * Copyright (C) 1999, 2000, 2001, 2002 IN2P3, CNRS |
---|
4 | * bbftp@in2p3.fr |
---|
5 | * http://doc.in2p3.fr/bbftp |
---|
6 | * |
---|
7 | * This program is free software; you can redistribute it and/or |
---|
8 | * modify it under the terms of the GNU General Public License |
---|
9 | * as published by the Free Software Foundation; either version 2 |
---|
10 | * of the License, or any later version. |
---|
11 | * |
---|
12 | * This program is distributed in the hope that it will be useful, |
---|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
15 | * GNU General Public License for more details. |
---|
16 | * |
---|
17 | * You should have received a copy of the GNU General Public License |
---|
18 | * along with this program; if not, write to the Free Software |
---|
19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
20 | */ |
---|
21 | |
---|
22 | /**************************************************************************** |
---|
23 | |
---|
24 | |
---|
25 | |
---|
26 | daemon_proto.h v 2.1.0 2001/03/21 - Header creation |
---|
27 | |
---|
28 | *****************************************************************************/ |
---|
29 | /* |
---|
30 | ** Prototype for utilities |
---|
31 | */ |
---|
32 | void checkfromwhere() ; |
---|
33 | int checkprotocol() ; |
---|
34 | void clean_child() ; |
---|
35 | void exit_clean() ; |
---|
36 | int bbftpd_checkendchild(int status) ; |
---|
37 | void strip_trailing_slashes (char *path) ; |
---|
38 | void free_all_var() ; |
---|
39 | /* |
---|
40 | ** Prototypes for message routines |
---|
41 | */ |
---|
42 | int discardmessage(int sock,int msglen,int to) ; |
---|
43 | int readmessage(int sock,char *buffer,int msglen,int to) ; |
---|
44 | void reply(int n, char *str) ; |
---|
45 | int writemessage(int sock,char *buffer,int msglen,int to) ; |
---|
46 | /* |
---|
47 | ** Prototypes for signal routines |
---|
48 | */ |
---|
49 | void bbftpd_sigchld(int sig) ; |
---|
50 | void bbftpd_sighup( int sig) ; |
---|
51 | void bbftpd_sigterm(int sig) ; |
---|
52 | int bbftpd_checkendchild(int status) ; |
---|
53 | int bbftpd_setsignals() ; |
---|
54 | int bbftpd_blockallsignals() ; |
---|
55 | /* |
---|
56 | ** Prototype for sockets |
---|
57 | */ |
---|
58 | |
---|
59 | /* |
---|
60 | ** Prototype for global private authentication routines |
---|
61 | */ |
---|
62 | int bbftpd_private_receive_connection(int msglen) ; |
---|
63 | int bbftpd_private_send(char *buffertosend, int buffertosendlength, char *logmessage) ; |
---|
64 | int bbftpd_private_recv(char *buffertorecv, int lengthtorecv, char *logmessage) ; |
---|
65 | #ifdef NDG_AUTH |
---|
66 | int bbftpd_private_initialise(char *logmessage); |
---|
67 | void bbftpd_private_atexit(void); |
---|
68 | #endif // NDG_AUTH |
---|
69 | /* |
---|
70 | ** Prototype for user private authentication routines |
---|
71 | */ |
---|
72 | int bbftpd_private_auth(char *logmessage) ; |
---|
73 | #ifdef NDG_AUTH |
---|
74 | int bbftpd_private_init(char *logmessage); |
---|
75 | void bbftpd_private_finalise(void); |
---|
76 | void bbftpd_private_auth_finalise(void); |
---|
77 | #endif // NDG_AUTH |
---|
78 | /* |
---|
79 | ** Prototype for retr routines |
---|
80 | */ |
---|
81 | int bbftpd_retrcheckfile(char *filename,char *logmessage) ; |
---|
82 | int bbftpd_retrlistdir(char *pattern,char **filelist,int *filelistlen,char *logmessage) ; |
---|
83 | int bbftpd_retrtransferfile(char *filename,int simulation,char *logmessage) ; |
---|
84 | |
---|
85 | int bbftpd_retrcheckfile_rfio(char *filename,char *logmessage) ; |
---|
86 | int bbftpd_retrlistdir_rfio(char *pattern,char **filelist,int *filelistlen,char *logmessage) ; |
---|
87 | int bbftpd_retrtransferfile_rfio(char *filename,int simulation,char *logmessage) ; |
---|
88 | /* |
---|
89 | ** Prototype for store routines |
---|
90 | */ |
---|
91 | int bbftpd_storecheckoptions(char *logmessage) ; |
---|
92 | int bbftpd_storechmod(char *filename,int mode,char *logmessage) ; |
---|
93 | int bbftpd_storeclosecastfile(char *filename,char *logmessage) ; |
---|
94 | int bbftpd_storecreatefile(char *filename, char *logmessage) ; |
---|
95 | int bbftpd_storemkdir(char *dirname,char *logmessage,int recursif) ; |
---|
96 | int bbftpd_storerename(char *newfilename,char *oldfilename,char *logmessage) ; |
---|
97 | int bbftpd_storetransferfile(char *filename,int simulation,char *logmessage) ; |
---|
98 | int bbftpd_storeunlink(char *filename) ; |
---|
99 | int bbftpd_storeutime(char *filename,struct utimbuf *ftime,char *logmessage) ; |
---|
100 | |
---|
101 | int bbftpd_storecheckoptions_rfio(char *logmessage) ; |
---|
102 | int bbftpd_storechmod_rfio(char *filename,int mode,char *logmessage) ; |
---|
103 | int bbftpd_storeclosecastfile_rfio(char *filename,char *logmessage) ; |
---|
104 | int bbftpd_storecreatefile_rfio(char *filename, char *logmessage) ; |
---|
105 | int bbftpd_storemkdir_rfio(char *dirname,char *logmessage,int recursif) ; |
---|
106 | int bbftpd_storerename_rfio(char *newfilename,char *oldfilename,char *logmessage) ; |
---|
107 | int bbftpd_storetransferfile_rfio(char *filename,int simulation,char *logmessage) ; |
---|
108 | int bbftpd_storeunlink_rfio(char *filename) ; |
---|
109 | /* |
---|
110 | ** Prototype for mains routines |
---|
111 | */ |
---|
112 | int bbftpd_cd(int sock,int msglen) ; |
---|
113 | int bbftpd_list(char *pattern,char *logmessage) ; |
---|
114 | int bbftpd_mkdir(int sock,int msglen) ; |
---|
115 | int bbftpd_readcontrol(int msgcode,int msglen) ; |
---|
116 | |
---|