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

📄 telnetdlib.html

📁 Vxworks API操作系统和驱动程序设计API。压缩的HTML文件
💻 HTML
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/telnetdLib.html - generated by refgen from telnetdLib.c --> <title> telnetdLib </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>telnetdLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>telnetdLib</strong> - telnet server library </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><a href="./telnetdLib.html#telnetdInit">telnetdInit</a>(&nbsp;)</b>  -  initialize the telnet services<br><b><a href="./telnetdLib.html#telnetdParserSet">telnetdParserSet</a>(&nbsp;)</b>  -  specify a command interpreter for telnet sessions<br><b><a href="./telnetdLib.html#telnetdStart">telnetdStart</a>(&nbsp;)</b>  -  initialize the telnet services<br><b><a href="./telnetdLib.html#telnetdExit">telnetdExit</a>(&nbsp;)</b>  -  close an active telnet session<br><b><a href="./telnetdLib.html#telnetdStaticTaskInitializationGet">telnetdStaticTaskInitializationGet</a>(&nbsp;)</b>  -  report whether tasks were pre-started by telnetd<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>The telnet protocol enables users on remote systems to login to VxWorks.<p>This library implements a telnet server which accepts remote telnet loginrequests and transfers input and output data between a command interpreterand the remote user. The default configuration redirects the input and outputfrom the VxWorks shell if available. The <b><a href="./telnetdLib.html#telnetdParserSet">telnetdParserSet</a>(&nbsp;)</b> routine allowsthe installation of an alternative command interpreter to handle the remoteinput and provide the output responses. If <b>INCLUDE_SHELL</b> is not defined,installing a command interpreter is required.<p>The <b><a href="./telnetdLib.html#telnetdInit">telnetdInit</a>(&nbsp;)</b> routine initializes the telnet service when <b>INCLUDE_TELNET</b>is defined. If <b>INCLUDE_SHELL</b> is also defined, the <b><a href="./telnetdLib.html#telnetdStart">telnetdStart</a>(&nbsp;)</b> routineautomatically starts the server. Client sessions will connect to the shell,which only supports one client at a time.<p></blockquote><h4>VXWORKS AE PROTECTION DOMAINS</h4><blockquote><p>Under VxWorks AE, the telnet server runs within 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>telnetLib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./rlogLib.html#top">rlogLib</a></b><hr><a name="telnetdInit"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>telnetdInit(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>telnetdInit(&nbsp;)</strong> - initialize the telnet services</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS telnetdInit    (    int  numClients,          /* maximum number of simultaneous sessions */    BOOL staticFlag           /* TRUE: create all tasks in advance of any */                              /* clients */     )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes the telnet server, which supports remote loginto VxWorks via the telnet protocol. It is called automatically when theconfiguration macro <b>INCLUDE_TELNET</b> is defined. The telnet server supportssimultaneous client sessions up to the limit specified by the<b>TELNETD_MAX_CLIENTS</b> setting provided in the <i>numClients</i> argument. The<i>staticFlag</i> argument is equal to the <b>TELNETD_TASKFLAG</b> setting. It allowsthe server to create all of the secondary input and output tasks and allocateall required resources in advance of any connection. The default value ofFALSE causes the server to spawn a task pair and create the associated datastructures after each new connection.<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.  This restriction does not apply under non-AE versions of VxWorks.  <p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if initialization fails</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./telnetdLib.html#top">telnetdLib</a></b><hr><a name="telnetdParserSet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>telnetdParserSet(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>telnetdParserSet(&nbsp;)</strong> - specify a command interpreter for telnet sessions</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS telnetdParserSet    (    FUNCPTR pParserCtrlRtn    /* provides parser's file descriptors */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine provides the ability to handle telnet connections usinga custom command interpreter or the default VxWorks shell. It iscalled automatically during system startup (when the configuration macro<b>INCLUDE_TELNET</b> is defined) to connect clients to the command interpreterspecified in the <b>TELNETD_PARSER_HOOK</b> parameter. The command interpreter in use when the telnet server start scan never be changed.<p>The <i>pParserCtrlRtn</i> argument provides a routine using the followinginterface:<pre>STATUS parserControlRtn    (    int telnetdEvent,/* start or stop a telnet session */    UINT32 sessionId,/* a unique session identifier */    int ioFd         /* file descriptor for character i/o */    )</pre>The telnet server calls the control routine with a <i>telnetdEvent</i>parameter of <b>REMOTE_INIT</b> during inititialization.  The telnet server thencalls the control routine with a <i>telnetdEvent</i> parameter of <b>REMOTE_START</b> when a client establishes a new connection.The <i>sessionId</i> parameter provides a unique identifier for the session.<p>In the default configuration, the telnet server calls the control routinewith a <i>telnetdEvent</i> parameter of <b>REMOTE_STOP</b> when a session ends. <p>The telnet server does not call the control routine when a session endsif it is configured to spawn all tasks and allocate all resources inadvance of any connections. The associated file descriptors will be reusedby later clients and cannot be released. In that case, the <b>REMOTE_STOP</b>operation only occurs to allow the command interpreter to close thosefiles when the server encounters a fatal error.<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>OK if parser control routine installed, or ERROR otherwise.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./telnetdLib.html#top">telnetdLib</a></b><hr><a name="telnetdStart"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>telnetdStart(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>telnetdStart(&nbsp;)</strong> - initialize the telnet services</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS telnetdStart    (    int port                  /* target port for accepting connections */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>Following the telnet server initialization, this routine creates a socketfor accepting remote connections and spawns the primary telnet server task.It executes automatically during system startup when the <b>INCLUDE_TELNET</b>configuration macro is defined since a parser control routine is available.The server will not accept connections otherwise.<p>By default, the server will spawn a pair of secondary input and outputtasks after each client connection. Changing the <b>TELNETD_TASKFLAG</b> settingto TRUE causes this routine to create all of those tasks in advance ofany connection. In that case, it calls the current parser control routinerepeatedly to obtain file descriptors for each possible client based onthe <i>numClients</i> argument to the initialization routine. The server willnot start if the parser control routine returns ERROR.<p>The <b>TELNETD_PORT</b> constant provides the <i>port</i> argument, which assigns theport where the server accepts connections. The default value is the standardsetting of 23. <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.  This restriction does not apply under non-AE versions of VxWorks.  <p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if startup fails</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./telnetdLib.html#top">telnetdLib</a></b><hr><a name="telnetdExit"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>telnetdExit(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>telnetdExit(&nbsp;)</strong> - close an active telnet session</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void telnetdExit    (    UINT32 sessionId          /* identifies the session to be deleted */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine supports the session exit command for a command interpreter(such as <b><a href="./usrLib.html#logout">logout</a>(&nbsp;)</b> for the VxWorks shell). Depending on the <b>TELNETD_TASKFLAG</b>setting, it causes the associated input and output tasks to restart or exit.The <i>sessionId</i> parameter must match a value provided to the commandinterpreter with the <b>REMOTE_START</b> option.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A.<p></blockquote><h4>ERRNO</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./telnetdLib.html#top">telnetdLib</a></b><hr><a name="telnetdStaticTaskInitializationGet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>telnetdStaticTaskInitializationGet(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>telnetdStaticTaskInitializationGet(&nbsp;)</strong> - report whether tasks were pre-started by telnetd</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>BOOL telnetdStaticTaskInitializationGet ()</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function is called by a custom shell parser library to determine if a shell is to be spawned at the time a connection is requested.<p></blockquote><h4>RETURNS  </h4><blockquote><p><p>TRUE, if all tasks are pre-spawned; FALSE, if tasks are spawned at the time a connection is requested.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./telnetdLib.html#top">telnetdLib</a></b>, <b><a href="./telnetdLib.html#telnetdInit">telnetdInit</a>(&nbsp;)</b>, <b><a href="./telnetdLib.html#telnetdParserSet">telnetdParserSet</a>(&nbsp;)</b><p></body></html>

⌨️ 快捷键说明

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