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

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

?? ipcp.c

?? MCS-51的一個Free小型操作系統,在KeilC中下編譯工作
?? C
?? 第 1 頁 / 共 3 頁
字號:
			goto bad; \		if (!old) { \			GETCHAR(cimaxslotindex, p); \			if (cimaxslotindex != maxslotindex) \				goto bad; \			GETCHAR(cicflag, p); \			if (cicflag != cflag) \				goto bad; \		} \	}	#define ACKCIADDR(opt, neg, old, val1, val2) \	if (neg) { \		int addrlen = (old? CILEN_ADDRS: CILEN_ADDR); \		u32_t l; \		if ((len -= addrlen) < 0) \			goto bad; \		GETCHAR(citype, p); \		GETCHAR(cilen, p); \		if (cilen != addrlen || \				citype != opt) \			goto bad; \		GETLONG(l, p); \		cilong = htonl(l); \		if (val1 != cilong) \			goto bad; \		if (old) { \			GETLONG(l, p); \			cilong = htonl(l); \			if (val2 != cilong) \				goto bad; \		} \	}#define ACKCIDNS(opt, neg, addr) \	if (neg) { \		u32_t l; \		if ((len -= CILEN_ADDR) < 0) \			goto bad; \		GETCHAR(citype, p); \		GETCHAR(cilen, p); \		if (cilen != CILEN_ADDR || \				citype != opt) \			goto bad; \		GETLONG(l, p); \		cilong = htonl(l); \		if (addr != cilong) \			goto bad; \	}		ACKCIADDR((go->old_addrs? CI_ADDRS: CI_ADDR), go->neg_addr,			  go->old_addrs, go->ouraddr, go->hisaddr);		ACKCIVJ(CI_COMPRESSTYPE, go->neg_vj, go->vj_protocol, go->old_vj,			go->maxslotindex, go->cflag);		ACKCIDNS(CI_MS_DNS1, go->req_dns1, go->dnsaddr[0]);	ACKCIDNS(CI_MS_DNS2, go->req_dns2, go->dnsaddr[1]);	/*	 * If there are any remaining CIs, then this packet is bad.	 */	if (len != 0)		goto bad;	return (1);	bad:	IPCPDEBUG((LOG_INFO, "ipcp_ackci: received bad Ack!\n"));	return (0);}/* * ipcp_nakci - Peer has sent a NAK for some of our CIs. * This should not modify any state if the Nak is bad * or if IPCP is in the OPENED state. * * Returns: *	0 - Nak was bad. *	1 - Nak was good. */static int ipcp_nakci(fsm *f, u_char *p, int len){	ipcp_options *go = &ipcp_gotoptions[f->unit];	u_char cimaxslotindex, cicflag;	u_char citype, cilen, *next;	u_short cishort;	u32_t ciaddr1, ciaddr2, l, cidnsaddr;	ipcp_options no;		/* options we've seen Naks for */	ipcp_options try;		/* options to request next time */		BZERO(&no, sizeof(no));	try = *go;		/*	 * Any Nak'd CIs must be in exactly the same order that we sent.	 * Check packet length and CI length at each step.	 * If we find any deviations, then this packet is bad.	 */#define NAKCIADDR(opt, neg, old, code) \	if (go->neg && \			len >= (cilen = (old? CILEN_ADDRS: CILEN_ADDR)) && \			p[1] == cilen && \			p[0] == opt) { \		len -= cilen; \		INCPTR(2, p); \		GETLONG(l, p); \		ciaddr1 = htonl(l); \		if (old) { \			GETLONG(l, p); \			ciaddr2 = htonl(l); \			no.old_addrs = 1; \		} else \			ciaddr2 = 0; \		no.neg = 1; \		code \	}	#define NAKCIVJ(opt, neg, code) \	if (go->neg && \			((cilen = p[1]) == CILEN_COMPRESS || cilen == CILEN_VJ) && \			len >= cilen && \			p[0] == opt) { \		len -= cilen; \		INCPTR(2, p); \		GETSHORT(cishort, p); \		no.neg = 1; \		code \	}	#define NAKCIDNS(opt, neg, code) \	if (go->neg && \			((cilen = p[1]) == CILEN_ADDR) && \			len >= cilen && \			p[0] == opt) { \		len -= cilen; \		INCPTR(2, p); \		GETLONG(l, p); \		cidnsaddr = htonl(l); \		no.neg = 1; \		code \	}		/*	 * Accept the peer's idea of {our,his} address, if different	 * from our idea, only if the accept_{local,remote} flag is set.	 */	NAKCIADDR((go->old_addrs? CI_ADDRS: CI_ADDR), neg_addr, go->old_addrs,	  if (go->accept_local && ciaddr1) { /* Do we know our address? */		  try.ouraddr = ciaddr1;		  IPCPDEBUG((LOG_INFO, "local IP address %s\n",			     inet_ntoa(ciaddr1)));	  }	  if (go->accept_remote && ciaddr2) { /* Does he know his? */		  try.hisaddr = ciaddr2;		  IPCPDEBUG((LOG_INFO, "remote IP address %s\n",			     inet_ntoa(ciaddr2)));	  }	);		/*	 * Accept the peer's value of maxslotindex provided that it	 * is less than what we asked for.  Turn off slot-ID compression	 * if the peer wants.  Send old-style compress-type option if	 * the peer wants.	 */	NAKCIVJ(CI_COMPRESSTYPE, neg_vj,		if (cilen == CILEN_VJ) {			GETCHAR(cimaxslotindex, p);			GETCHAR(cicflag, p);			if (cishort == IPCP_VJ_COMP) {				try.old_vj = 0;				if (cimaxslotindex < go->maxslotindex)					try.maxslotindex = cimaxslotindex;				if (!cicflag)					try.cflag = 0;			} else {				try.neg_vj = 0;			}		} else {			if (cishort == IPCP_VJ_COMP || cishort == IPCP_VJ_COMP_OLD) {				try.old_vj = 1;				try.vj_protocol = cishort;			} else {				try.neg_vj = 0;			}		}	);		NAKCIDNS(CI_MS_DNS1, req_dns1,			try.dnsaddr[0] = cidnsaddr;		  	IPCPDEBUG((LOG_INFO, "primary DNS address %s\n", inet_ntoa(cidnsaddr)));			);	NAKCIDNS(CI_MS_DNS2, req_dns2,			try.dnsaddr[1] = cidnsaddr;		  	IPCPDEBUG((LOG_INFO, "secondary DNS address %s\n", inet_ntoa(cidnsaddr)));			);	/*	* There may be remaining CIs, if the peer is requesting negotiation	* on an option that we didn't include in our request packet.	* If they want to negotiate about IP addresses, we comply.	* If they want us to ask for compression, we refuse.	*/	while (len > CILEN_VOID) {		GETCHAR(citype, p);		GETCHAR(cilen, p);		if( (len -= cilen) < 0 )			goto bad;		next = p + cilen - 2;				switch (citype) {		case CI_COMPRESSTYPE:			if (go->neg_vj || no.neg_vj ||					(cilen != CILEN_VJ && cilen != CILEN_COMPRESS))				goto bad;			no.neg_vj = 1;			break;		case CI_ADDRS:			if ((go->neg_addr && go->old_addrs) || no.old_addrs					|| cilen != CILEN_ADDRS)				goto bad;			try.neg_addr = 1;			try.old_addrs = 1;			GETLONG(l, p);			ciaddr1 = htonl(l);			if (ciaddr1 && go->accept_local)				try.ouraddr = ciaddr1;			GETLONG(l, p);			ciaddr2 = htonl(l);			if (ciaddr2 && go->accept_remote)				try.hisaddr = ciaddr2;			no.old_addrs = 1;			break;		case CI_ADDR:			if (go->neg_addr || no.neg_addr || cilen != CILEN_ADDR)				goto bad;			try.old_addrs = 0;			GETLONG(l, p);			ciaddr1 = htonl(l);			if (ciaddr1 && go->accept_local)				try.ouraddr = ciaddr1;			if (try.ouraddr != 0)				try.neg_addr = 1;			no.neg_addr = 1;			break;		}		p = next;	}		/* If there is still anything left, this packet is bad. */	if (len != 0)		goto bad;		/*	 * OK, the Nak is good.  Now we can update state.	 */	if (f->state != OPENED)		*go = try;		return 1;	bad:	IPCPDEBUG((LOG_INFO, "ipcp_nakci: received bad Nak!\n"));	return 0;}/* * ipcp_rejci - Reject some of our CIs. */static int ipcp_rejci(fsm *f, u_char *p, int len){	ipcp_options *go = &ipcp_gotoptions[f->unit];	u_char cimaxslotindex, ciflag, cilen;	u_short cishort;	u32_t cilong;	ipcp_options try;		/* options to request next time */		try = *go;	/*	 * Any Rejected CIs must be in exactly the same order that we sent.	 * Check packet length and CI length at each step.	 * If we find any deviations, then this packet is bad.	 */#define REJCIADDR(opt, neg, old, val1, val2) \	if (go->neg && \			len >= (cilen = old? CILEN_ADDRS: CILEN_ADDR) && \			p[1] == cilen && \			p[0] == opt) { \		u32_t l; \		len -= cilen; \		INCPTR(2, p); \		GETLONG(l, p); \		cilong = htonl(l); \		/* Check rejected value. */ \		if (cilong != val1) \			goto bad; \		if (old) { \			GETLONG(l, p); \			cilong = htonl(l); \			/* Check rejected value. */ \			if (cilong != val2) \				goto bad; \		} \		try.neg = 0; \	}	#define REJCIVJ(opt, neg, val, old, maxslot, cflag) \	if (go->neg && \			p[1] == (old? CILEN_COMPRESS : CILEN_VJ) && \			len >= p[1] && \			p[0] == opt) { \		len -= p[1]; \		INCPTR(2, p); \		GETSHORT(cishort, p); \		/* Check rejected value. */  \		if (cishort != val) \			goto bad; \		if (!old) { \			GETCHAR(cimaxslotindex, p); \			if (cimaxslotindex != maxslot) \				goto bad; \			GETCHAR(ciflag, p); \			if (ciflag != cflag) \				goto bad; \		} \		try.neg = 0; \	}	#define REJCIDNS(opt, neg, dnsaddr) \	if (go->neg && \			((cilen = p[1]) == CILEN_ADDR) && \			len >= cilen && \			p[0] == opt) { \		u32_t l; \		len -= cilen; \		INCPTR(2, p); \		GETLONG(l, p); \		cilong = htonl(l); \		/* Check rejected value. */ \		if (cilong != dnsaddr) \			goto bad; \		try.neg = 0; \	}	REJCIADDR((go->old_addrs? CI_ADDRS: CI_ADDR), neg_addr,			  go->old_addrs, go->ouraddr, go->hisaddr);		REJCIVJ(CI_COMPRESSTYPE, neg_vj, go->vj_protocol, go->old_vj,			go->maxslotindex, go->cflag);		REJCIDNS(CI_MS_DNS1, req_dns1, go->dnsaddr[0]);	REJCIDNS(CI_MS_DNS2, req_dns2, go->dnsaddr[1]);	/*	 * If there are any remaining CIs, then this packet is bad.	 */	if (len != 0)		goto bad;	/*	 * Now we can update state.	 */	if (f->state != OPENED)		*go = try;	return 1;	bad:	IPCPDEBUG((LOG_INFO, "ipcp_rejci: received bad Reject!\n"));	return 0;}/* * ipcp_reqci - Check the peer's requested CIs and send appropriate response. * * Returns: CONFACK, CONFNAK or CONFREJ and input packet modified * appropriately.  If reject_if_disagree is non-zero, doesn't return * CONFNAK; returns CONFREJ if it can't return CONFACK. */static int ipcp_reqci(	fsm *f,	u_char *inp,		/* Requested CIs */	int *len,			/* Length of requested CIs */	int reject_if_disagree){	ipcp_options *wo = &ipcp_wantoptions[f->unit];	ipcp_options *ho = &ipcp_hisoptions[f->unit];	ipcp_options *ao = &ipcp_allowoptions[f->unit];#ifdef OLD_CI_ADDRS	ipcp_options *go = &ipcp_gotoptions[f->unit];#endif	u_char *cip, *next;				/* Pointer to current and next CIs */	u_short cilen, citype;			/* Parsed len, type */	u_short cishort;				/* Parsed short value */	u32_t tl, ciaddr1;			/* Parsed address values */#ifdef OLD_CI_ADDRS	u32_t ciaddr2;				/* Parsed address values */#endif	int rc = CONFACK;				/* Final packet return code */	int orc;						/* Individual option return code */	u_char *p;						/* Pointer to next char to parse */	u_char *ucp = inp;				/* Pointer to current output char */	int l = *len;					/* Length left */	u_char maxslotindex, cflag;	int d;		cis_received[f->unit] = 1;		/*	 * Reset all his options.	 */	BZERO(ho, sizeof(*ho));		/*	 * Process all his options.	 */	next = inp;	while (l) {		orc = CONFACK;				/* Assume success */		cip = p = next;				/* Remember begining of CI */		if (l < 2 ||				/* Not enough data for CI header or */				p[1] < 2 ||			/*  CI length too small or */				p[1] > l) {			/*  CI length too big? */			IPCPDEBUG((LOG_INFO, "ipcp_reqci: bad CI length!\n"));			orc = CONFREJ;			/* Reject bad CI */			cilen = l;				/* Reject till end of packet */			l = 0;					/* Don't loop again */			goto endswitch;		}		GETCHAR(citype, p);			/* Parse CI type */		GETCHAR(cilen, p);			/* Parse CI length */		l -= cilen;					/* Adjust remaining length */		next += cilen;				/* Step to next CI */		switch (citype) {			/* Check CI type */#ifdef OLD_CI_ADDRS /* Need to save space... */		case CI_ADDRS:			IPCPDEBUG((LOG_INFO, "ipcp_reqci: received ADDRS\n"));			if (!ao->neg_addr ||					cilen != CILEN_ADDRS) {	/* Check CI length */				orc = CONFREJ;		/* Reject CI */				break;			}						/*			 * If he has no address, or if we both have his address but			 * disagree about it, then NAK it with our idea.			 * In particular, if we don't know his address, but he does,			 * then accept it.			 */			GETLONG(tl, p);		/* Parse source address (his) */			ciaddr1 = htonl(tl);			IPCPDEBUG((LOG_INFO, "his addr %s\n", inet_ntoa(ciaddr1)));			if (ciaddr1 != wo->hisaddr					&& (ciaddr1 == 0 || !wo->accept_remote)) {				orc = CONFNAK;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色婷婷综合久久久中文字幕| 国产嫩草影院久久久久| 欧美一区午夜视频在线观看| 精品国产乱码久久久久久蜜臀| 337p粉嫩大胆噜噜噜噜噜91av| 亚洲国产精品成人综合 | 91久久线看在观草草青青| 欧美午夜电影在线播放| 久久日一线二线三线suv| 亚洲天堂精品视频| 日韩国产欧美在线播放| 99精品久久只有精品| 日韩欧美电影一区| 亚洲五码中文字幕| 国产一区二区久久| 欧美肥大bbwbbw高潮| 国产蜜臀97一区二区三区| 日韩精品电影一区亚洲| www.综合网.com| 精品久久五月天| 男人的天堂久久精品| 在线精品视频一区二区| 国产精品久久久久久亚洲伦| 国产一区二区三区黄视频| 欧美日本不卡视频| 亚洲乱码国产乱码精品精可以看| 国产一区二区毛片| 精品国产一区a| 精品在线你懂的| 欧美成人一区二区三区片免费| 爽好久久久欧美精品| 欧美日韩国产综合久久| 亚洲一区在线播放| 欧美日韩在线播| 亚洲香肠在线观看| 欧美三级视频在线观看| 亚洲国产美女搞黄色| 欧美性做爰猛烈叫床潮| 亚洲高清免费观看高清完整版在线观看| 久久久久9999亚洲精品| 久久综合成人精品亚洲另类欧美| 亚洲精品国产精品乱码不99| 一本高清dvd不卡在线观看 | 94色蜜桃网一区二区三区| 国产精品成人在线观看| 欧美亚洲日本一区| 秋霞国产午夜精品免费视频| 日韩欧美成人午夜| 国产激情精品久久久第一区二区 | 欧美xxx久久| 成人网在线免费视频| 亚洲男人天堂av网| 91精品国产高清一区二区三区 | 欧美私模裸体表演在线观看| 日本不卡免费在线视频| 国产亚洲精品久| 色94色欧美sute亚洲线路一ni| 天天综合天天做天天综合| 精品精品欲导航| 91丨porny丨在线| 天天亚洲美女在线视频| 久久久国际精品| 欧美日韩亚州综合| 国产不卡免费视频| 午夜精品视频在线观看| 欧美国产日产图区| 91麻豆精品国产91久久久| 99精品桃花视频在线观看| 日韩福利电影在线观看| 国产精品系列在线| 日韩一区二区中文字幕| 91色porny| 国产九色精品成人porny| 午夜精品视频在线观看| 亚洲欧美在线aaa| 2017欧美狠狠色| 欧美一区二区福利视频| 在线观看视频一区二区| youjizz久久| 国产精品一区久久久久| 免费久久99精品国产| 亚洲国产成人精品视频| 亚洲欧美另类在线| 国产精品免费aⅴ片在线观看| 精品福利视频一区二区三区| 欧美一级日韩免费不卡| 欧美亚洲另类激情小说| 欧洲国内综合视频| 色域天天综合网| 色综合天天综合色综合av| 99国产精品久久久久久久久久| 国产乱子伦一区二区三区国色天香| 日本v片在线高清不卡在线观看| 亚洲aaa精品| 奇米888四色在线精品| 蜜桃一区二区三区四区| 精品无人码麻豆乱码1区2区 | 久久一夜天堂av一区二区三区| 日韩一二三区视频| 精品乱码亚洲一区二区不卡| 欧美精品一区二区蜜臀亚洲| 国产欧美视频一区二区三区| 欧美国产97人人爽人人喊| 国产精品福利av| 亚洲电影在线播放| 日日夜夜免费精品| 久久国产精品免费| 不卡电影免费在线播放一区| 欧美性感一区二区三区| 日韩欧美一区二区久久婷婷| 欧美国产日韩a欧美在线观看 | 在线观看区一区二| 7777精品伊人久久久大香线蕉经典版下载| 欧美精品电影在线播放| 久久午夜羞羞影院免费观看| 亚洲图片激情小说| 麻豆精品久久久| 99久久久久免费精品国产| 91精品视频网| 亚洲伦理在线精品| 久久精品国产久精国产| 色婷婷亚洲婷婷| 久久亚洲影视婷婷| 亚洲一区二区三区四区五区中文| 麻豆免费精品视频| 欧美在线综合视频| 国产农村妇女毛片精品久久麻豆 | 三级亚洲高清视频| 99视频一区二区三区| 精品成人在线观看| 伊人夜夜躁av伊人久久| 成人性视频网站| 欧美大尺度电影在线| 水蜜桃久久夜色精品一区的特点| 99精品在线观看视频| 2021久久国产精品不只是精品| 午夜精品爽啪视频| 欧美三电影在线| 亚洲女人小视频在线观看| 国产高清无密码一区二区三区| 日韩精品一区二区三区老鸭窝| 亚洲高清免费视频| 欧美日韩一区视频| 亚洲 欧美综合在线网络| 在线视频你懂得一区二区三区| 日韩一区有码在线| 97精品国产露脸对白| 日韩美女精品在线| 99国产精品久久久| 亚洲女同一区二区| 欧美少妇一区二区| 亚洲r级在线视频| 91精品国产色综合久久ai换脸 | 中文字幕免费不卡在线| 4438亚洲最大| 国产精品久久久久一区二区三区 | 狂野欧美性猛交blacked| 欧美放荡的少妇| 久久99精品国产.久久久久久| 日韩一区国产二区欧美三区| 国产一区二区导航在线播放| 久久综合久久鬼色中文字| 高清在线成人网| 亚洲视频综合在线| 精品1区2区3区| 韩国成人精品a∨在线观看| 欧美不卡一区二区| 成人精品国产免费网站| 亚洲欧美福利一区二区| 欧美日韩精品一区二区| 韩国欧美一区二区| 亚洲女性喷水在线观看一区| 欧美日韩小视频| 成人综合在线网站| 三级不卡在线观看| 亚洲免费毛片网站| 91麻豆蜜桃一区二区三区| 视频一区二区中文字幕| 欧美激情艳妇裸体舞| 欧美日韩精品一区二区三区四区| 九九精品一区二区| 亚洲精品成a人| 久久久久久久久久电影| 欧美日韩亚洲综合| 成人av资源下载| 天堂一区二区在线| 亚洲午夜一二三区视频| 国产精品视频看| 日韩欧美激情在线| 宅男在线国产精品| 欧洲精品视频在线观看| 成人午夜伦理影院| 国产美女精品一区二区三区| 日av在线不卡| 亚洲一区二区欧美日韩| 一区二区高清视频在线观看| 中文字幕一区二区三| 欧美国产欧美综合| 久久理论电影网| 国产亚洲一本大道中文在线|