This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
ftp client problem : ftp_get fails for large files
- From: "HG" <henri at broadbandnetdevices dot com>
- To: <ecos-discuss at sources dot redhat dot com>
- Date: Thu, 24 Apr 2003 15:08:41 -0400
- Subject: [ECOS] ftp client problem : ftp_get fails for large files
- Organization: BND
- Reply-to: "HG" <henri at broadbandnetdevices dot com>
Hi All
the function ftp_get hangs when files too large (512k)are downloaded
from a server . Files are downloaded ok when they have size of 256k or less:
This problem does bear some similarity to the problem reported earlier
with the tftp_get function.
test conditions : ftpclient1.c
stack used :
#define STACK_SIZE (CYGNUM_HAL_STACK_SIZE_TYPICAL + 0x30000)
static char stack[STACK_SIZE];
buffer size used:
#define FTPBUFSIZE (1024 * 1200)
char ftpbuf[FTPBUFSIZE];
tcp stack : freebsd
network interface used : 82559er, 128 tx&rx descriptors
server used : guildftpd on an nt4 workstation.
a windump capture of tcp packets is available (lenghty)
I will report test results on a linux server when they are available!
thanks for any help
Henri
program output for files smaller than 256k
INFO:<Getting /binary/hello1.s from %d
192.168.0.4>
FTP: Connected to 192.168.0.4.21
FTP: 220-admin
FTP: 220 Please enter your name:
FTP: Sending USER command
FTP: 331 User name okay, Need password.
FTP: Sending PASS command
FTP: 230 User logged in.
FTP: Login sucessfull
FTP: Sending TYPE command
FTP: 200 Type set to I.
FTP: Sending PORT command
FTP: 200 PORT command successful.
FTP: Sending RETR command
FTP: 150 Opening binary mode data connection for /binary/hello1.s (255864
bytes.
FTP: 226 Transfer complete. 255864 bytes in 1 sec. (255.86 Kb/s).
FTP: Sending QUIT command
FTP: 221 Goodbye. Control connection closed.
FTP: Connection closed
PASS:< 255864 bytes received>
program output for a 511k size file :
INFO:<Getting /binary/hello2.s from %d
192.168.0.4>
FTP: Connected to 192.168.0.4.21
FTP: 220-admin
FTP: 220 Please enter your name:
FTP: Sending USER command
FTP: 331 User name okay, Need password.
FTP: Sending PASS command
FTP: 230 User logged in.
FTP: Login sucessfull
FTP: Sending TYPE command
FTP: 200 Type set to I.
FTP: Sending PORT command
FTP: 200 PORT command successful.
FTP: Sending RETR command
FTP: 150 Opening binary mode data connection for /binary/hello2.s (511944
bytes
....never returns , the ftp server returns to idle after a while
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss