source: rtems/cpukit/libnetworking/rtems/ftpfs.h @ 8a775c27

4.104.11
Last change on this file since 8a775c27 was 8a775c27, checked in by Joel Sherrill <joel.sherrill@…>, on Mar 27, 2009 at 1:45:31 PM

2009-03-27 Sebastian Huber <sebastian.huber@…>

  • Makefile.am, preinstall.am, libmisc/Makefile.am, libmisc/shell/shell.c, libmisc/shell/shell.h, telnetd/check_passwd.c, telnetd/telnetd.c, telnetd/telnetd.h: Generalized login check.
  • libmisc/shell/login.h, libmisc/shell/login_check.c, libmisc/shell/login_prompt.c: New files.
  • libmisc/stackchk/check.c: Changed format for blown stack message.
  • libcsupport/src/libio_sockets.c: Removed superfluous cast.
  • libnetworking/rtems/ftpfs.h: Documentation.
  • Property mode set to 100644
File size: 3.4 KB
Line 
1/**
2 * @file
3 *
4 * @brief File Transfer Protocol file system (FTP client).
5 */
6
7/*
8 * Copyright (c) 2009
9 * embedded brains GmbH
10 * Obere Lagerstr. 30
11 * D-82178 Puchheim
12 * Germany
13 * <rtems@embedded-brains.de>
14 *
15 * (c) Copyright 2002
16 * Thomas Doerfler
17 * IMD Ingenieurbuero fuer Microcomputertechnik
18 * Herbststr. 8
19 * 82178 Puchheim, Germany
20 * <Thomas.Doerfler@imd-systems.de>
21 *
22 * Modified by Sebastian Huber <sebastian.huber@embedded-brains.de>.
23 *
24 * This code has been created after closly inspecting "tftpdriver.c" from Eric
25 * Norum.
26 *
27 * The license and distribution terms for this file may be
28 * found in the file LICENSE in this distribution or at
29 * http://www.rtems.com/license/LICENSE.
30 *
31 * $Id$
32 */
33
34#ifndef _RTEMS_FTPFS_H
35#define _RTEMS_FTPFS_H
36
37#include <rtems/libio.h>
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43/**
44 * @defgroup rtems_ftpfs File Transfer Protocol File System
45 *
46 * The FTP file system (FTP client) can be used to transfer files from or to
47 * remote hosts.
48 *
49 * You can mount the FTP file system with a call to rtems_ftpfs_mount().
50 * Alternatively you can use mount() with the @ref rtems_ftpfs_ops operations
51 * table.
52 *
53 * You can open files either read-only or write-only.  A seek is not allowed.
54 * A close terminates the control and data connections.
55 *
56 * To open a file @c file.txt in the directory @c dir (relative to home
57 * directory of the server) on a server named @c host using the user name
58 * @c user and the password @c pw you must specify the following path:
59 * <tt>/FTP/user:pw@@host/dir/file.txt</tt>.
60 *
61 * If the server is the default server specified in BOOTP, it can be ommitted:
62 * <tt>/FTP/user:pw/dir/file.txt</tt>.
63 *
64 * The user name will be used for the password if it is ommitted:
65 * <tt>/FTP/user@@host/dir/file.txt</tt>.
66 *
67 * For the data transfer passive (= default) and active (= fallback) mode are
68 * supported.
69 *
70 * @{
71 */
72
73/**
74 * @brief Well-known port number for FTP control connection.
75 */
76#define RTEMS_FTPFS_CTRL_PORT 21
77
78/**
79 * @brief Default mount point for FTP file system.
80 */
81#define RTEMS_FTPFS_MOUNT_POINT_DEFAULT "/FTP"
82
83/**
84 * @brief FTP file system operations table.
85 */
86extern const rtems_filesystem_operations_table rtems_ftpfs_ops;
87
88/**
89 * @brief Creates the mount point @a mount_point and mounts the FTP file
90 * system.
91 *
92 * If @a mount_point is @c NULL the default mount point
93 * @ref RTEMS_FTPFS_MOUNT_POINT_DEFAULT will be used.
94 *
95 * It is mounted with read and write access.
96 *
97 * @note The parent directories of the mount point have to exist.
98 */
99rtems_status_code rtems_ftpfs_mount( const char *mount_point);
100
101/**
102 * @brief Enables or disables the verbose mode if @a verbose is @c true or
103 * @c false respectively.
104 *
105 * In the enabled verbose mode the commands and replies of the FTP control
106 * connections will be printed to standard error.
107 */
108rtems_status_code rtems_ftpfs_set_verbose( bool verbose);
109
110/**
111 * @brief Returns in @a verbose if the verbose mode is enabled or disabled.
112 */
113rtems_status_code rtems_ftpfs_get_verbose( bool *verbose);
114
115/** @} */
116
117/**
118 * @brief Creates the default mount point @ref RTEMS_FTPFS_MOUNT_POINT_DEFAULT
119 * and mounts the FTP file system.
120 *
121 * It is mounted with read and write access.
122 *
123 * On success, zero is returned.  On error, -1 is returned.
124 *
125 * @deprecated Use rtems_ftpfs_mount() instead.
126 */
127int rtems_bsdnet_initialize_ftp_filesystem( void);
128
129#ifdef __cplusplus
130}
131#endif
132
133#endif
Note: See TracBrowser for help on using the repository browser.