Changeset d2ec643 in rtems


Ignore:
Timestamp:
May 7, 2009, 2:40:55 PM (10 years ago)
Author:
Thomas Doerfler <Thomas.Doerfler@…>
Branches:
4.10, 4.11, master
Children:
8814cf0
Parents:
facca98
Message:

libnetworking/lib/ftpfs.c, libnetworking/rtems/ftpfs.h: Added
timeouts. Options are now per file system instance.

Location:
cpukit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    rfacca98 rd2ec643  
     12009-05-07      Sebastian Huber <sebastian.huber@embedded-brains.de>
     2
     3        * libnetworking/lib/ftpfs.c, libnetworking/rtems/ftpfs.h: Added
     4        timeouts.  Options are now per file system instance.
     5
    162009-05-06      Joel Sherrill <joel.sherrill@oarcorp.com>
    27
  • cpukit/libnetworking/lib/ftpfs.c

    rfacca98 rd2ec643  
    22 * @file
    33 *
    4  * @brief File Transfer Protocol file system (FTP client).
     4 * File Transfer Protocol file system (FTP client).
    55 */
    66
     
    6262
    6363/**
    64  * @brief Connection entry for each open file stream.
     64 * Connection entry for each open file stream.
    6565 */
    6666typedef struct {
    6767  /**
    68    * @brief Control connection socket.
     68   * Control connection socket.
    6969   */
    7070  int ctrl_socket;
    7171
    7272  /**
    73    * @brief Data transfer socket.
     73   * Data transfer socket.
    7474   */
    7575  int data_socket;
    7676
    7777  /**
    78    * @brief End of file flag.
     78   * End of file flag.
    7979   */
    8080  bool eof;
    8181} rtems_ftpfs_entry;
    8282
    83 static bool rtems_ftpfs_verbose = false;
     83/**
     84 * Mount entry for each file system instance.
     85 */
     86typedef struct {
     87  /**
     88   * Verbose mode enabled or disabled.
     89   */
     90  bool verbose;
     91
     92  /**
     93   * Timeout value
     94   */
     95  struct timeval timeout;
     96} rtems_ftpfs_mount_entry;
     97
     98static const rtems_filesystem_file_handlers_r rtems_ftpfs_handlers;
     99
     100static const rtems_filesystem_file_handlers_r rtems_ftpfs_root_handlers;
     101
     102static bool rtems_ftpfs_use_timeout( const struct timeval *to)
     103{
     104  return to->tv_sec != 0 || to->tv_usec != 0;
     105}
     106
     107static int rtems_ftpfs_set_connection_timeout(
     108  int socket,
     109  const struct timeval *to
     110)
     111{
     112  if (rtems_ftpfs_use_timeout( to)) {
     113    int rv = 0;
     114   
     115    rv = setsockopt( socket, SOL_SOCKET, SO_SNDTIMEO, to, sizeof( *to));
     116    if (rv != 0) {
     117      return EIO;
     118    }
     119
     120    rv = setsockopt( socket, SOL_SOCKET, SO_RCVTIMEO, to, sizeof( *to));
     121    if (rv != 0) {
     122      return EIO;
     123    }
     124  }
     125
     126  return 0;
     127}
    84128
    85129rtems_status_code rtems_ftpfs_mount( const char *mount_point)
     
    110154}
    111155
    112 rtems_status_code rtems_ftpfs_set_verbose( bool verbose)
    113 {
    114   rtems_ftpfs_verbose = verbose;
    115 
    116   return RTEMS_SUCCESSFUL;
    117 }
    118 
    119 rtems_status_code rtems_ftpfs_get_verbose( bool *verbose)
    120 {
    121   if (verbose == NULL) {
    122     return RTEMS_INVALID_ADDRESS;
    123   }
    124 
    125   *verbose = rtems_ftpfs_verbose;
    126 
    127   return RTEMS_SUCCESSFUL;
     156static rtems_status_code rtems_ftpfs_do_ioctl(
     157  const char *mount_point,
     158  int req,
     159  ...
     160)
     161{
     162  rtems_status_code sc = RTEMS_SUCCESSFUL;
     163  int rv = 0;
     164  int fd = 0;
     165  va_list ap;
     166
     167  if (mount_point == NULL) {
     168    mount_point = RTEMS_FTPFS_MOUNT_POINT_DEFAULT;
     169  }
     170
     171  fd = open( mount_point, O_RDWR);
     172  if (fd < 0) {
     173    return RTEMS_INVALID_NAME;
     174  }
     175 
     176  va_start( ap, req);
     177  rv = ioctl( fd, req, va_arg( ap, void *));
     178  va_end( ap);
     179  if (rv != 0) {
     180    sc = RTEMS_INVALID_NUMBER;
     181  }
     182
     183  rv = close( fd);
     184  if (rv != 0 && sc == RTEMS_SUCCESSFUL) {
     185    sc = RTEMS_IO_ERROR;
     186  }
     187 
     188  return sc;
     189}
     190
     191rtems_status_code rtems_ftpfs_get_verbose( const char *mount_point, bool *verbose)
     192{
     193  return rtems_ftpfs_do_ioctl(
     194    mount_point,
     195    RTEMS_FTPFS_IOCTL_GET_VERBOSE,
     196    verbose
     197  );
     198}
     199
     200rtems_status_code rtems_ftpfs_set_verbose( const char *mount_point, bool verbose)
     201{
     202  return rtems_ftpfs_do_ioctl(
     203    mount_point,
     204    RTEMS_FTPFS_IOCTL_SET_VERBOSE,
     205    &verbose
     206  );
     207}
     208
     209rtems_status_code rtems_ftpfs_get_timeout(
     210  const char *mount_point,
     211  struct timeval *timeout
     212)
     213{
     214  return rtems_ftpfs_do_ioctl(
     215    mount_point,
     216    RTEMS_FTPFS_IOCTL_GET_TIMEOUT,
     217    timeout
     218  );
     219}
     220
     221rtems_status_code rtems_ftpfs_set_timeout(
     222  const char *mount_point,
     223  const struct timeval *timeout
     224)
     225{
     226  return rtems_ftpfs_do_ioctl(
     227    mount_point,
     228    RTEMS_FTPFS_IOCTL_SET_TIMEOUT,
     229    timeout
     230  );
    128231}
    129232
     
    170273  int socket,
    171274  rtems_ftpfs_reply_parser parser,
    172   void *parser_arg
     275  void *parser_arg,
     276  bool verbose
    173277)
    174278{
    175279  rtems_ftpfs_reply_state state = RTEMS_FTPFS_REPLY_START;
    176   bool verbose = rtems_ftpfs_verbose;
    177280  char reply_first [RTEMS_FTPFS_REPLY_SIZE] = { 'a', 'a', 'a' };
    178281  char reply_last [RTEMS_FTPFS_REPLY_SIZE] = { 'b', 'b', 'b' };
     
    275378  const char *arg,
    276379  rtems_ftpfs_reply_parser parser,
    277   void *parser_arg
     380  void *parser_arg,
     381  bool verbose
    278382)
    279383{
    280384  const char *const eol = "\r\n";
    281   bool verbose = rtems_ftpfs_verbose;
    282385  int rv = 0;
    283386
     
    312415
    313416  /* Return reply */
    314   return rtems_ftpfs_get_reply( socket, parser, parser_arg);
     417  return rtems_ftpfs_get_reply( socket, parser, parser_arg, verbose);
    315418}
    316419
     
    318421  int socket,
    319422  const char *cmd,
    320   const char *arg
    321 )
    322 {
    323   return rtems_ftpfs_send_command_with_parser( socket, cmd, arg, NULL, NULL);
     423  const char *arg,
     424  bool verbose
     425)
     426{
     427  return rtems_ftpfs_send_command_with_parser(
     428    socket,
     429    cmd,
     430    arg,
     431    NULL,
     432    NULL,
     433    verbose
     434  );
    324435}
    325436
     
    444555  int rv = 0;
    445556  rtems_ftpfs_entry *e = iop->data1;
     557  rtems_ftpfs_mount_entry *me = iop->pathinfo.mt_entry->fs_info;
     558  bool verbose = me->verbose;
    446559
    447560  if (e != NULL) {
     
    460573      ) {
    461574        rtems_ftpfs_reply reply =
    462           rtems_ftpfs_get_reply( e->ctrl_socket, NULL, NULL);
     575          rtems_ftpfs_get_reply( e->ctrl_socket, NULL, NULL, verbose);
    463576
    464577        if (reply != RTEMS_FTPFS_REPLY_2) {
     
    491604  const char *password,
    492605  const char *hostname,
    493   uint32_t *client_address
     606  uint32_t *client_address,
     607  bool verbose,
     608  const struct timeval *timeout
    494609)
    495610{
    496611  int rv = 0;
     612  int eno = 0;
    497613  rtems_ftpfs_reply reply = RTEMS_FTPFS_REPLY_ERROR;
    498614  struct in_addr address = { .s_addr = 0 };
     
    533649  }
    534650
     651  /* Set control connection timeout */
     652  eno = rtems_ftpfs_set_connection_timeout( e->ctrl_socket, timeout);
     653  if (eno != 0) {
     654    return eno;
     655  }
     656
    535657  /* Get client address */
    536658  size = rtems_ftpfs_create_address( &sa, INADDR_ANY, 0);
     
    547669
    548670  /* Now we should get a welcome message from the server */
    549   reply = rtems_ftpfs_get_reply( e->ctrl_socket, NULL, NULL);
     671  reply = rtems_ftpfs_get_reply( e->ctrl_socket, NULL, NULL, verbose);
    550672  if (reply != RTEMS_FTPFS_REPLY_2) {
    551673    return ENOENT;
     
    553675
    554676  /* Send USER command */
    555   reply = rtems_ftpfs_send_command( e->ctrl_socket, "USER ", user);
     677  reply = rtems_ftpfs_send_command( e->ctrl_socket, "USER ", user, verbose);
    556678  if (reply == RTEMS_FTPFS_REPLY_3) {
    557679    /* Send PASS command */
    558     reply = rtems_ftpfs_send_command( e->ctrl_socket, "PASS ", password);
     680    reply = rtems_ftpfs_send_command(
     681      e->ctrl_socket,
     682      "PASS ",
     683      password,
     684      verbose
     685    );
    559686    if (reply != RTEMS_FTPFS_REPLY_2) {
    560687      return EACCES;
     
    567694
    568695  /* Send TYPE command to set binary mode for all data transfers */
    569   reply = rtems_ftpfs_send_command( e->ctrl_socket, "TYPE I", NULL);
     696  reply = rtems_ftpfs_send_command( e->ctrl_socket, "TYPE I", NULL, verbose);
    570697  if (reply != RTEMS_FTPFS_REPLY_2) {
    571698    return EIO;
     
    579706  uint32_t client_address,
    580707  const char *file_command,
    581   const char *filename
     708  const char *filename,
     709  bool verbose,
     710  const struct timeval *timeout
    582711)
    583712{
     
    590719  char port_command [] = "PORT 000,000,000,000,000,000";
    591720  uint16_t data_port = 0;
    592   fd_set fds;
    593   struct timeval timeout = {
    594     .tv_sec = 60,
    595     .tv_usec = 0
    596   };
    597721
    598722  /* Create port socket to establish a data data connection */
     
    640764    (data_port >> 0) & 0xffUL
    641765  );
    642   reply = rtems_ftpfs_send_command( e->ctrl_socket, port_command, NULL);
     766  reply = rtems_ftpfs_send_command(
     767    e->ctrl_socket,
     768    port_command,
     769    NULL,
     770    verbose
     771  );
    643772  if (reply != RTEMS_FTPFS_REPLY_2) {
    644773    eno = ENOTSUP;
     
    654783
    655784  /* Send RETR or STOR command with filename */
    656   reply = rtems_ftpfs_send_command( e->ctrl_socket, file_command, filename);
     785  reply = rtems_ftpfs_send_command(
     786    e->ctrl_socket,
     787    file_command,
     788    filename,
     789    verbose
     790  );
    657791  if (reply != RTEMS_FTPFS_REPLY_1) {
    658792    eno = EIO;
     
    660794  }
    661795
    662   /* Wait for connect on data connection  */
    663   FD_ZERO( &fds);
    664   FD_SET( port_socket, &fds);
    665   rv = select( port_socket + 1, &fds, NULL, NULL, &timeout);
    666   if (rv <= 0) {
    667     eno = EIO;
    668     goto cleanup;
     796  /* Wait for connect on data connection if necessary */
     797  if (rtems_ftpfs_use_timeout( timeout)) {
     798    struct timeval to = *timeout;
     799    fd_set fds;
     800
     801    FD_ZERO( &fds);
     802    FD_SET( port_socket, &fds);
     803
     804    rv = select( port_socket + 1, &fds, NULL, NULL, &to);
     805    if (rv <= 0) {
     806      eno = EIO;
     807      goto cleanup;
     808    }
    669809  }
    670810
     
    756896  uint32_t client_address,
    757897  const char *file_command,
    758   const char *filename
     898  const char *filename,
     899  bool verbose,
     900  const struct timeval *timeout
    759901)
    760902{
     
    775917    NULL,
    776918    rtems_ftpfs_pasv_parser,
    777     &pe
     919    &pe,
     920    verbose
    778921  );
    779922  if (reply != RTEMS_FTPFS_REPLY_2) {
     
    807950
    808951  /* Send RETR or STOR command with filename */
    809   reply = rtems_ftpfs_send_command( e->ctrl_socket, file_command, filename);
     952  reply = rtems_ftpfs_send_command(
     953    e->ctrl_socket,
     954    file_command,
     955    filename,
     956    verbose
     957  );
    810958  if (reply != RTEMS_FTPFS_REPLY_1) {
    811959    return EIO;
     
    825973  bool ok = false;
    826974  rtems_ftpfs_entry *e = NULL;
     975  rtems_ftpfs_mount_entry *me = iop->pathinfo.mt_entry->fs_info;
     976  bool verbose = me->verbose;
     977  const struct timeval *timeout = &me->timeout;
    827978  const char *user = NULL;
    828979  const char *password = NULL;
     
    843994  }
    844995
    845   /* Check for either read-only or write-only flags */
    846   if (
    847     (iop->flags & LIBIO_FLAGS_WRITE) != 0
    848       && (iop->flags & LIBIO_FLAGS_READ) != 0
    849   ) {
    850     rtems_set_errno_and_return_minus_one( ENOTSUP);
    851   }
    852 
    853996  /* Split location into parts */
    854997  ok = rtems_ftpfs_split_names(
     
    8601003  );
    8611004  if (!ok) {
    862     rtems_set_errno_and_return_minus_one( ENOENT);
     1005    if (strlen( location) == 0) {
     1006      /*
     1007       * This is an access to the root node that will be used for file system
     1008       * option settings.
     1009       */
     1010      iop->handlers = &rtems_ftpfs_root_handlers;
     1011
     1012      return 0;
     1013    } else {
     1014      rtems_set_errno_and_return_minus_one( ENOENT);
     1015    }
    8631016  }
    8641017  DEBUG_PRINTF(
     
    8681021    filename
    8691022  );
     1023
     1024  /* Check for either read-only or write-only flags */
     1025  if (
     1026    (iop->flags & LIBIO_FLAGS_WRITE) != 0
     1027      && (iop->flags & LIBIO_FLAGS_READ) != 0
     1028  ) {
     1029    rtems_set_errno_and_return_minus_one( ENOTSUP);
     1030  }
    8701031
    8711032  /* Allocate connection entry */
     
    8891050    password,
    8901051    hostname,
    891     &client_address
     1052    &client_address,
     1053    verbose,
     1054    timeout
    8921055  );
    8931056  if (eno != 0) {
     
    9001063    client_address,
    9011064    file_command,
    902     filename
     1065    filename,
     1066    verbose,
     1067    timeout
    9031068  );
    9041069  if (eno == ENOTSUP) {
     
    9081073      client_address,
    9091074      file_command,
    910       filename
     1075      filename,
     1076      verbose,
     1077      timeout
    9111078    );
    9121079  }
     1080  if (eno != 0) {
     1081    goto cleanup;
     1082  }
     1083
     1084  /* Set data connection timeout */
     1085  eno = rtems_ftpfs_set_connection_timeout( e->data_socket, timeout);
    9131086
    9141087cleanup:
     
    9311104{
    9321105  rtems_ftpfs_entry *e = iop->data1;
     1106  rtems_ftpfs_mount_entry *me = iop->pathinfo.mt_entry->fs_info;
     1107  bool verbose = me->verbose;
    9331108  char *in = buffer;
    9341109  size_t todo = count;
     
    9441119      if (rv == 0) {
    9451120        rtems_ftpfs_reply reply =
    946           rtems_ftpfs_get_reply( e->ctrl_socket, NULL, NULL);
     1121          rtems_ftpfs_get_reply( e->ctrl_socket, NULL, NULL, verbose);
    9471122
    9481123        if (reply == RTEMS_FTPFS_REPLY_2) {
     
    10371212}
    10381213
    1039 static const rtems_filesystem_file_handlers_r rtems_ftpfs_handlers;
    1040 
    10411214static int rtems_ftpfs_mount_me(
    10421215  rtems_filesystem_mount_table_entry_t *e
    10431216)
    10441217{
     1218  rtems_ftpfs_mount_entry *me = malloc( sizeof( rtems_ftpfs_mount_entry));
     1219
     1220  /* Mount entry for FTP file system instance */
     1221  e->fs_info = me;
     1222  if (e->fs_info == NULL) {
     1223    rtems_set_errno_and_return_minus_one( ENOMEM);
     1224  }
     1225  me->verbose = false;
     1226  me->timeout.tv_sec = 0;
     1227  me->timeout.tv_usec = 0;
     1228
    10451229  /* Set handler and oparations table */
    10461230  e->mt_fs_root.handlers = &rtems_ftpfs_handlers;
    10471231  e->mt_fs_root.ops = &rtems_ftpfs_ops;
    10481232
    1049   /* We have no FTP file system specific data to maintain */
    1050   e->fs_info = NULL;
    1051 
    10521233  /* We maintain no real file system nodes, so there is no real root */
    10531234  e->mt_fs_root.node_access = NULL;
     
    10551236  /* Just use the limits from IMFS */
    10561237  e->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
     1238
     1239  return 0;
     1240}
     1241
     1242static int rtems_ftpfs_unmount_me(
     1243  rtems_filesystem_mount_table_entry_t *e
     1244)
     1245{
     1246  free( e->fs_info);
     1247
     1248  return 0;
     1249}
     1250
     1251static int rtems_ftpfs_ioctl(
     1252  rtems_libio_t *iop,
     1253  uint32_t command,
     1254  void *arg
     1255)
     1256{
     1257  rtems_ftpfs_mount_entry *me = iop->pathinfo.mt_entry->fs_info;
     1258  bool *verbose = arg;
     1259  struct timeval *timeout = arg;
     1260
     1261  if (arg == NULL) {
     1262    rtems_set_errno_and_return_minus_one( EINVAL);
     1263  }
     1264
     1265  switch (command) {
     1266    case RTEMS_FTPFS_IOCTL_GET_VERBOSE:
     1267      *verbose = me->verbose;
     1268      break;
     1269    case RTEMS_FTPFS_IOCTL_SET_VERBOSE:
     1270      me->verbose = *verbose;
     1271      break;
     1272    case RTEMS_FTPFS_IOCTL_GET_TIMEOUT:
     1273      *timeout = me->timeout;
     1274      break;
     1275    case RTEMS_FTPFS_IOCTL_SET_TIMEOUT:
     1276      me->timeout = *timeout;
     1277      break;
     1278    default:
     1279      rtems_set_errno_and_return_minus_one( EBADRQC);
     1280  }
    10571281
    10581282  return 0;
     
    10631287 * will return that we have a regular file with read, write and execute
    10641288 * permissions for every one.  The node index uses a global counter to support
    1065  * a remote to remote copy.  Is not a very sophisticated method.
     1289 * a remote to remote copy.  This is not a very sophisticated method.
    10661290 */
    10671291static int rtems_ftpfs_fstat(
     
    10951319  .fsmount_me_h = rtems_ftpfs_mount_me,
    10961320  .unmount_h = NULL,
    1097   .fsunmount_me_h = NULL,
     1321  .fsunmount_me_h = rtems_ftpfs_unmount_me,
    10981322  .utime_h = NULL,
    10991323  .eval_link_h = NULL,
     
    11181342  .rmnod_h = NULL
    11191343};
     1344
     1345static const rtems_filesystem_file_handlers_r rtems_ftpfs_root_handlers = {
     1346  .open_h = NULL,
     1347  .close_h = NULL,
     1348  .read_h = NULL,
     1349  .write_h = NULL,
     1350  .ioctl_h = rtems_ftpfs_ioctl,
     1351  .lseek_h = NULL,
     1352  .fstat_h = NULL,
     1353  .fchmod_h = NULL,
     1354  .ftruncate_h = NULL,
     1355  .fpathconf_h = NULL,
     1356  .fsync_h = NULL,
     1357  .fdatasync_h = NULL,
     1358  .fcntl_h = NULL,
     1359  .rmnod_h = NULL
     1360};
  • cpukit/libnetworking/rtems/ftpfs.h

    rfacca98 rd2ec643  
    22 * @file
    33 *
    4  * @brief File Transfer Protocol file system (FTP client).
     4 * File Transfer Protocol file system (FTP client).
    55 */
    66
     
    3434#ifndef _RTEMS_FTPFS_H
    3535#define _RTEMS_FTPFS_H
     36
     37#include <sys/time.h>
     38#include <sys/ioctl.h>
    3639
    3740#include <rtems/libio.h>
     
    7275
    7376/**
    74  * @brief Well-known port number for FTP control connection.
     77 * Well-known port number for FTP control connection.
    7578 */
    7679#define RTEMS_FTPFS_CTRL_PORT 21
    7780
    7881/**
    79  * @brief Default mount point for FTP file system.
     82 * Default mount point for FTP file system.
    8083 */
    8184#define RTEMS_FTPFS_MOUNT_POINT_DEFAULT "/FTP"
    8285
    8386/**
    84  * @brief FTP file system operations table.
     87 * FTP file system IO control requests.
     88 */
     89typedef enum {
     90  RTEMS_FTPFS_IOCTL_GET_VERBOSE = _IOR( 'd', 1, bool *),
     91  RTEMS_FTPFS_IOCTL_SET_VERBOSE = _IOW( 'd', 1, bool *),
     92  RTEMS_FTPFS_IOCTL_GET_TIMEOUT = _IOR( 'd', 2, struct timeval *),
     93  RTEMS_FTPFS_IOCTL_SET_TIMEOUT = _IOW( 'd', 2, struct timeval *)
     94} rtems_ftpfs_ioctl_numbers;
     95
     96/**
     97 * FTP file system operations table.
    8598 */
    8699extern const rtems_filesystem_operations_table rtems_ftpfs_ops;
    87100
    88101/**
    89  * @brief Creates the mount point @a mount_point and mounts the FTP file
    90  * system.
     102 * Creates the mount point @a mount_point and mounts the FTP file system.
    91103 *
    92104 * If @a mount_point is @c NULL the default mount point
     
    94106 *
    95107 * It is mounted with read and write access.
    96  *
    97  * @note The parent directories of the mount point have to exist.
    98108 */
    99109rtems_status_code rtems_ftpfs_mount( const char *mount_point);
    100110
    101111/**
    102  * @brief Enables or disables the verbose mode if @a verbose is @c true or
    103  * @c false respectively.
     112 * Returns in @a verbose if the verbose mode is enabled or disabled for the
     113 * file system at @a mount_point.
     114 *
     115 * If @a mount_point is @c NULL the default mount point
     116 * @ref RTEMS_FTPFS_MOUNT_POINT_DEFAULT will be used.
     117 */
     118rtems_status_code rtems_ftpfs_get_verbose( const char *mount_point, bool *verbose);
     119
     120/**
     121 * Enables or disables the verbose mode if @a verbose is @c true or
     122 * @c false respectively for the file system at @a mount_point.
    104123 *
    105124 * In the enabled verbose mode the commands and replies of the FTP control
    106125 * connections will be printed to standard error.
     126 *
     127 * If @a mount_point is @c NULL the default mount point
     128 * @ref RTEMS_FTPFS_MOUNT_POINT_DEFAULT will be used.
    107129 */
    108 rtems_status_code rtems_ftpfs_set_verbose( bool verbose);
     130rtems_status_code rtems_ftpfs_set_verbose( const char *mount_point, bool verbose);
    109131
    110132/**
    111  * @brief Returns in @a verbose if the verbose mode is enabled or disabled.
     133 * Returns the current timeout value in @a timeout for the file system at
     134 * @a mount_point.
     135 *
     136 * If @a mount_point is @c NULL the default mount point
     137 * @ref RTEMS_FTPFS_MOUNT_POINT_DEFAULT will be used.
    112138 */
    113 rtems_status_code rtems_ftpfs_get_verbose( bool *verbose);
     139rtems_status_code rtems_ftpfs_get_timeout(
     140  const char *mount_point,
     141  struct timeval *timeout
     142);
     143
     144/**
     145 * Sets the timeout value to @a timeout for the file system at @a mount_point.
     146 *
     147 * The timeout value will be used during connection establishment of active
     148 * data connections.  It will be also used for send and receive operations on
     149 * data and control connections.
     150 *
     151 * If @a mount_point is @c NULL the default mount point
     152 * @ref RTEMS_FTPFS_MOUNT_POINT_DEFAULT will be used.
     153 */
     154rtems_status_code rtems_ftpfs_set_timeout(
     155  const char *mount_point,
     156  const struct timeval *timeout
     157);
    114158
    115159/** @} */
    116160
    117161/**
    118  * @brief Creates the default mount point @ref RTEMS_FTPFS_MOUNT_POINT_DEFAULT
    119  * and mounts the FTP file system.
     162 * Creates the default mount point @ref RTEMS_FTPFS_MOUNT_POINT_DEFAULT and
     163 * mounts the FTP file system.
    120164 *
    121165 * It is mounted with read and write access.
Note: See TracChangeset for help on using the changeset viewer.