📄 ftplib.html
字号:
</blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets up the client side of a data connection for thespecified control connection. It issues a PASV command and attempts to connectto the host-specified port. If the host responds that it can not process thePASV command (command not supported) or fails to recognize the command, it will return ERROR.<p>This routine must be called <i>before</i> the data-transfer command is sent;otherwise, the server's connect may fail.<p>This routine is called after <b><a href="./ftpLib.html#ftpHookup">ftpHookup</a>( )</b> and <b><a href="./ftpLib.html#ftpLogin">ftpLogin</a>( )</b> to establish aconnection with a remote FTP server a low level. (For ahigher-level interaction with a remote FTP server, see <b><a href="./ftpLib.html#ftpXfer">ftpXfer</a>( )</b>.)<p>This function is preferred over <b><a href="./ftpLib.html#ftpDataConnInit">ftpDataConnInit</a>( )</b> because the remote system must preserve old port connection pairs even if the target system suffers from a reboot (2MSL). Using PASV we encourage the host's selection of a fresh port.<p></blockquote><h4>RETURNS</h4><blockquote><p>The file descriptor of the data socket created, or ERROR.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ftpLib.html#top">ftpLib</a></b>, <b><a href="./ftpLib.html#ftpHookup">ftpHookup</a>( )</b>, <b><a href="./ftpLib.html#ftpLogin">ftpLogin</a>( )</b>, <b><a href="./ftpLib.html#ftpCommandEnhanced">ftpCommandEnhanced</a>( )</b>, <b><a href="./ftpLib.html#ftpXfer">ftpXfer</a>( )</b>, <b>ftpConnInit( )</b><hr><a name="ftpDataConnInit"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>ftpDataConnInit( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>ftpDataConnInit( )</strong> - initialize an FTP data connection using PORT mode</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int ftpDataConnInit ( int ctrlSock /* fd of associated control socket */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets up the client side of a data connection for thespecified control connection using the PORT command. It creates the data port, informs theremote FTP server of the data port address, and listenson that data port. The server will then connect to this data portin response to a subsequent data-transfer command sent on thecontrol connection (see the manual entry for <b><a href="./ftpLib.html#ftpCommand">ftpCommand</a>( )</b>).<p>This routine must be called <i>before</i> the data-transfer command is sent;otherwise, the server's connect may fail.<p>This routine is called after <b><a href="./ftpLib.html#ftpHookup">ftpHookup</a>( )</b> and <b><a href="./ftpLib.html#ftpLogin">ftpLogin</a>( )</b> to establish aconnection with a remote FTP server at the lowest level. (For ahigher-level interaction with a remote FTP server, see <b><a href="./ftpLib.html#ftpXfer">ftpXfer</a>( )</b>.)<p>Please note that <b><a href="./ftpLib.html#ftpDataConnInitPassiveMode">ftpDataConnInitPassiveMode</a>( )</b> is recommended insteadof <b><a href="./ftpLib.html#ftpDataConnInit">ftpDataConnInit</a>( )</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>The file descriptor of the data socket created, or ERROR.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ftpLib.html#top">ftpLib</a></b>, <b><a href="./ftpLib.html#ftpDataConnInitPassiveMode">ftpDataConnInitPassiveMode</a>( )</b>, <b><a href="./ftpLib.html#ftpHookup">ftpHookup</a>( )</b>, <b><a href="./ftpLib.html#ftpLogin">ftpLogin</a>( )</b>, <b><a href="./ftpLib.html#ftpCommand">ftpCommand</a>( )</b>, <b><a href="./ftpLib.html#ftpXfer">ftpXfer</a>( )</b><hr><a name="ftpDataConnGet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>ftpDataConnGet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>ftpDataConnGet( )</strong> - get a completed FTP data connection</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int ftpDataConnGet ( int dataSock /* fd of data socket on which to await */ /* connection */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine completes a data connection initiated by a call to<b><a href="./ftpLib.html#ftpDataConnInit">ftpDataConnInit</a>( )</b>. It waits for a connection on the specified socket fromthe remote FTP server. The specified socket should be the one returned by<b><a href="./ftpLib.html#ftpDataConnInit">ftpDataConnInit</a>( )</b>. The connection is established on a new socket, whosefile descriptor is returned as the result of this function. The original socket, specified in the argument to this routine, is closed.<p>Usually this routine is called after <b><a href="./ftpLib.html#ftpDataConnInit">ftpDataConnInit</a>( )</b> and <b><a href="./ftpLib.html#ftpCommand">ftpCommand</a>( )</b> toinitiate a data transfer from/to the remote FTP server.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>The file descriptor of the new data socket, or ERROR if the connectionfailed.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ftpLib.html#top">ftpLib</a></b>, <b><a href="./ftpLib.html#ftpDataConnInit">ftpDataConnInit</a>( )</b>, <b><a href="./ftpLib.html#ftpCommand">ftpCommand</a>( )</b><hr><a name="ftpLs"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>ftpLs( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>ftpLs( )</strong> - list directory contents via FTP</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ftpLs ( char * dirName /* name of directory to list */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine lists the contents of a directory. The content listis obtained via an NLST FTP transaction.<p>The local device name must be the same as the remote host namewith a colon ":" as a suffix. (For example "wrs:" is the devicename for the "wrs" host.)<p></blockquote><h4>RETURNS </h4><blockquote><p>OK, or ERROR if could not open directory.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ftpLib.html#top">ftpLib</a></b><hr><a name="ftpLibDebugOptionSet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>ftpLibDebugOptionSet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>ftpLibDebugOptionSet( )</strong> - set the debug level of the ftp library routines</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void ftpLibDebugOptionsSet ( UINT32 debugLevel )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine enables the debugging of ftp transactions using the ftp library.<p><table><tr valign=top><th align=left>Debugging Level </th><th align=left> Meaning</tr><tr><td colspan="2"><hr></tr><tr valign=top><td align=left><b>FTPL_DEBUG_OFF</b> </td><td align=left> No debugging messages. </tr><tr valign=top><td align=left><b>FTPL_DEBUG_INCOMING</b> </td><td align=left> Display all incoming responses. </tr><tr valign=top><td align=left><b>FTPL_DEBUG_OUTGOING</b> </td><td align=left> Display all outgoing commands. </tr><tr valign=top><td align=left><b>FTPL_DEBUG_ERRORS</b> </td><td align=left> Display warnings and errors</tr><tr valign=top><td align=left></tr></tr></table></blockquote><h4>EXAMPLE</h4><blockquote><p><pre>ftpLibDebugOptionsSet (FTPL_DEBUG_ERRORS); /* Display any runtime errors */ftpLibDebugOptionsSet (FTPL_DEBUG_OUTGOING); /* Display outgoing commands */ftpLibDebugOptionsSet (FTPL_DEBUG_INCOMING); /* Display incoming replies */ftpLibDebugOptionsSet (FTPL_DEBUG_INCOMING | /* Display both commands and */ FTPL_DEBUG_OUTGOING); /* replies */</pre></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ftpLib.html#top">ftpLib</a></b><hr><a name="ftpTransientConfigSet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>ftpTransientConfigSet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>ftpTransientConfigSet( )</strong> - set parameters for host <b>FTP_TRANSIENT</b> responses </p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ftpTransientConfigSet ( UINT32 maxRetryCount, /* The maximum number of attempts to retry */ UINT32 retryInterval /* time (in system clock ticks) between retries */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine adjusts the delay between retries in response to receiving <b>FTP_PRELIM</b> and the maximum retry count permitted before failing.<p></blockquote><h4>RETURNS </h4><blockquote><p>OK</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ftpLib.html#top">ftpLib</a></b><hr><a name="ftpTransientConfigGet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>ftpTransientConfigGet( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>ftpTransientConfigGet( )</strong> - get parameters for host <b>FTP_TRANSIENT</b> responses </p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ftpTransientConfigGet ( UINT32 * maxRetryCount, /* The maximum number of attempts to retry */ UINT32 * retryInterval /* time (in system clock ticks) between retries */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine retrieves the delay between retries in response to receiving <b>FTP_TRANSIENT</b> and the maximum retry count permitted before failing.<p></blockquote><h4>RETURNS </h4><blockquote><p>OK<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ftpLib.html#top">ftpLib</a></b>, <b>ftpTransientConfigSet</b>, <b><a href="./tickLib.html#top">tickLib</a></b><hr><a name="ftpTransientFatalInstall"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>ftpTransientFatalInstall( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>ftpTransientFatalInstall( )</strong> - set applette to stop FTP transient host responses</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ftpTransientFatalInstall ( FUNCPTR pApplette /* function that returns TRUE or FALSE */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>The routine installs a function which will determine if a transient response should be fatal.Some ftp servers incorrectly use <b>transient</b> responses instead of <b>error</b> to describe conditions such as <b>disk full</b>.<p></blockquote><h4>RETURNS </h4><blockquote><p><p>OK if the installation is successful, or ERROR if the installation fails.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ftpLib.html#top">ftpLib</a></b>, <b><a href="./ftpLib.html#ftpTransientConfigSet">ftpTransientConfigSet</a>( )</b>, <b>ftpTransientFatal( )</b> in<b>target/config/comps/src/net/usrFtp.c</b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -