RTEMS 6.1-rc1
ftpfs.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
9/*
10 * Copyright (c) 2009 embedded brains GmbH & Co. KG
11 *
12 * Copyright (c) 2002 IMD Ingenieurbuero fuer Microcomputertechnik
13 * All rights reserved.
14 * Modified by Sebastian Huber <sebastian.huber@embedded-brains.de>.
15 *
16 * This code has been created after closly inspecting "tftpdriver.c" from Eric
17 * Norum.
18 *
19 * Redistribution and use in source and binary forms, with or without
20 * modification, are permitted provided that the following conditions
21 * are met:
22 * 1. Redistributions of source code must retain the above copyright
23 * notice, this list of conditions and the following disclaimer.
24 * 2. Redistributions in binary form must reproduce the above copyright
25 * notice, this list of conditions and the following disclaimer in the
26 * documentation and/or other materials provided with the distribution.
27 *
28 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
32 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
33 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
34 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
35 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
36 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
37 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
38 * POSSIBILITY OF SUCH DAMAGE.
39 */
40
41#ifndef _RTEMS_FTPFS_H
42#define _RTEMS_FTPFS_H
43
44#include <sys/time.h>
45#include <sys/ioctl.h>
46
47#include <rtems/libio.h>
48
49#ifdef __cplusplus
50extern "C" {
51#endif
52
90#define RTEMS_FTPFS_CTRL_PORT 21
91
95#define RTEMS_FTPFS_MOUNT_POINT_DEFAULT "/FTP"
96
100typedef enum {
101 RTEMS_FTPFS_IOCTL_GET_VERBOSE = _IOR( 'd', 1, bool *),
102 RTEMS_FTPFS_IOCTL_SET_VERBOSE = _IOW( 'd', 1, bool *),
103 RTEMS_FTPFS_IOCTL_GET_TIMEOUT = _IOR( 'd', 2, struct timeval *),
104 RTEMS_FTPFS_IOCTL_SET_TIMEOUT = _IOW( 'd', 2, struct timeval *)
106
114rtems_status_code rtems_ftpfs_get_verbose( const char *mount_point, bool *verbose);
115
126rtems_status_code rtems_ftpfs_set_verbose( const char *mount_point, bool verbose);
127
136 const char *mount_point,
137 struct timeval *timeout
138);
139
152 const char *mount_point,
153 const struct timeval *timeout
154);
155
163 const void *data
164);
165
166#ifdef __cplusplus
167}
168#endif
169
170#endif
int rtems_ftpfs_initialize(rtems_filesystem_mount_table_entry_t *mt_entry, const void *data)
Do not call directly, use mount().
Definition: ftpfs.c:1266
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:85
rtems_status_code rtems_ftpfs_set_verbose(const char *mount_point, bool verbose)
Enables or disables the verbose mode if verbose is true or false respectively for the file system at ...
Definition: ftpfs.c:225
rtems_status_code rtems_ftpfs_get_timeout(const char *mount_point, struct timeval *timeout)
Returns the current timeout value in timeout for the file system at mount_point.
Definition: ftpfs.c:234
rtems_ftpfs_ioctl_numbers
FTP file system IO control requests.
Definition: ftpfs.h:100
rtems_status_code rtems_ftpfs_set_timeout(const char *mount_point, const struct timeval *timeout)
Sets the timeout value to timeout for the file system at mount_point.
Definition: ftpfs.c:246
rtems_status_code rtems_ftpfs_get_verbose(const char *mount_point, bool *verbose)
Returns in verbose if the verbose mode is enabled or disabled for the file system at mount_point.
Definition: ftpfs.c:216
Basic IO API.
Mount table entry.
Definition: libio.h:1621