亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? remlib.c

?? vxwork源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* remLib.c - remote command library *//* Copyright 1984 - 2001 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------02u,10may02,kbw  making man page edits02t,15oct01,rae  merge from truestack ver 02w, base 02s (SPR #62484)02s,11aug93,jmm  Changed ioctl.h and socket.h to sys/ioctl.h and sys/socket.h02r,24jan93,jdi  documentation cleanup for 5.1.02q,04sep92,jmm  changed bindresvport() to correctly check the value of port                   (spr #1469)02p,19aug92,smb  Changed systime.h to sys/times.h.02o,18jul92,smb  Changed errno.h to errnoLib.h.02n,26may92,rrr  the tree shuffle		  -changed includes to have absolute path from h/02m,19nov91,rrr  shut up some ansi warnings.02l,04oct91,rrr  passed through the ansification filter                  -changed functions to ansi style		  -changed includes to have absolute path from h/		  -changed VOID to void		  -changed copyright notice02k,30apr91,jdi	 documentation tweaks.02j,05apr91,jdi	 documentation -- removed header parens and x-ref numbers;		 doc review by dnw.02i,11mar91,jaa	 documentation cleanup.02h,02oct90,hjb  added calls to htons() and ntohs() where needed.02g,19jul90,dnw  mangen fix02f,19apr90,hjb  added bindresvport(), modified rresvport()02e,07mar90,jdi  documentation cleanup.02d,07jun89,gae  changed SOCKADDR back to "struct sockaddr".02c,03may89,dnw  moved iam() and whoami() here remLib.c from usrLib.c		   to prevent usrLib from dragging in the network.02b,30may88,dnw  changed to v4 names.02a,28may88,dnw  removed host table routines to hostLib.		 removed iam, whoami to usrLib.		 changed call to fioStdErr to STD_ERR.01w,04mar88,jcf  changed semaphores, and sem calls for new semLib.01v,09jan88,gae  made hostTable a list -- no longer a fixed size.01u,15dec87,gae  used inet_ntoa_b() instead of inet_ntoa(); misc. cleanups.01t,14dec87,gae  documentation & checked malloc's for NULL.01s,11nov87,jlf  documentation01r,06nov87,dnw  changed remRcmd to take either host name or inet address.01q,11jun87,llk  added remShowHosts() which shows all hosts in the host table		   reachable from this VxWorks system.		 changed remInetAddr() to call inet_addr.  remInetAddr() is		   now considered obsolete.  Use inet_addr() instead.		 implemented host name aliases in host table.		 moved nethelp() from here to netLib.c.		 added remFillHostName().		 changed closeSocket() calls to close().01p,02apr87,ecs  added include of strLib.h.		 changed references to "struct sockaddr" to "SOCKADDR".01o,24mar87,jlf  documentation.01n,20dec86,dnw  changed iam() and remGetCurId to take password as 2nd param.		 updated nethelp().		 changed to not get include files from default directories.01m,08nov86,dnw  change remRresvport to choose different port numbers		   each time.  This is a TEMP (!?) fix for new net timing bug.		 fixed remRcmd() not cleaning up correctly on some errors.01l,29oct86,rdc	 deleted references to exLib.h and exos.h.01k,28oct86,rdc	 lint.01j,06oct86,gae	 got rid of rcd() and rpwd()...netDrv handles it.		 Moved HOST and HOSTNAME here from remLib.h for better hiding.01i,04sep86,jlf  documentation.01h,30jul86,rdc  fixed remRcmd to comply with (undocumented) rshd protocol.01g,17jul86,rdc  added seperate stderr stream to remRcmd.		 remRcmd now checks for recv errors correctly.01f,11jul86,rdc  wrote nethelp.01e,21may86,llk	 moved remCat to netDrv.c, called it netGet.		 changed memAllocate to malloc.	    rdc  delinted.01d,27mar86,rdc  made remCat a little less sensitive to crashed sockets.		 made remCat test for write errors properly.01c,28jan86,jlf  documentation01b,08oct85,rdc  de-linted01a,03oct85,rdc  written*//*This library provides routines that support remote command functions.  The rcmd() and rresvport() routines use protocols implemented in BSD 4.3; they support remote command execution, and the opening of a socket with a bound privileged port, respectively.  For more information, see <Unix Network Programming> by W. Richard Stevens. This library also includes routines that authorize network file access via 'netDrv'.To include 'remLib' in a VxWorks image, include the NETWRS_REMLIB configuration component.  This component contains one parameter, RSH_STDERR_SETUP_TIMEOUT.  Use this parameter to specify how  long an rcmd() call should wait for a return from its internal call to select().  Valid values for RSH_STDERR_SETUP_TIMEOUT are 0 (NO_WAIT), -1 (WAIT_FOREVER), or a positive integer from 1 to 2147483647 inclusive.  This positive integer specifies the wait in seconds.  The default value for RSH_STDERR_SETUP_TIMEOUT is -1 (WAIT_FOREVER).INCLUDE FILESremLib.hSEE ALSOinetLib*/#include "vxWorks.h"#include "sys/socket.h"#include "netinet/in.h"#include "remLib.h"#include "inetLib.h"#include "string.h"#include "errnoLib.h"#include "sys/times.h"#include "sockLib.h"#include "stdio.h"#include "unistd.h"#include "hostLib.h"#include "tickLib.h"#define MAX_RETRY_CONNECT 5LOCAL char remUser [MAX_IDENTITY_LEN];LOCAL char remPasswd [MAX_IDENTITY_LEN];int remLastResvPort = IPPORT_RESERVED - 1;long remStdErrSetupTimeout = 30;		/* RSH's stderr setup timeout(sec) */				        	/* select() timeout for 2nd port */ /********************************************************************************* remLibInit - initialize remLib** RETURNS: N/A* * NOMANUAL*/void remLibInit    (    long timeout			/* RSH_STDERR_SETUP_TIMEOUT */    )    {    remStdErrSetupTimeout = timeout;    }/********************************************************************************* rcmd - execute a shell command on a remote machine** This routine uses a remote shell daemon, 'rshd', to execute a command * on a remote system.  It is analogous to the BSD rcmd() routine.** Internally, this rcmd() implementation uses a select() call to wait for * a response from the 'rshd' daemon.  If rcmd() receives a response within  * its timeout, rcmd() calls accept() and completes by returning a socket * descriptor for the data generated on the remote machine.** The default timeout lets the rcmd() call wait forever.  However, * you can change the timeout value using the RSH_STDERR_SETUP_TIMEOUT * parameter associated with the NETWRS_REMLIB configuration component.** RETURNS* A socket descriptor if the remote shell daemon accepts, or* ERROR if the remote command fails.** S_remLib_RSH_ERROR, S_remLib_RSH_STDERR_SETUP_FAILED** SEE ALSO: BSD reference entry for rcmd()*/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 opened and */			/* socket descriptor is filled in */    )    {    int sd;    struct sockaddr_in sin;    struct sockaddr_in mySin;    int mySinLen;    char c;    int lport = 0;    int nTries = 0;    int stdErrPort;    int stdErrSocket;    char stringBuf [20];    sin.sin_family = AF_INET;    sin.sin_port = htons (remotePort);    if (((sin.sin_addr.s_addr = hostGetByName (host)) == ERROR) &&        ((sin.sin_addr.s_addr = inet_addr (host)) == ERROR))	{	return (ERROR);	}    do	{	sd = rresvport (&lport);	if (sd == ERROR)	    return (ERROR);	if (connect (sd, (struct sockaddr *) &sin, sizeof (sin)) == ERROR)	    {	    close (sd);	    lport--;	    }	else	    break;	}    while (++nTries <= MAX_RETRY_CONNECT);    if (nTries > MAX_RETRY_CONNECT)	return (ERROR);    if (fd2p == 0)        {        if (send (sd, "", 1, 0) <= 0)	    {	    close (sd);	    return (ERROR);	    }        lport = 0;        }    else        {	fd_set  readfds;	struct timeval *pT, t;	stdErrPort = --lport;	stdErrSocket = rresvport (&stdErrPort);	if (stdErrSocket == ERROR)	    {	    close (sd);	    return (ERROR);	    }	listen (stdErrSocket, 1);	sprintf (stringBuf, "%d", stdErrPort);	if (send (sd, stringBuf, strlen (stringBuf) + 1, 0) <= 0)	    {	    close (sd);	    close (stdErrPort);	    return (ERROR);	    }	    	/* wait for rshd to connect. vxWorks will wait the connect     */        /* by user-configurable timeout here(note: this timeout is     */        /* just policy, so user can set whatever as far as the timeout */        /* does not conflict with existing TCP timers.                 */#ifndef MAX	#define MAX(a, b)  ((a) > (b)? (a): (b))#endif	FD_ZERO(&readfds);	FD_SET(sd, &readfds);	FD_SET(stdErrSocket, &readfds);        /* setup select timeout given by user */        switch (remStdErrSetupTimeout)            {            case NO_WAIT:	        bzero ((char *)&t, sizeof(struct timeval));		pT = &t;                break;            case WAIT_FOREVER:                pT = NULL;                break;            default:	        bzero ((char *)&t, sizeof(struct timeval));                t.tv_sec = remStdErrSetupTimeout;		pT = &t;            }	if (select (MAX(sd, stdErrSocket)+1, &readfds, (fd_set *)NULL,		    (fd_set *)NULL, pT) < 1 ||	    !FD_ISSET(stdErrSocket, &readfds))	    {	    close (sd);	    close (stdErrSocket);	    	    errnoSet (S_remLib_RSH_STDERR_SETUP_FAILED);	    return (ERROR);	    }	/* rshd got back to the secondary port */	mySinLen = sizeof (mySin);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区在线观看网站| 国产v日产∨综合v精品视频| 亚洲欧美日韩中文字幕一区二区三区| 7777精品久久久大香线蕉| 亚洲午夜激情网页| 欧美日韩在线播放一区| 日韩中文字幕一区二区三区| 色偷偷久久人人79超碰人人澡| 91精品一区二区三区在线观看| 欧美丰满高潮xxxx喷水动漫| 91精品在线麻豆| 精品人伦一区二区色婷婷| 91久久精品日日躁夜夜躁欧美| 91麻豆swag| 欧美日韩免费高清一区色橹橹| 成人午夜免费电影| 99久久伊人精品| 成人在线综合网| 美女精品自拍一二三四| 91污片在线观看| 欧美成人女星排行榜| 国产欧美日韩三区| 伦理电影国产精品| 国产午夜亚洲精品理论片色戒| 国产精品综合久久| 99久久久精品| 亚洲 欧美综合在线网络| 日韩精品一区二区三区视频播放| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 日韩电影在线看| 欧美精品免费视频| 91免费版pro下载短视频| 亚洲一区日韩精品中文字幕| 久久久久免费观看| 91在线免费看| 日本在线观看不卡视频| 欧美精选午夜久久久乱码6080| 亚洲欧美另类久久久精品2019| 日本午夜一区二区| 欧美一区二区三级| 紧缚奴在线一区二区三区| 91蜜桃传媒精品久久久一区二区 | 这里只有精品视频在线观看| 国产视频一区二区三区在线观看| 丰满白嫩尤物一区二区| 国产自产高清不卡| 国产a区久久久| 欧美日本免费一区二区三区| 丰满岳乱妇一区二区三区| 日韩中文字幕亚洲一区二区va在线| 久久九九久久九九| 91精品国产乱码久久蜜臀| 日本精品一区二区三区四区的功能| 久久99精品国产麻豆不卡| 亚洲影院久久精品| 久久久久久电影| 日韩一区二区免费电影| 在线观看日韩高清av| 成人app在线| 国产福利视频一区二区三区| 五月婷婷综合激情| 一区二区三区丝袜| 亚洲视频在线一区二区| 国产精品视频观看| 欧美激情资源网| 亚洲国产精品传媒在线观看| 精品国产一区二区三区不卡| 91精品国产综合久久精品| 欧美日韩一级片在线观看| 日本道免费精品一区二区三区| 成a人片亚洲日本久久| 精品国产百合女同互慰| 国产成人午夜99999| 国产福利91精品一区| 亚洲色图在线播放| 久久久精品2019中文字幕之3| 91老司机福利 在线| 首页国产丝袜综合| 亚洲人成人一区二区在线观看| 波多野结衣在线一区| 午夜精品一区二区三区免费视频 | 国产成人av电影在线| 中文字幕av一区二区三区高 | 国产欧美综合在线| 久久久精品天堂| 欧美高清在线一区| 欧美激情一区二区三区在线| 欧美一级夜夜爽| 精品噜噜噜噜久久久久久久久试看 | 麻豆精品国产传媒mv男同| 久久久亚洲精品一区二区三区 | 国产成人综合亚洲网站| 亚洲成人中文在线| 丰满岳乱妇一区二区三区| 国产精品欧美一区喷水| 亚洲精品一区二区三区精华液| 欧美日韩成人综合| 欧美妇女性影城| 精品久久久久久久人人人人传媒| 高清在线成人网| 日韩va亚洲va欧美va久久| 日韩午夜在线观看视频| 福利一区在线观看| 国产精品白丝jk黑袜喷水| 国产米奇在线777精品观看| 99国产精品国产精品毛片| 一区二区三区国产精品| av激情综合网| 亚洲va国产天堂va久久en| 日韩电影免费一区| 成人免费毛片高清视频| 欧美在线三级电影| 精品国产亚洲一区二区三区在线观看| 国产亚洲一区二区在线观看| 亚洲男人电影天堂| 青青草97国产精品免费观看无弹窗版| 国产一区999| 欧美亚男人的天堂| 欧美精品在线视频| 久久久综合精品| 午夜av一区二区三区| 成人做爰69片免费看网站| 成人av电影免费观看| 在线播放中文字幕一区| 国产日产欧美一区二区三区 | 精品国产伦一区二区三区观看方式| 成人欧美一区二区三区小说 | 国产精品一区久久久久| 亚洲一区二区三区中文字幕在线| 美女免费视频一区二区| 色av成人天堂桃色av| 国产亚洲短视频| 亚洲一区二区三区在线| 国产91精品在线观看| 777奇米四色成人影色区| 国产精品久久三区| 国产尤物一区二区| 欧美精品高清视频| 亚洲另类色综合网站| 国产在线精品一区二区夜色 | 粉嫩aⅴ一区二区三区四区| 欧美色成人综合| 国产精品国模大尺度视频| 美女爽到高潮91| 欧美日韩国产天堂| 亚洲精品视频在线| av高清久久久| 中文字幕一区二区三区四区| 国内精品伊人久久久久av一坑| 欧美一三区三区四区免费在线看| 亚洲精品一卡二卡| av一区二区三区四区| 亚洲国产精华液网站w | 99精品视频在线免费观看| 久久一日本道色综合| 麻豆国产精品777777在线| 这里只有精品电影| 日韩一区欧美二区| 免费av网站大全久久| 久久久噜噜噜久久中文字幕色伊伊 | 国产亚洲女人久久久久毛片| 国产福利91精品一区| 国产日韩欧美精品在线| 色综合久久久久久久久| 午夜免费久久看| 久久综合九色综合97婷婷女人| 韩国视频一区二区| 亚洲综合成人在线| 一区二区三区视频在线观看| 免费xxxx性欧美18vr| 日韩美女视频一区二区在线观看| 喷白浆一区二区| 日韩欧美色综合| 久久99精品久久久久久国产越南| 日韩视频免费观看高清完整版| 欧美成人高清电影在线| 成人免费视频app| 另类综合日韩欧美亚洲| 日韩美女视频19| 国产无一区二区| 精品日韩99亚洲| 欧美日韩国产免费| 成人性生交大片免费看视频在线 | 日韩欧美美女一区二区三区| 国产高清精品在线| 日韩精品乱码免费| 亚洲最新在线观看| 亚洲人成人一区二区在线观看| 久久久久久亚洲综合| 91精品国产福利在线观看| 中文字幕一区二区三区av| 欧美国产精品一区二区| 91精彩视频在线| 国产一区二区h| 久久激五月天综合精品| 三级欧美韩日大片在线看| 亚洲免费高清视频在线| 一色桃子久久精品亚洲| 中文字幕亚洲成人| 亚洲激情在线播放|