VxWorks Reference Manual : Libraries

ftpdLib

NAME

ftpdLib - File Transfer Protocol (FTP) server

ROUTINES

ftpdInit( ) - initialize the FTP server task
ftpdDelete( ) - terminate the FTP server task

DESCRIPTION

This library implements the server side of the File Transfer Protocol (FTP), which provides remote access to the file systems available on a target. The protocol is defined in RFC 959. This implementation supports all commands required by that specification, as well as several additional commands.

USER INTERFACE

During system startup, the ftpdInit( ) routine creates a control connection at the predefined FTP server port which is monitored by the primary FTP task. Each FTP session established is handled by a secondary server task created as necessary. The server accepts the following commands:

HELP - List supported commands.
USER - Verify user name.
PASS - Verify password for the user.
QUIT - Quit the session.
LIST - List out contents of a directory.
NLST - List directory contents using a concise format.
RETR - Retrieve a file.
STOR - Store a file.
CWD - Change working directory.
TYPE - Change the data representation type.
PORT - Change the port number.
PWD - Get the name of current working directory.
STRU - Change file structure settings.
MODE - Change file transfer mode.
ALLO - Reserver sufficient storage.
ACCT - Identify the user's account.
PASV - Make the server listen on a port for data connection.
NOOP - Do nothing.
DELE - Delete a file
The ftpdDelete( ) routine will disable the FTP server until restarted. It reclaims all system resources used by the server tasks and cleanly terminates all active sessions.

INCLUDE FILES

ftpdLib.h

SEE ALSO

ftpdLib, ftpLib, netDrv, RFC-959 File Transfer Protocol


Libraries : Routines

ftpdInit( )

NAME

ftpdInit( ) - initialize the FTP server task

SYNOPSIS

STATUS ftpdInit
    (
    FUNCPTR pLoginRtn, /* user verification routine, or NULL */
    int     stackSize  /* task stack size, or 0 for default */
    )

DESCRIPTION

This routine installs the password verification routine indicated by pLoginRtn and establishes a control connection for the primary FTP server task, which it then creates. It is called automatically during system startup if INCLUDE_FTP_SERVER is defined. The primary server task supports simultaneous client sessions, up to the limit specified by the global variable ftpsMaxClients. The default value allows a maximum of four simultaneous connections. The stackSize argument specifies the stack size for the primary server task. It is set to the value specified in the ftpdWorkTaskStackSize global variable by default.

RETURNS

OK if server started, or ERROR otherwise.

ERRNO

N/A

SEE ALSO

ftpdLib


Libraries : Routines

ftpdDelete( )

NAME

ftpdDelete( ) - terminate the FTP server task

SYNOPSIS


STATUS ftpdDelete (void)

DESCRIPTION

This routine halts the FTP server and closes the control connection. All client sessions are removed after completing any commands in progress. When this routine executes, no further client connections will be accepted until the server is restarted. This routine is not reentrant and must not be called from interrupt level.

NOTE

If any file transfer operations are in progress when this routine is executed, the transfers will be aborted, possibly leaving incomplete files on the destination host.

RETURNS

OK if shutdown completed, or ERROR otherwise.

ERRNO

N/A

SEE ALSO

ftpdLib