ReactOS 0.4.15-dev-7887-g64a59a1
ncftp.h
Go to the documentation of this file.
1/* ncftp.h
2 *
3 * Copyright (c) 1996-2001 Mike Gleason, NCEMRSoft.
4 * All rights reserved.
5 *
6 */
7
8#ifndef _ncftp_h_
9#define _ncftp_h_ 1
10
11#define kLibraryVersion "@(#) LibNcFTP 3.0.6 (April 14, 2001)"
12
13#if defined(WIN32) || defined(_WINDOWS)
14# define longest_int LONGLONG
15# define longest_uint ULONGLONG
16# ifndef HAVE_LONG_LONG
17# define HAVE_LONG_LONG 1
18# endif
19# ifndef SCANF_LONG_LONG
20# define SCANF_LONG_LONG "%I64d"
21# endif
22# ifndef PRINTF_LONG_LONG
23# define PRINTF_LONG_LONG "%I64d"
24# endif
25# ifndef PRINTF_LONG_LONG_I64D
26# define PRINTF_LONG_LONG_I64D 1
27# endif
28# ifndef SCANF_LONG_LONG_I64D
29# define SCANF_LONG_LONG_I64D 1
30# endif
31# ifndef USE_SIO
32# define USE_SIO 1
33# endif
34# ifndef NO_SIGNALS
35# define NO_SIGNALS 1
36# endif
37#else
38# include <stdio.h>
39# include <sys/time.h>
40# if !defined(__ultrix) || !defined(XTI)
41# include <sys/socket.h>
42# endif
43# include <netinet/in.h>
44# if 1 /* %config1% -- set by configure script -- do not modify */
45# ifndef USE_SIO
46# define USE_SIO 1
47# endif
48# ifndef NO_SIGNALS
49# define NO_SIGNALS 1
50# endif
51# else
52# ifndef USE_SIO
53# define USE_SIO 0
54# endif
55 /* #undef NO_SIGNALS */
56# endif
57#endif
58
59#include "ncftp_errno.h"
60
61/* This is used to verify validty of the data passed in.
62 * It also specifies the minimum version that is binary-compatibile with
63 * this version. (So this may not necessarily be kLibraryVersion.)
64 */
65#define kLibraryMagic "LibNcFTP 3.0.6"
66
67#ifndef longest_int
68#define longest_int long long
69#define longest_uint unsigned long long
70#endif
71
72#ifndef forever
73# define forever for ( ; ; )
74#endif
75
76typedef void (*FTPSigProc)(int);
77
78typedef struct Line *LinePtr;
79typedef struct Line {
81 char *line;
82} Line;
83
84typedef struct LineList {
86 int nLines;
88
89typedef struct Response {
92 int code;
95 int hadEof;
97
98#if USE_SIO && !defined(_SReadlineInfo_)
99#define _SReadlineInfo_ 1
100typedef struct SReadlineInfo {
101 char *buf; /* Pointer to beginning of buffer. */
102 char *bufPtr; /* Pointer to current position in buffer. */
103 char *bufLim; /* Pointer to end of buffer. */
104 size_t bufSize; /* Current size of buffer block. */
105 size_t bufSizeMax; /* Maximum size available for buffer. */
106 int malloc; /* If non-zero, malloc() was used for buf. */
107 int fd; /* File descriptor to use for I/O. */
108 int timeoutLen; /* Timeout to use, in seconds. */
109 int requireEOLN; /* When buffer is full, continue reading and discarding until \n? */
111#endif
112
113typedef struct FTPLibraryInfo {
114 char magic[16]; /* Don't modify this field. */
115 int init; /* Don't modify this field. */
116 int socksInit; /* Don't modify this field. */
117 unsigned int defaultPort; /* Don't modify this field. */
118 char ourHostName[64]; /* Don't modify this field. */
119 int hresult; /* Don't modify this field. */
120 int htried; /* Don't modify this field. */
121 char defaultAnonPassword[80]; /* You may set this after init. */
123
126typedef void (*FTPLogProc)(const FTPCIPtr, char *);
131typedef int (*FTPFtwProc)(const FTPCIPtr cip, const char *fn, int flag);
132typedef void (*FTPGetPassphraseProc)(const FTPCIPtr, LineListPtr pwPrompt, char *pass, size_t dsize);
133
134typedef struct FTPConnectionInfo {
135 char magic[16]; /* Don't modify this field. */
136 char host[64]; /* REQUIRED input parameter. */
137 char user[64]; /* OPTIONAL input parameter. */
138 char pass[64]; /* OPTIONAL input parameter. */
139 char acct[64]; /* OPTIONAL input parameter. */
140 unsigned int port; /* OPTIONAL input parameter. */
141 unsigned int xferTimeout; /* OPTIONAL input parameter. */
142 unsigned int connTimeout; /* OPTIONAL input parameter. */
143 unsigned int ctrlTimeout; /* OPTIONAL input parameter. */
144 unsigned int abortTimeout; /* OPTIONAL input parameter. */
145 FILE *debugLog; /* OPTIONAL input parameter. */
146 FILE *errLog; /* OPTIONAL input parameter. */
147 FTPLogProc debugLogProc; /* OPTIONAL input parameter. */
148 FTPLogProc errLogProc; /* OPTIONAL input parameter. */
149 FTPLIPtr lip; /* Do not modify this field. */
150 int maxDials; /* OPTIONAL input parameter. */
151 int redialDelay; /* OPTIONAL input parameter. */
152 int dataPortMode; /* OPTIONAL input parameter. */
153 char actualHost[64]; /* Do not modify this field. */
154 char ip[32]; /* Do not modify this field. */
155 int connected; /* Do not modify this field. */
156 int loggedIn; /* Do not modify this field. */
157 int curTransferType; /* Do not modify this field. */
158 char *startingWorkingDirectory; /* Use, but do not modify. */
159 longest_int startPoint; /* Do not modify this field. */
160 int hasPASV; /* Do not modify this field. */
161 int hasSIZE; /* Do not modify this field. */
162 int hasMDTM; /* Do not modify this field. */
163 int hasREST; /* Do not modify this field. */
164 int hasNLST_d; /* Do not modify this field. */
165 int hasUTIME; /* Do not modify this field. */
166 int hasFEAT; /* Do not modify this field. */
167 int hasMLSD; /* Do not modify this field. */
168 int hasMLST; /* Do not modify this field. */
169 int usedMLS; /* Do not modify this field. */
170 int hasCLNT; /* Do not modify this field. */
171 int hasRETRBUFSIZE; /* Do not modify this field. */
172 int hasRBUFSIZ; /* Do not modify this field. */
173 int hasRBUFSZ; /* Do not modify this field. */
174 int hasSTORBUFSIZE; /* Do not modify this field. */
175 int hasSBUFSIZ; /* Do not modify this field. */
176 int hasSBUFSZ; /* Do not modify this field. */
177 int hasBUFSIZE; /* Do not modify this field. */
178 int mlsFeatures; /* Do not modify this field. */
179 int STATfileParamWorks; /* Do not modify this field. */
180 int NLSTfileParamWorks; /* Do not modify this field. */
181 struct sockaddr_in servCtlAddr; /* Do not modify this field. */
182 struct sockaddr_in servDataAddr; /* Do not modify this field. */
183 struct sockaddr_in ourCtlAddr; /* Do not modify this field. */
184 struct sockaddr_in ourDataAddr; /* Do not modify this field. */
185 int netMode; /* Do not use or modify. */
186 char *buf; /* Do not modify this field. */
187 size_t bufSize; /* Do not modify this field. */
188 FILE *cin; /* Do not use or modify. */
189 FILE *cout; /* Do not use or modify. */
190 int ctrlSocketR; /* You may use but not modify/close. */
191 int ctrlSocketW; /* You may use but not modify/close. */
192 int dataSocket; /* You may use but not modify/close. */
193 int errNo; /* You may modify this if you want. */
194 unsigned short ephemLo; /* You may modify this if you want. */
195 unsigned short ephemHi; /* You may modify this if you want. */
196 int cancelXfer; /* You may modify this. */
197 longest_int bytesTransferred; /* Do not modify this field. */
198 FTPProgressMeterProc progress; /* You may modify this if you want. */
199 int useProgressMeter; /* Used internally. */
200 int leavePass; /* You may modify this. */
201 double sec; /* Do not modify this field. */
202 double secLeft; /* Do not modify this field. */
203 double kBytesPerSec; /* Do not modify this field. */
204 double percentCompleted; /* Do not modify this field. */
205 longest_int expectedSize; /* Do not modify this field. */
206 time_t mdtm; /* Do not modify this field. */
207 time_t nextProgressUpdate; /* Do not modify this field. */
208 const char *rname; /* Do not modify this field. */
209 const char *lname; /* Do not modify this field. */
210 struct timeval t0; /* Do not modify this field. */
211 int stalled; /* Do not modify this field. */
212 int dataTimedOut; /* Do not modify this field. */
213 int eofOkay; /* Do not use or modify. */
214 char lastFTPCmdResultStr[128]; /* You may modify this if you want. */
215 LineList lastFTPCmdResultLL; /* Use, but do not modify. */
216 int lastFTPCmdResultNum; /* You may modify this if you want. */
217 char firewallHost[64]; /* You may modify this. */
218 char firewallUser[64]; /* You may modify this. */
219 char firewallPass[64]; /* You may modify this. */
220 unsigned int firewallPort; /* You may modify this. */
221 int firewallType; /* You may modify this. */
222 int require20; /* You may modify this. */
223 int usingTAR; /* Use, but do not modify. */
224 FTPConnectMessageProc onConnectMsgProc; /* You may modify this. */
225 FTPRedialStatusProc redialStatusProc; /* You may modify this. */
226 FTPPrintResponseProc printResponseProc; /* You may modify this. */
227 FTPLoginMessageProc onLoginMsgProc; /* You may modify this. */
228 size_t ctrlSocketRBufSize; /* You may modify this. */
229 size_t ctrlSocketSBufSize; /* You may modify this. */
230 size_t dataSocketRBufSize; /* You may modify this. */
231 size_t dataSocketSBufSize; /* You may modify this. */
232 int serverType; /* Do not use or modify. */
233 int ietfCompatLevel; /* Do not use or modify. */
234 int numDownloads; /* Do not use or modify. */
235 int numUploads; /* Do not use or modify. */
236 int numListings; /* Do not use or modify. */
237 int doNotGetStartingWorkingDirectory; /* You may modify this. */
238#if USE_SIO
239 char srlBuf[768];
240 SReadlineInfo ctrlSrl; /* Do not use or modify. */
241#endif
242 FTPGetPassphraseProc passphraseProc; /* You may modify this. */
243 int iUser; /* Scratch integer field you can use. */
244 void *pUser; /* Scratch pointer field you can use. */
245 longest_int llUser; /* Scratch long long field you can use. */
246 const char *asciiFilenameExtensions; /* You may assign this. */
247 int reserved[32]; /* Do not use or modify. */
249
251typedef struct FileInfo {
253 char *relname;
254 char *rname;
255 char *rlinkto;
256 char *lname;
257 char *plug; /* permissions, links, user, group */
258 int type;
263
264typedef struct FileInfoList {
273
274/* Used with UnMlsT() */
275typedef struct MLstItem{
276 char fname[512];
277 char linkto[512];
278 int ftype;
281 int mode; /* "UNIX.mode" fact */
282 int uid; /* "UNIX.uid" fact */
283 int gid; /* "UNIX.gid" fact */
284 char perm[16]; /* "perm" fact */
285 char owner[16]; /* "UNIX.owner" fact */
286 char group[16]; /* "UNIX.group" fact */
288
289/* Messages we pass to the current progress meter function. */
290#define kPrInitMsg 1
291#define kPrUpdateMsg 2
292#define kPrEndMsg 3
293
294/* Parameter for OpenDataConnection() */
295#define kSendPortMode 0
296#define kPassiveMode 1
297#define kFallBackToSendPortMode 2
298
299/* Parameter for AcceptDataConnection() */
300#define kAcceptForWriting 00100
301#define kAcceptForReading 00101
302#define kNetWriting kAcceptForWriting
303#define kNetReading kAcceptForReading
304
305/* Value for printMode field of Response structure.
306 * Generally, don't worry about this.
307 */
308#define kResponseNoPrint 00001
309#define kResponseNoSave 00002
310#define kResponseNoProc 00002
311
312#define kDefaultFTPPort 21
313
314#define kDefaultFTPBufSize 32768
315
316#ifdef USE_SIO
317/* This version of the library can handle timeouts without
318 * a user-installed signal handler.
319 */
320#define kDefaultXferTimeout 600
321#define kDefaultConnTimeout 30
322#define kDefaultCtrlTimeout 135
323#define kDefaultAbortTimeout 10
324#else
325/* The library doesn't use timeouts by default because it would
326 * break apps that don't have a SIGALRM handler.
327 */
328#define kDefaultXferTimeout (0) /* No timeout. */
329#define kDefaultConnTimeout (0) /* No timeout. */
330#define kDefaultCtrlTimeout (0) /* No timeout. */
331#define kDefaultAbortTimeout 10
332#endif
333
334
335/* Suggested timeout values, in seconds, if you use timeouts. */
336#define kSuggestedDefaultXferTimeout (0) /* No timeout on data blocks. */
337#define kSuggestedDefaultConnTimeout 30
338#define kSuggestedDefaultCtrlTimeout 135 /* 2*MSL, + slop */
339#define kSuggestedAbortTimeout 10
340
341#define kDefaultMaxDials 3
342#define kDefaultRedialDelay 20 /* seconds */
343
344#define kDefaultDataPortMode kSendPortMode
345
346#define kRedialStatusDialing 0
347#define kRedialStatusSleeping 1
348
349#ifndef INADDR_NONE
350# define INADDR_NONE (0xffffffff) /* <netinet/in.h> should have it. */
351#endif
352
353#define kTypeAscii 'A'
354#define kTypeBinary 'I'
355#define kTypeEbcdic 'E'
356
357#define kGlobChars "[*?"
358#define GLOBCHARSINSTR(a) (strpbrk(a, kGlobChars) != NULL)
359
360#define kGlobYes 1
361#define kGlobNo 0
362#define kRecursiveYes 1
363#define kRecursiveNo 0
364#define kAppendYes 1
365#define kAppendNo 0
366#define kResumeYes 1
367#define kResumeNo 0
368#define kDeleteYes 1
369#define kDeleteNo 0
370#define kTarYes 1
371#define kTarNo 0
372
373#define UNIMPLEMENTED_CMD(a) ((a == 500) || (a == 502) || (a == 504))
374
375/* Possible values returned by GetDateAndTime. */
376#define kSizeUnknown ((longest_int) (-1))
377#define kModTimeUnknown ((time_t) (-1))
378
379#define kCommandAvailabilityUnknown (-1)
380#define kCommandAvailable 1
381#define kCommandNotAvailable 0
382
383/* Values returned by FTPDecodeURL. */
384#define kNotURL (-1)
385#define kMalformedURL (-2)
386
387/* Values for the firewall/proxy open. */
388#define kFirewallNotInUse 0
389#define kFirewallUserAtSite 1
390#define kFirewallLoginThenUserAtSite 2
391#define kFirewallSiteSite 3
392#define kFirewallOpenSite 4
393#define kFirewallUserAtUserPassAtPass 5
394#define kFirewallFwuAtSiteFwpUserPass 6
395#define kFirewallUserAtSiteFwuPassFwp 7
396#define kFirewallLastType kFirewallUserAtSiteFwuPassFwp
397
398/* For MLSD, MLST, and STAT. */
399#define kPreferredMlsOpts (kMlsOptType | kMlsOptSize | kMlsOptModify | kMlsOptUNIXmode | kMlsOptUNIXowner | kMlsOptUNIXgroup | kMlsOptUNIXuid | kMlsOptUNIXgid | kMlsOptPerm)
400
401#define kMlsOptType 00001
402#define kMlsOptSize 00002
403#define kMlsOptModify 00004
404#define kMlsOptUNIXmode 00010
405#define kMlsOptUNIXowner 00020
406#define kMlsOptUNIXgroup 00040
407#define kMlsOptPerm 00100
408#define kMlsOptUNIXuid 00200
409#define kMlsOptUNIXgid 00400
410#define kMlsOptUnique 01000
411
412/* For FTPFtw(). */
413#define kFtwFile 0
414#define kFtwDir 1
415
416/* For FTPChdir3(). */
417#define kChdirOnly 00000
418#define kChdirAndMkdir 00001
419#define kChdirAndGetCWD 00002
420#define kChdirOneSubdirAtATime 00004
421
422/* Return codes for custom ConfirmResumeDownloadProcs. */
423#define kConfirmResumeProcNotUsed 0
424#define kConfirmResumeProcSaidSkip 1
425#define kConfirmResumeProcSaidResume 2
426#define kConfirmResumeProcSaidOverwrite 3
427#define kConfirmResumeProcSaidAppend 4
428#define kConfirmResumeProcSaidBestGuess 5
429#define kConfirmResumeProcSaidCancel 6
430
432 const char *volatile *localpath,
433 volatile longest_int localsize,
434 volatile time_t localmtime,
435 const char *volatile remotepath,
436 volatile longest_int remotesize,
437 volatile time_t remotetime,
438 volatile longest_int *volatile startPoint
439);
440
442 const char *volatile localpath,
443 volatile longest_int localsize,
444 volatile time_t localmtime,
445 const char *volatile *remotepath,
446 volatile longest_int remotesize,
447 volatile time_t remotetime,
448 volatile longest_int *volatile startPoint
449);
450
451#define NoConfirmResumeDownloadProc ((ConfirmResumeDownloadProc) 0)
452#define NoConfirmResumeUploadProc ((ConfirmResumeUploadProc) 0)
453#define NoGetPassphraseProc ((FTPGetPassphraseProc) 0)
454
455/* Types of FTP server software.
456 *
457 * We try to recognize a few of these, for information
458 * only, and occasional uses to determine some additional
459 * or broken functionality.
460 */
461#define kServerTypeUnknown 0
462#define kServerTypeWuFTPd 1
463#define kServerTypeNcFTPd 2
464#define kServerTypeProFTPD 3
465#define kServerTypeMicrosoftFTP 4
466#define kServerTypeWarFTPd 5
467#define kServerTypeServ_U 6
468#define kServerTypeWFTPD 7
469#define kServerTypeVFTPD 8
470#define kServerTypeFTP_Max 9
471#define kServerTypeRoxen 10
472#define kServerTypeNetWareFTP 11
473#define kServerTypeWS_FTP 12
474
475
476#if !defined(WIN32) && !defined(_WINDOWS) && !defined(closesocket)
477# define closesocket close
478#endif
479
480#if !defined(WIN32) && !defined(_WINDOWS) && !defined(ioctlsocket)
481# define ioctlsocket ioctl
482#endif
483
484#if defined(WIN32) || defined(_WINDOWS)
485# define LOCAL_PATH_DELIM '\\'
486# define LOCAL_PATH_DELIM_STR "\\"
487# define LOCAL_PATH_ALTDELIM '/'
488# define IsLocalPathDelim(c) ((c == LOCAL_PATH_DELIM) || (c == LOCAL_PATH_ALTDELIM))
489# define UNC_PATH_PREFIX "\\\\"
490# define IsUNCPrefixed(s) (IsLocalPathDelim(s[0]) && IsLocalPathDelim(s[1]))
491#else
492# define LOCAL_PATH_DELIM '/'
493# define LOCAL_PATH_DELIM_STR "/"
494# define StrFindLocalPathDelim(a) strchr(a, LOCAL_PATH_DELIM)
495# define StrRFindLocalPathDelim(a) strrchr(a, LOCAL_PATH_DELIM)
496# define StrRemoveTrailingLocalPathDelim StrRemoveTrailingSlashes
497# define IsLocalPathDelim(c) (c == LOCAL_PATH_DELIM)
498# define TVFSPathToLocalPath(s)
499# define LocalPathToTVFSPath(s)
500#endif
501
502#ifdef __cplusplus
503extern "C"
504{
505#endif /* __cplusplus */
506
507#ifndef _libncftp_ftp_c_
508extern char gLibNcFTPVersion[64];
509#endif
510
511#ifndef _libncftp_errno_c_
513#endif
514
515#if (defined(__GNUC__)) && (__GNUC__ >= 2)
516# ifndef UNUSED
517# define UNUSED(a) a __attribute__ ((unused))
518# endif
519# define LIBNCFTP_USE_VAR(a)
520#else
521# define LIBNCFTP_USE_VAR(a) gLibNcFTP_Uses_Me_To_Quiet_Variable_Unused_Warnings = (a == 0)
522# ifndef UNUSED
523# define UNUSED(a) a
524# endif
525#endif
526
527/* Public routines */
528void FTPAbortDataTransfer(const FTPCIPtr cip);
529int FTPChdir(const FTPCIPtr cip, const char *const cdCwd);
530int FTPChdirAndGetCWD(const FTPCIPtr cip, const char *const cdCwd, char *const newCwd, const size_t newCwdSize);
531int FTPChdir3(FTPCIPtr cip, const char *const cdCwd, char *const newCwd, const size_t newCwdSize, int flags);
532int FTPChmod(const FTPCIPtr cip, const char *const pattern, const char *const mode, const int doGlob);
533int FTPCloseHost(const FTPCIPtr cip);
534int FTPCmd(const FTPCIPtr cip, const char *const cmdspec, ...)
535#if (defined(__GNUC__)) && (__GNUC__ >= 2)
536__attribute__ ((format (printf, 2, 3)))
537#endif
538;
539int FTPDecodeURL(const FTPCIPtr cip, char *const url, LineListPtr cdlist, char *const fn, const size_t fnsize, int *const xtype, int *const wantnlst);
540int FTPDelete(const FTPCIPtr cip, const char *const pattern, const int recurse, const int doGlob);
541int FTPFileExists(const FTPCIPtr cip, const char *const file);
542int FTPFileModificationTime(const FTPCIPtr cip, const char *const file, time_t *const mdtm);
543int FTPFileSize(const FTPCIPtr cip, const char *const file, longest_int *const size, const int type);
544int FTPFileSizeAndModificationTime(const FTPCIPtr cip, const char *const file, longest_int *const size, const int type, time_t *const mdtm);
545int FTPFileType(const FTPCIPtr cip, const char *const file, int *const ftype);
546int FTPGetCWD(const FTPCIPtr cip, char *const newCwd, const size_t newCwdSize);
547int FTPGetFiles3(const FTPCIPtr cip, const char *pattern, const char *const dstdir, const int recurse, int doGlob, const int xtype, const int resumeflag, int appendflag, const int deleteflag, const int tarflag, const ConfirmResumeDownloadProc resumeProc, int reserved);
548int FTPGetOneFile3(const FTPCIPtr cip, const char *const file, const char *const dstfile, const int xtype, const int fdtouse, const int resumeflag, const int appendflag, const int deleteflag, const ConfirmResumeDownloadProc resumeProc, int reserved);
549int FTPInitConnectionInfo(const FTPLIPtr lip, const FTPCIPtr cip, size_t bufsize);
550int FTPInitLibrary(const FTPLIPtr lip);
551int FTPIsDir(const FTPCIPtr cip, const char *const dir);
552int FTPIsRegularFile(const FTPCIPtr cip, const char *const file);
553int FTPList(const FTPCIPtr cip, const int outfd, const int longMode, const char *const lsflag);
554int FTPListToMemory(const FTPCIPtr cip, const char *const pattern, const LineListPtr llines, const char *const lsflags);
555int FTPLocalGlob(FTPCIPtr cip, LineListPtr fileList, const char *pattern, int doGlob);
556int FTPLoginHost(const FTPCIPtr cip);
557int FTPMkdir(const FTPCIPtr cip, const char *const newDir, const int recurse);
558int FTPMkdir2(const FTPCIPtr cip, const char *const newDir, const int recurse, const char *const curDir);
559int FTPOpenHost(const FTPCIPtr cip);
560int FTPOpenHostNoLogin(const FTPCIPtr cip);
561void FTPPerror(const FTPCIPtr cip, const int err, const int eerr, const char *const s1, const char *const s2);
562int FTPPutOneFile3(const FTPCIPtr cip, const char *const file, const char *const dstfile, const int xtype, const int fdtouse, const int appendflag, const char *const tmppfx, const char *const tmpsfx, const int resumeflag, const int deleteflag, const ConfirmResumeUploadProc resumeProc, int reserved);
563int FTPPutFiles3(const FTPCIPtr cip, const char *const pattern, const char *const dstdir, const int recurse, const int doGlob, const int xtype, int appendflag, const char *const tmppfx, const char *const tmpsfx, const int resumeflag, const int deleteflag, const ConfirmResumeUploadProc resumeProc, int reserved);
564int FTPRemoteGlob(FTPCIPtr cip, LineListPtr fileList, const char *pattern, int doGlob);
565int FTPRename(const FTPCIPtr cip, const char *const oldname, const char *const newname);
566int FTPRmdir(const FTPCIPtr cip, const char *const pattern, const int recurse, const int doGlob);
567void FTPShutdownHost(const FTPCIPtr cip);
568const char *FTPStrError(int e);
569int FTPSymlink(const FTPCIPtr cip, const char *const lfrom, const char *const lto);
570int FTPUmask(const FTPCIPtr cip, const char *const umsk);
571int FTPUtime(const FTPCIPtr cip, const char *const file, time_t actime, time_t modtime, time_t crtime);
572
573/* LineList routines */
578LinePtr AddLine(LineListPtr, const char *);
579
580/* Other routines that might be useful. */
581char *StrDup(const char *);
582char *FGets(char *, size_t, FILE *);
583void GetHomeDir(char *, size_t);
584void GetUsrName(char *, size_t);
585void Scramble(unsigned char *dst, size_t dsize, unsigned char *src, char *key);
586time_t UnMDTMDate(char *);
587int MkDirs(const char *const, int mode1);
588char *GetPass(const char *const prompt);
589int FilenameExtensionIndicatesASCII(const char *const pathName, const char *const extnList);
590void StrRemoveTrailingSlashes(char *dst);
591#if defined(WIN32) || defined(_WINDOWS)
592char *StrFindLocalPathDelim(const char *src);
593char *StrRFindLocalPathDelim(const char *src);
595void TVFSPathToLocalPath(char *dst);
596void LocalPathToTVFSPath(char *dst);
597int gettimeofday(struct timeval *const tp, void *junk);
598void WinSleep(unsigned int seconds);
599#endif
600
601#ifdef HAVE_SIGACTION
602void (*NcSignal(int signum, void (*handler)(int)))(int);
603#elif !defined(NcSignal)
604# define NcSignal signal
605#endif
606
607/* Obselete routines. */
608int FTPGetOneFile(const FTPCIPtr cip, const char *const file, const char *const dstfile);
609int FTPGetOneFile2(const FTPCIPtr cip, const char *const file, const char *const dstfile, const int xtype, const int fdtouse, const int resumeflag, const int appendflag);
610int FTPGetFiles(const FTPCIPtr cip, const char *const pattern, const char *const dstdir, const int recurse, const int doGlob);
611int FTPGetFiles2(const FTPCIPtr cip, const char *const pattern, const char *const dstdir, const int recurse, const int doGlob, const int xtype, const int resumeflag, const int appendflag);
612int FTPGetOneFileAscii(const FTPCIPtr cip, const char *const file, const char *const dstfile);
613int FTPGetFilesAscii(const FTPCIPtr cip, const char *const pattern, const char *const dstdir, const int recurse, const int doGlob);
614int FTPPutOneFile(const FTPCIPtr cip, const char *const file, const char *const dstfile);
615int FTPPutOneFile2(const FTPCIPtr cip, const char *const file, const char *const dstfile, const int xtype, const int fdtouse, const int appendflag, const char *const tmppfx, const char *const tmpsfx);
616int FTPPutFiles(const FTPCIPtr cip, const char *const pattern, const char *const dstdir, const int recurse, const int doGlob);
617int FTPPutFiles2(const FTPCIPtr cip, const char *const pattern, const char *const dstdir, const int recurse, const int doGlob, const int xtype, const int appendflag, const char *const tmppfx, const char *const tmpsfx);
618int FTPPutOneFileAscii(const FTPCIPtr cip, const char *const file, const char *const dstfile);
619int FTPPutFilesAscii(const FTPCIPtr cip, const char *const pattern, const char *const dstdir, const int recurse, const int doGlob);
620
621/* Private routines, or stuff for testing */
622char *FTPGetLocalCWD(char *buf, size_t size);
623int FTPQueryFeatures(const FTPCIPtr);
624int FTPMListOneFile(const FTPCIPtr cip, const char *const file, const MLstItemPtr mlip);
627int FTPListToMemory2(const FTPCIPtr cip, const char *const pattern, const LineListPtr llines, const char *const lsflags, const int blanklines, int *const tryMLSD);
628void FTPInitIOTimer(const FTPCIPtr);
629int FTPStartDataCmd(const FTPCIPtr, int, int, longest_int, const char *,...)
630#if (defined(__GNUC__)) && (__GNUC__ >= 2)
631__attribute__ ((format (printf, 5, 6)))
632#endif
633;
634void FTPStartIOTimer(const FTPCIPtr);
635void FTPStopIOTimer(const FTPCIPtr);
636void FTPUpdateIOTimer(const FTPCIPtr);
637int FTPSetTransferType(const FTPCIPtr, int);
638int FTPEndDataCmd(const FTPCIPtr, int);
639int FTPRemoteHelp(const FTPCIPtr, const char *const, const LineListPtr);
640int FTPCmdNoResponse(const FTPCIPtr, const char *const cmdspec,...)
641#if (defined(__GNUC__)) && (__GNUC__ >= 2)
642__attribute__ ((format (printf, 2, 3)))
643#endif
644;
645int WaitResponse(const FTPCIPtr, unsigned int);
647int FTPLocalRecursiveFileList2(FTPCIPtr cip, LineListPtr fileList, FileInfoListPtr files, int erelative);
650int FTPRebuildConnectionInfo(const FTPLIPtr lip, const FTPCIPtr cip);
651int FTPFileExistsStat(const FTPCIPtr cip, const char *const file);
652int FTPFileExistsNlst(const FTPCIPtr cip, const char *const file);
653int FTPFileExists2(const FTPCIPtr cip, const char *const file, const int tryMDTM, const int trySIZE, const int tryMLST, const int trySTAT, const int tryNLST);
654int FTPFtw(const FTPCIPtr cip, const char *const dir, FTPFtwProc proc, int maxdepth);
655int BufferGets(char *, size_t, int, char *, char **, char **, size_t);
661void SortFileInfoList(FileInfoListPtr, int, int);
664int ComputeRNames(FileInfoListPtr, const char *, int, int);
665int ComputeLNames(FileInfoListPtr, const char *, const char *, int);
670void URLCopyToken(char *, size_t, const char *, size_t);
671int UnMlsT(const char *const, const MLstItemPtr);
679int GetTelnetString(const FTPCIPtr, char *, size_t, FILE *, FILE *);
681int RCmd(const FTPCIPtr, ResponsePtr, const char *, ...)
682#if (defined(__GNUC__)) && (__GNUC__ >= 2)
683__attribute__ ((format (printf, 3, 4)))
684#endif
685;
686
687#ifdef __cplusplus
688}
689#endif /* __cplusplus */
690
691#endif /* _ncftp_h_ */
#define gettimeofday(tv, tz)
Definition: adns_win32.h:159
unsigned int dir
Definition: maze.c:112
void modtime(int argc, const char *argv[])
Definition: cmds.c:2232
#define __attribute__(x)
Definition: wpp_private.h:207
UINT(* handler)(MSIPACKAGE *)
Definition: action.c:7482
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
_In_ uint64_t _In_ uint64_t _In_ uint64_t _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2996
r reserved
Definition: btrfs.c:3006
__kernel_time_t time_t
Definition: linux.h:252
#define printf
Definition: freeldr.h:93
uint8_t junk[422]
Definition: fsck.fat.h:34
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
GLsizeiptr size
Definition: glext.h:5919
GLenum src
Definition: glext.h:6340
GLubyte * pattern
Definition: glext.h:7787
GLenum mode
Definition: glext.h:6217
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLenum GLenum dst
Definition: glext.h:6340
GLbitfield flags
Definition: glext.h:7161
GLboolean GLuint group
Definition: glext.h:11120
GLenum GLuint GLsizei bufsize
Definition: glext.h:7473
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
Definition: glfuncs.h:52
#define e
Definition: ke_i.h:82
struct S1 s1
struct S2 s2
static const WCHAR url[]
Definition: encode.c:1432
int WaitResponse(const FTPCIPtr, unsigned int)
Definition: rcmd.c:684
int FTPPutFiles2(const FTPCIPtr cip, const char *const pattern, const char *const dstdir, const int recurse, const int doGlob, const int xtype, const int appendflag, const char *const tmppfx, const char *const tmpsfx)
Definition: io.c:2793
void URLCopyToken(char *, size_t, const char *, size_t)
Definition: open.c:598
int FTPCmd(const FTPCIPtr cip, const char *const cmdspec,...)
Definition: rcmd.c:603
int FTPGetFiles2(const FTPCIPtr cip, const char *const pattern, const char *const dstdir, const int recurse, const int doGlob, const int xtype, const int resumeflag, const int appendflag)
Definition: io.c:2739
int FTPRemoteRecursiveFileList1(FTPCIPtr, char *const, FileInfoListPtr)
Definition: glob.c:983
int FTPFtw(const FTPCIPtr cip, const char *const dir, FTPFtwProc proc, int maxdepth)
Definition: glob.c:1706
int FTPPutFilesAscii(const FTPCIPtr cip, const char *const pattern, const char *const dstdir, const int recurse, const int doGlob)
Definition: io.c:2811
int FTPMListOneFile(const FTPCIPtr cip, const char *const file, const MLstItemPtr mlip)
Definition: cmds.c:947
int RCmd(const FTPCIPtr, ResponsePtr, const char *,...)
Definition: rcmd.c:718
int ConcatFileInfoList(FileInfoListPtr, FileInfoListPtr)
Definition: linelist.c:556
void InitFileInfoList(FileInfoListPtr)
Definition: linelist.c:193
int GetTelnetString(const FTPCIPtr, char *, size_t, FILE *, FILE *)
struct FTPConnectionInfo * FTPCIPtr
Definition: ncftp.h:124
struct Line * LinePtr
Definition: ncftp.h:78
int FTPPutFiles(const FTPCIPtr cip, const char *const pattern, const char *const dstdir, const int recurse, const int doGlob)
Definition: io.c:2784
int FTPGetFiles3(const FTPCIPtr cip, const char *pattern, const char *const dstdir, const int recurse, int doGlob, const int xtype, const int resumeflag, int appendflag, const int deleteflag, const int tarflag, const ConfirmResumeDownloadProc resumeProc, int reserved)
int BufferGets(char *, size_t, int, char *, char **, char **, size_t)
Definition: rcmd.c:978
int FTPOpenHostNoLogin(const FTPCIPtr cip)
Definition: open.c:910
int FTPRmdir(const FTPCIPtr cip, const char *const pattern, const int recurse, const int doGlob)
Definition: cmds.c:784
int ComputeRNames(FileInfoListPtr, const char *, int, int)
Definition: linelist.c:579
int FTPSymlink(const FTPCIPtr cip, const char *const lfrom, const char *const lto)
Definition: cmds.c:1585
void FTPShutdownHost(const FTPCIPtr cip)
Definition: open.c:564
int FTPListToMemory(const FTPCIPtr cip, const char *const pattern, const LineListPtr llines, const char *const lsflags)
Definition: io.c:2819
int FTPFileSizeAndModificationTime(const FTPCIPtr cip, const char *const file, longest_int *const size, const int type, time_t *const mdtm)
Definition: cmds.c:1433
int FTPRemoteRecursiveFileList(FTPCIPtr, LineListPtr, FileInfoListPtr)
Definition: glob.c:1032
int FTPFileExistsStat(const FTPCIPtr cip, const char *const file)
Definition: cmds.c:1008
#define StrRFindLocalPathDelim(a)
Definition: ncftp.h:495
void GetHomeDir(char *, size_t)
Definition: util.c:240
struct SReadlineInfo SReadlineInfo
void InitLineList(LineListPtr)
Definition: linelist.c:54
LinePtr RemoveLine(LineListPtr, LinePtr)
Definition: linelist.c:63
int FTPListToMemory2(const FTPCIPtr cip, const char *const pattern, const LineListPtr llines, const char *const lsflags, const int blanklines, int *const tryMLSD)
Definition: io.c:366
void UnvectorizeFileInfoList(FileInfoListPtr)
Definition: linelist.c:441
void(* FTPSigProc)(int)
Definition: ncftp.h:76
struct MLstItem * MLstItemPtr
int FTPGetOneFileAscii(const FTPCIPtr cip, const char *const file, const char *const dstfile)
Definition: io.c:2748
void DisposeLineListContents(LineListPtr)
Definition: linelist.c:33
char * FTPGetLocalCWD(char *buf, size_t size)
Definition: util.c:29
struct FileInfo * FileInfoPtr
Definition: ncftp.h:250
int UnMlsD(FileInfoListPtr, LineListPtr)
Definition: glob.c:827
int FTPEndDataCmd(const FTPCIPtr, int)
Definition: rcmd.c:933
int MkDirs(const char *const, int mode1)
Definition: util.c:785
int FTPCloseHost(const FTPCIPtr cip)
Definition: open.c:523
int FTPOpenHost(const FTPCIPtr cip)
Definition: open.c:818
void PrintResponse(const FTPCIPtr, LineListPtr)
Definition: rcmd.c:74
int FTPPutOneFile3(const FTPCIPtr cip, const char *const file, const char *const dstfile, const int xtype, const int fdtouse, const int appendflag, const char *const tmppfx, const char *const tmpsfx, const int resumeflag, const int deleteflag, const ConfirmResumeUploadProc resumeProc, int reserved)
int FTPLocalRecursiveFileList2(FTPCIPtr cip, LineListPtr fileList, FileInfoListPtr files, int erelative)
Definition: glob.c:1276
struct LineList * LineListPtr
int FTPMkdir(const FTPCIPtr cip, const char *const newDir, const int recurse)
Definition: cmds.c:641
int(* ConfirmResumeDownloadProc)(const char *volatile *localpath, volatile longest_int localsize, volatile time_t localmtime, const char *volatile remotepath, volatile longest_int remotesize, volatile time_t remotetime, volatile longest_int *volatile startPoint)
Definition: ncftp.h:431
int UnMlsT(const char *const, const MLstItemPtr)
Definition: glob.c:693
char gLibNcFTPVersion[64]
Definition: ftp.c:11
int FTPInitConnectionInfo(const FTPLIPtr lip, const FTPCIPtr cip, size_t bufsize)
Definition: open.c:984
int FTPFileType(const FTPCIPtr cip, const char *const file, int *const ftype)
Definition: cmds.c:1475
void FTPStartIOTimer(const FTPCIPtr)
Definition: io.c:93
void FTPInitializeOurHostName(const FTPLIPtr)
Definition: open.c:63
void FTPPerror(const FTPCIPtr cip, const int err, const int eerr, const char *const s1, const char *const s2)
Definition: errno.c:134
int FTPUtime(const FTPCIPtr cip, const char *const file, time_t actime, time_t modtime, time_t crtime)
Definition: cmds.c:1649
int FTPFileModificationTime(const FTPCIPtr cip, const char *const file, time_t *const mdtm)
Definition: cmds.c:649
int FTPMkdir2(const FTPCIPtr cip, const char *const newDir, const int recurse, const char *const curDir)
Definition: cmds.c:472
void(* FTPConnectMessageProc)(const FTPCIPtr, ResponsePtr)
Definition: ncftp.h:127
#define longest_int
Definition: ncftp.h:68
void InitFileInfo(FileInfoPtr)
Definition: linelist.c:471
struct FTPLibraryInfo * FTPLIPtr
int FilenameExtensionIndicatesASCII(const char *const pathName, const char *const extnList)
Definition: util.c:963
int FTPFileExistsNlst(const FTPCIPtr cip, const char *const file)
Definition: cmds.c:1209
void DoneWithResponse(const FTPCIPtr, ResponsePtr)
Definition: rcmd.c:114
void(* FTPLoginMessageProc)(const FTPCIPtr, ResponsePtr)
Definition: ncftp.h:128
#define StrFindLocalPathDelim(a)
Definition: ncftp.h:494
int FTPFileExists2(const FTPCIPtr cip, const char *const file, const int tryMDTM, const int trySIZE, const int tryMLST, const int trySTAT, const int tryNLST)
Definition: cmds.c:1350
void FTPAbortDataTransfer(const FTPCIPtr cip)
Definition: rcmd.c:870
int FTPGetFiles(const FTPCIPtr cip, const char *const pattern, const char *const dstdir, const int recurse, const int doGlob)
Definition: io.c:2730
void GetUsrName(char *, size_t)
Definition: util.c:290
int FTPPutOneFile2(const FTPCIPtr cip, const char *const file, const char *const dstfile, const int xtype, const int fdtouse, const int appendflag, const char *const tmppfx, const char *const tmpsfx)
Definition: io.c:2775
int FTPGetFilesAscii(const FTPCIPtr cip, const char *const pattern, const char *const dstdir, const int recurse, const int doGlob)
Definition: io.c:2757
int FTPSetTransferType(const FTPCIPtr, int)
Definition: cmds.c:836
int FTPPutFiles3(const FTPCIPtr cip, const char *const pattern, const char *const dstdir, const int recurse, const int doGlob, const int xtype, int appendflag, const char *const tmppfx, const char *const tmpsfx, const int resumeflag, const int deleteflag, const ConfirmResumeUploadProc resumeProc, int reserved)
int FTPChmod(const FTPCIPtr cip, const char *const pattern, const char *const mode, const int doGlob)
Definition: cmds.c:46
void FTPUpdateIOTimer(const FTPCIPtr)
Definition: io.c:104
int LineToFileInfoList(LinePtr, FileInfoListPtr)
Definition: linelist.c:775
int ConcatFileToFileInfoList(FileInfoListPtr, char *)
Definition: linelist.c:740
FileInfoPtr RemoveFileInfo(FileInfoListPtr, FileInfoPtr)
Definition: linelist.c:483
struct FileInfo FileInfo
int FTPUmask(const FTPCIPtr cip, const char *const umsk)
Definition: cmds.c:1602
int LineListToFileInfoList(LineListPtr, FileInfoListPtr)
Definition: linelist.c:758
int FTPRebuildConnectionInfo(const FTPLIPtr lip, const FTPCIPtr cip)
Definition: open.c:1041
#define StrRemoveTrailingLocalPathDelim
Definition: ncftp.h:496
int FTPPutOneFile(const FTPCIPtr cip, const char *const file, const char *const dstfile)
Definition: io.c:2766
#define LocalPathToTVFSPath(s)
Definition: ncftp.h:499
int FTPDelete(const FTPCIPtr cip, const char *const pattern, const int recurse, const int doGlob)
Definition: cmds.c:195
int FTPStartDataCmd(const FTPCIPtr, int, int, longest_int, const char *,...)
Definition: rcmd.c:763
int FTPGetCWD(const FTPCIPtr cip, char *const newCwd, const size_t newCwdSize)
Definition: cmds.c:254
int FTPRename(const FTPCIPtr cip, const char *const oldname, const char *const newname)
Definition: cmds.c:703
#define NcSignal
Definition: ncftp.h:604
void VectorizeFileInfoList(FileInfoListPtr)
Definition: linelist.c:423
int FTPIsDir(const FTPCIPtr cip, const char *const dir)
Definition: cmds.c:1531
time_t UnMDTMDate(char *)
Definition: util.c:486
void ReInitResponse(const FTPCIPtr, ResponsePtr)
Definition: rcmd.c:142
void TraceResponse(const FTPCIPtr, ResponsePtr)
Definition: rcmd.c:55
void FTPInitializeAnonPassword(const FTPLIPtr)
Definition: open.c:81
int FTPChdir(const FTPCIPtr cip, const char *const cdCwd)
Definition: cmds.c:11
int FTPIsRegularFile(const FTPCIPtr cip, const char *const file)
Definition: cmds.c:1558
int ComputeLNames(FileInfoListPtr, const char *, const char *, int)
Definition: linelist.c:663
int FTPGetOneFile3(const FTPCIPtr cip, const char *const file, const char *const dstfile, const int xtype, const int fdtouse, const int resumeflag, const int appendflag, const int deleteflag, const ConfirmResumeDownloadProc resumeProc, int reserved)
void SortFileInfoList(FileInfoListPtr, int, int)
Definition: linelist.c:353
const char * FTPStrError(int e)
Definition: errno.c:114
int(* ConfirmResumeUploadProc)(const char *volatile localpath, volatile longest_int localsize, volatile time_t localmtime, const char *volatile *remotepath, volatile longest_int remotesize, volatile time_t remotetime, volatile longest_int *volatile startPoint)
Definition: ncftp.h:441
void(* FTPGetPassphraseProc)(const FTPCIPtr, LineListPtr pwPrompt, char *pass, size_t dsize)
Definition: ncftp.h:132
int FTPLoginHost(const FTPCIPtr cip)
Definition: open.c:110
#define TVFSPathToLocalPath(s)
Definition: ncftp.h:498
int CopyLineList(LineListPtr, LineListPtr)
Definition: linelist.c:127
int FTPLocalGlob(FTPCIPtr cip, LineListPtr fileList, const char *pattern, int doGlob)
Definition: glob.c:1580
int FTPChdir3(FTPCIPtr cip, const char *const cdCwd, char *const newCwd, const size_t newCwdSize, int flags)
Definition: cmds.c:376
int FTPRemoteHelp(const FTPCIPtr, const char *const, const LineListPtr)
Definition: cmds.c:739
int FTPPutOneFileAscii(const FTPCIPtr cip, const char *const file, const char *const dstfile)
Definition: io.c:2802
struct FileInfoList * FileInfoListPtr
void(* FTPLogProc)(const FTPCIPtr, char *)
Definition: ncftp.h:126
int FTPLocalRecursiveFileList(FTPCIPtr, LineListPtr, FileInfoListPtr)
Definition: glob.c:1333
int FTPDecodeURL(const FTPCIPtr cip, char *const url, LineListPtr cdlist, char *const fn, const size_t fnsize, int *const xtype, int *const wantnlst)
Definition: open.c:639
void DisposeFileInfoListContents(FileInfoListPtr)
Definition: linelist.c:152
int GetResponse(const FTPCIPtr, ResponsePtr)
Definition: rcmd.c:287
int FTPCmdNoResponse(const FTPCIPtr, const char *const cmdspec,...)
Definition: rcmd.c:656
int FTPList(const FTPCIPtr cip, const int outfd, const int longMode, const char *const lsflag)
Definition: io.c:174
int(* FTPFtwProc)(const FTPCIPtr cip, const char *fn, int flag)
Definition: ncftp.h:131
struct FileInfo ** FileInfoVec
Definition: ncftp.h:250
int FTPGetOneFile2(const FTPCIPtr cip, const char *const file, const char *const dstfile, const int xtype, const int fdtouse, const int resumeflag, const int appendflag)
Definition: io.c:2721
int FTPGetOneFile(const FTPCIPtr cip, const char *const file, const char *const dstfile)
Definition: io.c:2712
LinePtr AddLine(LineListPtr, const char *)
Definition: linelist.c:94
int FTPRemoteGlob(FTPCIPtr cip, LineListPtr fileList, const char *pattern, int doGlob)
Definition: glob.c:1341
FileInfoPtr AddFileInfo(FileInfoListPtr, FileInfoPtr)
Definition: linelist.c:530
int FTPInitLibrary(const FTPLIPtr lip)
Definition: open.c:1110
void(* FTPProgressMeterProc)(const FTPCIPtr, int)
Definition: ncftp.h:125
int FTPFileSize(const FTPCIPtr cip, const char *const file, longest_int *const size, const int type)
Definition: cmds.c:887
int UnLslR(FileInfoListPtr, LineListPtr, int)
Definition: glob.c:561
int FTPFileExists(const FTPCIPtr cip, const char *const file)
Definition: cmds.c:1423
void StrRemoveTrailingSlashes(char *dst)
Definition: util.c:768
struct Response * ResponsePtr
void(* FTPRedialStatusProc)(const FTPCIPtr, int, int)
Definition: ncftp.h:129
void FTPInitIOTimer(const FTPCIPtr)
Definition: io.c:71
char * GetPass(const char *const prompt)
Definition: util.c:186
int FTPQueryFeatures(const FTPCIPtr)
Definition: open.c:380
int gLibNcFTP_Uses_Me_To_Quiet_Variable_Unused_Warnings
Definition: errno.c:111
void(* FTPPrintResponseProc)(const FTPCIPtr, ResponsePtr)
Definition: ncftp.h:130
ResponsePtr InitResponse(void)
Definition: rcmd.c:38
void Scramble(unsigned char *dst, size_t dsize, unsigned char *src, char *key)
Definition: util.c:607
char * FGets(char *, size_t, FILE *)
Definition: util.c:111
int FTPChdirAndGetCWD(const FTPCIPtr cip, const char *const cdCwd, char *const newCwd, const size_t newCwdSize)
Definition: cmds.c:313
void FTPStopIOTimer(const FTPCIPtr)
Definition: io.c:159
static HANDLE proc()
Definition: pdb.c:34
#define err(...)
#define StrDup
Definition: shlwapi.h:1533
int firewallType
Definition: ncftp.h:221
struct sockaddr_in ourCtlAddr
Definition: ncftp.h:183
FILE * cout
Definition: ncftp.h:189
int ietfCompatLevel
Definition: ncftp.h:233
time_t nextProgressUpdate
Definition: ncftp.h:207
struct sockaddr_in servDataAddr
Definition: ncftp.h:182
unsigned int firewallPort
Definition: ncftp.h:220
FTPPrintResponseProc printResponseProc
Definition: ncftp.h:226
int curTransferType
Definition: ncftp.h:157
int dataTimedOut
Definition: ncftp.h:212
char srlBuf[768]
Definition: ncftp.h:239
FTPLogProc errLogProc
Definition: ncftp.h:148
int hasRETRBUFSIZE
Definition: ncftp.h:171
int doNotGetStartingWorkingDirectory
Definition: ncftp.h:237
unsigned short ephemHi
Definition: ncftp.h:195
int reserved[32]
Definition: ncftp.h:247
int lastFTPCmdResultNum
Definition: ncftp.h:216
char * startingWorkingDirectory
Definition: ncftp.h:158
char host[64]
Definition: ncftp.h:136
char magic[16]
Definition: ncftp.h:135
double percentCompleted
Definition: ncftp.h:204
LineList lastFTPCmdResultLL
Definition: ncftp.h:215
unsigned int xferTimeout
Definition: ncftp.h:141
char firewallPass[64]
Definition: ncftp.h:219
double sec
Definition: ncftp.h:201
time_t mdtm
Definition: ncftp.h:206
unsigned int connTimeout
Definition: ncftp.h:142
char firewallHost[64]
Definition: ncftp.h:217
unsigned short ephemLo
Definition: ncftp.h:194
size_t dataSocketRBufSize
Definition: ncftp.h:230
int dataPortMode
Definition: ncftp.h:152
FTPProgressMeterProc progress
Definition: ncftp.h:198
double kBytesPerSec
Definition: ncftp.h:203
int numDownloads
Definition: ncftp.h:234
int NLSTfileParamWorks
Definition: ncftp.h:180
int hasSTORBUFSIZE
Definition: ncftp.h:174
size_t ctrlSocketRBufSize
Definition: ncftp.h:228
unsigned int abortTimeout
Definition: ncftp.h:144
longest_int startPoint
Definition: ncftp.h:159
const char * asciiFilenameExtensions
Definition: ncftp.h:246
longest_int llUser
Definition: ncftp.h:245
int useProgressMeter
Definition: ncftp.h:199
FTPGetPassphraseProc passphraseProc
Definition: ncftp.h:242
FTPConnectMessageProc onConnectMsgProc
Definition: ncftp.h:224
struct sockaddr_in servCtlAddr
Definition: ncftp.h:181
void * pUser
Definition: ncftp.h:244
FILE * debugLog
Definition: ncftp.h:145
double secLeft
Definition: ncftp.h:202
size_t ctrlSocketSBufSize
Definition: ncftp.h:229
FILE * errLog
Definition: ncftp.h:146
const char * rname
Definition: ncftp.h:208
size_t dataSocketSBufSize
Definition: ncftp.h:231
FTPRedialStatusProc redialStatusProc
Definition: ncftp.h:225
const char * lname
Definition: ncftp.h:209
int STATfileParamWorks
Definition: ncftp.h:179
FTPLoginMessageProc onLoginMsgProc
Definition: ncftp.h:227
struct timeval t0
Definition: ncftp.h:210
size_t bufSize
Definition: ncftp.h:187
unsigned int port
Definition: ncftp.h:140
FTPLIPtr lip
Definition: ncftp.h:149
longest_int expectedSize
Definition: ncftp.h:205
char actualHost[64]
Definition: ncftp.h:153
longest_int bytesTransferred
Definition: ncftp.h:197
SReadlineInfo ctrlSrl
Definition: ncftp.h:240
struct sockaddr_in ourDataAddr
Definition: ncftp.h:184
char firewallUser[64]
Definition: ncftp.h:218
unsigned int ctrlTimeout
Definition: ncftp.h:143
FILE * cin
Definition: ncftp.h:188
char acct[64]
Definition: ncftp.h:139
char lastFTPCmdResultStr[128]
Definition: ncftp.h:214
FTPLogProc debugLogProc
Definition: ncftp.h:147
char user[64]
Definition: ncftp.h:137
char * buf
Definition: ncftp.h:186
int socksInit
Definition: ncftp.h:116
char defaultAnonPassword[80]
Definition: ncftp.h:121
int hresult
Definition: ncftp.h:119
char magic[16]
Definition: ncftp.h:114
char ourHostName[64]
Definition: ncftp.h:118
int htried
Definition: ncftp.h:120
unsigned int defaultPort
Definition: ncftp.h:117
FileInfoPtr last
Definition: ncftp.h:265
FileInfoPtr first
Definition: ncftp.h:265
int nFileInfos
Definition: ncftp.h:269
FileInfoVec vec
Definition: ncftp.h:266
size_t maxFileLen
Definition: ncftp.h:267
int sortOrder
Definition: ncftp.h:271
size_t maxPlugLen
Definition: ncftp.h:268
int sortKey
Definition: ncftp.h:270
longest_int size
Definition: ncftp.h:260
FileInfoPtr prev
Definition: ncftp.h:252
size_t relnameLen
Definition: ncftp.h:261
int type
Definition: ncftp.h:258
char * lname
Definition: ncftp.h:256
char * rlinkto
Definition: ncftp.h:255
time_t mdtm
Definition: ncftp.h:259
char * plug
Definition: ncftp.h:257
FileInfoPtr next
Definition: ncftp.h:252
char * rname
Definition: ncftp.h:254
char * relname
Definition: ncftp.h:253
Definition: ncftp.h:84
int nLines
Definition: ncftp.h:86
LinePtr first
Definition: ncftp.h:85
LinePtr last
Definition: ncftp.h:85
Definition: ncftp.h:79
LinePtr prev
Definition: ncftp.h:80
char * line
Definition: ncftp.h:81
LinePtr next
Definition: ncftp.h:80
longest_int fsize
Definition: ncftp.h:279
time_t ftime
Definition: ncftp.h:280
char fname[512]
Definition: ncftp.h:276
char perm[16]
Definition: ncftp.h:284
int gid
Definition: ncftp.h:283
int ftype
Definition: ncftp.h:278
int mode
Definition: ncftp.h:281
int uid
Definition: ncftp.h:282
char owner[16]
Definition: ncftp.h:285
char linkto[512]
Definition: ncftp.h:277
Definition: ncftp.h:89
int eofOkay
Definition: ncftp.h:94
int hadEof
Definition: ncftp.h:95
int printMode
Definition: ncftp.h:93
int code
Definition: ncftp.h:92
int codeType
Definition: ncftp.h:91
LineList msg
Definition: ncftp.h:90
char * bufLim
Definition: ncftp.h:103
char * bufPtr
Definition: ncftp.h:102
int timeoutLen
Definition: ncftp.h:108
size_t bufSize
Definition: ncftp.h:104
size_t bufSizeMax
Definition: ncftp.h:105
char * buf
Definition: ncftp.h:101
int requireEOLN
Definition: ncftp.h:109
int malloc
Definition: ncftp.h:106
Definition: fci.c:127
Definition: dhcpd.h:62
Definition: copy.c:22
pass
Definition: typegen.h:25
static GLenum _GLUfuncptr fn
Definition: wgl_font.c:159