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

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

?? res_comp.c

?? vxworks的完整的源代碼
?? C
字號:
/* res_comp.c - expands and compresses domain names in a messge  *//* Copyright 1984-2001 Wind River Systems, Inc. */#include "copyright_wrs.h"/* * Copyright (c) 1985 Regents of the University of California. * All rights reserved. * * 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. *//*modification history--------------------01b,17sep01,vvv  fixed compilation warnings01a,13dec96,jag  Cleaned up and rename functions with the resolv prefix.  The                 man pages for these functions appear in resolvLib*/#include <resolvLib.h>#include <stdio.h>static int dn_find();/* * Expand compressed domain name 'comp_dn' to full domain name. * 'msg' is a pointer to the begining of the message, * 'eomorig' points to the first location after the message, * 'exp_dn' is a pointer to a buffer of size 'length' for the result. * Return size of compressed name or -1 if there was an error. */int resolvDNExpand(msg, eomorig, comp_dn, exp_dn, length)	const u_char *msg, *eomorig, *comp_dn;	u_char *exp_dn;	int length;{	register u_char *cp, *dn;	register int n, c;	u_char *eom;	int len = -1, checked = 0;	dn = exp_dn;	cp = (u_char *)comp_dn;	eom = exp_dn + length;	/*	 * fetch next label in domain name	 */	while ((n = *cp++)) {		/*		 * Check for indirection		 */		switch (n & INDIR_MASK) {		case 0:			if (dn != exp_dn) {				if (dn >= eom)					return (-1);				*dn++ = '.';			}			if (dn+n >= eom)				return (-1);			checked += n + 1;			while (--n >= 0) {				if ((c = *cp++) == '.') {					if (dn + n + 2 >= eom)						return (-1);					*dn++ = '\\';				}				*dn++ = c;				if (cp >= eomorig)	/* out of range */					return(-1);			}			break;		case INDIR_MASK:			if (len < 0)				len = cp - comp_dn + 1;			cp = (u_char *)msg + (((n & 0x3f) << 8) | (*cp & 0xff));			if (cp < msg || cp >= eomorig)	/* out of range */				return(-1);			checked += 2;			/*			 * Check for loops in the compressed name;			 * if we've looked at the whole message,			 * there must be a loop.			 */			if (checked >= eomorig - msg)				return (-1);			break;		default:			return (-1);			/* flag error */		}	}	*dn = '\0';	if (len < 0)		len = cp - comp_dn;	return (len);}/* * Compress domain name 'exp_dn' into 'comp_dn'. * Return the size of the compressed name or -1. * 'length' is the size of the array pointed to by 'comp_dn'. * 'dnptrs' is a list of pointers to previous compressed names. dnptrs[0] * is a pointer to the beginning of the message. The list ends with NULL. * 'lastdnptr' is a pointer to the end of the arrary pointed to * by 'dnptrs'. Side effect is to update the list of pointers for * labels inserted into the message as we compress the name. * If 'dnptr' is NULL, we don't try to compress names. If 'lastdnptr' * is NULL, we don't update the list. */int resolvDNComp(exp_dn, comp_dn, length, dnptrs, lastdnptr)	const u_char *exp_dn;	u_char *comp_dn;        int length;        u_char **dnptrs, **lastdnptr;{	register u_char *cp, *dn;	register int c, l;	u_char **cpp = NULL, **lpp = NULL, *sp, *eob;	u_char *msg;	dn = (u_char *)exp_dn;	cp = comp_dn;	eob = cp + length;	if (dnptrs != NULL) {		if ((msg = *dnptrs++) != NULL) {			for (cpp = dnptrs; *cpp != NULL; cpp++)				;			lpp = cpp;	/* end of list to search */		}	} else		msg = NULL;	for (c = *dn++; c != '\0'; ) {		/* look to see if we can use pointers */		if (msg != NULL) {			if ((l = dn_find(dn-1, msg, dnptrs, lpp)) >= 0) {				if (cp+1 >= eob)					return (-1);				*cp++ = (l >> 8) | INDIR_MASK;				*cp++ = l % 256;				return (cp - comp_dn);			}			/* not found, save it */			if (lastdnptr != NULL && cpp < lastdnptr-1) {				*cpp++ = cp;				*cpp = NULL;			}		}		sp = cp++;	/* save ptr to length byte */		do {			if (c == '.') {				c = *dn++;				break;			}			if (c == '\\') {				if ((c = *dn++) == '\0')					break;			}			if (cp >= eob) {				if (msg != NULL)					*lpp = NULL;				return (-1);			}			*cp++ = c;		} while ((c = *dn++) != '\0');		/* catch trailing '.'s but not '..' */		if ((l = cp - sp - 1) == 0 && c == '\0') {			cp--;			break;		}		if (l <= 0 || l > MAXLABEL) {			if (msg != NULL)				*lpp = NULL;			return (-1);		}		*sp = l;	}	if (cp >= eob) {		if (msg != NULL)			*lpp = NULL;		return (-1);	}	*cp++ = '\0';	return (cp - comp_dn);}/* * Skip over a compressed domain name. Return the size or -1. */int __dn_skipname(comp_dn, eom)	const u_char *comp_dn, *eom;{	register u_char *cp;	register int n;	cp = (u_char *)comp_dn;	while (cp < eom && (n = *cp++)) {		/*		 * check for indirection		 */		switch (n & INDIR_MASK) {		case 0:			/* normal case, n == len */			cp += n;			continue;		case INDIR_MASK:	/* indirection */			cp++;			break;		default:		/* illegal type */			return (-1);		}		break;	}	if (cp > eom)		return -1;	return (cp - comp_dn);}/* * Search for expanded name from a list of previously compressed names. * Return the offset from msg if found or -1. * dnptrs is the pointer to the first name on the list, * not the pointer to the start of the message. */static intdn_find(exp_dn, msg, dnptrs, lastdnptr)	u_char *exp_dn, *msg;	u_char **dnptrs, **lastdnptr;{	register u_char *dn, *cp, **cpp;	register int n;	u_char *sp;	for (cpp = dnptrs; cpp < lastdnptr; cpp++) {		dn = exp_dn;		sp = cp = *cpp;		while ((n = *cp++)) {			/*			 * check for indirection			 */			switch (n & INDIR_MASK) {			case 0:		/* normal case, n == len */				while (--n >= 0) {					if (*dn == '.')						goto next;					if (*dn == '\\')						dn++;					if (*dn++ != *cp++)						goto next;				}				if ((n = *dn++) == '\0' && *cp == '\0')					return (sp - msg);				if (n == '.')					continue;				goto next;			default:	/* illegal type */				return (-1);			case INDIR_MASK:	/* indirection */				cp = msg + (((n & 0x3f) << 8) | *cp);			}		}		if (*dn == '\0')			return (sp - msg);	next:	;	}	return (-1);}/* * Routines to insert/extract short/long's. Must account for byte * order and non-alignment problems. This code at least has the * advantage of being portable. * * used by sendmail. */u_short_getshort(msgp)	register u_char *msgp;{	register u_short u;	GETSHORT(u, msgp);	return (u);}uint32_t_getlong(msgp)	u_char *msgp;{	register uint32_t u;	GETLONG(u, msgp);	return (u);}void#ifdef __STDC____putshort(register uint16_t s, register u_char *msgp)#else__putshort(s, msgp)	register uint16_t s;	register u_char *msgp;#endif{	PUTSHORT(s, msgp);}void__putlong(l, msgp)	register uint32_t l;	register u_char *msgp;{	PUTLONG(l, msgp);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲黄色av一区| 欧美影片第一页| 裸体在线国模精品偷拍| 一区二区三区电影在线播| 国产精品美女久久久久aⅴ| 国产精品美女一区二区三区| 中文字幕在线一区| 亚洲免费三区一区二区| 亚洲高清不卡在线观看| 美日韩黄色大片| 成人av网站大全| 成人视屏免费看| 成人精品鲁一区一区二区| 色综合激情五月| 2020国产精品| 亚洲一区免费在线观看| 久久9热精品视频| 99久久精品免费看国产| 91精品麻豆日日躁夜夜躁| 久久久精品国产99久久精品芒果| 亚洲女同一区二区| 国产激情一区二区三区四区| 91丨porny丨最新| 国产清纯白嫩初高生在线观看91| 一区二区三区精品视频在线| 国产美女精品在线| 日韩一区二区三区视频| 亚洲品质自拍视频网站| 粉嫩嫩av羞羞动漫久久久 | 欧美一级夜夜爽| ●精品国产综合乱码久久久久| 日韩二区在线观看| 精品视频在线免费| 亚洲123区在线观看| 日本韩国欧美一区| 亚洲国产另类av| 欧美三级资源在线| 亚洲在线成人精品| 欧美亚男人的天堂| 一区二区三区四区在线| 成人不卡免费av| 国产精品理论片| 51精品视频一区二区三区| 一二三区精品视频| 欧美日韩视频在线一区二区| 亚洲成人1区2区| 欧美疯狂做受xxxx富婆| 六月丁香综合在线视频| 久久嫩草精品久久久精品一| 国产麻豆成人精品| 国产精品久久久久久久岛一牛影视 | 欧美国产综合色视频| 亚洲综合丝袜美腿| 日韩一区二区三区电影| 亚洲最色的网站| 欧美高清dvd| 成人av在线资源| 亚洲欧美在线视频观看| 91免费观看在线| 韩国午夜理伦三级不卡影院| 欧美日韩一区二区三区不卡| 日韩1区2区3区| 国产精品免费视频观看| 欧美日韩在线三区| 高清在线成人网| 天堂久久一区二区三区| 国产精品美女视频| 日韩精品一区二区三区视频| 色哟哟国产精品| 国产精品77777| 毛片基地黄久久久久久天堂| 中文字幕在线不卡一区 | 蜜臀av一级做a爰片久久| 久久久精品综合| 日韩欧美国产综合一区| 欧美亚洲高清一区二区三区不卡| 久久精品国产免费看久久精品| 伊人一区二区三区| 亚洲女与黑人做爰| 国产精品国产三级国产三级人妇| 欧美成人vps| 精品国产乱码久久久久久闺蜜| 欧美群妇大交群中文字幕| 色综合久久久久久久久久久| 成人av影院在线| 高清免费成人av| 91免费版pro下载短视频| 91在线看国产| 欧美三区在线观看| 91精品国产一区二区三区蜜臀| 欧美无砖砖区免费| 欧美一区二区精品| 日韩欧美国产综合一区| 国产欧美日韩在线| 国产精品色哟哟网站| 亚洲色图视频网| 天天综合网天天综合色| 久久福利资源站| 91一区二区在线| 一本色道a无线码一区v| 5858s免费视频成人| 国产欧美日韩综合精品一区二区| 1024国产精品| 久久精品国产99国产| 99精品欧美一区二区三区小说| 成人免费看视频| 91久久线看在观草草青青| 91精品国产一区二区三区香蕉| 国产精品色哟哟| 久久国产精品露脸对白| 一本大道久久a久久精品综合| 欧美日韩一级黄| 亚洲欧洲无码一区二区三区| 男人的j进女人的j一区| 成人高清免费在线播放| 欧美一区二区免费观在线| 中文字幕乱码亚洲精品一区| 美女视频黄 久久| 91国内精品野花午夜精品| 久久久久综合网| 日韩精品三区四区| 欧美性色欧美a在线播放| 亚洲图片激情小说| 不卡av在线网| 中文字幕佐山爱一区二区免费| 久久国产精品99久久人人澡| 欧美日韩综合在线| 中文字幕日韩欧美一区二区三区| 国内精品伊人久久久久av一坑| 在线不卡免费av| 日韩综合小视频| 欧美xxx久久| 国产精一品亚洲二区在线视频| 欧美一卡二卡在线观看| 日韩中文字幕不卡| 制服丝袜日韩国产| 一区二区三区精品在线观看| 97精品国产露脸对白| 欧美视频在线一区| 亚洲国产日韩一区二区| 国产·精品毛片| 毛片一区二区三区| 精品国产凹凸成av人导航| 日韩国产精品久久久久久亚洲| 国产一区999| 亚洲免费观看在线视频| 日本韩国一区二区| 久久66热偷产精品| 国产三级久久久| 色综合一个色综合| 日韩成人午夜电影| 中文字幕av不卡| 777亚洲妇女| 91美女在线观看| 国产一区二区电影| 亚洲电影你懂得| 亚洲视频狠狠干| 精品国产三级电影在线观看| 在线精品视频小说1| 国产精品一二三四区| 亚洲一级二级三级在线免费观看| 日韩欧美综合一区| 精品视频免费看| 色婷婷av一区二区三区软件| 国产一区二区三区久久悠悠色av| 亚洲已满18点击进入久久| 国产精品麻豆视频| 久久久久久久久久久久电影| 日韩视频免费观看高清完整版在线观看 | 美女一区二区在线观看| 亚洲一区二区三区四区不卡 | 国产成人一区在线| 免费在线观看精品| 久久99热这里只有精品| 美女脱光内衣内裤视频久久影院| 亚洲五码中文字幕| 日精品一区二区| 久久99精品国产麻豆婷婷| 蜜桃视频在线一区| 久久成人18免费观看| 久久国产夜色精品鲁鲁99| 免费在线观看视频一区| 精品一区二区在线播放| 国产一区在线视频| 不卡av在线免费观看| 色综合中文字幕| 日韩欧美www| 国产精品高潮久久久久无| 中文字幕人成不卡一区| 一区二区三区在线视频观看58| 亚洲综合自拍偷拍| 美国十次综合导航| 99久久er热在这里只有精品66| 日本电影亚洲天堂一区| 日韩一区二区三区免费观看| 国产欧美日韩精品a在线观看| 亚洲丝袜美腿综合| 精品一区二区三区免费观看| 99re热视频精品| 久久久久亚洲综合|