RTEMS
5.1
|
The FTP file system (FTP client) can be used to transfer files from or to remote hosts. More...
Macros | |
#define | RTEMS_FTPFS_CTRL_PORT 21 |
Well-known port number for FTP control connection. | |
#define | RTEMS_FTPFS_MOUNT_POINT_DEFAULT "/FTP" |
Default mount point for FTP file system. | |
Enumerations | |
enum | rtems_ftpfs_ioctl_numbers { RTEMS_FTPFS_IOCTL_GET_VERBOSE = _IOR( 'd', 1, bool *), RTEMS_FTPFS_IOCTL_SET_VERBOSE = _IOW( 'd', 1, bool *), RTEMS_FTPFS_IOCTL_GET_TIMEOUT = _IOR( 'd', 2, struct timeval *), RTEMS_FTPFS_IOCTL_SET_TIMEOUT = _IOW( 'd', 2, struct timeval *) } |
FTP file system IO control requests. | |
Functions | |
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. More... | |
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 mount_point. More... | |
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. More... | |
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. More... | |
The FTP file system (FTP client) can be used to transfer files from or to remote hosts.
You can mount the FTP file system with a call to mount() or mount_and_make_target_path() with the RTEMS_FILESYSTEM_TYPE_FTPFS file system type.
You have to add CONFIGURE_FILESYSTEM_FTPFS to your application configuration.
You can open files either read-only or write-only. A seek is not allowed. A close terminates the control and data connections.
To open a file file.txt
in the directory dir
(relative to home directory of the server) on a server named host
using the user name user
and the password pw
you must specify the following path: /FTP/user:pw@host/dir/file.txt
.
If the server is the default server specified in BOOTP, it can be ommitted: /FTP/user:pw/dir/file.txt
.
The user name will be used for the password if it is ommitted: /FTP/user@host/dir/file.txt
.
For the data transfer passive (= default) and active (= fallback) mode are supported.
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.
If mount_point is NULL
the default mount point RTEMS_FTPFS_MOUNT_POINT_DEFAULT will be used.
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.
If mount_point is NULL
the default mount point RTEMS_FTPFS_MOUNT_POINT_DEFAULT will be used.
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.
The timeout value will be used during connection establishment of active data connections. It will be also used for send and receive operations on data and control connections.
If mount_point is NULL
the default mount point RTEMS_FTPFS_MOUNT_POINT_DEFAULT will be used.
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 mount_point.
In the enabled verbose mode the commands and replies of the FTP control connections will be printed to standard error.
If mount_point is NULL
the default mount point RTEMS_FTPFS_MOUNT_POINT_DEFAULT will be used.