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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? rbootd.c

?? 早期freebsd實現
?? C
字號:
/* * Copyright (c) 1988, 1992 The University of Utah and the Center *	for Software Science (CSS). * Copyright (c) 1992, 1993 *	The Regents of the University of California.  All rights reserved. * * This code is derived from software contributed to Berkeley by * the Center for Software Science of the University of Utah Computer * Science Department.  CSS requests users of this software to return * to css-dist@cs.utah.edu any improvements that they make and grant * CSS redistribution rights. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software *    must display the following acknowledgement: *	This product includes software developed by the University of *	California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors *    may be used to endorse or promote products derived from this software *    without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * *	@(#)rbootd.c	8.2 (Berkeley) 2/22/94 * * Utah $Hdr: rbootd.c 3.1 92/07/06$ * Author: Jeff Forys, University of Utah CSS */#ifndef lintstatic char copyright[] ="@(#) Copyright (c) 1992, 1993\n\	The Regents of the University of California.  All rights reserved.\n";#endif /* not lint */#ifndef lintstatic char sccsid[] = "@(#)rbootd.c	8.2 (Berkeley) 2/22/94";#endif /* not lint */#include <sys/param.h>#include <sys/ioctl.h>#include <sys/time.h>#include <ctype.h>#include <errno.h>#include <fcntl.h>#include <signal.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <syslog.h>#include <unistd.h>#include "defs.h"/* fd mask macros (backward compatibility with 4.2BSD) */#ifndef	FD_SET#ifdef	notdeftypedef	struct fd_set {		/* this should already be in 4.2 */	int fds_bits[1];} fd_set;#endif#define	FD_ZERO(p)	((p)->fds_bits[0] = 0)#define	FD_SET(n, p)	((p)->fds_bits[0] |= (1 << (n)))#define	FD_CLR(n, p)	((p)->fds_bits[0] &= ~(1 << (n)))#define	FD_ISSET(n, p)	((p)->fds_bits[0] & (1 << (n)))#endifintmain(argc, argv)	int argc;	char *argv[];{	int c, fd, omask, maxfds;	fd_set rset;	/*	 *  Find what name we are running under.	 */	ProgName = (ProgName = rindex(argv[0],'/')) ? ++ProgName : *argv;	/*	 *  Close any open file descriptors.	 *  Temporarily leave stdin & stdout open for `-d',	 *  and stderr open for any pre-syslog error messages.	 */	{		int i, nfds = getdtablesize();		for (i = 0; i < nfds; i++)			if (i != fileno(stdin) && i != fileno(stdout) &&			    i != fileno(stderr))				(void) close(i);	}	/*	 *  Parse any arguments.	 */	while ((c = getopt(argc, argv, "adi:")) != EOF)		switch(c) {		    case 'a':			BootAny++;			break;		    case 'd':			DebugFlg++;			break;		    case 'i':			IntfName = optarg;			break;		}	for (; optind < argc; optind++) {		if (ConfigFile == NULL)			ConfigFile = argv[optind];		else {			fprintf(stderr,			        "%s: too many config files (`%s' ignored)\n",			        ProgName, argv[optind]);		}	}	if (ConfigFile == NULL)			/* use default config file */		ConfigFile = DfltConfig;	if (DebugFlg) {		DbgFp = stdout;				/* output to stdout */		(void) signal(SIGUSR1, SIG_IGN);	/* dont muck w/DbgFp */		(void) signal(SIGUSR2, SIG_IGN);	} else {		(void) fclose(stdin);			/* dont need these */		(void) fclose(stdout);		/*		 *  Fork off a child to do the work & exit.		 */		switch(fork()) {			case -1:	/* fork failed */				fprintf(stderr, "%s: ", ProgName);				perror("fork");				Exit(0);			case 0:		/* this is the CHILD */				break;			default:	/* this is the PARENT */				_exit(0);		}		/*		 *  Try to disassociate from the current tty.		 */		{			char *devtty = "/dev/tty";			int i;			if ((i = open(devtty, O_RDWR)) < 0) {				/* probably already disassociated */				if (setpgrp(0, 0) < 0) {					fprintf(stderr, "%s: ", ProgName);					perror("setpgrp");				}			} else {				if (ioctl(i, (u_long)TIOCNOTTY, (char *)0) < 0){					fprintf(stderr, "%s: ", ProgName);					perror("ioctl");				}				(void) close(i);			}		}		(void) signal(SIGUSR1, DebugOn);		(void) signal(SIGUSR2, DebugOff);	}	(void) fclose(stderr);		/* finished with it */#ifdef SYSLOG4_2	openlog(ProgName, LOG_PID);#else	openlog(ProgName, LOG_PID, LOG_DAEMON);#endif	/*	 *  If no interface was specified, get one now.	 *	 *  This is convoluted because we want to get the default interface	 *  name for the syslog("restarted") message.  If BpfGetIntfName()	 *  runs into an error, it will return a syslog-able error message	 *  (in `errmsg') which will be displayed here.	 */	if (IntfName == NULL) {		char *errmsg;		if ((IntfName = BpfGetIntfName(&errmsg)) == NULL) {			syslog(LOG_NOTICE, "restarted (??)");			syslog(LOG_ERR, errmsg);			Exit(0);		}	}	syslog(LOG_NOTICE, "restarted (%s)", IntfName);	(void) signal(SIGHUP, ReConfig);	(void) signal(SIGINT, Exit);	(void) signal(SIGTERM, Exit);	/*	 *  Grab our host name and pid.	 */	if (gethostname(MyHost, MAXHOSTNAMELEN) < 0) {		syslog(LOG_ERR, "gethostname: %m");		Exit(0);	}	MyHost[MAXHOSTNAMELEN] = '\0';	MyPid = getpid();	/*	 *  Write proc's pid to a file.	 */	{		FILE *fp;		if ((fp = fopen(PidFile, "w")) != NULL) {			(void) fprintf(fp, "%d\n", MyPid);			(void) fclose(fp);		} else {			syslog(LOG_WARNING, "fopen: failed (%s)", PidFile);		}	}	/*	 *  All boot files are relative to the boot directory, we might	 *  as well chdir() there to make life easier.	 */	if (chdir(BootDir) < 0) {		syslog(LOG_ERR, "chdir: %m (%s)", BootDir);		Exit(0);	}	/*	 *  Initial configuration.	 */	omask = sigblock(sigmask(SIGHUP));	/* prevent reconfig's */	if (GetBootFiles() == 0)		/* get list of boot files */		Exit(0);	if (ParseConfig() == 0)			/* parse config file */		Exit(0);	/*	 *  Open and initialize a BPF device for the appropriate interface.	 *  If an error is encountered, a message is displayed and Exit()	 *  is called.	 */	fd = BpfOpen();	(void) sigsetmask(omask);		/* allow reconfig's */	/*	 *  Main loop: receive a packet, determine where it came from,	 *  and if we service this host, call routine to handle request.	 */	maxfds = fd + 1;	FD_ZERO(&rset);	FD_SET(fd, &rset);	for (;;) {		struct timeval timeout;		fd_set r;		int nsel;		r = rset;		if (RmpConns == NULL) {		/* timeout isnt necessary */			nsel = select(maxfds, &r, (fd_set *)0, (fd_set *)0,			              (struct timeval *)0);		} else {			timeout.tv_sec = RMP_TIMEOUT;			timeout.tv_usec = 0;			nsel = select(maxfds, &r, (fd_set *)0, (fd_set *)0,			              &timeout);		}		if (nsel < 0) {			if (errno == EINTR)				continue;			syslog(LOG_ERR, "select: %m");			Exit(0);		} else if (nsel == 0) {		/* timeout */			DoTimeout();			/* clear stale conns */			continue;		}		if (FD_ISSET(fd, &r)) {			RMPCONN rconn;			CLIENT *client, *FindClient();			int doread = 1;			while (BpfRead(&rconn, doread)) {				doread = 0;				if (DbgFp != NULL)	/* display packet */					DispPkt(&rconn,DIR_RCVD);				omask = sigblock(sigmask(SIGHUP));				/*				 *  If we do not restrict service, set the				 *  client to NULL (ProcessPacket() handles				 *  this).  Otherwise, check that we can				 *  service this host; if not, log a message				 *  and ignore the packet.				 */				if (BootAny) {					client = NULL;				} else if ((client=FindClient(&rconn))==NULL) {					syslog(LOG_INFO,					       "%s: boot packet ignored",					       EnetStr(&rconn));					(void) sigsetmask(omask);					continue;				}				ProcessPacket(&rconn,client);				(void) sigsetmask(omask);			}		}	}}/***  DoTimeout -- Free any connections that have timed out.****	Parameters:**		None.****	Returns:**		Nothing.****	Side Effects:**		- Timed out connections in `RmpConns' will be freed.*/voidDoTimeout(){	register RMPCONN *rtmp;	struct timeval now;	(void) gettimeofday(&now, (struct timezone *)0);	/*	 *  For each active connection, if RMP_TIMEOUT seconds have passed	 *  since the last packet was sent, delete the connection.	 */	for (rtmp = RmpConns; rtmp != NULL; rtmp = rtmp->next)		if ((rtmp->tstamp.tv_sec + RMP_TIMEOUT) < now.tv_sec) {			syslog(LOG_WARNING, "%s: connection timed out (%u)",			       EnetStr(rtmp), rtmp->rmp.r_type);			RemoveConn(rtmp);		}}/***  FindClient -- Find client associated with a packet.****	Parameters:**		rconn - the new packet. ****	Returns:**		Pointer to client info if found, NULL otherwise.****	Side Effects:**		None.****	Warnings:**		- This routine must be called with SIGHUP blocked since**		  a reconfigure can invalidate the information returned.*/CLIENT *FindClient(rconn)	register RMPCONN *rconn;{	register CLIENT *ctmp;	for (ctmp = Clients; ctmp != NULL; ctmp = ctmp->next)		if (bcmp((char *)&rconn->rmp.hp_hdr.saddr[0],		         (char *)&ctmp->addr[0], RMP_ADDRLEN) == 0)			break;	return(ctmp);}/***  Exit -- Log an error message and exit.****	Parameters:**		sig - caught signal (or zero if not dying on a signal).****	Returns:**		Does not return.****	Side Effects:**		- This process ceases to exist.*/voidExit(sig)	int sig;{	if (sig > 0)		syslog(LOG_ERR, "going down on signal %d", sig);	else		syslog(LOG_ERR, "going down with fatal error");	BpfClose();	exit(1);}/***  ReConfig -- Get new list of boot files and reread config files.****	Parameters:**		None.****	Returns:**		Nothing.****	Side Effects:**		- All active connections are dropped.**		- List of boot-able files is changed.**		- List of clients is changed.****	Warnings:**		- This routine must be called with SIGHUP blocked.*/voidReConfig(signo)	int signo;{	syslog(LOG_NOTICE, "reconfiguring boot server");	FreeConns();	if (GetBootFiles() == 0)		Exit(0);	if (ParseConfig() == 0)		Exit(0);}/***  DebugOff -- Turn off debugging.****	Parameters:**		None.****	Returns:**		Nothing.****	Side Effects:**		- Debug file is closed.*/voidDebugOff(signo)	int signo;{	if (DbgFp != NULL)		(void) fclose(DbgFp);	DbgFp = NULL;}/***  DebugOn -- Turn on debugging.****	Parameters:**		None.****	Returns:**		Nothing.****	Side Effects:**		- Debug file is opened/truncated if not already opened,**		  otherwise do nothing.*/voidDebugOn(signo)	int signo;{	if (DbgFp == NULL) {		if ((DbgFp = fopen(DbgFile, "w")) == NULL)			syslog(LOG_ERR, "can't open debug file (%s)", DbgFile);	}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜精品久久久久久久99樱桃| 久久夜色精品国产噜噜av| 樱花影视一区二区| 日本丶国产丶欧美色综合| 亚洲欧洲中文日韩久久av乱码| 色哟哟在线观看一区二区三区| 亚洲女子a中天字幕| 欧美日韩国产一级| 蜜桃精品在线观看| 欧美—级在线免费片| 色婷婷av一区二区三区软件 | 日韩情涩欧美日韩视频| 久久99精品久久久| 国产精品色呦呦| 欧美午夜精品久久久久久孕妇| 毛片av一区二区| 国产欧美一区二区在线观看| 91视频xxxx| 看电影不卡的网站| 国产精品福利电影一区二区三区四区| 在线观看欧美黄色| 免费欧美日韩国产三级电影| 国产欧美日韩视频一区二区| 欧美性生活一区| 激情小说亚洲一区| 亚洲理论在线观看| 99久久综合国产精品| 亚洲一区在线视频| 久久综合九色欧美综合狠狠| 91猫先生在线| 国产麻豆成人精品| 亚洲第一会所有码转帖| 久久久激情视频| 欧美日韩日日骚| 国产成人午夜视频| 日韩黄色免费电影| 亚洲天堂免费看| 精品国产91亚洲一区二区三区婷婷| 97久久精品人人做人人爽| 久久福利视频一区二区| 亚洲欧美电影一区二区| 久久丝袜美腿综合| 91精品国产全国免费观看| 99热99精品| 国产美女精品人人做人人爽| 亚洲成av人片www| 中文字幕一区二区三区在线不卡| 日韩欧美在线网站| 欧美亚洲动漫制服丝袜| 国产91富婆露脸刺激对白| 奇米在线7777在线精品| 亚洲美女淫视频| 国产清纯白嫩初高生在线观看91 | 久久亚洲二区三区| 欧美日韩免费一区二区三区视频| 成人永久看片免费视频天堂| 乱一区二区av| 日韩国产欧美在线视频| 亚洲综合在线观看视频| 中文字幕一区二区在线播放 | 欧美日本一区二区| 色综合久久九月婷婷色综合| 国产剧情一区在线| 激情综合色播五月| 麻豆精品国产91久久久久久| 亚洲va国产va欧美va观看| 亚洲女性喷水在线观看一区| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 国产亚洲精品bt天堂精选| 日韩一区二区三区视频| 欧美乱妇23p| 欧美视频完全免费看| 欧洲视频一区二区| 欧美在线free| 欧美日韩一区二区三区不卡| 在线免费视频一区二区| 91国产免费看| 欧美亚洲高清一区| 欧美精品乱人伦久久久久久| 欧美午夜在线观看| 制服丝袜亚洲色图| 日韩午夜激情视频| 2021久久国产精品不只是精品| 日韩一区二区不卡| www国产精品av| 中文字幕av一区二区三区高| 中文字幕第一区| 亚洲欧美日韩系列| 亚洲综合网站在线观看| 亚洲国产精品久久不卡毛片 | 欧美丝袜丝交足nylons图片| 欧美性色综合网| 欧美一区二区三区成人| 欧美本精品男人aⅴ天堂| 久久综合九色欧美综合狠狠| 国产欧美在线观看一区| 亚洲视频电影在线| 亚洲成人精品在线观看| 蜜臀av一区二区| 久久99精品国产.久久久久久| 韩国女主播一区| 欧美一区二区视频在线观看2022| 欧美性xxxxx极品少妇| 欧美日韩在线一区二区| 欧美成人bangbros| 色欧美片视频在线观看在线视频| 欧美日韩国产在线播放网站| 欧美一区二区三区四区久久| 久久久欧美精品sm网站| 亚洲三级电影网站| 日本在线不卡视频| 国产成人综合亚洲网站| 欧美午夜一区二区三区| 亚洲精品在线三区| 亚洲精品第1页| 精品一区二区在线看| 99热99精品| 日韩一区二区在线观看视频 | 精品国产免费视频| 国产精品国产三级国产aⅴ无密码| 亚洲国产欧美在线人成| 国产一区二区三区香蕉 | 欧美精品日韩一区| 中文字幕电影一区| 免费精品视频在线| 91在线免费看| 久久久99精品免费观看| 亚洲va在线va天堂| 91色视频在线| 国产视频在线观看一区二区三区 | 99re6这里只有精品视频在线观看| 欧美片在线播放| 亚洲日本青草视频在线怡红院 | 国产在线一区观看| 欧美日本韩国一区二区三区视频| 日本一区二区免费在线| 日本成人在线一区| 欧洲中文字幕精品| 国产精品国产三级国产普通话三级 | 欧美成人精品3d动漫h| 日本中文字幕一区二区有限公司| www.欧美色图| 久久―日本道色综合久久| 婷婷综合在线观看| 在线观看不卡视频| 亚洲三级在线观看| 成人免费视频播放| 国产夜色精品一区二区av| 美国十次综合导航| 7777精品伊人久久久大香线蕉经典版下载 | 精品免费一区二区三区| 午夜精品久久久久久不卡8050| 99国产欧美另类久久久精品| 久久久午夜精品理论片中文字幕| 日本vs亚洲vs韩国一区三区二区 | 欧美视频三区在线播放| 亚洲天堂av老司机| 成人免费黄色在线| 国产三级精品三级| 国产精品一区二区久久不卡| 精品日韩一区二区三区免费视频| 性做久久久久久久免费看| 色老综合老女人久久久| 综合分类小说区另类春色亚洲小说欧美| 国产精品一二一区| 久久久久久久久97黄色工厂| 激情av综合网| 日韩精品专区在线影院观看| 人人精品人人爱| 日韩视频免费直播| 久久精品久久99精品久久| 日韩一区二区三区电影| 麻豆91免费观看| 精品第一国产综合精品aⅴ| 精品中文字幕一区二区| 久久综合一区二区| 国产福利精品导航| 亚洲国产精品成人综合色在线婷婷 | 狠狠色狠狠色合久久伊人| 精品国精品国产| 国产精品综合在线视频| 国产日产亚洲精品系列| 成人激情小说网站| 亚洲女同ⅹxx女同tv| 欧美日韩视频专区在线播放| 日本不卡一区二区| 精品成人在线观看| 91亚洲资源网| 午夜不卡在线视频| 欧美xxxxxxxx| 成人黄色综合网站| 亚洲 欧美综合在线网络| 日韩一区二区三区观看| 成人综合在线观看| 亚洲精品国产一区二区三区四区在线| 欧美日韩久久一区二区| 精品伊人久久久久7777人| 日本一区二区动态图| 在线免费观看成人短视频| 日本伊人色综合网|