source: rtems/cpukit/ftpd/ftpd.h @ eef45d1

4.115
Last change on this file since eef45d1 was 86933ce0, checked in by Sebastian Huber <sebastian.huber@…>, on 06/24/11 at 10:00:36

2011-06-24 Arnout Vandecappelle <arnout@…>

Sebastien Bourdeauducq <sebastien@…>

PR 1724/cpukit

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