⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tftplib.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>tftpInit</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>tftpInit</i>(&nbsp;)</strong> - initialize a TFTP session</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>TFTP_DESC * tftpInit (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes a TFTP session by allocating and initializing a TFTPdescriptor.  It sets the default transfer mode to "netascii".<p></blockquote><h4>RETURNS</h4><blockquote><p>A pointer to a TFTP descriptor if successful, otherwise NULL.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tftpLib.html#top">tftpLib</a></b><hr><a name="tftpModeSet"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>tftpModeSet</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>tftpModeSet</i>(&nbsp;)</strong> - set the TFTP transfer mode</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS tftpModeSet    (    TFTP_DESC * pTftpDesc, /* TFTP descriptor */    char *      pMode      /* TFTP transfer mode */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets the transfer mode associated with the TFTP descriptor<i>pTftpDesc</i>.  <i>pMode</i> specifies the transfer mode, which can be"netascii", "binary", "image", or "octet".  Although recognized, thesemodes actually translate into either octet or netascii.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if unsuccessful.<p></blockquote><h4>ERRNO</h4><blockquote><p>S_tftpLib_INVALID_DESCRIPTOR<br>&nbsp;S_tftpLib_INVALID_ARGUMENT<br>&nbsp;S_tftpLib_INVALID_MODE</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tftpLib.html#top">tftpLib</a></b><hr><a name="tftpPeerSet"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>tftpPeerSet</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>tftpPeerSet</i>(&nbsp;)</strong> - set the TFTP server address</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS tftpPeerSet    (    TFTP_DESC * pTftpDesc, /* TFTP descriptor */    char *      pHostname, /* server name/address */    int         port       /* port number */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets the TFTP server (peer) address associated with the TFTPdescriptor <i>pTftpDesc</i>.  <i>pHostname</i> is either the TFTP server name(e.g., "congo") or the server Internet address (e.g., "90.3").  A non-zerovalue for <i>port</i> specifies the server port number (zero means usethe default TFTP server port number (69)).<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if unsuccessful.<p></blockquote><h4>ERRNO</h4><blockquote><p>S_tftpLib_INVALID_DESCRIPTOR<br>&nbsp;S_tftpLib_INVALID_ARGUMENT<br>&nbsp;S_tftpLib_UNKNOWN_HOST</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tftpLib.html#top">tftpLib</a></b><hr><a name="tftpPut"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>tftpPut</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>tftpPut</i>(&nbsp;)</strong> - put a file to a remote system</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS tftpPut    (    TFTP_DESC * pTftpDesc,     /* TFTP descriptor */    char *      pFilename,     /* remote filename */    int         fd,            /* file descriptor */    int         clientOrServer /* which side is calling */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine puts data from a local file (descriptor) to a file on the remotesystem.  <i>pTftpDesc</i> is a pointer to the TFTP descriptor.  <i>pFilename</i> isthe remote filename.  <i>fd</i> is the file descriptor from which it gets thedata.  A call to <b><i><a href="./tftpLib.html#tftpPeerSet">tftpPeerSet</a></i>(&nbsp;)</b> must be made prior to calling this routine.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if unsuccessful.<p></blockquote><h4>ERRNO</h4><blockquote><p>S_tftpLib_INVALID_DESCRIPTOR<br>&nbsp;S_tftpLib_INVALID_ARGUMENT<br>&nbsp;S_tftpLib_NOT_CONNECTED</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tftpLib.html#top">tftpLib</a></b><hr><a name="tftpGet"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>tftpGet</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>tftpGet</i>(&nbsp;)</strong> - get a file from a remote system</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS tftpGet    (    TFTP_DESC * pTftpDesc,     /* TFTP descriptor */    char *      pFilename,     /* remote filename */    int         fd,            /* file descriptor */    int         clientOrServer /* which side is calling */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine gets a file from a remote system via TFTP.  <i>pFilename</i> is thefilename.  <i>fd</i> is the file descriptor to which the data is written.<i>pTftpDesc</i> is a pointer to the TFTP descriptor.  The <b><i><a href="./tftpLib.html#tftpPeerSet">tftpPeerSet</a></i>(&nbsp;)</b> routinemust be called prior to calling this routine.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if unsuccessful.<p></blockquote><h4>ERRNO</h4><blockquote><p>S_tftpLib_INVALID_DESCRIPTOR<br>&nbsp;S_tftpLib_INVALID_ARGUMENT<br>&nbsp;S_tftpLib_NOT_CONNECTED</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tftpLib.html#top">tftpLib</a></b><hr><a name="tftpInfoShow"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>tftpInfoShow</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>tftpInfoShow</i>(&nbsp;)</strong> - get TFTP status information</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS tftpInfoShow    (    TFTP_DESC * pTftpDesc /* TFTP descriptor */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine prints information associated with TFTP descriptor <i>pTftpDesc</i>.<p></blockquote><h4>EXAMPLE</h4><blockquote><p>A call to <b><i><a href="./tftpLib.html#tftpInfoShow">tftpInfoShow</a></i>(&nbsp;)</b> might look like:<p><pre>    -&gt; tftpInfoShow (tftpDesc)           Connected to yuba [69]           Mode: netascii  Verbose: off  Tracing: off           Rexmt-interval: 5 seconds, Max-timeout: 25 seconds    value = 0 = 0x0    -&gt;</pre></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if unsuccessful.<p></blockquote><h4>ERRNO</h4><blockquote><p>S_tftpLib_INVALID_DESCRIPTOR</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tftpLib.html#top">tftpLib</a></b><hr><a name="tftpQuit"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>tftpQuit</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>tftpQuit</i>(&nbsp;)</strong> - quit a TFTP session</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS tftpQuit    (    TFTP_DESC * pTftpDesc /* TFTP descriptor */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine closes a TFTP session associated with the TFTP descriptor<i>pTftpDesc</i>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if unsuccessful.<p></blockquote><h4>ERRNO</h4><blockquote><p>S_tftpLib_INVALID_DESCRIPTOR</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tftpLib.html#top">tftpLib</a></b><hr><a name="tftpSend"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>tftpSend</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>tftpSend</i>(&nbsp;)</strong> - send a TFTP message to the remote system</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int tftpSend    (    TFTP_DESC * pTftpDesc,  /* TFTP descriptor */    TFTP_MSG *  pTftpMsg,   /* TFTP send message */    int         sizeMsg,    /* send message size */    TFTP_MSG *  pTftpReply, /* TFTP reply message */    int         opReply,    /* reply opcode */    int         blockReply, /* reply block number */    int *       pPort       /* return port number */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sends <i>sizeMsg</i> bytes of the passed message <i>pTftpMsg</i> to theremote system associated with the TFTP descriptor <i>pTftpDesc</i>.  If<i>pTftpReply</i> is not NULL, <b><i><a href="./tftpLib.html#tftpSend">tftpSend</a></i>(&nbsp;)</b> tries to get a reply message with ablock number <i>blockReply</i> and an opcode <i>opReply</i>.  If <i>pPort</i> is NULL,the reply message must come from the same port to which the messagewas sent.  If <i>pPort</i> is not NULL, the port number from which the replymessage comes is copied to this variable.<p></blockquote><h4>RETURNS</h4><blockquote><p>The size of the reply message, or ERROR.<p></blockquote><h4>ERRNO</h4><blockquote><p>S_tftpLib_TIMED_OUT<br>&nbsp;S_tftpLib_TFTP_ERROR</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tftpLib.html#top">tftpLib</a></b></body></html>

⌨️ 快捷键说明

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