tftpdlib.html

来自「Vxworks API操作系统和驱动程序设计API。压缩的HTML文件」· HTML 代码 · 共 201 行

HTML
201
字号
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/tftpdLib.html - generated by refgen from tftpdLib.c --> <title> tftpdLib </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.htm"><i>VxWorks API Reference :  OS Libraries</i></a></p></blockquote><h1>tftpdLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>tftpdLib</strong> - Trivial File Transfer Protocol server library </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><a href="./tftpdLib.html#tftpdInit">tftpdInit</a>(&nbsp;)</b>  -  initialize the TFTP server task<br><b><a href="./tftpdLib.html#tftpdTask">tftpdTask</a>(&nbsp;)</b>  -  TFTP server daemon task<br><b><a href="./tftpdLib.html#tftpdDirectoryAdd">tftpdDirectoryAdd</a>(&nbsp;)</b>  -  add a directory to the access list<br><b><a href="./tftpdLib.html#tftpdDirectoryRemove">tftpdDirectoryRemove</a>(&nbsp;)</b>  -  delete a directory from the access list<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library implements the VxWorks Trivial File Transfer Protocol(TFTP) server module.  The server can respond to both read and writerequests.  It is started by a call to <b><a href="./tftpdLib.html#tftpdInit">tftpdInit</a>(&nbsp;)</b>.<p>The server has access to a list of directories that can either beprovided in the initial call to <b><a href="./tftpdLib.html#tftpdInit">tftpdInit</a>(&nbsp;)</b> or changed dynamicallyusing the <b><a href="./tftpdLib.html#tftpdDirectoryAdd">tftpdDirectoryAdd</a>(&nbsp;)</b> and <b>tftpDirectoryRemove(&nbsp;)</b> calls.Requests for files not in the directory trees specified in the accesslist will be rejected, unless the list is empty, in which case allrequests will be allowed.  By default, the access list contains thedirectory given in the global variable <b>tftpdDirectory</b>.  It is possibleto remove the default by calling <b><a href="./tftpdLib.html#tftpdDirectoryRemove">tftpdDirectoryRemove</a>(&nbsp;)</b>.<p>For specific information about the TFTP protocol, see RFC 783, "TFTPProtocol."<p></blockquote><h4>VXWORKS AE PROTECTION DOMAINS</h4><blockquote><p>Under VxWorks AE, you can run the tftp server in the kernel protection domain only.  This restriction does not apply under non-AE versions of VxWorks.  <p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>tftpdLib.h</b>, <b>tftpLib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><p><b><a href="./tftpLib.html#top">tftpLib</a></b>, RFC 783 "TFTP Protocol"<hr><a name="tftpdInit"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>tftpdInit(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>tftpdInit(&nbsp;)</strong> - initialize the TFTP server task</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>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    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine will spawn a new TFTP server task, if one does not alreadyexist.  If a TFTP server task is running already, <b><a href="./tftpdLib.html#tftpdInit">tftpdInit</a>(&nbsp;)</b> will simplyreturn an ERROR value without creating a new task.<p>To change the default stack size for the TFTP server task, use the<i>stackSize</i> parameter.  The task stack size should be set to a large enoughvalue for the needs of your application - use <b><a href="./usrLib.html#checkStack">checkStack</a>(&nbsp;)</b> to evaluate yourstack usage.  The default size is set in the global variable<b>tftpdTaskStackSize</b>.  Setting <i>stackSize</i> to zero will result in the stacksize being set to this default.<p>To set the maximum number of simultaneous TFTP connections (each with itsown transfer identifier or TID), set the <i>maxConnections</i> parameter.  Moreinformation on this is found in RFC 1350 ("The TFTP Protocol (Revision 2)").Setting <i>maxConnections</i> to zero will result in the maximum number ofconnections being set to the default, which is 10.<p>If <i>noControl</i> is TRUE, the server will be set up to transfer anyfile in any location.  Otherwise, it will only transfer files in thedirectories in <b>/tftpboot</b> or the <i>nDirectories</i> directories in the<i>directoryNames</i> list, and will send anaccess violation error to clients that attempt to access files outside ofthese directories.<p>By default, <i>noControl</i> is FALSE, <i>directoryNames</i> is empty, <i>nDirectories</i>is zero, and access is restricted to the <b>/tftpboot</b> directory.<p>Directories can be added to the access list after initialization by usingthe <b><a href="./tftpdLib.html#tftpdDirectoryAdd">tftpdDirectoryAdd</a>(&nbsp;)</b> routine.<p></blockquote><h4>VXWORKS AE PROTECTION DOMAINS</h4><blockquote><p>Under VxWorks AE, you can call this function from within the kernel protection domain only.  In addition, all arguments to this function can  reference only that data which is valid in the kernel protection domain. This restriction does not apply under non-AE versions of VxWorks.  <p></blockquote><h4>RETURNS</h4><blockquote><p><p>OK, or ERROR if a new TFTP task cannot be created.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tftpdLib.html#top">tftpdLib</a></b><hr><a name="tftpdTask"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>tftpdTask(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>tftpdTask(&nbsp;)</strong> - TFTP server daemon task</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS tftpdTask    (    int    nDirectories,      /* number of dirs allowed access */    char * *directoryNames,   /* array of directory names */    int    maxConnections     /* max number of simultan. connects */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine processes incoming TFTP client requests by spawning a newtask for each connection that is set up.  This routine is called by <b><a href="./tftpdLib.html#tftpdInit">tftpdInit</a>(&nbsp;)</b>.<p></blockquote><h4>VXWORKS AE PROTECTION DOMAINS</h4><blockquote><p>Under VxWorks AE, you can call this function from within the kernel protection domain only.  In addition, all arguments to this function can  reference only that data which is valid in the kernel protection domain. This restriction does not apply under non-AE versions of VxWorks.  <p></blockquote><h4>RETURNS</h4><blockquote><p><p>OK, or ERROR if the task returns unexpectedly.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tftpdLib.html#top">tftpdLib</a></b><hr><a name="tftpdDirectoryAdd"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>tftpdDirectoryAdd(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>tftpdDirectoryAdd(&nbsp;)</strong> - add a directory to the access list</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS tftpdDirectoryAdd    (    char * fileName           /* name of directory to add to access list */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine adds the specified directory name to the access list for the TFTP server.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tftpdLib.html#top">tftpdLib</a></b><hr><a name="tftpdDirectoryRemove"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>tftpdDirectoryRemove(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>tftpdDirectoryRemove(&nbsp;)</strong> - delete a directory from the access list</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS tftpdDirectoryRemove    (    char * fileName           /* name of directory to add to access list */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine deletes the specified directory name from the access list for the TFTP server.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tftpdLib.html#top">tftpdLib</a></b></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?