4.104.114.84.95
Last change
on this file since f22ebf0 was
38371dbe,
checked in by Joel Sherrill <joel.sherrill@…>, on 01/24/01 at 19:20:24
|
2001-01-24 Sergei Organov <osv@…>
- rtems_servers/ftpd.c, rtems_servers/ftpd.h: Major enhancements
as listed below:
- Timeouts on sockets implemented. 'idle' field added to
configuration. No timeout by default to keep backward compatibility.
Note: SITE IDLE command not implemented yet.
- Basic global access control implemented. 'access' field added to
configuration. No access limitations by default to keep backward
compatibility.
- Anchor data socket for active mode (using self IP and port 20.)
- Fixed default data port support (still not tested).
- Don't allow IP address different from originating host in
PORT command to improve security.
- Fixed bug in MDTM command.
- Check for correctness of parsing of argument in command_port().
- Fixed squeeze_path() to don't allow names like 'NAME/smth' where
'NAME' is not a directory.
- Command parsing a little bit improved: command names are now
converted to upper-case to be more compatible with RFC (command
names are not case-sensitive.)
- Reformat comments so that they have RTEMS look-and-feel.
- Fixed DELE, SITE CHMOD, RMD, MKD broken by previous changes
- True ASCII mode implemented (doesn't work for hooks and /dev/null)
- Passive mode implemented, PASV command added.
- Default port for data connection could be used (untested, can't find
ftp client that doesn't send PORT command)
- SYST reply changed to UNIX, as former RTEMS isn't registered name.
- Reply codes reviewed and fixed.
|
-
Property mode set to
100644
|
File size:
1.7 KB
|
Rev | Line | |
---|
[6d0e13c] | 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 | |
---|
[38371dbe] | 13 | /* FTPD access control flags */ |
---|
| 14 | enum |
---|
| 15 | { |
---|
| 16 | FTPD_NO_WRITE = 0x1, |
---|
| 17 | FTPD_NO_READ = 0x2, |
---|
| 18 | FTPD_NO_RW = FTPD_NO_WRITE | FTPD_NO_READ |
---|
| 19 | }; |
---|
| 20 | |
---|
[85e24a3] | 21 | typedef int (*rtems_ftpd_hookfunction)(unsigned char *, unsigned long); |
---|
| 22 | |
---|
| 23 | struct rtems_ftpd_hook |
---|
| 24 | { |
---|
| 25 | char *filename; |
---|
| 26 | rtems_ftpd_hookfunction hook_function; |
---|
| 27 | }; |
---|
| 28 | |
---|
| 29 | struct rtems_ftpd_configuration |
---|
| 30 | { |
---|
| 31 | rtems_task_priority priority; /* FTPD task priority */ |
---|
| 32 | unsigned long max_hook_filesize; /* Maximum buffersize */ |
---|
| 33 | /* for hooks */ |
---|
| 34 | int port; /* Well-known port */ |
---|
| 35 | struct rtems_ftpd_hook *hooks; /* List of hooks */ |
---|
[3f777d0e] | 36 | char const *root; /* Root for FTPD or 0 for / */ |
---|
| 37 | int tasks_count; /* Max. connections */ |
---|
[38371dbe] | 38 | int idle; /* Idle timeout in seoconds |
---|
| 39 | or 0 for no (inf) timeout */ |
---|
| 40 | int access; /* 0 - r/w, 1 - read-only, |
---|
| 41 | 2 - write-only, |
---|
| 42 | 3 - browse-only */ |
---|
[85e24a3] | 43 | }; |
---|
| 44 | |
---|
[6d0e13c] | 45 | /* |
---|
| 46 | * Reply codes. |
---|
| 47 | */ |
---|
| 48 | #define PRELIM 1 /* positive preliminary */ |
---|
| 49 | #define COMPLETE 2 /* positive completion */ |
---|
| 50 | #define CONTINUE 3 /* positive intermediate */ |
---|
| 51 | #define TRANSIENT 4 /* transient negative completion */ |
---|
| 52 | #define ERROR 5 /* permanent negative completion */ |
---|
| 53 | |
---|
[85e24a3] | 54 | int rtems_initialize_ftpd(); |
---|
[6d0e13c] | 55 | |
---|
| 56 | #endif /* __FTPD_H__ */ |
---|
| 57 | |
---|
Note: See
TracBrowser
for help on using the repository browser.