Files
rtems/cpukit/ftpd/ftpd.h
Ralf Corsepius f26145b800 2005-02-03 Ralf Corsepius <ralf.corsepius@rtems.org>
PR 756/rtems
	* ftpd/ftpd.c, ftpd/ftpd.h, ftpd/Makefile.am: New (relocated from
	/c/src/libnetworking/ftpd)
	* ftpd/ftd.h: New header guards.
	* ftpd/Makefile.am: Install libftd.a, install ftp.h to rtems/ftp.h.
	* configure.ac: Add ftpd/Makefile.
	* Makefile.am: Add ftpd.
2005-02-04 12:40:16 +00:00

57 lines
1.7 KiB
C

/*
* FTP Server Information
*
* $Id$
*/
#ifndef _RTEMS_FTPD_H
#define _RTEMS_FTPD_H
#define FTPD_CONTROL_PORT 21
/* FTPD access control flags */
enum
{
FTPD_NO_WRITE = 0x1,
FTPD_NO_READ = 0x2,
FTPD_NO_RW = FTPD_NO_WRITE | FTPD_NO_READ
};
typedef int (*rtems_ftpd_hookfunction)(char *, size_t);
struct rtems_ftpd_hook
{
char *filename;
rtems_ftpd_hookfunction hook_function;
};
struct rtems_ftpd_configuration
{
rtems_task_priority priority; /* FTPD task priority */
unsigned long max_hook_filesize; /* Maximum buffersize */
/* for hooks */
int port; /* Well-known port */
struct rtems_ftpd_hook *hooks; /* List of hooks */
char const *root; /* Root for FTPD or 0 for / */
int tasks_count; /* Max. connections */
int idle; /* Idle timeout in seoconds
or 0 for no (inf) timeout */
int access; /* 0 - r/w, 1 - read-only,
2 - write-only,
3 - browse-only */
};
/*
* Reply codes.
*/
#define PRELIM 1 /* positive preliminary */
#define COMPLETE 2 /* positive completion */
#define CONTINUE 3 /* positive intermediate */
#define TRANSIENT 4 /* transient negative completion */
#define ERROR 5 /* permanent negative completion */
int rtems_initialize_ftpd();
#endif /* _RTEMS_FTPD_H */