source: rtems/cpukit/ftpd/ftpd.h @ 965a442

4.115
Last change on this file since 965a442 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 2.2 KB
Line 
1/*
2 *  FTP Server Information
3 */
4
5#ifndef _RTEMS_FTPD_H
6#define _RTEMS_FTPD_H
7
8#include <rtems/rtems/tasks.h>
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14#define FTPD_CONTROL_PORT   21
15
16/* Various buffer sizes */
17enum {
18  FTPD_BUFSIZE  = 256,       /* Size for temporary buffers */
19  FTPD_DATASIZE = 4 * 1024,      /* Size for file transfer buffers */
20  FTPD_STACKSIZE = RTEMS_MINIMUM_STACK_SIZE + FTPD_DATASIZE /* Tasks stack size */
21};
22
23/* FTPD access control flags */
24enum
25{
26  FTPD_NO_WRITE = 0x1,
27  FTPD_NO_READ  = 0x2,
28  FTPD_NO_RW    = FTPD_NO_WRITE | FTPD_NO_READ
29};
30
31typedef int (*rtems_ftpd_hookfunction)(char *, size_t);
32
33#include <rtems/shell.h>
34
35struct rtems_ftpd_hook
36{
37   char                    *filename;
38   rtems_ftpd_hookfunction hook_function;
39};
40
41struct rtems_ftpd_configuration
42{
43   rtems_task_priority     priority;           /* FTPD task priority  */
44   unsigned long           max_hook_filesize;  /* Maximum buffersize  */
45                                               /*    for hooks        */
46   int                     port;               /* Well-known port     */
47   struct rtems_ftpd_hook  *hooks;             /* List of hooks       */
48   char const              *root;              /* Root for FTPD or 0 for / */
49   int                     tasks_count;        /* Max. connections    */
50   int                     idle;               /* Idle timeout in seoconds
51                                                  or 0 for no (inf) timeout */
52   int                     access;             /* 0 - r/w, 1 - read-only,
53                                                  2 - write-only,
54                                                  3 - browse-only */
55   rtems_shell_login_check_t login;            /* Login check or 0 to ignore
56                                                  user/passwd. */
57};
58
59/*
60 * Reply codes.
61 */
62#define PRELIM          1       /* positive preliminary */
63#define COMPLETE        2       /* positive completion */
64#define CONTINUE        3       /* positive intermediate */
65#define TRANSIENT       4       /* transient negative completion */
66#define ERROR           5       /* permanent negative completion */
67
68int rtems_initialize_ftpd(void);
69
70#ifdef __cplusplus
71}
72#endif
73
74#endif  /* _RTEMS_FTPD_H */
Note: See TracBrowser for help on using the repository browser.