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

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

?? lcp.c

?? lwip在ucos上的移植
?? C
?? 第 1 頁 / 共 4 頁
字號:
		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");			}		} 		else

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
青青青伊人色综合久久| 在线观看区一区二| 欧美日韩在线播| 亚洲人午夜精品天堂一二香蕉| 亚洲综合精品自拍| 国产1区2区3区精品美女| 欧美精品久久久久久久久老牛影院| 国产日产欧产精品推荐色 | 日韩成人一区二区| www.亚洲精品| 国产欧美精品一区aⅴ影院| 日韩精品午夜视频| 欧美制服丝袜第一页| 国产精品三级电影| 国产999精品久久久久久绿帽| 日韩精品专区在线| 亚洲v日本v欧美v久久精品| 91视频一区二区| 国产精品网站在线观看| 国产老妇另类xxxxx| 精品欧美一区二区在线观看| 亚洲成va人在线观看| 欧美中文字幕亚洲一区二区va在线 | 亚洲人吸女人奶水| 国产成人av影院| 亚洲精品在线三区| 国内成+人亚洲+欧美+综合在线| 91.麻豆视频| 日韩一区精品字幕| 欧美一级高清大全免费观看| 亚洲国产精品视频| 欧美美女网站色| 日韩国产欧美在线播放| 777欧美精品| 蜜臀av一区二区| 精品久久五月天| 国产一区二区三区不卡在线观看 | 欧美在线观看18| 亚洲一区av在线| 欧美日韩精品电影| 首页国产欧美日韩丝袜| 欧美高清一级片在线| 日韩中文字幕一区二区三区| 67194成人在线观看| 日韩av在线发布| 26uuu久久天堂性欧美| 国产成人亚洲综合a∨婷婷 | 国产乱码精品1区2区3区| 亚洲精品一区二区三区99| 久久av中文字幕片| 久久久精品2019中文字幕之3| 国产精品综合视频| 中文字幕一区二区三区av| 91在线国产观看| 香蕉久久夜色精品国产使用方法| 欧美一区二区三级| 国产一区福利在线| 亚洲视频一二三区| 欧美日韩国产电影| 精品系列免费在线观看| 国产精品夫妻自拍| 777亚洲妇女| 高清在线观看日韩| 亚洲一区二区三区小说| 精品国产乱码久久久久久图片| 粉嫩一区二区三区性色av| 依依成人精品视频| 精品日韩一区二区三区免费视频| 成人一区二区三区视频在线观看| 亚洲同性同志一二三专区| 91精品国产入口在线| 国产麻豆91精品| 午夜免费欧美电影| 中文字幕av一区二区三区高| 欧美美女视频在线观看| 成人app在线| 免费av成人在线| 亚洲日本欧美天堂| 久久综合狠狠综合久久综合88 | 国产精品精品国产色婷婷| 欧美电影影音先锋| 9色porny自拍视频一区二区| 日本三级亚洲精品| 亚洲欧美日韩中文字幕一区二区三区| 日韩一区二区三区电影在线观看| 99久久免费视频.com| 美女在线视频一区| 亚洲妇女屁股眼交7| 中文字幕一区二区三区在线不卡| 日韩精品最新网址| 9191成人精品久久| 欧美性视频一区二区三区| 国产精品 欧美精品| 日本在线不卡一区| 亚洲国产日日夜夜| 亚洲精品国产第一综合99久久| 久久影院午夜片一区| 欧美精品国产精品| 欧美最猛性xxxxx直播| va亚洲va日韩不卡在线观看| 久久国产精品第一页| 日本va欧美va欧美va精品| 亚洲成a人v欧美综合天堂下载| 国产精品免费观看视频| 久久久青草青青国产亚洲免观| 欧美日韩成人激情| 欧美疯狂做受xxxx富婆| 欧美亚洲另类激情小说| 色诱视频网站一区| 日本韩国精品在线| 91久久久免费一区二区| 一本久道久久综合中文字幕| 成人av在线资源网| 99久久99久久久精品齐齐| 国产mv日韩mv欧美| 风间由美中文字幕在线看视频国产欧美| 久久99国产精品久久99果冻传媒| 天堂一区二区在线| 日产欧产美韩系列久久99| 美女一区二区视频| 国内久久婷婷综合| 成人精品免费网站| 99视频精品免费视频| av电影在线观看完整版一区二区| 成人97人人超碰人人99| av成人免费在线观看| aaa亚洲精品| 欧美三电影在线| 日韩一区二区在线观看视频播放| 日韩亚洲欧美在线观看| 欧美mv日韩mv国产网站| 国产视频一区二区三区在线观看 | 成人一区二区在线观看| 99久久精品国产网站| 一本一道综合狠狠老| 欧美乱熟臀69xxxxxx| 日韩三级在线观看| 中文字幕国产一区二区| 亚洲综合色噜噜狠狠| 老司机精品视频导航| 成人一区二区三区中文字幕| 91免费看视频| 欧美一区二区视频网站| 久久久久久9999| 亚洲精品欧美激情| 另类的小说在线视频另类成人小视频在线| 国产综合色产在线精品| 一道本成人在线| 精品国产一区a| 一区二区三区欧美亚洲| 久久成人18免费观看| 92精品国产成人观看免费| 制服丝袜激情欧洲亚洲| 国产欧美日韩另类一区| 亚洲国产精品人人做人人爽| 国产一区二区在线免费观看| 日本韩国欧美三级| 久久久精品tv| 日日噜噜夜夜狠狠视频欧美人 | 国产视频一区二区在线| 一区二区国产盗摄色噜噜| 国产自产视频一区二区三区| 色哟哟欧美精品| 久久综合色一综合色88| 亚洲综合无码一区二区| 国产精品中文欧美| 欧美久久久久中文字幕| 国产精品美日韩| 久久99精品国产91久久来源| 日本韩国视频一区二区| 久久九九国产精品| 另类中文字幕网| 欧美少妇bbb| 亚洲日本成人在线观看| 国产二区国产一区在线观看 | 色老汉av一区二区三区| 久久久久久久久99精品| 一区二区三区欧美| 成人免费视频app| 精品免费国产二区三区| 五月天激情小说综合| 在线亚洲高清视频| 最新国产成人在线观看| 国产精品996| 精品电影一区二区三区 | 国产福利一区在线| 欧美tickling挠脚心丨vk| 天天色综合天天| 欧美日韩三级视频| 亚洲一区二区五区| 91丨porny丨蝌蚪视频| 国产精品美女久久久久久久网站| 国产一区二区不卡在线| 精品免费国产二区三区| 另类小说一区二区三区| 欧美一区二区在线免费播放| 日韩电影在线一区二区三区| 911精品产国品一二三产区| 日韩中文字幕一区二区三区| 欧美放荡的少妇|