4.104.114.84.95
Last change
on this file since 3f777d0e was
3f777d0e,
checked in by Joel Sherrill <joel.sherrill@…>, on Jan 12, 2001 at 1:51:56 PM
|
2001-01-12 Sergei Organov <osv@…>
- rtems_servers/ftpd.c, rtems_servers/ftpd.h: Major enhancements
as listed below:
- use pool of pre-created threads to handle sessions instead of
creating/deleting threads on the fly
- LIST output is now similar to what "/bin/ls -al" would output,
thus FTP clients such Netscape are happy with it.
- LIST NAME now works (both for files and directories)
- added support for NLST, CDUP, and MDTM FTP commands to make
more FTP clients happy
- keep track of CWD for every session separately
- ability to specify root directory name for FTPD in configuration
table. FTPD will then create illusion for FTP clients that this
is actually root directory.
- ignore options sent in commands, thus LIST -al FILE works and
doesn't try to list "-al" directory.
- buffers are allocated on stack instead of heap where possible to
eliminate malloc/free calls (avoid possible heap fragmentation
troubles).
- drop using of task notepad to pass parameters - use function
arguments instead
- use snprintf() instead of sprintf() as the latter is unsafe
- use of PF_INET in socket() instead of AF_INET
Here are ftp clients I've tried new FTPD with (all of them
running on Debian GNU/Linux 2.2):
Lftp 2.1.10
NcFTP 2.4.3
Netscape 4.75
ftp
mc 4.5.49
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | /* |
---|
2 | * FTP Server Information |
---|
3 | * |
---|
4 | * $Id$ |
---|
5 | */ |
---|
6 | |
---|
7 | #ifndef __FTPD_H__ |
---|
8 | #define __FTPD_H__ |
---|
9 | |
---|
10 | |
---|
11 | #define FTPD_CONTROL_PORT 21 |
---|
12 | |
---|
13 | typedef int (*rtems_ftpd_hookfunction)(unsigned char *, unsigned long); |
---|
14 | |
---|
15 | struct rtems_ftpd_hook |
---|
16 | { |
---|
17 | char *filename; |
---|
18 | rtems_ftpd_hookfunction hook_function; |
---|
19 | }; |
---|
20 | |
---|
21 | struct rtems_ftpd_configuration |
---|
22 | { |
---|
23 | rtems_task_priority priority; /* FTPD task priority */ |
---|
24 | unsigned long max_hook_filesize; /* Maximum buffersize */ |
---|
25 | /* for hooks */ |
---|
26 | int port; /* Well-known port */ |
---|
27 | struct rtems_ftpd_hook *hooks; /* List of hooks */ |
---|
28 | char const *root; /* Root for FTPD or 0 for / */ |
---|
29 | int tasks_count; /* Max. connections */ |
---|
30 | }; |
---|
31 | |
---|
32 | /* |
---|
33 | * Reply codes. |
---|
34 | */ |
---|
35 | #define PRELIM 1 /* positive preliminary */ |
---|
36 | #define COMPLETE 2 /* positive completion */ |
---|
37 | #define CONTINUE 3 /* positive intermediate */ |
---|
38 | #define TRANSIENT 4 /* transient negative completion */ |
---|
39 | #define ERROR 5 /* permanent negative completion */ |
---|
40 | |
---|
41 | int rtems_initialize_ftpd(); |
---|
42 | |
---|
43 | #endif /* __FTPD_H__ */ |
---|
44 | |
---|
Note: See
TracBrowser
for help on using the repository browser.