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

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

?? parseconf.c

?? 早期freebsd實(shí)現(xiàn)
?? C
字號(hào):
/* * 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. * *	@(#)parseconf.c	8.1 (Berkeley) 6/4/93 * * Utah $Hdr: parseconf.c 3.1 92/07/06$ * Author: Jeff Forys, University of Utah CSS */#ifndef lintstatic char sccsid[] = "@(#)parseconf.c	8.1 (Berkeley) 6/4/93";#endif /* not lint */#include <sys/param.h>#include <sys/stat.h>#include <ctype.h>#include <dirent.h>#include <fcntl.h>#include <signal.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <syslog.h>#include "defs.h"/***  ParseConfig -- parse the config file into linked list of clients.****	Parameters:**		None.****	Returns:**		1 on success, 0 otherwise.****	Side Effects:**		- Linked list of clients will be (re)allocated.****	Warnings:**		- GetBootFiles() must be called before this routine**		  to create a linked list of default boot files.*/intParseConfig(){	FILE *fp;	CLIENT *client;	u_char *addr;	char line[C_LINELEN];	register char *cp, *bcp;	register int i, j;	int omask, linecnt = 0;	if (BootAny)				/* ignore config file */		return(1);	FreeClients();				/* delete old list of clients */	if ((fp = fopen(ConfigFile, "r")) == NULL) {		syslog(LOG_ERR, "ParseConfig: can't open config file (%s)",		       ConfigFile);		return(0);	}	/*	 *  We've got to block SIGHUP to prevent reconfiguration while	 *  dealing with the linked list of Clients.  This can be done	 *  when actually linking the new client into the list, but	 *  this could have unexpected results if the server was HUP'd	 *  whilst reconfiguring.  Hence, it is done here.	 */	omask = sigblock(sigmask(SIGHUP));	/*	 *  GETSTR positions `bcp' at the start of the current token,	 *  and null terminates it.  `cp' is positioned at the start	 *  of the next token.  spaces & commas are separators.	 */#define GETSTR	while (isspace(*cp) || *cp == ',') cp++;	\		bcp = cp;					\		while (*cp && *cp!=',' && !isspace(*cp)) cp++;	\		if (*cp) *cp++ = '\0'	/*	 *  For each line, parse it into a new CLIENT struct.	 */	while (fgets(line, C_LINELEN, fp) != NULL) {		linecnt++;				/* line counter */		if (*line == '\0' || *line == '#')	/* ignore comment */			continue;		if ((cp = index(line,'#')) != NULL)	/* trash comments */			*cp = '\0';		cp = line;				/* init `cp' */		GETSTR;					/* get RMP addr */		if (bcp == cp)				/* all delimiters */			continue;		/*		 *  Get an RMP address from a string.  Abort on failure.		 */		if ((addr = ParseAddr(bcp)) == NULL) {			syslog(LOG_ERR,			       "ParseConfig: line %d: cant parse <%s>",			       linecnt, bcp);			continue;		}		if ((client = NewClient(addr)) == NULL)	/* alloc new client */			continue;		GETSTR;					/* get first file */		/*		 *  If no boot files are spec'd, use the default list.		 *  Otherwise, validate each file (`bcp') against the		 *  list of boot-able files.		 */		i = 0;		if (bcp == cp)				/* no files spec'd */			for (; i < C_MAXFILE && BootFiles[i] != NULL; i++)				client->files[i] = BootFiles[i];		else {			do {				/*				 *  For each boot file spec'd, make sure it's				 *  in our list.  If so, include a pointer to				 *  it in the CLIENT's list of boot files.				 */				for (j = 0; ; j++) {					if (j==C_MAXFILE||BootFiles[j]==NULL) {						syslog(LOG_ERR, "ParseConfig: line %d: no boot file (%s)",						       linecnt, bcp);						break;					}					if (STREQN(BootFiles[j], bcp)) {						if (i < C_MAXFILE)							client->files[i++] =							    BootFiles[j];						else							syslog(LOG_ERR, "ParseConfig: line %d: too many boot files (%s)",							       linecnt, bcp);						break;					}				}				GETSTR;			/* get next file */			} while (bcp != cp);			/*			 *  Restricted list of boot files were spec'd,			 *  however, none of them were found.  Since we			 *  apparently cant let them boot "just anything",			 *  the entire record is invalidated.			 */			if (i == 0) {				FreeClient(client);					continue;			}		}		/*		 *  Link this client into the linked list of clients.		 *  SIGHUP has already been blocked.		 */		if (Clients)			client->next = Clients;		Clients = client;	}	(void) fclose(fp);				/* close config file */	(void) sigsetmask(omask);			/* reset signal mask */	return(1);					/* return success */}/***  ParseAddr -- Parse a string containing an RMP address.****	This routine is fairly liberal at parsing an RMP address.  The**	address must contain 6 octets consisting of between 0 and 2 hex**	chars (upper/lower case) separated by colons.  If two colons are**	together (e.g. "::", the octet between them is recorded as being**	zero.  Hence, the following addrs are all valid and parse to the**	same thing:****		08:00:09:00:66:ad	8::9:0:66:AD	8::9::66:aD****	For clarity, an RMP address is really an Ethernet address, but**	since the HP boot code uses IEEE 802.3, it's really an IEEE**	802.3 address.  Of course, all of these are identical.****	Parameters:**		str - string representation of an RMP address.****	Returns:**		pointer to a static array of RMP_ADDRLEN bytes.****	Side Effects:**		None.****	Warnings:**		- The return value points to a static buffer; it must**		  be copied if it's to be saved.**		- For speed, we assume a u_char consists of 8 bits.*/u_char *ParseAddr(str)	char *str;{	static u_char addr[RMP_ADDRLEN];	register char *cp;	register unsigned i;	register int part, subpart;	bzero((char *)&addr[0], RMP_ADDRLEN);	/* zero static buffer */	part = subpart = 0;	for (cp = str; *cp; cp++) {		/*		 *  A colon (`:') must be used to delimit each octet.		 */		if (*cp == ':') {			if (++part == RMP_ADDRLEN)	/* too many parts */				return(NULL);			subpart = 0;			continue;		}		/*		 *  Convert hex character to an integer.		 */		if (isdigit(*cp))			i = *cp - '0';		else {			i = (isupper(*cp)? tolower(*cp): *cp) - 'a' + 10;			if (i < 10 || i > 15)		/* not a hex char */				return(NULL);		}		if (subpart++) {			if (subpart > 2)		/* too many hex chars */				return(NULL);			addr[part] <<= 4;		}		addr[part] |= i;	}	if (part != (RMP_ADDRLEN-1))			/* too few parts */		return(NULL);	return(&addr[0]);}/***  GetBootFiles -- record list of files in current (boot) directory.****	Parameters:**		None.****	Returns:**		Number of boot files on success, 0 on failure.****	Side Effects:**		Strings in `BootFiles' are freed/allocated.****	Warnings:**		- After this routine is called, ParseConfig() must be**		  called to re-order it's list of boot file pointers.*/intGetBootFiles(){	DIR *dfd;	struct stat statb;	register struct dirent *dp;	register int i;	/*	 *  Free the current list of boot files.	 */	for (i = 0; i < C_MAXFILE && BootFiles[i] != NULL; i++) {		FreeStr(BootFiles[i]);		BootFiles[i] = NULL;	}	/*	 *  Open current directory to read boot file names.	 */	if ((dfd = opendir(".")) == NULL) {	/* open BootDir */		syslog(LOG_ERR, "GetBootFiles: can't open directory (%s)\n",		       BootDir);		return(0);	}	/*	 *  Read each boot file name and allocate space for it in the	 *  list of boot files (BootFiles).  All boot files read after	 *  C_MAXFILE will be ignored.	 */	i = 0;	for (dp = readdir(dfd); dp != NULL; dp = readdir(dfd)) {		if (stat(dp->d_name, &statb) < 0 ||		    (statb.st_mode & S_IFMT) != S_IFREG)			continue;		if (i == C_MAXFILE)			syslog(LOG_ERR,			       "GetBootFiles: too many boot files (%s ignored)",			       dp->d_name);		else if ((BootFiles[i] = NewStr(dp->d_name)) != NULL)			i++;	}	(void) closedir(dfd);			/* close BootDir */	if (i == 0)				/* cant find any boot files */		syslog(LOG_ERR, "GetBootFiles: no boot files (%s)\n", BootDir);	return(i);}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩高清在线| 在线观看成人小视频| 亚洲精品视频自拍| 日韩一区二区麻豆国产| 成人激情黄色小说| 美女看a上一区| 一区二区高清在线| 久久精品视频一区二区| 69久久99精品久久久久婷婷| 岛国一区二区三区| 久草热8精品视频在线观看| 亚洲精品菠萝久久久久久久| 久久亚洲精华国产精华液| 欧美日韩一区二区三区在线| 成人激情文学综合网| 另类小说图片综合网| 亚洲一二三四久久| 国产精品嫩草久久久久| 精品国产亚洲在线| 欧美精品1区2区| 91美女片黄在线观看91美女| 国产精品一区一区三区| 麻豆精品国产传媒mv男同 | 99久久精品免费看国产免费软件| 日本aⅴ免费视频一区二区三区| 亚洲啪啪综合av一区二区三区| 国产亚洲欧美日韩俺去了| 91麻豆精品国产91久久久资源速度| 色综合色狠狠天天综合色| 国产成人午夜电影网| 国产精品一区二区在线播放| 日日夜夜一区二区| 亚洲一区二区黄色| 亚洲免费观看高清完整版在线观看 | 久久蜜桃香蕉精品一区二区三区| 欧美日本一区二区在线观看| 在线免费亚洲电影| 色哟哟国产精品| 99精品欧美一区二区蜜桃免费| 国产sm精品调教视频网站| 国产米奇在线777精品观看| 国内成人自拍视频| 精品亚洲国内自在自线福利| 久久国产欧美日韩精品| 免费观看久久久4p| 久久99精品国产麻豆婷婷| 麻豆成人在线观看| 九一九一国产精品| 精品一区二区三区视频在线观看 | 蜜桃av一区二区三区电影| 日韩黄色免费电影| 久久国产精品区| 国产在线精品视频| 高清av一区二区| 成人av第一页| 日本道精品一区二区三区| 在线观看一区二区视频| 欧美日韩精品系列| 91精品国产aⅴ一区二区| 日韩欧美久久一区| 久久伊人中文字幕| 亚洲欧洲日产国码二区| 亚洲欧洲成人av每日更新| 一二三区精品视频| 日韩精品视频网| 国内成人精品2018免费看| 国产在线精品一区二区夜色| 欧美亚洲日本一区| 欧美一级高清片| 欧美国产日韩精品免费观看| 亚洲色图在线看| 天堂久久久久va久久久久| 毛片av一区二区| 成人免费毛片aaaaa**| 在线欧美小视频| 日韩欧美中文一区二区| 日本一区免费视频| 亚洲综合成人网| 久久精品99国产精品| 成人午夜在线播放| 欧美日韩在线亚洲一区蜜芽| 欧美成人精品高清在线播放 | 中文字幕免费观看一区| 亚洲欧美日韩国产手机在线| 天天综合网天天综合色| 国产成人精品三级麻豆| 欧美色窝79yyyycom| 精品粉嫩超白一线天av| 亚洲精品国产高清久久伦理二区| 日韩成人免费电影| 不卡av在线免费观看| 7777精品伊人久久久大香线蕉完整版| 精品国产一区a| 亚洲免费在线观看视频| 国产真实乱偷精品视频免| 一本到高清视频免费精品| 精品国产一区二区亚洲人成毛片| 亚洲色图视频免费播放| 精品亚洲国产成人av制服丝袜| 91色视频在线| 久久久久久**毛片大全| 亚洲国产精品久久不卡毛片| 国产aⅴ综合色| 欧美一区二区高清| 亚洲美女一区二区三区| 国产精品一区二区久久精品爱涩 | 一区二区三区四区乱视频| 国内偷窥港台综合视频在线播放| 欧美性生交片4| 国产欧美日韩激情| 免费高清成人在线| 欧美三级在线视频| 国产精品国产三级国产专播品爱网| 美女一区二区视频| 欧美亚洲一区二区在线| 成人免费小视频| 国内精品在线播放| 91麻豆精品国产91| 亚洲自拍与偷拍| 97国产精品videossex| 国产欧美日韩另类一区| 精品中文av资源站在线观看| 欧美久久久久久久久中文字幕| 亚洲视频香蕉人妖| 成人久久18免费网站麻豆| 欧美精品一区二区三区在线播放| 日精品一区二区| 欧美日韩精品专区| 亚洲一线二线三线视频| 日本国产一区二区| 椎名由奈av一区二区三区| 成人午夜电影网站| 日本一区二区三区免费乱视频| 激情六月婷婷久久| 精品999久久久| 久久9热精品视频| 6080国产精品一区二区| 午夜精品久久久久久久99水蜜桃| 在线观看免费亚洲| 亚洲国产视频直播| 欧美日韩亚洲国产综合| 亚洲国产欧美在线| 欧美日韩国产综合久久| 亚洲成人动漫一区| 3d动漫精品啪啪| 男人的j进女人的j一区| 欧美一区二区三区人| 男人的天堂亚洲一区| 精品久久久久久无| 国产精品911| 国产精品每日更新在线播放网址 | av一区二区三区四区| 国产精品久久久久久久第一福利 | 久草在线在线精品观看| 久久免费国产精品| 盗摄精品av一区二区三区| 亚洲欧洲av色图| 在线观看免费亚洲| 日韩高清不卡一区二区| 欧美成人国产一区二区| 国产传媒久久文化传媒| 18欧美乱大交hd1984| 欧美午夜片在线观看| 蜜桃av一区二区在线观看| 久久久久久麻豆| 色婷婷久久99综合精品jk白丝| 亚洲五月六月丁香激情| 日韩精品资源二区在线| 国产成人精品在线看| 1区2区3区国产精品| 2023国产精品视频| 丁香一区二区三区| 亚洲午夜在线观看视频在线| 欧美成人精品3d动漫h| www.亚洲色图| 天堂午夜影视日韩欧美一区二区| 精品999在线播放| 91色porny蝌蚪| 捆绑变态av一区二区三区| 国产精品国产三级国产三级人妇 | 国产亚洲精久久久久久| 一本色道久久综合狠狠躁的推荐 | 欧美一区午夜视频在线观看| 国产在线视频精品一区| 亚洲精选视频在线| 日韩精品一区二区三区视频 | 在线观看免费视频综合| 久久99久久久久| 亚洲男人的天堂网| 欧美成人精精品一区二区频| 色综合av在线| 国产一区二区三区四| 亚洲人xxxx| 久久尤物电影视频在线观看| 欧美无砖砖区免费| 成人午夜在线视频| 蜜桃视频免费观看一区| 18欧美亚洲精品| 亚洲精品一区二区三区蜜桃下载| 欧美亚洲高清一区二区三区不卡|