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

📄 remlib.html

📁 vxworks相关论文
💻 HTML
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/remLib.html - generated by refgen from remLib.c --> <title> remLib </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.html"><i>VxWorks Reference Manual :  Libraries</i></a></p></blockquote><h1>remLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>remLib</strong> - remote command library </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./remLib.html#rcmd">rcmd</a></i>(&nbsp;)</b>  -  execute a shell command on a remote machine<br><b><i><a href="./remLib.html#rresvport">rresvport</a></i>(&nbsp;)</b>  -  open a socket with a privileged port bound to it<br><b><i><a href="./remLib.html#remCurIdGet">remCurIdGet</a></i>(&nbsp;)</b>  -  get the current user name and password<br><b><i><a href="./remLib.html#remCurIdSet">remCurIdSet</a></i>(&nbsp;)</b>  -  set the remote user name and password<br><b><i><a href="./remLib.html#iam">iam</a></i>(&nbsp;)</b>  -  set the remote user name and password<br><b><i><a href="./remLib.html#whoami">whoami</a></i>(&nbsp;)</b>  -  display the current remote identity<br><b><i><a href="./remLib.html#bindresvport">bindresvport</a></i>(&nbsp;)</b>  -  bind a socket to a privileged IP port<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library provides routines to support remote command functions.  The <b><i><a href="./remLib.html#rcmd">rcmd</a></i>(&nbsp;)</b>and <b><i><a href="./remLib.html#rresvport">rresvport</a></i>(&nbsp;)</b> routines use protocols implemented in UNIX BSD 4.3; they supportremote command execution, and the opening of a socket with a bound privilegedport, respectively.  Other routines in this library authorize network file access via netDrv.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>remLib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./remLib.html#top">remLib</a></b>, <b><a href="./inetLib.html#top">inetLib</a></b>,  <i>VxWorks Programmer's Guide: Network</i><hr><a name="rcmd"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>rcmd</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>rcmd</i>(&nbsp;)</strong> - execute a shell command on a remote machine</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int rcmd    (    char * host,       /* host name or inet address */    int    remotePort, /* remote port to connect to (rshd) */    char * localUser,  /* local user name */    char * remoteUser, /* remote user name */    char * cmd,        /* command */    int *  fd2p        /* if this pointer is non-zero, stderr socket is */                       /* and socket descriptor is filled in */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine executes a command on a remote machine, using the remoteshell daemon, <b>rshd</b>, on the remote system.  It is analogous to the UNIXroutine <b><i><a href="./remLib.html#rcmd">rcmd</a></i>(&nbsp;)</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>A socket descriptor if the remote shell daemon accepts, orERROR if the remote command fails.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./remLib.html#top">remLib</a></b>, UNIX BSD 4.3 manual entry for <b><i><a href="./remLib.html#rcmd">rcmd</a></i>(&nbsp;)</b><hr><a name="rresvport"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>rresvport</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>rresvport</i>(&nbsp;)</strong> - open a socket with a privileged port bound to it</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int rresvport    (    int * alport /* port number to initially try */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine opens a socket with a privileged port bound to it.It is analogous to the UNIX routine <b><i><a href="./remLib.html#rresvport">rresvport</a></i>(&nbsp;)</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>A socket descriptor, or ERROR if either the socket cannot be opened or allports are in use.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./remLib.html#top">remLib</a></b>, UNIX BSD 4.3 manual entry for <b><i><a href="./remLib.html#rresvport">rresvport</a></i>(&nbsp;)</b><hr><a name="remCurIdGet"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>remCurIdGet</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>remCurIdGet</i>(&nbsp;)</strong> - get the current user name and password</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void remCurIdGet    (    char * user,  /* where to return current user name */    char * passwd /* where to return current password */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine gets the user name and password currently used for remotehost access privileges and copies them to <i>user</i> and <i>passwd</i>.  Eitherparameter can be initialized to NULL, and the corresponding item will notbe passed.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./remLib.html#top">remLib</a></b>, <b><i><a href="./remLib.html#iam">iam</a></i>(&nbsp;)</b>, <b><i><a href="./remLib.html#whoami">whoami</a></i>(&nbsp;)</b><hr><a name="remCurIdSet"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>remCurIdSet</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>remCurIdSet</i>(&nbsp;)</strong> - set the remote user name and password</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS remCurIdSet    (    char * newUser,  /* user name to use on remote */    char * newPasswd /* password to use on remote (NULL = none) */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine specifies the user name that will have access privilegeson the remote machine.  The user name must exist in the remotemachine's <b>/etc/passwd</b>, and if it has been assigned a password,the password must be specified in <i>newPasswd</i>.<p>Either parameter can be NULL, and the corresponding item will not be set.<p>The maximum length of the user name and the password is <b>MAX_IDENTITY_LEN</b>(defined in <b>remLib.h</b>).<p></blockquote><h4>NOTE</h4><blockquote><p>A more convenient version of this routine is <b><i><a href="./remLib.html#iam">iam</a></i>(&nbsp;)</b>, which is intendedto be used from the shell.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the name or password is too long.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./remLib.html#top">remLib</a></b>, <b><i><a href="./remLib.html#iam">iam</a></i>(&nbsp;)</b>, <b><i><a href="./remLib.html#whoami">whoami</a></i>(&nbsp;)</b><hr><a name="iam"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>iam</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>iam</i>(&nbsp;)</strong> - set the remote user name and password</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS iam    (    char * newUser,  /* user name to use on remote */    char * newPasswd /* password to use on remote (NULL = none) */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine specifies the user name that will have access privilegeson the remote machine.  The user name must exist in the remotemachine's <b>/etc/passwd</b>, and if it has been assigned a password,the password must be specified in <i>newPasswd</i>.<p>Either parameter can be NULL, and the corresponding item will not be set.<p>The maximum length of the user name and the password is <b>MAX_IDENTITY_LEN</b>(defined in <b>remLib.h</b>).<p></blockquote><h4>NOTE</h4><blockquote><p>This routine is a more convenient version of <b><i><a href="./remLib.html#remCurIdSet">remCurIdSet</a></i>(&nbsp;)</b> and isintended to be used from the shell.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the call fails.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./remLib.html#top">remLib</a></b>, <b><i><a href="./remLib.html#whoami">whoami</a></i>(&nbsp;)</b>, <b><i><a href="./remLib.html#remCurIdGet">remCurIdGet</a></i>(&nbsp;)</b>, <b><i><a href="./remLib.html#remCurIdSet">remCurIdSet</a></i>(&nbsp;)</b><hr><a name="whoami"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>whoami</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>whoami</i>(&nbsp;)</strong> - display the current remote identity</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void whoami (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine displays the user name currently used for remote machineaccess.  The user name is set with <b><i><a href="./remLib.html#iam">iam</a></i>(&nbsp;)</b> or <b><i><a href="./remLib.html#remCurIdSet">remCurIdSet</a></i>(&nbsp;)</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./remLib.html#top">remLib</a></b>, <b><i><a href="./remLib.html#iam">iam</a></i>(&nbsp;)</b>, <b><i><a href="./remLib.html#remCurIdGet">remCurIdGet</a></i>(&nbsp;)</b>, <b><i><a href="./remLib.html#remCurIdSet">remCurIdSet</a></i>(&nbsp;)</b><hr><a name="bindresvport"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>bindresvport</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>bindresvport</i>(&nbsp;)</strong> - bind a socket to a privileged IP port</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS bindresvport    (    int                  sd, /* socket to be bound */    struct sockaddr_in * sin /* socket address -- value/result */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine picks a port number between 600 and 1023 that is not beingused by any other programs and binds the socket passed as <i>sd</i> to thatport.  Privileged IP ports (numbers between and including 0 and 1023) arereserved for privileged programs.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>OK, or ERROR if the address family specified in <i>sin</i> is not supported orthe call fails.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./remLib.html#top">remLib</a></b></body></html>

⌨️ 快捷键说明

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