91 #ifdef SPAM_PROBLEM_HAS_BEEN_SOLVED_FOREVER 129 if (cip->
user[0] ==
'\0')
136 if (cip->
pass[0] ==
'\0') {
149 for (firstTime = 1, fwloggedin = 0; ; ) {
158 if (firstTime != 0) {
315 if ((anonLogin == 0) && (cip->
leavePass == 0))
327 if ((anonLogin == 0) && (cip->
leavePass == 0))
340 char buf[256], *feat;
346 while (feat !=
NULL) {
349 if (
ISTREQ(feat,
"type")) {
351 }
else if (
ISTREQ(feat,
"size")) {
353 }
else if (
ISTREQ(feat,
"modify")) {
355 }
else if (
ISTREQ(feat,
"UNIX.mode")) {
357 }
else if (
ISTREQ(feat,
"UNIX.owner")) {
359 }
else if (
ISTREQ(feat,
"UNIX.group")) {
361 }
else if (
ISTREQ(feat,
"perm")) {
363 }
else if (
ISTREQ(feat,
"UNIX.uid")) {
365 }
else if (
ISTREQ(feat,
"UNIX.gid")) {
367 }
else if (
ISTREQ(feat,
"UNIX.gid")) {
475 }
else if (
ISTRNCMP(
cp,
"Compliance Level: ", 18) == 0) {
606 dlim =
dst + dsize - 1;
607 slim =
src + howmuch;
614 if (
src < slim + 2) {
619 if ((
sscanf(
h,
"%x", &hc) >= 0) && (hc != 0xeeff)) {
621 *(
unsigned char *)
dst = (
unsigned char) hc;
664 if (wantnlst !=
NULL)
670 #ifdef HAVE_STRCASECMP 699 for (hstart =
cp; ;
cp++) {
705 }
else if ((*
cp ==
'\0') || (*
cp ==
'/')) {
749 if ((*hend ==
'\0') || ((*hend ==
'/') && (hend[1] ==
'\0'))) {
754 lastslash =
strrchr(hend,
'/');
755 if (lastslash ==
NULL) {
761 if ((semi =
strchr(lastslash + 1,
';')) !=
NULL) {
763 #ifdef HAVE_STRCASECMP 774 if (wantnlst !=
NULL) {
784 if (
strcmp(semi,
"type=i") == 0) {
787 }
else if (
strcmp(semi,
"type=a") == 0) {
790 }
else if (
strcmp(semi,
"type=b") == 0) {
793 }
else if (
strcmp(semi,
"type=d") == 0) {
794 if (wantnlst !=
NULL) {
806 for (parsestr = hend; (tok =
strtok(parsestr,
"/")) !=
NULL; parsestr =
NULL) {
830 if (cip->
host[0] ==
'\0') {
847 PrintF(cip,
"Retry Number: %d\n", dials);
884 PrintF(cip,
"Cannot recover from miscellaneous open error %d.\n",
result);
892 elapsed = (
int) (t1 - t0);
893 if (elapsed < cip->redialDelay) {
894 PrintF(cip,
"Sleeping %u seconds.\n",
922 if (cip->
host[0] ==
'\0') {
940 PrintF(cip,
"Retry Number: %d\n", dials);
958 PrintF(cip,
"Cannot recover from miscellaneous open error %d.\n",
result);
966 elapsed = (
int) (t1 - t0);
967 if (elapsed < cip->redialDelay) {
968 PrintF(cip,
"Sleeping %u seconds.\n",
1130 #ifdef HAVE_LIBSOCKS 1131 SOCKSinit(
"libncftp");
void DisposeSReadlineInfo(SReadlineInfo *)
#define kFirewallSiteSite
#define kServerTypeWuFTPd
LineList lastFTPCmdResultLL
static void FTPExamineMlstFeatures(const FTPCIPtr cip, const char *features)
#define kFirewallLastType
void ReInitResponse(const FTPCIPtr, ResponsePtr)
void FTPAbortDataTransfer(const FTPCIPtr cip)
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
const char * asciiFilenameExtensions
#define kCommandAvailable
int RCmd(const FTPCIPtr, ResponsePtr, const char *,...)
#define kServerTypeNcFTPd
_Check_return_ _CRTIMP FILE *__cdecl _fdopen(_In_ int _FileHandle, _In_z_ const char *_Mode)
ACPI_SIZE strlen(const char *String)
static GLenum _GLUfuncptr fn
int InitSReadlineInfo(SReadlineInfo *, int, char *, size_t, int, int)
void CloseDataConnection(const FTPCIPtr cip)
#define kFirewallUserAtSite
char * strstr(char *String1, char *String2)
#define NoGetPassphraseProc
void CloseControlConnection(const FTPCIPtr cip)
FTPLoginMessageProc onLoginMsgProc
int FTPOpenHost(const FTPCIPtr cip)
#define kCommandAvailabilityUnknown
void DoneWithResponse(const FTPCIPtr, ResponsePtr)
#define kDefaultCtrlTimeout
#define STRNCPY(dst, src, n)
int doNotGetStartingWorkingDirectory
FTPProgressMeterProc progress
_Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
#define kFirewallNotInUse
#define kDefaultRedialDelay
GLfloat GLfloat GLfloat GLfloat h
GLenum GLuint GLenum GLsizei const GLchar * buf
#define kServerTypeNetWareFTP
FTPRedialStatusProc redialStatusProc
int GetOurHostName(char *host, size_t siz)
#define kFirewallUserAtSiteFwuPassFwp
int FTPInitLibrary(const FTPLIPtr lip)
FTPConnectMessageProc onConnectMsgProc
void FTPInitializeOurHostName(const FTPLIPtr lip)
_Check_return_ _CRTIMP int __cdecl sscanf(_In_z_ const char *_Src, _In_z_ _Scanf_format_string_ const char *_Format,...)
#define kErrConnectRefused
struct FTPConnectionInfo FTPConnectionInfo
char * startingWorkingDirectory
#define kFirewallLoginThenUserAtSite
static int FTPAllocateHost(const FTPCIPtr cip)
PSERVENT WSAAPI getservbyname(IN const char FAR *name, IN const char FAR *proto)
int FTPDecodeURL(const FTPCIPtr cip, char *const url, LineListPtr cdlist, char *const fn, const size_t fnsize, int *const xtype, int *const wantnlst)
#define kErrHostDisconnectedDuringLogin
char defaultAnonPassword[80]
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
LinePtr AddLine(LineListPtr list, const char *buf1)
int FTPLoginHost(const FTPCIPtr cip)
#define kErrBadRemoteUser
#define kFirewallFwuAtSiteFwpUserPass
#define kDefaultAbortTimeout
void FTPInitializeAnonPassword(const FTPLIPtr lip)
#define kRedialStatusSleeping
#define kClosedFileDescriptor
void FTPShutdownHost(const FTPCIPtr cip)
int FTPRebuildConnectionInfo(const FTPLIPtr lip, const FTPCIPtr cip)
#define kCommandNotAvailable
int OpenControlConnection(const FTPCIPtr cip, char *host, unsigned int port)
#define kDefaultConnTimeout
#define kErrConnectMiscErr
int FTPOpenHostNoLogin(const FTPCIPtr cip)
void PrintF(const FTPCIPtr cip, const char *const fmt,...)
#define kFirewallOpenSite
FTPPrintResponseProc printResponseProc
static void FTPDeallocateHost(const FTPCIPtr cip)
void InitLineList(LineListPtr list)
int FTPGetCWD(const FTPCIPtr cip, char *const newCwd, const size_t newCwdSize)
unsigned int firewallPort
int FTPQueryFeatures(const FTPCIPtr cip)
void GetUsrName(char *, size_t)
char * strtok(char *String, const char *Delimiters)
#define kFirewallUserAtUserPassAtPass
int SetLinger(const FTPCIPtr cip, int sockfd, int onoff)
char * strchr(const char *String, int ch)
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
#define kDefaultXferTimeout
int FTPInitConnectionInfo(const FTPLIPtr lip, const FTPCIPtr cip, size_t bufSize)
void URLCopyToken(char *dst, size_t dsize, const char *src, size_t howmuch)
#define kErrRemoteHostClosedConnection
int strcmp(const char *String1, const char *String2)
unsigned int abortTimeout
#define kErrConnectRetryableErr
void DisposeLineListContents(LineListPtr list)
int FTPCloseHost(const FTPCIPtr cip)
ResponsePtr InitResponse(void)
#define kErrBadRemoteUserOrPassword
#define kRedialStatusDialing
FTPGetPassphraseProc passphraseProc
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *