source: TI05-delivery/trunk/src/python_ext/bbftpc_globals.h @ 1242

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI05-delivery/trunk/src/python_ext/bbftpc_globals.h@1448
Revision 1242, 5.6 KB checked in by spascoe, 14 years ago (diff)

bbftpc_main.c has been cut down further and split into static functions.
The client test cases now pass using this file instead of bbftp.c.

Line 
1/*
2 * bbftpc/bbftp.c
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 * Global variables defined by the bbftp client.
24 */
25
26
27int     state   = SETTOZERO ;
28/*
29** timestamp:
30**      Every message on standart error and standart output are
31**      timestamped
32*/
33int     timestamp = SETTOZERO ;
34/*
35** protocolmin:
36**      Minimum protocol supportted
37*/
38int     protocolmin = 2 ; 
39int     protocolmax = 3 ; 
40int     protocol ;
41/*
42** debug:
43**      Set to one to print more debugging information
44*/
45int     debug = SETTOZERO ;
46/*
47** verbose:
48**      Set to one to print  information
49*/
50int     verbose = SETTOZERO ;
51/*
52** warning:
53**      Set to one to print warning to stderr
54*/
55int     warning = SETTOZERO ;
56/*
57** statoutput:
58**      Set to one for special output
59*/
60int     statoutput = SETTOZERO ;
61/*
62** globaltrymax:
63**      Number of try in case or recoverable error
64*/
65int     globaltrymax = NBTRYMAX ;
66/*
67** newcontrolport:
68**      Control port to be used
69*/
70int     newcontrolport = CONTROLPORT ;
71/*
72** usessh:
73**      Set to one when using ssh to start the remote daemon
74*/
75int     usessh = SETTOZERO ;
76/*
77** sshbatchmode:
78**      This is set to non-zero if running in batch mode (that is, password
79**      and passphrase queries are not allowed).
80*/
81int     sshbatchmode  = SETTOZERO ;
82/*
83** sshchildpid:
84**      To keep the ssh child pid
85*/
86int     sshchildpid   = SETTOZERO ;
87/*
88** For ssh
89*/
90char    *sshidentityfile = NULL ;
91char    *sshremotecmd = NULL ;
92char    *sshcmd = NULL ;
93/*
94** usecert:
95**              Set to one if using certificate authentifaction
96*/
97int             usecert = SETTOZERO ;
98/*
99** useprivate:
100**      Set to one if using private authentication
101*/
102int     useprivate = SETTOZERO ;
103/*
104** privatestr:
105**      Pointer to a private string used for private authentication
106**
107*/
108char    *privatestr = NULL ;
109/*
110** hisctladdr:
111**      the remote address
112*/
113struct sockaddr_in hisctladdr ;
114/*
115** myctladdr:
116**      the local address
117*/
118struct sockaddr_in myctladdr ;
119/*
120** bbftprc:
121**      Where to store the bbftprc file
122*/
123char    *bbftprc = NULL ;
124/*
125** Variable defining the local options :
126**
127** localumask:
128**      Local umask taken by the umask command at start and
129**      modified by the setlocalumask command
130**
131** localrfio:
132**      set to one when using rfio for local files
133**
134*/
135int     localumask ;
136
137char *newcmd = NULL;
138int remoterfio;
139int localrfio;
140/*
141** Variables defining both side options :
142**
143** usetmpfile:
144**      Set to one when using tmpname for file creation
145**
146** usegzipcompress:
147**      Set to one when using tmpname for file creation
148**
149** keepaccess:
150**      Set to one when keeping access time and modification
151**
152** keepmode:
153**      Set to one when keeping file mode
154**
155** creatdir:
156**      Set to one when automatic directory creation is needed
157*/
158int     sendwinsize     = 256 ;
159int     recvwinsize     = 256 ;
160int     nbport = 1 ;
161int             ackto                   = ACKTO;
162int             recvcontrolto   = CONTROLSOCKTO;
163int             sendcontrolto   = SENDCONTROLTO;
164int             datato                  = DATASOCKTO;
165
166/*
167** Variables remote side options :
168**
169** remoterfio:
170**      Set to one when rfio for remote file
171**
172** remoteumask:
173**      if set to zero do not set remote umask
174**
175** remotecos:
176**      if not set to zero do set remote cos
177**
178** remotedir :
179**      if not set to NULL change dir after connection
180**
181*/
182int     remoteumask = SETTOZERO ;
183int     remotecos   = -1 ;
184char    *remotedir = NULL ;
185/*
186** incontrolsock :
187**      Define the control socket for reading
188** outcontrolsock :
189**      Define the control socket for writing
190**
191**      For normal use : incontrolsock = outcontrolsock
192*/
193int     incontrolsock ;
194int     outcontrolsock ;
195/*
196** myexitcode :
197**      Contains the first error code that has to be return when program
198**      is ended
199*/
200int     myexitcode = SETTOZERO ;
201char    *hostname   = NULL ;
202struct hostent  *hp = NULL ;
203char    *username   = NULL ;
204char    *password   = NULL ;
205/*
206** mychildren :
207**      Pointer to the first pid of children
208*/
209int     *mychildren = NULL ;
210/*
211** nbpidchid :
212**      Number of pid pointed by mychildren
213*/
214int     nbpidchild ;
215
216/*
217** Parameters describing the transfer ********************
218*/
219int     transferoption = TROPT_TMP | TROPT_DIR | TROPT_MODE | TROPT_ACC; 
220int     filemode ;
221char    lastaccess[9] ;
222char    lastmodif[9] ;
223int     buffersizeperstream = 256 ;
224int     requestedstreamnumber ;
225my64_t  filesize ;
226/*
227** curfilename :
228**      Define the pointer to the current file
229*/
230char    *curfilename = NULL ;
231/*
232** realfilename :
233**      Define the pointer to the real file (= curfilename if TROPT_TMP not
234**      set)
235*/
236char    *realfilename   = NULL ;
237int     *myports        = NULL ;
238int     *mysockets      = NULL ;
239char    *readbuffer     = NULL ;
240char    *compbuffer     = NULL ; 
241int     resfd = -1 ;
242/*
243** Simulation mode (option -n)
244*/
245int             simulation_mode = SETTOZERO;
246/*
247**
248*/
249int connectionisbroken = SETTOZERO ;
250
251/*
252 * Range for the ephemeral ports for data connections
253 */
254int     pasvport_min = 0 ;
255int     pasvport_max = 0 ;
Note: See TracBrowser for help on using the repository browser.