source: rtems/cpukit/ftpd/ftpd.h @ 86933ce0

4.115
Last change on this file since 86933ce0 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
RevLine 
[6d0e13c]1/*
2 *  FTP Server Information
3 *
4 *  $Id$
5 */
6
[f26145b]7#ifndef _RTEMS_FTPD_H
8#define _RTEMS_FTPD_H
[6d0e13c]9
[fa40adf9]10#include <rtems/rtems/tasks.h>
11
[47261f4]12#ifdef __cplusplus
13extern "C" {
14#endif
[6d0e13c]15
16#define FTPD_CONTROL_PORT   21
17
[38371dbe]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
[f92f5f6]26typedef int (*rtems_ftpd_hookfunction)(char *, size_t);
[85e24a3]27
[86933ce0]28#include <rtems/shell.h>
29
[85e24a3]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       */
[3f777d0e]43   char const              *root;              /* Root for FTPD or 0 for / */
44   int                     tasks_count;        /* Max. connections    */
[38371dbe]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 */
[86933ce0]50   rtems_shell_login_check_t login;            /* Login check or 0 to ignore
51                                                  user/passwd. */
[85e24a3]52};
53
[6d0e13c]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
[5bc8a75]63int rtems_initialize_ftpd(void);
[6d0e13c]64
[47261f4]65#ifdef __cplusplus
66}
67#endif
68
[f26145b]69#endif  /* _RTEMS_FTPD_H */
Note: See TracBrowser for help on using the repository browser.