source: rtems-libbsd/rtemsbsd/include/rtems/ftpd.h @ fc26479

55-freebsd-126-freebsd-12freebsd-9.3
Last change on this file since fc26479 was fc26479, checked in by Chris Johns <chrisj@…>, on 06/30/16 at 03:35:37

Add ftpd initailize comment.

  • Property mode set to 100644
File size: 2.4 KB
Line 
1/*
2 *  FTP Server Information
3 */
4
5#ifndef _RTEMS_FTPD_H
6#define _RTEMS_FTPD_H
7
8#include <rtems.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   bool                      verbose;          /* Say hello! */
58};
59
60/*
61 * Reply codes.
62 */
63#define PRELIM          1       /* positive preliminary */
64#define COMPLETE        2       /* positive completion */
65#define CONTINUE        3       /* positive intermediate */
66#define TRANSIENT       4       /* transient negative completion */
67#define ERROR           5       /* permanent negative completion */
68
69/*
70 * Initialise with the global table.
71 *
72 * Note, use rc.conf, this function will be removed at some point.
73 */
74int rtems_initialize_ftpd(void);
75
76#ifdef __cplusplus
77}
78#endif
79
80#endif  /* _RTEMS_FTPD_H */
Note: See TracBrowser for help on using the repository browser.