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

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

?? rloglib.c

?? vxworks的完整的源代碼
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/* rlogLib.c - remote login library *//* Copyright 1984 - 2002 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------03m,07may02,kbw  man page edits03l,30apr02,fmk  notify shell of remote connection/disconnection03k,15oct01,rae  merge from truestack ver 03l, base 03i (AE support)03j,24may01,mil  Bump up rlogin task stack size to 8000.03i,14mar99,jdi  doc: removed refs to config.h and/or configAll.h (SPR 25663).03h,05oct98,jmp  doc: cleanup.03g,30oct96,dgp  doc: change task names for rlogind() per SPR #590203f,09aug94,dzb  fixed activeFlag race with cleanupFlag (SPR #2050).                 made rlogindSocket global (SPR #1941).	   +jpb  added username to rlogin "engaged" messages (SPR #3274).03e,02may94,ms   increased stack size for SIMHPPA.03d,24aug93,dvs  cleaned up removing pty from log fd list.03c,23aug93,dvs  added logFdFromRlogin (SPR #2212).03b,11aug93,jmm  Changed ioctl.h and socket.h to sys/ioctl.h and sys/socket.h03a,02feb93,jdi  documentation tweak on configuration.02z,20jan93,jdi  documentation cleanup for 5.1.02y,19aug92,smb  Changed systime.h to sys/times.h.02x,18jul92,smb  Changed errno.h to errnoLib.h.02w,26may92,rrr  the tree shuffle		  -changed includes to have absolute path from h/02v,24apr92,rfs  Fixed flaky shell restart upon connection termination.                 The functions rlogInTask() and rlogExit() were changed.                 This is fixing SPR #1427.  Also misc ANSI noise.02u,13dec91,gae  ANSI cleanup.02t,19nov91,rrr  shut up some ansi warnings.02s,14nov91,jpb  moved remCurIdSet to shellLogout (shellLib.c).02r,04oct91,rrr  passed through the ansification filter                  -changed functions to ansi style		  -changed READ, WRITE and UPDATE to O_RDONLY O_WRONLY and ...		  -changed VOID to void		  -changed copyright notice02q,01aug91,yao  added to pass 6 args to excJobAdd() call.02p,13may91,shl  undo'ed 02n.02o,30apr91,jdi	 documentation tweaks.02n,29apr91,shl  added call to restore original machine name, user and		 group ids (spr 916).02m,05apr91,jdi	 documentation -- removed header parens and x-ref numbers;		 doc review by dnw.02l,08mar91,jaa	 documentation cleanup.02k,04oct90.shl	 fixed rlogExit() to restore original user and password.02j,30sep90.del	 added htons macros to port references02i,08may90,shl  changed entry point of tRlogind back to rlogind.02h,18apr90,shl  added shell security.		 changed rlogind name to tRlogind.02g,07apr89,ecs  bumped rlogTaskStackSize from 2000 to 5000 for SPARC.02f,07jun89,gae  changed SOCKADDR back to "struct sockaddr".02e,06jun88,dnw  changed taskSpawn/taskCreate args.02d,30may88,dnw  changed to v4 names.02c,28may88,dnw  changed to use shellOrigStdSet (...) instead of shellSetOrig...		 changed not to use shellTaskId global variable.02b,31mar88,gae  made it work with I/O system revision.02a,26jan88,jcf  made kernel independent.01x,19nov87,dnw  made rlogin set terminal 7-bit option so that "~." and		   XON-XOFF will be reliably detected.		 cleaned-up rlogin loop.		 changed rlogind to wait for shell to exist before accepting		   remote connections.	   +gae  fixed problem of rlogin() exiting before a possible	           rlogind session gets to finish.01w,18nov87,ecs  lint.		 added include of inetLib.h.01v,15nov87,dnw  changed rlogInit() to return status.01u,03nov87,ecs  documentation.	     &   fixed bug in use of setsockopt().	    dnw  changed rlogin() to accept inet address as well as host name.		 changed to call shellLogoutInstall() instead of logoutInstall.01t,24oct87,gae  changed setOrig{In,Out,Err}Fd() to shellSetOrig{In,Out,Err}().		 made rlogindOut() exit on EOF from master pty fd.		 made rlogin return VxWorks prompt when client disconnects.		 made rlogInit() not sweat being called more than once.		 added shellLock() to rlogind & rlogin to get exclusive use		   of shell.01s,20oct87,gae  added logging device for rlogin shell; made rlogInit()		   create pty device.01r,03oct87,gae  moved logout to usrLib.c and made rlogindExit() from rlogindIn.		 removed gratuitious standard I/O ioctl()'s.		 made "disconnection" cleaner by having shell do the restart.01q,04sep87,llk  added logout().  Made rlogindSock global so that logout() could		   access it.		 changed rlogind so that it doesn't exit when an accept fails.01p,22apr87,dnw  changed rlogin to turn on xon-xoff to terminal.		 fixed handling of termination sequence "~.".		 changed default priority of rlogin tasks from 100 to 2.		 made priority and task ids be global variables so they		   can be accessed from outside this module.01o,02apr87,ecs	 changed references to "struct sockaddr" to "SOCKADDR".01n,27mar87,dnw  documentation.01m,23mar87,jlf  documentation.01l,27feb87,dnw  changed to spawn rlog tasks as UNBREAKABLE.01k,20dec86,dnw  changed to use new call to remGetCurId().		 changed old socket calls to normal i/o calls.		 changed to not get include files from default directories.		 added rlogInit ().01j,27oct86,rdc  everything is now spawned in system mode with bigger stacks.		 delinted.01i,10oct86,gae  'remUser' made available through remGetCurId()...		   included remLib.h.  Housekeeping.01h,04sep86,jlf  documentation.01g,31jul86,llk  uses new spawn01f,27jul86,llk  added standard error fd which prints to the rlogin terminal.		 Error messages go to standard error.01e,07jul86,rdc  made rlogindInChild restart the shell after disconnect.		 Documentation.01d,19jun86,rdc  make rlogin close the socket after disconnect.01c,18jun86,rdc  delinted.01b,29apr86,rdc  rlogin now tries multiple local port numbers in its attempt		 to connect to a remote host.		 rlogind now uses KEEPALIVE option on sockets connected to		 clients.		 made rlogind unbreakable.01a,02apr86,rdc  written.*//*DESCRIPTIONThis library provides a remote login facility for VxWorks based on the UNIX `rlogin' protocol (as implemented in UNIX BSD 4.3).  On a VxWorks terminal, this command gives users the ability to log in to remote systems on the network.  Reciprocally, the remote login daemon, rlogind(), allows remote users to log in to VxWorks.  The daemon is started by calling rlogInit(), which is called automatically when INCLUDE_RLOGIN is defined.  The remote login daemon accepts remote login requests from another VxWorks or UNIX system, and causes the shell's input and output to be redirected to the remote user.Internally, rlogind() provides a tty-like interface to the remoteuser through the use of the VxWorks pseudo-terminal driver ptyDrv.INCLUDE FILES: rlogLib.hSEE ALSO:ptyDrv, telnetLib, UNIX BSD 4.3 manual entries for `rlogin', `rlogind', and `pty'*/#include "vxWorks.h"#include "sys/socket.h"#include "netinet/in.h"#include "inetLib.h"#include "ioLib.h"#include "remLib.h"#include "taskLib.h"#include "sys/times.h"#include "sockLib.h"#include "stdio.h"#include "unistd.h"#include "string.h"#include "errnoLib.h"#include "excLib.h"#include "logLib.h"#include "hostLib.h"#include "sysLib.h"#include "ptyDrv.h"#include "shellLib.h"#include "fcntl.h"#include "netLib.h"#define LOGIN_SERVICE		513#define STDIN_BUF_SIZE		200#define STDOUT_BUF_SIZE		200#define MAX_CONNECT_TRIES	5char *rlogShellName	= "tShell";	/* task name we connect to */char *rlogTermType	= "dumb/9600";	/* default terminal type *//* rlogin task parameters */int rlogTaskPriority	= 2;		/* task priority of rlogin tasks */int rlogTaskOptions	= VX_SUPERVISOR_MODE | VX_UNBREAKABLE;#if    (CPU_FAMILY == SIMHPPA) || (CPU_FAMILY == SIMSPARCSUNOS)int rlogTaskStackSize   = 10000;         /* stack size of rlogin tasks */#else  /* CPU_FAMILY == SIMHPPA */int rlogTaskStackSize   = 8000;         /* stack size of rlogin tasks */#endif /* CPU_FAMILY == SIMHPPA */int rlogindId;				/* rlogind task ID */int rlogInTaskId;			/* rlogInTask task ID */int rlogOutTaskId;			/* rlogOutTask task ID */int rlogChildTaskId;			/* rlogChildTask task ID */int rlogindSocket;			/* rlogind socket fd *//* externals */IMPORT	int logFdFromRlogin;		/* fd of pty for rlogin *//* local variables */LOCAL char *ptyRlogName  = "/pty/rlogin.";LOCAL char *ptyRlogNameM = "/pty/rlogin.M";LOCAL char *ptyRlogNameS = "/pty/rlogin.S";LOCAL BOOL activeFlag = FALSE;	/* TRUE if there is an active connection */LOCAL BOOL cleanupFlag;		/* TRUE if exit cleanup has occurred */LOCAL int rlogindM;		/* rlogind master pty */LOCAL int rlogindS;		/* rlogind slave pty */LOCAL int rloginSocket;		/* rlogin socket */LOCAL int shellInFd;		/* original console input */LOCAL int shellOutFd;		/* original console output */LOCAL int shellErrFd;		/* original console error output *//* forward declarations */void rlogind ();void rlogInTask ();void rlogOutTask ();void rlogChildTask ();/* forward static functions */static void rlogExit (BOOL usedLogout);static STATUS recvStr (int sd, char *buf);static void childTaskSpawn (int	priority, int options, int stackSize);/********************************************************************************* rlogInit - initialize the remote login facility** This routine initializes the remote login facility.  It creates a pty * (pseudo tty) device and spawns rlogind().  If INCLUDE_RLOGIN is included,* rlogInit() is called automatically at boot time.** VXWORKS AE PROTECTION DOMAINS* 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.  ** RETURNS: OK or ERROR.** SEE ALSO: ptyDrv*/STATUS rlogInit (void)    {    static BOOL done;	/* FALSE = not done */    if (done)	{	printErr ("rlogInit: already initialized.\n");	return (ERROR);	}    else	done = TRUE;    if (ptyDrv () == ERROR || ptyDevCreate (ptyRlogName, 1024, 1024) == ERROR)	{	printErr ("rlogInit: unable to create pty device.\n");	return (ERROR);	}    rlogindId = taskSpawn ("tRlogind", rlogTaskPriority,			   rlogTaskOptions, rlogTaskStackSize,			   (FUNCPTR)rlogind, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);    if (rlogindId == ERROR)	{	printErr ("rlogInit: unable to spawn rlogind.\n");	return (ERROR);	}    return (OK);    }/********************************************************************************* rlogind - the VxWorks remote login daemon** This routine provides a facility for remote users to log in to VxWorks over* the network.  If INCLUDE_RLOGIN is defined, rlogind() is spawned by* rlogInit() at boot time.** Remote login requests will cause `stdin', `stdout', and `stderr' to be* directed away from the console.  When the remote user disconnects,* `stdin', `stdout', and `stderr' are restored, and the shell is restarted.* The rlogind() routine uses the remote user verification protocol specified* by the UNIX remote shell daemon documentation, but ignores all the* information except the user name, which is used to set the VxWorks remote* identity (see the manual entry for iam()).** The remote login daemon requires the existence of a pseudo-terminal* device, which is created by rlogInit() before rlogind() is spawned.  The* rlogind() routine creates two child processes, `tRlogInTask' and* `tRlogOutTask', whenever a remote user is logged in.  These processes exit* when the remote connection is terminated.** VXWORKS AE PROTECTION DOMAINS* 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.  ** RETURNS: N/A** SEE ALSO: rlogInit(), iam()*/void rlogind (void)    {    char remUser [MAX_IDENTITY_LEN];	/* remote user trying to log in */    char curUser [MAX_IDENTITY_LEN];	/* current user already logged in */    char buf [STDIN_BUF_SIZE];    int optval;    struct sockaddr_in myAddress;    struct sockaddr_in clientAddress;    int clientAddrLen;    int masterFd;    int slaveFd;    int client;    int sd;    /* open a socket and wait for a client */    sd = socket (AF_INET, SOCK_STREAM, 0);    bzero ((char *) &myAddress, sizeof (myAddress));    myAddress.sin_family = AF_INET;    myAddress.sin_port   = htons (LOGIN_SERVICE);    if (bind (sd, (struct sockaddr *) &myAddress, sizeof (myAddress)) == ERROR)	{	printErr ("rlogind: bind failed.\n");	return;	}    listen (sd, 1);    FOREVER	{	/* wait for shell to exist */	while (taskNameToId (rlogShellName) == ERROR)	    taskDelay (sysClkRateGet ());	errnoSet (OK);		/* clear errno for pretty i() display */	/* now accept connection */	clientAddrLen = sizeof (clientAddress);	client = accept (sd, (struct sockaddr *)&clientAddress, &clientAddrLen);	if (client == ERROR)	    {	    printErr ("rlogind: accept failed - status = 0x%x", errnoGet());	    continue;	    }	/* turn on KEEPALIVE so if the client crashes, we'll know about it */	optval = 1;	setsockopt (client, SOL_SOCKET, SO_KEEPALIVE,		    (char *)&optval, sizeof (optval));	/* read in initial strings from remote rlogin */	if ((recvStr (client, buf) == ERROR) ||	    /* ignore stderr */	    (recvStr (client, remUser) == ERROR) || /* get local user name */	    (recvStr (client, buf) == ERROR) ||	    /* ignore remote user name*/	    (recvStr (client, buf) == ERROR))	    /* ignore terminal stuff */	    {	    close (client);	    continue;	    }	/* acknowlege connection */	write (client, "", 1);	/* check to see if there's already an active connection */	if (activeFlag)	    {	    char msg [STDOUT_BUF_SIZE];	    sprintf (msg, "\r\nSorry, this system is engaged by user: %s.\r\n",		curUser);	    write (client, msg, strlen (msg));	    close (client);	    continue;	    }	/* create the pseudo terminal:	 * the master side is connected to the socket to the	 * remote machine - two processes rlogInTask & rlogOutTask	 * handle input and output.	 */	if ((masterFd = open (ptyRlogNameM, O_RDWR, 0)) == ERROR)	    {	    char *msg = "\r\nSorry, trouble with pty.\r\n";	    printErr ("rlogind: error opening %s\n", ptyRlogNameM);	    write (client, msg, strlen (msg));	    close (client);	    continue;	    }	if ((slaveFd = open (ptyRlogNameS, O_RDWR, 0)) == ERROR)	    {	    char *msg = "\r\nSorry, trouble with pty.\r\n";	    printErr ("rlogind: error opening %s\n", ptyRlogNameS);	    write (client, msg, strlen (msg));	    close (client);	    close (masterFd);	    continue;	    }	if (!shellLock (TRUE))	    {	    char *msg = "\r\nSorry, shell is locked.\r\n";	    printErr ("rlogind: user: %s tried to login.\n", remUser);	    write (client, msg, strlen (msg));	    close (client);	    close (masterFd);	    close (slaveFd);	    continue;	    }	/* setup the slave device to act like a terminal */	ioctl (slaveFd, FIOOPTIONS, OPT_TERMINAL);        strcpy (curUser, remUser);	printf ("\nrlogind: This system *IN USE* via rlogin by user: %s.\n",

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲777理论| 成人一区二区三区在线观看 | 国产亚洲精久久久久久| 国产精品国产自产拍在线| 亚洲成人精品一区| 99久久精品99国产精品| 精品国精品国产尤物美女| 亚洲国产精品久久久久婷婷884| 国产一区欧美二区| 欧美一区2区视频在线观看| 亚洲日本成人在线观看| 国产成人精品网址| 精品国产乱子伦一区| 性做久久久久久| 在线免费视频一区二区| 国产精品你懂的在线欣赏| 国产又粗又猛又爽又黄91精品| 欧美日韩国产一级片| 一区二区三区欧美在线观看| 成人自拍视频在线| 国产视频一区在线播放| 国产成人免费视频网站高清观看视频 | 麻豆精品视频在线观看视频| 91福利精品视频| 亚洲女同一区二区| 91视频在线看| 亚洲男帅同性gay1069| 99re成人在线| 亚洲视频1区2区| 日本乱人伦aⅴ精品| 亚洲精品v日韩精品| 色偷偷一区二区三区| 亚洲精品福利视频网站| 在线观看日产精品| 亚洲va在线va天堂| 91精品国产色综合久久久蜜香臀| 肉色丝袜一区二区| 日韩欧美中文字幕一区| 国产精品一区二区三区四区| 精品国产乱码久久久久久蜜臀| 国产米奇在线777精品观看| 国产午夜一区二区三区| www.色综合.com| 一区二区三区毛片| 欧美一区二区精品| 国产精品亚洲第一| 最新国产成人在线观看| 欧美在线观看18| 精品一区二区三区欧美| 欧美国产精品中文字幕| 色成年激情久久综合| 偷拍亚洲欧洲综合| 精品国产免费一区二区三区四区 | 中文字幕第一区综合| 成人一级片在线观看| 亚洲乱码国产乱码精品精98午夜 | 精品国产乱码久久久久久久| 国产精品中文字幕日韩精品| 亚洲欧美欧美一区二区三区| 51精品秘密在线观看| 国产精品正在播放| 亚洲国产综合人成综合网站| 精品久久久久久久久久久久久久久| 国产成人精品一区二| 亚洲国产精品久久一线不卡| 欧美激情在线一区二区| 欧美性三三影院| 狠狠色2019综合网| 亚洲一区二区av在线| 久久免费视频色| 欧美日本一区二区三区| 国产91丝袜在线观看| 视频一区二区三区在线| 国产精品国产三级国产aⅴ中文| 欧美麻豆精品久久久久久| 国产凹凸在线观看一区二区| 亚洲成av人片在线| 1024国产精品| 久久久不卡影院| 日韩一区二区视频| 欧美在线观看视频在线| jvid福利写真一区二区三区| 经典三级一区二区| 午夜av电影一区| 亚洲精品乱码久久久久久黑人 | 日韩一卡二卡三卡四卡| 91亚洲午夜精品久久久久久| 国产自产高清不卡| 日韩精品久久理论片| 一区二区激情视频| 国产精品久久久久9999吃药| 精品国产青草久久久久福利| 欧美夫妻性生活| 欧美日精品一区视频| 91免费在线看| av福利精品导航| 国产成人精品免费| 国产不卡免费视频| 国产精品一区二区免费不卡 | 99riav久久精品riav| 国产麻豆成人传媒免费观看| 裸体歌舞表演一区二区| 日本美女一区二区三区| 偷窥少妇高潮呻吟av久久免费| 亚洲免费在线电影| 亚洲精品免费在线观看| 亚洲乱码国产乱码精品精可以看 | 人人爽香蕉精品| 午夜精品久久久久久久99樱桃| 一区二区三区在线视频观看58| 1区2区3区国产精品| 亚洲天堂网中文字| 一区视频在线播放| 亚洲精品免费一二三区| 亚洲欧美日韩国产另类专区| 亚洲另类在线制服丝袜| 亚洲一区视频在线观看视频| 亚洲国产一区二区三区青草影视| 亚洲综合在线五月| 视频在线在亚洲| 久久99日本精品| 国产一区日韩二区欧美三区| 盗摄精品av一区二区三区| 成人av电影在线网| 在线观看精品一区| 欧美一级日韩免费不卡| 久久婷婷综合激情| 日韩理论片中文av| 天天综合色天天| 国产老女人精品毛片久久| 岛国精品在线观看| 在线精品观看国产| 日韩写真欧美这视频| 久久天天做天天爱综合色| 亚洲欧洲美洲综合色网| 亚洲国产综合色| 国产综合成人久久大片91| 99久久综合国产精品| 欧美日本一区二区| 国产欧美一区二区精品仙草咪| 国产精品国产自产拍在线| 五月婷婷另类国产| 国产精品亚洲一区二区三区在线 | 精品国产亚洲在线| 亚洲国产精品激情在线观看| |精品福利一区二区三区| 午夜欧美视频在线观看| 激情欧美一区二区| 99久久精品一区二区| 日韩一区二区中文字幕| 亚洲色图19p| 精品影视av免费| 在线免费观看不卡av| 久久久美女毛片| 亚洲福利一二三区| 成人黄色av网站在线| 日韩亚洲欧美一区二区三区| 亚洲欧美日韩久久| 极品销魂美女一区二区三区| 色哟哟欧美精品| 久久久国际精品| 美女网站一区二区| 在线观看视频91| 中文文精品字幕一区二区| 青椒成人免费视频| 日本福利一区二区| 国产精品视频第一区| 秋霞午夜av一区二区三区| 色狠狠av一区二区三区| 欧美国产成人在线| 精品影视av免费| 制服.丝袜.亚洲.另类.中文| 亚洲六月丁香色婷婷综合久久| 国产福利不卡视频| 精品日韩99亚洲| 日本人妖一区二区| 欧美色网站导航| 亚洲视频精选在线| aaa亚洲精品一二三区| 久久精品人人做人人爽97| 毛片av一区二区三区| 欧美精品在线一区二区三区| 亚洲四区在线观看| 成人av小说网| 国产精品毛片久久久久久 | 三级影片在线观看欧美日韩一区二区 | 国产精品一区一区三区| 日韩欧美自拍偷拍| 日本成人在线网站| 91精品国产欧美一区二区| 亚洲国产视频一区| 色老头久久综合| 亚洲资源中文字幕| 91最新地址在线播放| 日韩理论在线观看| 97久久精品人人做人人爽| 亚洲欧美日韩在线不卡| 色先锋aa成人| 亚洲va在线va天堂| 日韩一区二区免费在线电影|