RTEMS
6.3
Toggle main menu visibility
Loading...
Searching...
No Matches
cpukit
include
rtems
ftpd.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-2-Clause */
2
8
9
/*
10
* Copyright (C) 1999 Jake Janovetz <jvanovetz@uiuc.edu>
11
*
12
* Redistribution and use in source and binary forms, with or without
13
* modification, are permitted provided that the following conditions
14
* are met:
15
* 1. Redistributions of source code must retain the above copyright
16
* notice, this list of conditions and the following disclaimer.
17
* 2. Redistributions in binary form must reproduce the above copyright
18
* notice, this list of conditions and the following disclaimer in the
19
* documentation and/or other materials provided with the distribution.
20
*
21
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
25
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31
* POSSIBILITY OF SUCH DAMAGE.
32
*/
33
34
#ifndef _RTEMS_FTPD_H
35
#define _RTEMS_FTPD_H
36
37
#include <
rtems.h
>
38
39
#ifdef __cplusplus
40
extern
"C"
{
41
#endif
42
43
#define FTPD_CONTROL_PORT 21
44
45
/* Various buffer sizes */
46
enum
{
47
FTPD_BUFSIZE = 256,
/* Size for temporary buffers */
48
FTPD_DATASIZE = 4 * 1024,
/* Size for file transfer buffers */
49
FTPD_STACKSIZE =
RTEMS_MINIMUM_STACK_SIZE
+ FTPD_DATASIZE
/* Tasks stack size */
50
};
51
52
/* FTPD access control flags */
53
enum
54
{
55
FTPD_NO_WRITE = 0x1,
56
FTPD_NO_READ = 0x2,
57
FTPD_NO_RW = FTPD_NO_WRITE | FTPD_NO_READ
58
};
59
60
typedef
int (*rtems_ftpd_hookfunction)(
char
*, size_t);
61
62
#include <
rtems/shell.h
>
63
64
struct
rtems_ftpd_hook
65
{
66
char
*filename;
67
rtems_ftpd_hookfunction hook_function;
68
};
69
70
struct
rtems_ftpd_configuration
71
{
72
rtems_task_priority
priority;
/* FTPD task priority */
73
unsigned
long
max_hook_filesize;
/* Maximum buffersize */
74
/* for hooks */
75
int
port;
/* Well-known port */
76
struct
rtems_ftpd_hook
*hooks;
/* List of hooks */
77
char
const
*root;
/* Root for FTPD or 0 for / */
78
int
tasks_count;
/* Max. connections */
79
int
idle;
/* Idle timeout in seoconds
80
or 0 for no (inf) timeout */
81
int
access;
/* 0 - r/w, 1 - read-only,
82
2 - write-only,
83
3 - browse-only */
84
rtems_shell_login_check_t login;
/* Login check or 0 to ignore
85
user/passwd. */
86
bool
verbose;
/* Say hello! */
87
};
88
89
rtems_status_code
rtems_ftpd_start(
90
const
struct
rtems_ftpd_configuration
*config
91
);
92
93
extern
struct
rtems_ftpd_configuration
rtems_ftpd_configuration
;
94
95
rtems_status_code
rtems_initialize_ftpd(
void
);
96
97
#ifdef __cplusplus
98
}
99
#endif
100
101
#endif
/* _RTEMS_FTPD_H */
rtems_status_code
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition
status.h:85
RTEMS_MINIMUM_STACK_SIZE
#define RTEMS_MINIMUM_STACK_SIZE
This compile time constant provides the minimum task stack size recommended for the target architectu...
Definition
tasks.h:331
rtems_task_priority
uint32_t rtems_task_priority
This integer type represents task priorities of the Classic API.
Definition
types.h:257
rtems.h
This header file defines the RTEMS Classic API.
shell.h
Instantatiate a New Terminal Shell.
rtems_ftpd_configuration
Definition
ftpd.h:71
rtems_ftpd_hook
Definition
ftpd.h:65
Generated by
1.18.0