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

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

?? lcp.c

?? lwip在ucos上的移植
?? C
?? 第 1 頁 / 共 4 頁
字號:
	*/	return (LENCISHORT(go->neg_mru && go->mru != PPP_DEFMRU) +		LENCILONG(go->neg_asyncmap && go->asyncmap != 0xFFFFFFFFl) +		LENCICHAP(go->neg_chap) +		LENCISHORT(!go->neg_chap && go->neg_upap) +		LENCILQR(go->neg_lqr) +		LENCICBCP(go->neg_cbcp) +		LENCILONG(go->neg_magicnumber) +		LENCIVOID(go->neg_pcompression) +		LENCIVOID(go->neg_accompression));}/* * lcp_addci - Add our desired CIs to a packet. */static void lcp_addci(fsm *f, u_char *ucp, int *lenp){	lcp_options *go = &lcp_gotoptions[f->unit];	u_char *start_ucp = ucp;	#define ADDCIVOID(opt, neg) \	if (neg) { \	    LCPDEBUG((LOG_INFO, "lcp_addci: opt=%d\n", opt)); \		PUTCHAR(opt, ucp); \		PUTCHAR(CILEN_VOID, ucp); \	}#define ADDCISHORT(opt, neg, val) \	if (neg) { \	    LCPDEBUG((LOG_INFO, "lcp_addci: INT opt=%d %X\n", opt, val)); \		PUTCHAR(opt, ucp); \		PUTCHAR(CILEN_SHORT, ucp); \		PUTSHORT(val, ucp); \	}#define ADDCICHAP(opt, neg, val, digest) \	if (neg) { \	    LCPDEBUG((LOG_INFO, "lcp_addci: CHAP opt=%d %X\n", opt, val)); \		PUTCHAR(opt, ucp); \		PUTCHAR(CILEN_CHAP, ucp); \		PUTSHORT(val, ucp); \		PUTCHAR(digest, ucp); \	}#define ADDCILONG(opt, neg, val) \	if (neg) { \	    LCPDEBUG((LOG_INFO, "lcp_addci: L opt=%d %lX\n", opt, val)); \		PUTCHAR(opt, ucp); \		PUTCHAR(CILEN_LONG, ucp); \		PUTLONG(val, ucp); \	}#define ADDCILQR(opt, neg, val) \	if (neg) { \	    LCPDEBUG((LOG_INFO, "lcp_addci: LQR opt=%d %lX\n", opt, val)); \		PUTCHAR(opt, ucp); \		PUTCHAR(CILEN_LQR, ucp); \		PUTSHORT(PPP_LQR, ucp); \		PUTLONG(val, ucp); \	}#define ADDCICHAR(opt, neg, val) \	if (neg) { \	    LCPDEBUG((LOG_INFO, "lcp_addci: CHAR opt=%d %X '%z'\n", opt, val, val)); \		PUTCHAR(opt, ucp); \		PUTCHAR(CILEN_CHAR, ucp); \		PUTCHAR(val, ucp); \	}		ADDCISHORT(CI_MRU, go->neg_mru && go->mru != PPP_DEFMRU, go->mru);	ADDCILONG(CI_ASYNCMAP, go->neg_asyncmap && go->asyncmap != 0xFFFFFFFFl,			go->asyncmap);	ADDCICHAP(CI_AUTHTYPE, go->neg_chap, PPP_CHAP, go->chap_mdtype);	ADDCISHORT(CI_AUTHTYPE, !go->neg_chap && go->neg_upap, PPP_PAP);	ADDCILQR(CI_QUALITY, go->neg_lqr, go->lqr_period);	ADDCICHAR(CI_CALLBACK, go->neg_cbcp, CBCP_OPT);	ADDCILONG(CI_MAGICNUMBER, go->neg_magicnumber, go->magicnumber);	ADDCIVOID(CI_PCOMPRESSION, go->neg_pcompression);	ADDCIVOID(CI_ACCOMPRESSION, go->neg_accompression);		if (ucp - start_ucp != *lenp) {		/* this should never happen, because peer_mtu should be 1500 */		LCPDEBUG((LOG_ERR, "Bug in lcp_addci: wrong length\n"));	}}/* * lcp_ackci - Ack our CIs. * This should not modify any state if the Ack is bad. * * Returns: *	0 - Ack was bad. *	1 - Ack was good. */static int lcp_ackci(fsm *f, u_char *p, int len){	lcp_options *go = &lcp_gotoptions[f->unit];	u_char cilen, citype, cichar;	u_short cishort;	u32_t cilong;		/*	* 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 ACKCIVOID(opt, neg) \	if (neg) { \		if ((len -= CILEN_VOID) < 0) \			goto bad; \		GETCHAR(citype, p); \		GETCHAR(cilen, p); \		if (cilen != CILEN_VOID || \				citype != opt) \			goto bad; \	}#define ACKCISHORT(opt, neg, val) \	if (neg) { \		if ((len -= CILEN_SHORT) < 0) \			goto bad; \		GETCHAR(citype, p); \		GETCHAR(cilen, p); \		if (cilen != CILEN_SHORT || \				citype != opt) \			goto bad; \		GETSHORT(cishort, p); \		if (cishort != val) \			goto bad; \	}#define ACKCICHAR(opt, neg, val) \	if (neg) { \		if ((len -= CILEN_CHAR) < 0) \			goto bad; \		GETCHAR(citype, p); \		GETCHAR(cilen, p); \		if (cilen != CILEN_CHAR || \				citype != opt) \			goto bad; \		GETCHAR(cichar, p); \		if (cichar != val) \			goto bad; \	}#define ACKCICHAP(opt, neg, val, digest) \	if (neg) { \		if ((len -= CILEN_CHAP) < 0) \			goto bad; \		GETCHAR(citype, p); \		GETCHAR(cilen, p); \		if (cilen != CILEN_CHAP || \				citype != opt) \			goto bad; \		GETSHORT(cishort, p); \		if (cishort != val) \			goto bad; \		GETCHAR(cichar, p); \		if (cichar != digest) \			goto bad; \	}#define ACKCILONG(opt, neg, val) \	if (neg) { \		if ((len -= CILEN_LONG) < 0) \			goto bad; \		GETCHAR(citype, p); \		GETCHAR(cilen, p); \		if (cilen != CILEN_LONG || \				citype != opt) \			goto bad; \		GETLONG(cilong, p); \		if (cilong != val) \			goto bad; \	}#define ACKCILQR(opt, neg, val) \	if (neg) { \		if ((len -= CILEN_LQR) < 0) \			goto bad; \		GETCHAR(citype, p); \		GETCHAR(cilen, p); \		if (cilen != CILEN_LQR || \				citype != opt) \			goto bad; \		GETSHORT(cishort, p); \		if (cishort != PPP_LQR) \			goto bad; \		GETLONG(cilong, p); \		if (cilong != val) \			goto bad; \	}		ACKCISHORT(CI_MRU, go->neg_mru && go->mru != PPP_DEFMRU, go->mru);	ACKCILONG(CI_ASYNCMAP, go->neg_asyncmap && go->asyncmap != 0xFFFFFFFFl,			go->asyncmap);	ACKCICHAP(CI_AUTHTYPE, go->neg_chap, PPP_CHAP, go->chap_mdtype);	ACKCISHORT(CI_AUTHTYPE, !go->neg_chap && go->neg_upap, PPP_PAP);	ACKCILQR(CI_QUALITY, go->neg_lqr, go->lqr_period);	ACKCICHAR(CI_CALLBACK, go->neg_cbcp, CBCP_OPT);	ACKCILONG(CI_MAGICNUMBER, go->neg_magicnumber, go->magicnumber);	ACKCIVOID(CI_PCOMPRESSION, go->neg_pcompression);	ACKCIVOID(CI_ACCOMPRESSION, go->neg_accompression);		/*	 * If there are any remaining CIs, then this packet is bad.	 */	if (len != 0)		goto bad;	LCPDEBUG((LOG_INFO, "lcp_acki: Ack\n"));	return (1);bad:	LCPDEBUG((LOG_WARNING, "lcp_acki: received bad Ack!\n"));	return (0);}/* * lcp_nakci - Peer has sent a NAK for some of our CIs. * This should not modify any state if the Nak is bad * or if LCP is in the OPENED state. * * Returns: *	0 - Nak was bad. *	1 - Nak was good. */static int lcp_nakci(fsm *f, u_char *p, int len){	lcp_options *go = &lcp_gotoptions[f->unit];	lcp_options *wo = &lcp_wantoptions[f->unit];	u_char citype, cichar, *next;	u_short cishort;	u32_t cilong;	lcp_options no;		/* options we've seen Naks for */	lcp_options try;		/* options to request next time */	int looped_back = 0;	int cilen;		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 NAKCIVOID(opt, neg, code) \	if (go->neg && \			len >= CILEN_VOID && \			p[1] == CILEN_VOID && \			p[0] == opt) { \		len -= CILEN_VOID; \		INCPTR(CILEN_VOID, p); \		no.neg = 1; \		code \	}#define NAKCICHAP(opt, neg, code) \	if (go->neg && \			len >= CILEN_CHAP && \			p[1] == CILEN_CHAP && \			p[0] == opt) { \		len -= CILEN_CHAP; \		INCPTR(2, p); \		GETSHORT(cishort, p); \		GETCHAR(cichar, p); \		no.neg = 1; \		code \	}#define NAKCICHAR(opt, neg, code) \	if (go->neg && \			len >= CILEN_CHAR && \			p[1] == CILEN_CHAR && \			p[0] == opt) { \		len -= CILEN_CHAR; \		INCPTR(2, p); \		GETCHAR(cichar, p); \		no.neg = 1; \		code \	}#define NAKCISHORT(opt, neg, code) \	if (go->neg && \			len >= CILEN_SHORT && \			p[1] == CILEN_SHORT && \			p[0] == opt) { \		len -= CILEN_SHORT; \		INCPTR(2, p); \		GETSHORT(cishort, p); \		no.neg = 1; \		code \	}#define NAKCILONG(opt, neg, code) \	if (go->neg && \			len >= CILEN_LONG && \			p[1] == CILEN_LONG && \			p[0] == opt) { \		len -= CILEN_LONG; \		INCPTR(2, p); \		GETLONG(cilong, p); \		no.neg = 1; \		code \	}#define NAKCILQR(opt, neg, code) \	if (go->neg && \			len >= CILEN_LQR && \			p[1] == CILEN_LQR && \			p[0] == opt) { \		len -= CILEN_LQR; \		INCPTR(2, p); \		GETSHORT(cishort, p); \		GETLONG(cilong, p); \		no.neg = 1; \		code \	}		/*	* We don't care if they want to send us smaller packets than	* we want.  Therefore, accept any MRU less than what we asked for,	* but then ignore the new value when setting the MRU in the kernel.	* If they send us a bigger MRU than what we asked, accept it, up to	* the limit of the default MRU we'd get if we didn't negotiate.	*/	if (go->neg_mru && go->mru != PPP_DEFMRU) {		NAKCISHORT(CI_MRU, neg_mru,			if (cishort <= wo->mru || cishort < PPP_DEFMRU)				try.mru = cishort;		);	}		/*	* Add any characters they want to our (receive-side) asyncmap.	*/	if (go->neg_asyncmap && go->asyncmap != 0xFFFFFFFFl) {		NAKCILONG(CI_ASYNCMAP, neg_asyncmap,			try.asyncmap = go->asyncmap | cilong;		);	}		/*	* If they've nak'd our authentication-protocol, check whether	* they are proposing a different protocol, or a different	* hash algorithm for CHAP.	*/	if ((go->neg_chap || go->neg_upap)			&& len >= CILEN_SHORT			&& p[0] == CI_AUTHTYPE && p[1] >= CILEN_SHORT && p[1] <= len) {		cilen = p[1];	len -= cilen;	no.neg_chap = go->neg_chap;	no.neg_upap = go->neg_upap;	INCPTR(2, p);	GETSHORT(cishort, p);	if (cishort == PPP_PAP && cilen == CILEN_SHORT) {		/*		 * If we were asking for CHAP, they obviously don't want to do it.		 * If we weren't asking for CHAP, then we were asking for PAP,		 * in which case this Nak is bad.		 */		if (!go->neg_chap)			goto bad;		try.neg_chap = 0;		} else if (cishort == PPP_CHAP && cilen == CILEN_CHAP) {		GETCHAR(cichar, p);		if (go->neg_chap) {			/*			 * We were asking for CHAP/MD5; they must want a different			 * algorithm.  If they can't do MD5, we'll have to stop			 * asking for CHAP.			 */			if (cichar != go->chap_mdtype)				try.neg_chap = 0;		} else {			/*			 * Stop asking for PAP if we were asking for it.			 */			try.neg_upap = 0;		}		} else {		/*		 * We don't recognize what they're suggesting.		 * Stop asking for what we were asking for.		 */		if (go->neg_chap)			try.neg_chap = 0;		else			try.neg_upap = 0;		p += cilen - CILEN_SHORT;	}	}		/*	* If they can't cope with our link quality protocol, we'll have	* to stop asking for LQR.  We haven't got any other protocol.	* If they Nak the reporting period, take their value XXX ?	*/	NAKCILQR(CI_QUALITY, neg_lqr,		if (cishort != PPP_LQR)			try.neg_lqr = 0;		else			try.lqr_period = cilong;	);		/*	* Only implementing CBCP...not the rest of the callback options	*/	NAKCICHAR(CI_CALLBACK, neg_cbcp,		try.neg_cbcp = 0;	);		/*	* Check for a looped-back line.	*/	NAKCILONG(CI_MAGICNUMBER, neg_magicnumber,		try.magicnumber = magic();		looped_back = 1;	);		/*	* Peer shouldn't send Nak for protocol compression or	* address/control compression requests; they should send	* a Reject instead.  If they send a Nak, treat it as a Reject.	*/	NAKCIVOID(CI_PCOMPRESSION, neg_pcompression,		try.neg_pcompression = 0;	);	NAKCIVOID(CI_ACCOMPRESSION, neg_accompression,		try.neg_accompression = 0;	);		/*	* There may be remaining CIs, if the peer is requesting negotiation	* on an option that we didn't include in our request packet.	* If we see an option that we requested, or one we've already seen	* in this packet, then this packet is bad.	* If we wanted to respond by starting to negotiate on the requested	* option(s), we could, but we don't, because except for the	* authentication type and quality protocol, if we are not negotiating	* an option, it is because we were told not to.	* For the authentication type, the Nak from the peer means	* `let me authenticate myself with you' which is a bit pointless.	* For the quality protocol, the Nak means `ask me to send you quality	* reports', but if we didn't ask for them, we don't want them.	* An option we don't recognize represents the peer asking to	* negotiate some option we don't support, so ignore it.	*/	while (len > CILEN_VOID) {		GETCHAR(citype, p);		GETCHAR(cilen, p);		if (cilen < CILEN_VOID || (len -= cilen) < 0)			goto bad;		next = p + cilen - 2;				switch (citype) {		case CI_MRU:			if ((go->neg_mru && go->mru != PPP_DEFMRU)					|| no.neg_mru || cilen != CILEN_SHORT)				goto bad;			GETSHORT(cishort, p);			if (cishort < PPP_DEFMRU)				try.mru = cishort;			break;		case CI_ASYNCMAP:			if ((go->neg_asyncmap && go->asyncmap != 0xFFFFFFFFl)					|| no.neg_asyncmap || cilen != CILEN_LONG)				goto bad;			break;		case CI_AUTHTYPE:			if (go->neg_chap || no.neg_chap || go->neg_upap || no.neg_upap)				goto bad;			break;		case CI_MAGICNUMBER:			if (go->neg_magicnumber || no.neg_magicnumber ||					cilen != CILEN_LONG)				goto bad;			break;		case CI_PCOMPRESSION:			if (go->neg_pcompression || no.neg_pcompression					|| cilen != CILEN_VOID)				goto bad;			break;		case CI_ACCOMPRESSION:			if (go->neg_accompression || no.neg_accompression					|| cilen != CILEN_VOID)				goto bad;			break;		case CI_QUALITY:			if (go->neg_lqr || no.neg_lqr || cilen != CILEN_LQR)				goto bad;			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) {		if (looped_back) {			if (++try.numloops >= lcp_loopbackfail) {				LCPDEBUG((LOG_NOTICE, "Serial line is looped back.\n"));				lcp_close(f->unit, "Loopback detected");

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人午夜私人影院| 欧美激情一区二区在线| 国产精品国产三级国产| 三级欧美在线一区| 91极品视觉盛宴| 日本一区二区久久| 久久99国内精品| 91色视频在线| 色网站国产精品| 国产精品嫩草影院com| 久久99精品久久久久| 欧美性生活大片视频| 国产欧美精品一区二区色综合 | 国产成都精品91一区二区三| 在线亚洲精品福利网址导航| 国产网站一区二区| 国产尤物一区二区| 精品日韩欧美在线| 久久精品国产一区二区| 欧美一区二区视频网站| 亚洲国产成人av网| 欧美日韩精品专区| 亚洲第一会所有码转帖| 欧美性色黄大片| 亚洲综合色成人| 欧美视频自拍偷拍| 亚洲综合一区在线| 欧美日韩激情一区| 首页国产欧美日韩丝袜| 欧美理论片在线| 免费高清在线视频一区·| 日韩手机在线导航| 久久99在线观看| www国产成人| 国产精品一二一区| 国产精品久久免费看| 不卡的看片网站| 亚洲精品成人少妇| 欧美日韩大陆在线| 毛片av一区二区三区| 精品久久一二三区| 国产精品一区二区不卡| 国产精品福利一区| 欧美性感一类影片在线播放| 天天综合色天天综合| 日韩三级高清在线| 国产suv精品一区二区6| 亚洲三级在线免费| 精品视频1区2区| 国模少妇一区二区三区| 国产精品乱子久久久久| 欧美亚洲国产一区二区三区va| 亚洲丰满少妇videoshd| 欧美不卡激情三级在线观看| 成人国产精品免费| 亚洲一区二区中文在线| 精品日本一线二线三线不卡| 成人一区二区视频| 亚洲午夜精品网| www久久久久| 色综合久久久久| 麻豆成人久久精品二区三区红| 亚洲国产精品高清| 欧美年轻男男videosbes| 久久99精品久久久久久| 亚洲精品日产精品乱码不卡| 日韩欧美综合在线| 日本韩国精品在线| 狠狠色狠狠色综合| 亚洲成人自拍网| 欧美激情中文不卡| 日韩一级大片在线| 91视频在线观看免费| 久久精品国产免费| 亚洲一二三四区不卡| 国产日韩欧美精品在线| 欧美日本不卡视频| 9i在线看片成人免费| 美腿丝袜亚洲色图| 亚洲线精品一区二区三区| 久久精品在这里| 日韩亚洲欧美在线| 在线观看免费亚洲| 丁香天五香天堂综合| 激情综合五月天| 午夜免费久久看| 亚洲精品伦理在线| 国产精品污污网站在线观看| 日韩欧美电影在线| 欧美日韩1区2区| 欧美影片第一页| 91亚洲精华国产精华精华液| 国产精品一级在线| 极品少妇一区二区| 美腿丝袜亚洲综合| 亚洲chinese男男1069| 亚洲狠狠丁香婷婷综合久久久| 久久色.com| 精品日韩一区二区| 精品福利视频一区二区三区| 337p亚洲精品色噜噜狠狠| 在线亚洲免费视频| 欧美在线影院一区二区| 91香蕉视频污在线| 色综合av在线| 欧美亚洲动漫精品| 欧美在线看片a免费观看| 色94色欧美sute亚洲线路一久| 成人免费视频caoporn| 国产91精品一区二区麻豆亚洲| 国产精品中文字幕欧美| 国产成人免费在线| 丁香六月综合激情| 不卡av在线免费观看| 成人av高清在线| 色综合av在线| 欧美欧美欧美欧美| 日韩免费福利电影在线观看| 日韩精品一区国产麻豆| 2023国产精品自拍| 国产丝袜在线精品| 综合激情成人伊人| 亚洲一区二区三区影院| 日本一区中文字幕| 国产又黄又大久久| 不卡av在线网| 欧美性大战xxxxx久久久| 欧美精品一级二级三级| 日韩免费在线观看| 国产色爱av资源综合区| 亚洲视频小说图片| 亚洲电影中文字幕在线观看| 免费欧美在线视频| 成人一级黄色片| 在线欧美小视频| 欧美一级片免费看| 国产欧美日韩另类视频免费观看 | 日韩欧美高清在线| 国产精品婷婷午夜在线观看| 亚洲激情av在线| 久久国产精品72免费观看| 国产九色精品成人porny| 色综合久久久久综合体| 日韩一区和二区| 国产精品视频一二三区| 亚洲无线码一区二区三区| 韩国午夜理伦三级不卡影院| 99久久国产综合精品色伊| 欧美日韩成人综合在线一区二区| 欧美精品一区二区不卡| 亚洲免费在线播放| 九九精品视频在线看| 色综合中文字幕国产 | 91精品在线一区二区| 国产午夜精品美女毛片视频| 亚洲精品你懂的| 国产一区二区视频在线| 欧美日韩一级片在线观看| 久久久亚洲精华液精华液精华液 | 在线观看亚洲a| 久久先锋影音av鲁色资源| 亚洲国产日韩一区二区| 国产激情一区二区三区| 91精品国产综合久久小美女| 综合久久久久久| 国产在线看一区| 91精品国产综合久久精品性色| 中文字幕一区二区三区四区不卡 | 成人免费高清在线观看| 欧美一区二区三区性视频| 日韩理论片中文av| 国产精品一线二线三线精华| 91精品国产品国语在线不卡| 一区二区三区四区蜜桃| 高清国产一区二区| 精品免费视频一区二区| 亚洲大型综合色站| 色综合久久66| 国产精品福利av| 成人的网站免费观看| 国产日产亚洲精品系列| 久久99九九99精品| 欧美丰满嫩嫩电影| 亚洲无人区一区| 欧美系列亚洲系列| 一二三四区精品视频| 色婷婷久久久综合中文字幕| 中文字幕一区二区不卡| 国产91露脸合集magnet| 日本一区免费视频| 国产精品原创巨作av| 国产视频一区二区在线| 国产精品一区二区免费不卡| 久久久综合网站| 精品一区二区久久| 久久亚洲精品国产精品紫薇| 国产一区二区三区精品视频| 26uuu国产电影一区二区| 国产传媒日韩欧美成人| 国产日韩欧美精品一区|