VxWorks Reference Manual : Libraries

tftpdLib

NAME

tftpdLib - Trivial File Transfer Protocol server library

ROUTINES

tftpdInit( ) - initialize the TFTP server task
tftpdTask( ) - TFTP server daemon task
tftpdDirectoryAdd( ) - add a directory to the access list
tftpdDirectoryRemove( ) - delete a directory from the access list

DESCRIPTION

This library implements the VxWorks Trivial File Transfer Protocol (TFTP) server module. The server can respond to both read and write requests. It is started by a call to tftpdInit( ).

The server has access to a list of directories that can either be provided in the initial call to tftpdInit( ) or changed dynamically using the tftpdDirectoryAdd( ) and tftpDirectoryRemove( ) calls. Requests for files not in the directory trees specified in the access list will be rejected, unless the list is empty, in which case all requests will be allowed. By default, the access list contains the directory given in the global variable tftpdDirectory. It is possible to remove the default by calling tftpdDirectoryRemove( ).

For specific information about the TFTP protocol, see RFC 783, "TFTP Protocol."

INCLUDE FILES

tftpdLib.h, tftpLib.h

SEE ALSO

tftpdLib, tftpLib, RFC 783 "TFTP Protocol", VxWorks Programmer's Guide: Network


Libraries : Routines

tftpdInit( )

NAME

tftpdInit( ) - initialize the TFTP server task

SYNOPSIS

STATUS tftpdInit
    (
    int    stackSize,       /* stack size for the tftpdTask */
    int    nDirectories,    /* number of directories allowed read */
    char * *directoryNames, /* array of dir names */
    BOOL   noControl,       /* TRUE if no access control required */
    int    maxConnections
    )

DESCRIPTION

This routine will spawn a new TFTP server task, if one does not already exist. If a TFTP server task is running already, tftpdInit( ) will simply return without creating a new task. It will simply report whether a new TFTP task was successfully spawned. The argument stackSize can be specified to change the default stack size for the TFTP server task. The default size is set in the global variable tftpdTaskStackSize.

RETURNS

OK, or ERROR if a new TFTP task cannot be created.

SEE ALSO

tftpdLib


Libraries : Routines

tftpdTask( )

NAME

tftpdTask( ) - TFTP server daemon task

SYNOPSIS

STATUS tftpdTask
    (
    int    nDirectories,    /* number of dirs allowed access */
    char * *directoryNames, /* array of directory names */
    int    maxConnections   /* max number of simultan. connects */
    )

DESCRIPTION

This routine processes incoming TFTP client requests by spawning a new task for each connection that is set up.

This routine is called by tftpdInit( ).

RETURNS

OK, or ERROR if the task returns unexpectedly.

SEE ALSO

tftpdLib


Libraries : Routines

tftpdDirectoryAdd( )

NAME

tftpdDirectoryAdd( ) - add a directory to the access list

SYNOPSIS

STATUS tftpdDirectoryAdd
    (
    char * fileName /* name of directory to add to access list */
    )

DESCRIPTION

This routine adds the specified directory name to the access list for the TFTP server.

RETURNS

N/A

SEE ALSO

tftpdLib


Libraries : Routines

tftpdDirectoryRemove( )

NAME

tftpdDirectoryRemove( ) - delete a directory from the access list

SYNOPSIS

STATUS tftpdDirectoryRemove
    (
    char * fileName /* name of directory to add to access list */
    )

DESCRIPTION

This routine deletes the specified directory name from the access list for the TFTP server.

RETURNS

N/A

SEE ALSO

tftpdLib