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

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

?? netlcp.c

?? 一個tcp/ip協(xié)議棧,帶有PPP、IP、TCP、UDP等協(xié)議
?? C
?? 第 1 頁 / 共 4 頁
字號:
					cilong == go->magicnumber) {
				cilong = magic();	/* Don't put magic() inside macro! */
				orc = CONFNAK;
				PUTCHAR(CI_MAGICNUMBER, nakp);
				PUTCHAR(CILEN_LONG, nakp);
				PUTLONG(cilong, nakp);
				break;
			}
			ho->neg_magicnumber = 1;
			ho->magicnumber = cilong;
			break;
		
		
		case CI_PCOMPRESSION:
#if TRACELCP > 0
			sprintf(&traceBuf[traceNdx], " PCOMPRESSION");
			traceNdx = strlen(traceBuf);
#endif
			if (!ao->neg_pcompression ||
					cilen != CILEN_VOID) {
				orc = CONFREJ;
				break;
			}
			ho->neg_pcompression = 1;
			break;
		
		case CI_ACCOMPRESSION:
#if TRACELCP > 0
			sprintf(&traceBuf[traceNdx], " ACCOMPRESSION");
			traceNdx = strlen(traceBuf);
#endif
			if (!ao->neg_accompression ||
					cilen != CILEN_VOID) {
				orc = CONFREJ;
				break;
			}
			ho->neg_accompression = 1;
			break;
		
		default:
#if TRACELCP
			sprintf(&traceBuf[traceNdx], " unknown %d", citype);
			traceNdx = strlen(traceBuf);
#endif
			orc = CONFREJ;
			break;
		}
		
	endswitch:
#if TRACELCP
		if (traceNdx >= 80 - 32) {
			LCPDEBUG((LOG_INFO, "lcp_reqci: rcvd%s", traceBuf));
			traceNdx = 0;
		}
#endif
		if (orc == CONFACK &&		/* Good CI */
				rc != CONFACK)		/*  but prior CI wasnt? */
			continue;			/* Don't send this one */
		
		if (orc == CONFNAK) {		/* Nak this CI? */
			if (reject_if_disagree	/* Getting fed up with sending NAKs? */
					&& citype != CI_MAGICNUMBER) {
				orc = CONFREJ;		/* Get tough if so */
			} 
			else {
				if (rc == CONFREJ)	/* Rejecting prior CI? */
					continue;		/* Don't send this one */
				rc = CONFNAK;
			}
		}
		if (orc == CONFREJ) {		/* Reject this CI */
			rc = CONFREJ;
			if (cip != rejp)		/* Need to move rejected CI? */
				BCOPY(cip, rejp, cilen); /* Move it */
			INCPTR(cilen, rejp);	/* Update output pointer */
		}
	}
	
	/*
	 * If we wanted to send additional NAKs (for unsent CIs), the
	 * code would go here.  The extra NAKs would go at *nakp.
	 * At present there are no cases where we want to ask the
	 * peer to negotiate an option.
	 */
	
	switch (rc) {
	case CONFACK:
		*lenp = (int)(next - inp);
		break;
	case CONFNAK:
		/*
		 * Copy the Nak'd options from the nak_buffer to the caller's buffer.
		 */
		*lenp = (int)(nakp - nak_buffer);
		BCOPY(nak_buffer, inp, *lenp);
		break;
	case CONFREJ:
		*lenp = (int)(rejp - inp);
		break;
	}
	
#if TRACELCP > 0
	if (traceNdx > 0) {
		LCPDEBUG((LOG_INFO, "lcp_reqci: %s", traceBuf));
	}
#endif
	LCPDEBUG((LOG_INFO, "lcp_reqci: returning CONF%s.", CODENAME(rc)));
	return (rc);			/* Return final code */
}


/*
 * lcp_up - LCP has come UP.
 */
static void lcp_up(fsm *f)
{
	lcp_options *wo = &lcp_wantoptions[f->unit];
	lcp_options *ho = &lcp_hisoptions[f->unit];
	lcp_options *go = &lcp_gotoptions[f->unit];
	lcp_options *ao = &lcp_allowoptions[f->unit];
	
	if (!go->neg_magicnumber)
		go->magicnumber = 0;
	if (!ho->neg_magicnumber)
		ho->magicnumber = 0;
	
	/*
	* Set our MTU to the smaller of the MTU we wanted and
	* the MRU our peer wanted.  If we negotiated an MRU,
	* set our MRU to the larger of value we wanted and
	* the value we got in the negotiation.
	*/
	ppp_send_config(f->unit, MIN(ao->mru, (ho->neg_mru? ho->mru: PPP_MRU)),
				(ho->neg_asyncmap? ho->asyncmap: 0xffffffffl),
				ho->neg_pcompression, ho->neg_accompression);
	/*
	* If the asyncmap hasn't been negotiated, we really should
	* set the receive asyncmap to ffffffff, but we set it to 0
	* for backwards contemptibility.
	*/
	ppp_recv_config(f->unit, (go->neg_mru? MAX(wo->mru, go->mru): PPP_MRU),
				(go->neg_asyncmap? go->asyncmap: 0x00000000),
				go->neg_pcompression, go->neg_accompression);
	
	if (ho->neg_mru)
		peer_mru[f->unit] = ho->mru;
	
	lcp_echo_lowerup(f->unit);  /* Enable echo messages */
	
	link_established(f->unit);
}


/*
 * lcp_down - LCP has gone DOWN.
 *
 * Alert other protocols.
 */
static void lcp_down(fsm *f)
{
	lcp_options *go = &lcp_gotoptions[f->unit];
	
	lcp_echo_lowerdown(f->unit);
	
	link_down(f->unit);
	
	ppp_send_config(f->unit, PPP_MRU, 0xffffffffl, 0, 0);
	ppp_recv_config(f->unit, PPP_MRU,
				(go->neg_asyncmap? go->asyncmap: 0x00000000),
				go->neg_pcompression, go->neg_accompression);
	peer_mru[f->unit] = PPP_MRU;
}


/*
 * lcp_starting - LCP needs the lower layer up.
 */
static void lcp_starting(fsm *f)
{
	link_required(f->unit);
}


/*
 * lcp_finished - LCP has finished with the lower layer.
 */
static void lcp_finished(fsm *f)
{
	link_terminated(f->unit);
}


static int lcp_printpkt(
	u_char *p,
	int plen,
	void (*printer) __P((void *, char *, ...)),
	void *arg
)
{
	int code, id, len, olen;
	u_char *pstart, *optend;
	u_short cishort;
	u_int32_t cilong;
	
	if (plen < HEADERLEN)
		return 0;
	pstart = p;
	GETCHAR(code, p);
	GETCHAR(id, p);
	GETSHORT(len, p);
	if (len < HEADERLEN || len > plen)
		return 0;
	
	if (code >= 1 && code <= sizeof(lcp_codenames) / sizeof(char *))
		printer(arg, " %s", lcp_codenames[code-1]);
	else
		printer(arg, " code=0x%x", code);
	printer(arg, " id=0x%x", id);
	len -= HEADERLEN;
	switch (code) {
	case CONFREQ:
	case CONFACK:
	case CONFNAK:
	case CONFREJ:
		/* print option list */
		while (len >= 2) {
			GETCHAR(code, p);
			GETCHAR(olen, p);
			p -= 2;
			if (olen < 2 || olen > len) {
				break;
			}
			printer(arg, " <");
			len -= olen;
			optend = p + olen;
			switch (code) {
			case CI_MRU:
				if (olen == CILEN_SHORT) {
					p += 2;
					GETSHORT(cishort, p);
					printer(arg, "mru %d", cishort);
				}
				break;
			case CI_ASYNCMAP:
				if (olen == CILEN_LONG) {
					p += 2;
					GETLONG(cilong, p);
					printer(arg, "asyncmap 0x%lx", cilong);
				}
				break;
			case CI_AUTHTYPE:
				if (olen >= CILEN_SHORT) {
					p += 2;
					printer(arg, "auth ");
					GETSHORT(cishort, p);
					switch (cishort) {
					case PPP_PAP:
						printer(arg, "pap");
						break;
					case PPP_CHAP:
						printer(arg, "chap");
						break;
					default:
						printer(arg, "0x%x", cishort);
					}
				}
				break;
			case CI_QUALITY:
				if (olen >= CILEN_SHORT) {
					p += 2;
					printer(arg, "quality ");
					GETSHORT(cishort, p);
					switch (cishort) {
					case PPP_LQR:
						printer(arg, "lqr");
						break;
					default:
						printer(arg, "0x%x", cishort);
					}
				}
				break;
			case CI_CALLBACK:
				if (olen >= CILEN_CHAR) {
					p += 2;
					printer(arg, "callback ");
					GETSHORT(cishort, p);
					switch (cishort) {
					case CBCP_OPT:
						printer(arg, "CBCP");
						break;
					default:
						printer(arg, "0x%x", cishort);
					}
				}
				break;
			case CI_MAGICNUMBER:
				if (olen == CILEN_LONG) {
					p += 2;
					GETLONG(cilong, p);
					printer(arg, "magic 0x%x", cilong);
				}
				break;
			case CI_PCOMPRESSION:
				if (olen == CILEN_VOID) {
					p += 2;
					printer(arg, "pcomp");
				}
				break;
			case CI_ACCOMPRESSION:
				if (olen == CILEN_VOID) {
					p += 2;
					printer(arg, "accomp");
				}
				break;
			}
			while (p < optend) {
				GETCHAR(code, p);
				printer(arg, " %.2x", code);
			}
			printer(arg, ">");
		}
		break;
	
	case TERMACK:
	case TERMREQ:
		if (len > 0 && *p >= ' ' && *p < 0x7f) {
			printer(arg, " ");
			print_string(p, len, printer, arg);
			p += len;
			len = 0;
		}
		break;
	
	case ECHOREQ:
	case ECHOREP:
	case DISCREQ:
		if (len >= 4) {
			GETLONG(cilong, p);
			printer(arg, " magic=0x%x", cilong);
			p += 4;
			len -= 4;
		}
		break;
	}
	
	/* print the rest of the bytes in the packet */
	for (; len > 0; --len) {
		GETCHAR(code, p);
		printer(arg, " %.2x", code);
	}
	
	return (int)(p - pstart);
}

/*
 * Time to shut down the link because there is nothing out there.
 */

static void LcpLinkFailure (fsm *f)
{
	if (f->state == OPENED) {
		LCPDEBUG((LOG_INFO, "No response to %d echo-requests", lcp_echos_pending));
		LCPDEBUG((LOG_NOTICE, "Serial link appears to be disconnected."));
		lcp_close(f->unit, "Peer not responding");
	}
}

/*
 * Timer expired for the LCP echo requests from this process.
 */

static void LcpEchoCheck (fsm *f)
{
	LcpSendEchoRequest (f);
	
	/*
	 * Start the timer for the next interval.
	 */
	if (lcp_echo_timer_running != 0)
		panic("LcpEchoCheck");
	TIMEOUT (LcpEchoTimeout, f, lcp_echo_interval);
	lcp_echo_timer_running = 1;
}

/*
 * LcpEchoTimeout - Timer expired on the LCP echo
 */

static void LcpEchoTimeout (void *arg)
{
	if (lcp_echo_timer_running != 0) {
		lcp_echo_timer_running = 0;
		LcpEchoCheck ((fsm *) arg);
	}
}

/*
 * LcpEchoReply - LCP has received a reply to the echo
 */
#pragma argsused		/* Arg id not used. */
static void lcp_received_echo_reply (fsm *f, int id, u_char *inp, int len)
{
	u_int32_t magic;
	
	/* Check the magic number - don't count replies from ourselves. */
	if (len < 4) {
		LCPDEBUG((LOG_WARNING, "lcp: received short Echo-Reply, length %d", len));
		return;
	}
	GETLONG(magic, inp);
	if (lcp_gotoptions[f->unit].neg_magicnumber
			&& magic == lcp_gotoptions[f->unit].magicnumber) {
		LCPDEBUG((LOG_WARNING, "appear to have received our own echo-reply!"));
		return;
	}
	
	/* Reset the number of outstanding echo frames */
	lcp_echos_pending = 0;
}

/*
 * LcpSendEchoRequest - Send an echo request frame to the peer
 */

static void LcpSendEchoRequest (fsm *f)
{
	u_int32_t lcp_magic;
	u_char pkt[4], *pktp;
	
	/*
	* Detect the failure of the peer at this point.
	*/
	if (lcp_echo_fails != 0) {
		if (lcp_echos_pending++ >= lcp_echo_fails) {
			LcpLinkFailure(f);
			lcp_echos_pending = 0;
		}
	}
	
	/*
	* Make and send the echo request frame.
	*/
	if (f->state == OPENED) {
		lcp_magic = lcp_gotoptions[f->unit].magicnumber;
		pktp = pkt;
		PUTLONG(lcp_magic, pktp);
		fsm_sdata(f, ECHOREQ, (u_char)(lcp_echo_number++ & 0xFF), pkt, (int)(pktp - pkt));
	}
}

/*
 * lcp_echo_lowerup - Start the timer for the LCP frame
 */

static void lcp_echo_lowerup (int unit)
{
	fsm *f = &lcp_fsm[unit];
	
	/* Clear the parameters for generating echo frames */
	lcp_echos_pending      = 0;
	lcp_echo_number        = 0;
	lcp_echo_timer_running = 0;
	
	/* If a timeout interval is specified then start the timer */
	if (lcp_echo_interval != 0)
		LcpEchoCheck (f);
}

/*
 * lcp_echo_lowerdown - Stop the timer for the LCP frame
 */

static void lcp_echo_lowerdown (int unit)
{
	fsm *f = &lcp_fsm[unit];
	
	if (lcp_echo_timer_running != 0) {
		UNTIMEOUT (LcpEchoTimeout, f);
		lcp_echo_timer_running = 0;
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
av电影天堂一区二区在线| 在线观看中文字幕不卡| 舔着乳尖日韩一区| 亚洲成av人影院| 日本三级韩国三级欧美三级| 亚洲一级二级在线| 国产精品理论片| 一二三四区精品视频| 免费的成人av| 国产综合色精品一区二区三区| 蓝色福利精品导航| 国产精品一区二区久久精品爱涩| 国产伦精品一区二区三区视频青涩| 另类专区欧美蜜桃臀第一页| 不卡的av网站| 在线视频一区二区免费| 久久亚区不卡日本| 亚洲精品视频观看| 久久国产欧美日韩精品| 日本精品视频一区二区三区| 欧美一区二区三区在| 中文字幕永久在线不卡| 一区二区三区不卡视频在线观看 | 精品亚洲porn| 色拍拍在线精品视频8848| 欧美日韩国产中文| 亚洲猫色日本管| 美女性感视频久久| 欧美日韩三级视频| 国产精品久久久久久久午夜片| 日本成人中文字幕在线视频| 99精品视频在线观看免费| 777午夜精品免费视频| 艳妇臀荡乳欲伦亚洲一区| 亚洲亚洲精品在线观看| 免费黄网站欧美| 欧美日韩电影在线播放| 亚洲一区二区三区自拍| 91免费视频观看| 综合久久给合久久狠狠狠97色 | 欧洲av一区二区嗯嗯嗯啊| 国产精品久久久久一区| 不卡视频免费播放| 国产精品天美传媒沈樵| 成人高清免费在线播放| 亚洲欧洲精品一区二区三区| av电影在线不卡| 午夜视频在线观看一区二区三区| 97久久精品人人澡人人爽| 亚洲精品五月天| 欧美剧情片在线观看| 青青草91视频| 国产三级精品三级| 色哟哟一区二区| 美女一区二区久久| 欧美激情一区二区三区在线| 毛片av中文字幕一区二区| 日韩免费观看高清完整版在线观看| 日本成人中文字幕| 精品国产自在久精品国产| 国产精品一二三区在线| 丝袜美腿高跟呻吟高潮一区| 欧美成人aa大片| 色综合久久久网| 国产91丝袜在线观看| 婷婷综合另类小说色区| 中文无字幕一区二区三区| 99国产麻豆精品| 国产精品资源在线看| 综合精品久久久| 久久色成人在线| av亚洲精华国产精华精华| 日韩情涩欧美日韩视频| 91女人视频在线观看| 极品美女销魂一区二区三区| 一区在线播放视频| 久久久久国色av免费看影院| 91精品国产综合久久香蕉麻豆| av综合在线播放| 国产成人aaa| 国产成人精品免费一区二区| 亚洲一区二区在线免费观看视频| 欧美激情一区二区三区蜜桃视频| 日韩视频一区在线观看| 欧美一区二区三区思思人 | 精品免费日韩av| 欧美一区二区黄| 日韩欧美久久久| 精品欧美久久久| 久久久另类综合| 欧美国产日韩在线观看| 亚洲国产精华液网站w| 国产精品国产三级国产aⅴ无密码| 精品日韩欧美在线| 国产精品毛片高清在线完整版| 中文乱码免费一区二区| 亚洲欧美日韩国产成人精品影院| 亚洲精品免费电影| 天堂久久一区二区三区| 国内一区二区视频| 91在线码无精品| 91精品婷婷国产综合久久| 精品久久久久久久久久久久包黑料| 精品国产91洋老外米糕| 中文字幕在线不卡国产视频| 亚洲国产中文字幕在线视频综合 | 欧美日韩国产大片| 久久综合狠狠综合久久激情 | www.欧美日韩国产在线| 555www色欧美视频| 欧美色综合天天久久综合精品| 成人免费看视频| 6080国产精品一区二区| 国产日韩精品视频一区| 午夜精品在线视频一区| 国产91精品一区二区麻豆网站| 一本色道久久加勒比精品| 欧美一级精品在线| 亚洲免费在线观看视频| 国产成人8x视频一区二区| 欧美一区二区三区视频| 亚洲精选在线视频| a级高清视频欧美日韩| 国产午夜精品一区二区三区四区| 日本不卡视频一二三区| 在线亚洲精品福利网址导航| 久久久久国产精品厨房| 久久精品国产一区二区| 日韩亚洲电影在线| 日韩av一区二区三区四区| 欧美亚洲一区三区| 亚洲444eee在线观看| 在线观看亚洲精品视频| 亚洲综合色区另类av| 欧美三片在线视频观看| 天天av天天翘天天综合网色鬼国产| 日本电影亚洲天堂一区| 亚洲精品高清在线观看| 91久久国产最好的精华液| 一二三四社区欧美黄| 欧美日韩精品三区| 蜜乳av一区二区| 国产三级精品三级在线专区| 成人一级视频在线观看| 亚洲精品免费在线播放| 欧美日韩一区三区四区| 日韩国产成人精品| 国产清纯白嫩初高生在线观看91| 国产精品综合二区| 亚洲综合一区在线| 日韩一级免费观看| 91啪亚洲精品| 国产精一区二区三区| 亚洲免费观看高清完整版在线观看| 欧美日韩国产片| 成人激情免费视频| 蜜桃av噜噜一区| 久久久久88色偷偷免费| 亚洲高清免费在线| 精品国产99国产精品| 在线观看日韩电影| gogo大胆日本视频一区| 日本美女一区二区三区视频| 日韩伦理免费电影| 亚洲精品一区二区三区影院| 欧美在线999| 色噜噜狠狠色综合中国| 国产在线视频精品一区| 日韩专区欧美专区| 一二三四社区欧美黄| 综合网在线视频| 国产精品萝li| 最新国产精品久久精品| 精品欧美乱码久久久久久| 欧美一级在线免费| 欧美久久久久久久久中文字幕| 91久久精品一区二区三区| 不卡一区二区在线| 色综合久久久久久久久| 91视频你懂的| 色欲综合视频天天天| 欧美视频你懂的| 8v天堂国产在线一区二区| 日韩一级完整毛片| 国产日韩在线不卡| 一区二区三区在线观看欧美| 一区二区三区精品视频| 天天免费综合色| 黄色资源网久久资源365| 国产精品一区二区果冻传媒| 国产精一品亚洲二区在线视频| www.日韩大片| 欧美一级片在线观看| 日韩三级视频在线看| 国产精品卡一卡二卡三| 丝袜亚洲另类丝袜在线| 不卡一区二区中文字幕| 91精品国产乱| 国产精品久久久久久一区二区三区 | 欧美日韩一卡二卡三卡|