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

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

?? lcp.c

?? “華為模塊(GTM900)+ ARM(LPC2104) + LWIP1.1”以PPP 方式實現(xiàn)GPRS 無線數(shù)據(jù)傳輸
?? C
?? 第 1 頁 / 共 4 頁
字號:
#define LENCISHORT(neg)	((neg) ? CILEN_SHORT : 0)#define LENCILONG(neg)	((neg) ? CILEN_LONG : 0)#define LENCILQR(neg)	((neg) ? CILEN_LQR: 0)#define LENCICBCP(neg)	((neg) ? CILEN_CBCP: 0)	/*	* NB: we only ask for one of CHAP and UPAP, even if we will	* accept either.	*/	return (LENCISHORT(go->neg_mru && go->mru != PPP_DEFMRU) +	       //(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);	//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) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
秋霞电影一区二区| 精品日韩99亚洲| 色综合天天在线| 99久久精品国产观看| 国产aⅴ综合色| 成人激情黄色小说| 91论坛在线播放| 日本韩国一区二区三区视频| 色嗨嗨av一区二区三区| 欧洲中文字幕精品| 欧美日产在线观看| 欧美电影影音先锋| 日韩美女视频在线| 久久久综合九色合综国产精品| 久久亚洲精品国产精品紫薇| 久久精品男人天堂av| 国产精品国产三级国产a| 中文字幕亚洲综合久久菠萝蜜| 成人免费在线观看入口| 亚洲午夜精品在线| 老司机一区二区| 国产麻豆成人精品| 色综合久久久久网| 欧美美女直播网站| 精品国产乱码久久久久久牛牛| 久久久亚洲高清| 亚洲三级在线免费观看| 午夜不卡av在线| 久久 天天综合| www..com久久爱| 911国产精品| 国产农村妇女精品| 亚洲成人免费av| 国产一区欧美日韩| 91免费精品国自产拍在线不卡| 欧美三级在线看| 久久久精品蜜桃| 一区二区三区在线看| 日韩成人午夜精品| 丁香桃色午夜亚洲一区二区三区| 91久久国产综合久久| 日韩欧美一区二区视频| 国产精品毛片高清在线完整版| 亚洲福利视频导航| 国产精品性做久久久久久| 欧洲另类一二三四区| 精品国产免费人成在线观看| 亚洲欧美区自拍先锋| 卡一卡二国产精品 | 丁香亚洲综合激情啪啪综合| 91福利在线免费观看| 精品国产伦一区二区三区观看方式 | 国产一区二区美女诱惑| 91久久线看在观草草青青| 日韩欧美国产综合在线一区二区三区| 国产精品麻豆99久久久久久| 日韩精品电影一区亚洲| 丰满白嫩尤物一区二区| 欧美精品久久99久久在免费线 | 日韩美女一区二区三区四区| 亚洲天堂成人网| 久久精品国产精品亚洲精品| 色老汉一区二区三区| 国产色产综合色产在线视频| 日韩专区一卡二卡| 在线一区二区三区做爰视频网站| 国产三区在线成人av| 美女久久久精品| 欧美精品免费视频| 一区二区三区在线观看视频| 国产福利一区二区| 欧美电影免费观看高清完整版| 亚洲男帅同性gay1069| 国产日韩欧美高清| 另类小说图片综合网| 91香蕉视频mp4| 久久精品视频一区| 卡一卡二国产精品| 欧美伊人久久大香线蕉综合69| 捆绑调教美女网站视频一区| 色婷婷精品大在线视频| 中文字幕欧美三区| 国产毛片精品视频| 欧美成人福利视频| 男女激情视频一区| 欧美女孩性生活视频| 亚洲黄一区二区三区| 成人激情午夜影院| 国产欧美精品一区| 国产成人欧美日韩在线电影| 精品国产伦一区二区三区观看方式| 日韩综合一区二区| 欧美欧美欧美欧美| 日韩激情一二三区| 欧美高清激情brazzers| 亚洲第一狼人社区| 在线播放一区二区三区| 爽好久久久欧美精品| 欧美一区二区久久| 久久电影国产免费久久电影| 欧美va亚洲va| 国产一区二区三区在线看麻豆| 精品卡一卡二卡三卡四在线| 精品一区二区三区日韩| 久久这里只精品最新地址| 国产一区二区三区不卡在线观看 | 欧美一区二区视频在线观看2022| 亚洲成人自拍网| 欧美日韩你懂得| 日本成人中文字幕在线视频 | 伊人性伊人情综合网| 91国产成人在线| 五月综合激情网| 日韩一卡二卡三卡四卡| 久久www免费人成看片高清| 久久亚区不卡日本| 成人性生交大片| 亚洲免费视频中文字幕| 欧美在线制服丝袜| 日本午夜一本久久久综合| 日韩美一区二区三区| 高清国产一区二区三区| 中文字幕一区二区三区视频 | 国产偷v国产偷v亚洲高清| 成人伦理片在线| 亚洲综合在线视频| 日韩一区二区在线看| 国产大陆精品国产| 亚洲裸体在线观看| 91精品国产色综合久久| 国产乱码精品一区二区三区av| 国产精品久久久久桃色tv| 在线影院国内精品| 久久99精品久久久久婷婷| 国产精品日日摸夜夜摸av| 欧美伊人久久久久久午夜久久久久| 日本va欧美va精品| 国产精品丝袜久久久久久app| 欧洲一区二区三区在线| 精品一区二区综合| 亚洲人成精品久久久久久 | 亚洲资源中文字幕| 日韩女同互慰一区二区| 成人免费视频播放| 日韩和的一区二区| 国产精品网站一区| 欧美群妇大交群中文字幕| 国产成人aaa| 日韩中文字幕麻豆| 国产精品嫩草影院av蜜臀| 欧美精品视频www在线观看| 国产成人精品综合在线观看 | 日韩精品欧美精品| 中文字幕免费观看一区| 4hu四虎永久在线影院成人| 国产精品 日产精品 欧美精品| 亚洲国产精品久久久久婷婷884 | 中文字幕+乱码+中文字幕一区| 精品视频一区二区三区免费| 国产99久久久久久免费看农村| 五月婷婷久久综合| 亚洲欧洲精品天堂一级| 日韩欧美你懂的| 在线观看亚洲a| 高清不卡在线观看| 美女精品一区二区| 夜夜精品视频一区二区| 久久久综合激的五月天| 欧美一区二区二区| 欧美午夜片在线观看| 成人18视频在线播放| 精品一区二区三区免费观看| 亚洲国产sm捆绑调教视频| 国产精品的网站| 久久久一区二区三区| 日韩欧美国产一区二区在线播放| 色婷婷香蕉在线一区二区| 成人国产在线观看| 国产精品一区二区久久精品爱涩| 婷婷激情综合网| 亚洲午夜免费电影| 亚洲激情六月丁香| 最新国产の精品合集bt伙计| 久久久精品免费网站| 精品国产免费人成在线观看| 欧美久久久久久久久中文字幕| 91免费精品国自产拍在线不卡| 成人蜜臀av电影| 国产精品中文有码| 精彩视频一区二区三区 | 欧美精品 日韩| 在线视频亚洲一区| 色婷婷av一区| 色婷婷av一区二区三区软件| 91免费看片在线观看| av在线不卡网| 91亚洲精品久久久蜜桃网站| 成人伦理片在线| eeuss鲁片一区二区三区在线看| 国产成人综合亚洲网站|