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

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

?? res_comp.c

?? vxwork源代碼
?? 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一区二区三区免费野_久草精品视频
国产成人免费在线观看不卡| 日本不卡1234视频| 日本在线播放一区二区三区| 国模冰冰炮一区二区| 亚洲永久免费av| 激情图片小说一区| 欧美日韩免费视频| 中文字幕佐山爱一区二区免费| 日韩不卡一区二区三区| 99免费精品视频| wwww国产精品欧美| 夜夜嗨av一区二区三区网页| 日韩影院免费视频| 91视视频在线直接观看在线看网页在线看 | 国产精品久久免费看| 美女看a上一区| 欧美在线一二三| 国产精品久久久久久久久动漫| 激情图片小说一区| 91精品国产丝袜白色高跟鞋| 亚洲免费观看高清在线观看| 国产成人一区在线| 久久久久97国产精华液好用吗| 天使萌一区二区三区免费观看| 91农村精品一区二区在线| 国产欧美精品在线观看| 精品一区二区久久久| 欧美一区二视频| 69堂亚洲精品首页| 奇米四色…亚洲| 日韩电影一区二区三区四区| 欧美日韩在线电影| 亚洲一区二区视频在线| 91久久精品日日躁夜夜躁欧美| 国产精品久久久久影院亚瑟| 成人午夜av在线| 欧美xxx久久| 毛片基地黄久久久久久天堂| 欧美一区二区三区性视频| 蜜桃精品在线观看| 久久久久国产精品麻豆ai换脸| 精品亚洲免费视频| 国产午夜精品一区二区三区嫩草 | 精品国精品自拍自在线| 精品一区二区在线视频| 久久影院视频免费| 成人手机电影网| 亚洲日本在线观看| 欧美理论电影在线| 理论电影国产精品| 国产女主播视频一区二区| 国产99久久久精品| 一区二区三区影院| 欧美精品亚洲一区二区在线播放| 青娱乐精品视频在线| 欧美精品一区二| 久久久久97国产精华液好用吗| 国产suv精品一区二区三区| 国产精品色呦呦| 色婷婷精品大视频在线蜜桃视频| 亚洲电影一区二区三区| 精品国产成人系列| 成人app网站| 亚洲va天堂va国产va久| 色婷婷精品大视频在线蜜桃视频| 亚洲第一综合色| 2023国产精品| jlzzjlzz亚洲日本少妇| 婷婷久久综合九色综合绿巨人| 久久综合九色综合97婷婷女人| av电影天堂一区二区在线| 午夜精品成人在线视频| 国产亚洲综合色| 欧美羞羞免费网站| 国产一区欧美一区| 亚洲精品国产一区二区精华液| 日韩欧美一级精品久久| av中文字幕在线不卡| 捆绑变态av一区二区三区| 国产精品国产三级国产有无不卡| 欧美日韩高清影院| 大胆亚洲人体视频| 美女一区二区三区| 日韩美女视频19| 成人综合激情网| 亚洲v精品v日韩v欧美v专区| 国产成人av一区二区三区在线| 亚洲 欧美综合在线网络| 欧美国产1区2区| 日韩免费一区二区三区在线播放| av在线不卡网| 国产一区日韩二区欧美三区| 亚洲第一激情av| 日本午夜精品一区二区三区电影| 欧美午夜电影在线播放| 国产成人啪午夜精品网站男同| 视频一区国产视频| 亚洲一区二区在线免费观看视频| 久久久久国产精品麻豆ai换脸 | 国产拍欧美日韩视频二区| 欧美日韩久久久| 9l国产精品久久久久麻豆| 国产成人在线电影| 国产美女主播视频一区| 精品亚洲porn| 蜜桃精品视频在线| 日韩国产欧美在线播放| 亚洲欧洲日产国码二区| 国产精品三级久久久久三级| 日韩精品一区在线| 91精选在线观看| 欧美日韩高清影院| 欧美无砖砖区免费| 亚洲欧美偷拍另类a∨色屁股| 久久久久九九视频| 精品sm在线观看| 日韩欧美二区三区| 日韩欧美一区二区视频| 日韩无一区二区| 日韩一级二级三级精品视频| 欧美久久婷婷综合色| 国产精品久久久久久久久图文区| 成人午夜激情在线| 色综合一区二区| 在线观看国产91| 欧美日韩在线三级| 91精品国产综合久久福利| 欧美日韩免费在线视频| 蜜臀av一区二区| 激情六月婷婷综合| 成人一区二区在线观看| 国产精品99久久久久久久vr| 风间由美中文字幕在线看视频国产欧美 | 麻豆精品一区二区综合av| 久久精品亚洲乱码伦伦中文 | 国产欧美日韩三区| 国产精品久久久久9999吃药| 中文字幕视频一区| eeuss鲁片一区二区三区| aaa国产一区| 欧洲精品视频在线观看| 日本国产一区二区| 日韩午夜在线播放| 国产三级一区二区| 一区二区三区加勒比av| 日韩激情一区二区| 国产98色在线|日韩| 蜜桃传媒麻豆第一区在线观看| 狠狠色丁香婷综合久久| 成人亚洲一区二区一| 91国偷自产一区二区开放时间 | 亚洲欧美日韩一区| 婷婷国产v国产偷v亚洲高清| 国内成人自拍视频| 色香色香欲天天天影视综合网| 91精选在线观看| 国产精品色婷婷久久58| 五月激情综合婷婷| 国产成人免费xxxxxxxx| 欧美四级电影在线观看| 久久精品视频免费观看| 日本韩国欧美一区| 久久人人爽爽爽人久久久| 亚洲欧美综合色| 美女网站一区二区| 91久久精品一区二区二区| 久久久精品国产免大香伊| 亚洲国产你懂的| 国产99久久久精品| 日韩一区二区免费高清| 亚洲精品高清在线| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 色综合视频在线观看| 欧美成人精品二区三区99精品| 亚洲乱码一区二区三区在线观看| 国产在线一区二区综合免费视频| 色婷婷综合久久久久中文 | 日韩欧美国产精品| 亚洲一区在线观看网站| 懂色av中文一区二区三区| 4438x亚洲最大成人网| 中文字幕亚洲不卡| 国产麻豆9l精品三级站| 欧美人牲a欧美精品| 一区二区中文视频| 韩国v欧美v亚洲v日本v| 欧美三级电影网| 国产成人亚洲综合色影视| 日韩三级在线观看| 亚洲成人精品一区| 色激情天天射综合网| 最新国产の精品合集bt伙计| 国产精品自产自拍| ww亚洲ww在线观看国产| 美女免费视频一区| 91精品国产综合久久精品| 性久久久久久久久久久久| 在线视频综合导航| 亚洲一区二区三区美女| 国产毛片精品一区|