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

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

?? ipcp.c

?? lwip在ucos上的移植
?? C
?? 第 1 頁 / 共 3 頁
字號:
				if (!reject_if_disagree) {					DECPTR(sizeof(u32_t), p);					tl = ntohl(wo->hisaddr);					PUTLONG(tl, p);				}			} else if (ciaddr1 == 0 && wo->hisaddr == 0) {				/*				 * If neither we nor he knows his address, reject the option.				 */				orc = CONFREJ;				wo->req_addr = 0;	/* don't NAK with 0.0.0.0 later */				break;			}						/*			 * If he doesn't know our address, or if we both have our address			 * but disagree about it, then NAK it with our idea.			 */			GETLONG(tl, p);		/* Parse desination address (ours) */			ciaddr2 = htonl(tl);			IPCPDEBUG((LOG_INFO, "our addr %s\n", inet_ntoa(ciaddr2)));			if (ciaddr2 != wo->ouraddr) {				if (ciaddr2 == 0 || !wo->accept_local) {					orc = CONFNAK;					if (!reject_if_disagree) {						DECPTR(sizeof(u32_t), p);						tl = ntohl(wo->ouraddr);						PUTLONG(tl, p);					}				} else {					go->ouraddr = ciaddr2;	/* accept peer's idea */				}			}						ho->neg_addr = 1;			ho->old_addrs = 1;			ho->hisaddr = ciaddr1;			ho->ouraddr = ciaddr2;			break;#endif				case CI_ADDR:			if (!ao->neg_addr) {				IPCPDEBUG((LOG_INFO, "ipcp_reqci: Reject ADDR not allowed\n"));				orc = CONFREJ;				/* Reject CI */				break;			} else if (cilen != CILEN_ADDR) {	/* Check CI length */				IPCPDEBUG((LOG_INFO, "ipcp_reqci: Reject ADDR bad len\n"));				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);			if (ciaddr1 != wo->hisaddr					&& (ciaddr1 == 0 || !wo->accept_remote)) {				orc = CONFNAK;				if (!reject_if_disagree) {					DECPTR(sizeof(u32_t), p);					tl = ntohl(wo->hisaddr);					PUTLONG(tl, p);				}				IPCPDEBUG((LOG_INFO, "ipcp_reqci: Nak ADDR %s\n", inet_ntoa(ciaddr1)));			} else if (ciaddr1 == 0 && wo->hisaddr == 0) {				/*				 * Don't ACK an address of 0.0.0.0 - reject it instead.				 */				IPCPDEBUG((LOG_INFO, "ipcp_reqci: Reject ADDR %s\n", inet_ntoa(ciaddr1)));				orc = CONFREJ;				wo->req_addr = 0;	/* don't NAK with 0.0.0.0 later */				break;			}						ho->neg_addr = 1;			ho->hisaddr = ciaddr1;			IPCPDEBUG((LOG_INFO, "ipcp_reqci: ADDR %s\n", inet_ntoa(ciaddr1)));			break;				case CI_MS_DNS1:		case CI_MS_DNS2:			/* Microsoft primary or secondary DNS request */			d = citype == CI_MS_DNS2;						/* If we do not have a DNS address then we cannot send it */			if (ao->dnsaddr[d] == 0 ||					cilen != CILEN_ADDR) {	/* Check CI length */				IPCPDEBUG((LOG_INFO, "ipcp_reqci: Rejecting DNS%d Request\n", d+1));				orc = CONFREJ;				/* Reject CI */				break;			}			GETLONG(tl, p);			if (htonl(tl) != ao->dnsaddr[d]) {				IPCPDEBUG((LOG_INFO, "ipcp_reqci: Naking DNS%d Request %d\n",							d+1, inet_ntoa(tl)));				DECPTR(sizeof(u32_t), p);				tl = ntohl(ao->dnsaddr[d]);				PUTLONG(tl, p);				orc = CONFNAK;			}			IPCPDEBUG((LOG_INFO, "ipcp_reqci: received DNS%d Request\n", d+1));			break;				case CI_MS_WINS1:		case CI_MS_WINS2:			/* Microsoft primary or secondary WINS request */			d = citype == CI_MS_WINS2;			IPCPDEBUG((LOG_INFO, "ipcp_reqci: received WINS%d Request\n", d+1));						/* If we do not have a DNS address then we cannot send it */			if (ao->winsaddr[d] == 0 ||				cilen != CILEN_ADDR) {	/* Check CI length */				orc = CONFREJ;			/* Reject CI */				break;			}			GETLONG(tl, p);			if (htonl(tl) != ao->winsaddr[d]) {				DECPTR(sizeof(u32_t), p);				tl = ntohl(ao->winsaddr[d]);				PUTLONG(tl, p);				orc = CONFNAK;			}			break;				case CI_COMPRESSTYPE:			if (!ao->neg_vj) {				IPCPDEBUG((LOG_INFO, "ipcp_reqci: Rejecting COMPRESSTYPE not allowed\n"));				orc = CONFREJ;				break;			} else if (cilen != CILEN_VJ && cilen != CILEN_COMPRESS) {				IPCPDEBUG((LOG_INFO, "ipcp_reqci: Rejecting COMPRESSTYPE len=%d\n", cilen));				orc = CONFREJ;				break;			}			GETSHORT(cishort, p);						if (!(cishort == IPCP_VJ_COMP ||					(cishort == IPCP_VJ_COMP_OLD && cilen == CILEN_COMPRESS))) {				IPCPDEBUG((LOG_INFO, "ipcp_reqci: Rejecting COMPRESSTYPE %d\n", cishort));				orc = CONFREJ;				break;			}						ho->neg_vj = 1;			ho->vj_protocol = cishort;			if (cilen == CILEN_VJ) {				GETCHAR(maxslotindex, p);				if (maxslotindex > ao->maxslotindex) { 					IPCPDEBUG((LOG_INFO, "ipcp_reqci: Naking VJ max slot %d\n", maxslotindex));					orc = CONFNAK;					if (!reject_if_disagree){						DECPTR(1, p);						PUTCHAR(ao->maxslotindex, p);					}				}				GETCHAR(cflag, p);				if (cflag && !ao->cflag) {					IPCPDEBUG((LOG_INFO, "ipcp_reqci: Naking VJ cflag %d\n", cflag));					orc = CONFNAK;					if (!reject_if_disagree){						DECPTR(1, p);						PUTCHAR(wo->cflag, p);					}				}				ho->maxslotindex = maxslotindex;				ho->cflag = cflag;			} else {				ho->old_vj = 1;				ho->maxslotindex = MAX_SLOTS - 1;				ho->cflag = 1;			}			IPCPDEBUG((LOG_INFO, 						"ipcp_reqci: received COMPRESSTYPE p=%d old=%d maxslot=%d cflag=%d\n",						ho->vj_protocol, ho->old_vj, ho->maxslotindex, ho->cflag));			break;					default:			IPCPDEBUG((LOG_INFO, "ipcp_reqci: Rejecting unknown CI type %d\n", citype));			orc = CONFREJ;			break;		}		endswitch:		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? */				IPCPDEBUG((LOG_INFO, "ipcp_reqci: Rejecting too many naks\n"));				orc = CONFREJ;		/* Get tough if so */			} else {				if (rc == CONFREJ)	/* Rejecting prior CI? */					continue;		/* Don't send this one */				if (rc == CONFACK) {	/* Ack'd all prior CIs? */					rc = CONFNAK;	/* Not anymore... */					ucp = inp;		/* Backup */				}			}		}				if (orc == CONFREJ &&		/* Reject this CI */				rc != CONFREJ) {	/*  but no prior ones? */			rc = CONFREJ;			ucp = inp;				/* Backup */		}				/* Need to move CI? */		if (ucp != cip)			BCOPY(cip, ucp, cilen);	/* Move it */				/* Update output pointer */		INCPTR(cilen, ucp);	}		/*	 * If we aren't rejecting this packet, and we want to negotiate	 * their address, and they didn't send their address, then we	 * send a NAK with a CI_ADDR option appended.  We assume the	 * input buffer is long enough that we can append the extra	 * option safely.	 */	if (rc != CONFREJ && !ho->neg_addr &&			wo->req_addr && !reject_if_disagree) {		IPCPDEBUG((LOG_INFO, "ipcp_reqci: Requesting peer address\n"));		if (rc == CONFACK) {			rc = CONFNAK;			ucp = inp;				/* reset pointer */			wo->req_addr = 0;		/* don't ask again */		}		PUTCHAR(CI_ADDR, ucp);		PUTCHAR(CILEN_ADDR, ucp);		tl = ntohl(wo->hisaddr);		PUTLONG(tl, ucp);	}		*len = (int)(ucp - inp);		/* Compute output length */	IPCPDEBUG((LOG_INFO, "ipcp_reqci: returning Configure-%s\n", CODENAME(rc)));	return (rc);			/* Return final code */}#if 0/* * ip_check_options - check that any IP-related options are OK, * and assign appropriate defaults. */static void ip_check_options(u_long localAddr){	ipcp_options *wo = &ipcp_wantoptions[0];	/*	 * Load our default IP address but allow the remote host to give us	 * a new address.	 */	if (wo->ouraddr == 0 && !ppp_settings.disable_defaultip) {		wo->accept_local = 1;	/* don't insist on this default value */		wo->ouraddr = htonl(localAddr);	}}#endif/* * ipcp_up - IPCP has come UP. * * Configure the IP network interface appropriately and bring it up. */static void ipcp_up(fsm *f){	u32_t mask;	ipcp_options *ho = &ipcp_hisoptions[f->unit];	ipcp_options *go = &ipcp_gotoptions[f->unit];	ipcp_options *wo = &ipcp_wantoptions[f->unit];		np_up(f->unit, PPP_IP);	IPCPDEBUG((LOG_INFO, "ipcp: up\n"));		/*	 * We must have a non-zero IP address for both ends of the link.	 */	if (!ho->neg_addr)		ho->hisaddr = wo->hisaddr;		if (ho->hisaddr == 0) {		IPCPDEBUG((LOG_ERR, "Could not determine remote IP address\n"));		ipcp_close(f->unit, "Could not determine remote IP address");		return;	}	if (go->ouraddr == 0) {		IPCPDEBUG((LOG_ERR, "Could not determine local IP address\n"));		ipcp_close(f->unit, "Could not determine local IP address");		return;	}		if (ppp_settings.usepeerdns && (go->dnsaddr[0] || go->dnsaddr[1])) {		/*pppGotDNSAddrs(go->dnsaddr[0], go->dnsaddr[1]);*/	}	/*	 * Check that the peer is allowed to use the IP address it wants.	 */	if (!auth_ip_addr(f->unit, ho->hisaddr)) {		IPCPDEBUG((LOG_ERR, "Peer is not authorized to use remote address %s\n",				inet_ntoa(ho->hisaddr)));		ipcp_close(f->unit, "Unauthorized remote IP address");		return;	}		/* set tcp compression */	sifvjcomp(f->unit, ho->neg_vj, ho->cflag, ho->maxslotindex);		/*	 * Set IP addresses and (if specified) netmask.	 */	mask = GetMask(go->ouraddr);		if (!sifaddr(f->unit, go->ouraddr, ho->hisaddr, mask, go->dnsaddr[0], go->dnsaddr[1])) {		IPCPDEBUG((LOG_WARNING, "sifaddr failed\n"));		ipcp_close(f->unit, "Interface configuration failed");		return;	}		/* bring the interface up for IP */	if (!sifup(f->unit)) {		IPCPDEBUG((LOG_WARNING, "sifup failed\n"));		ipcp_close(f->unit, "Interface configuration failed");		return;	}		sifnpmode(f->unit, PPP_IP, NPMODE_PASS);		/* assign a default route through the interface if required */	if (ipcp_wantoptions[f->unit].default_route) 		if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr))			default_route_set[f->unit] = 1;		IPCPDEBUG((LOG_NOTICE, "local  IP address %s\n", inet_ntoa(go->ouraddr)));	IPCPDEBUG((LOG_NOTICE, "remote IP address %s\n", inet_ntoa(ho->hisaddr)));	if (go->dnsaddr[0]) {		IPCPDEBUG((LOG_NOTICE, "primary   DNS address %s\n", inet_ntoa(go->dnsaddr[0])));	}	if (go->dnsaddr[1]) {		IPCPDEBUG((LOG_NOTICE, "secondary DNS address %s\n", inet_ntoa(go->dnsaddr[1])));	}}/* * ipcp_down - IPCP has gone DOWN. * * Take the IP network interface down, clear its addresses * and delete routes through it. */static void ipcp_down(fsm *f){	IPCPDEBUG((LOG_INFO, "ipcp: down\n"));	np_down(f->unit, PPP_IP);	sifvjcomp(f->unit, 0, 0, 0);		sifdown(f->unit);	ipcp_clear_addrs(f->unit);}/* * ipcp_clear_addrs() - clear the interface addresses, routes, etc. */static void ipcp_clear_addrs(int unit){	u32_t ouraddr, hisaddr;		ouraddr = ipcp_gotoptions[unit].ouraddr;	hisaddr = ipcp_hisoptions[unit].hisaddr;	if (default_route_set[unit]) {		cifdefaultroute(unit, ouraddr, hisaddr);		default_route_set[unit] = 0;	}	cifaddr(unit, ouraddr, hisaddr);}/* * ipcp_finished - possibly shut down the lower layers. */static void ipcp_finished(fsm *f){	np_finished(f->unit, PPP_IP);}#if 0static int ipcp_printpkt(	u_char *p,	int plen,	void (*printer) (void *, char *, ...),	void *arg){	(void)p;	(void)plen;	(void)printer;	(void)arg;	return 0;}/* * ip_active_pkt - see if this IP packet is worth bringing the link up for. * We don't bring the link up for IP fragments or for TCP FIN packets * with no data. */#define IP_HDRLEN	20	/* bytes */#define IP_OFFMASK	0x1fff#define IPPROTO_TCP	6#define TCP_HDRLEN	20#define TH_FIN		0x01/* * We use these macros because the IP header may be at an odd address, * and some compilers might use word loads to get th_off or ip_hl. */#define net_short(x)	(((x)[0] << 8) + (x)[1])#define get_iphl(x)	(((unsigned char *)(x))[0] & 0xF)#define get_ipoff(x)	net_short((unsigned char *)(x) + 6)#define get_ipproto(x)	(((unsigned char *)(x))[9])#define get_tcpoff(x)	(((unsigned char *)(x))[12] >> 4)#define get_tcpflags(x)	(((unsigned char *)(x))[13])static int ip_active_pkt(u_char *pkt, int len){	u_char *tcp;	int hlen;		len -= PPP_HDRLEN;	pkt += PPP_HDRLEN;	if (len < IP_HDRLEN)		return 0;	if ((get_ipoff(pkt) & IP_OFFMASK) != 0)		return 0;	if (get_ipproto(pkt) != IPPROTO_TCP)		return 1;	hlen = get_iphl(pkt) * 4;	if (len < hlen + TCP_HDRLEN)		return 0;	tcp = pkt + hlen;	if ((get_tcpflags(tcp) & TH_FIN) != 0 && len == hlen + get_tcpoff(tcp) * 4)		return 0;	return 1;}#endif#endif /* PPP_SUPPORT */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色婷婷狠狠综合| 91在线高清观看| 1区2区3区国产精品| 日韩一区二区免费视频| 成人黄色一级视频| 日本欧美一区二区| 亚洲欧美日韩国产一区二区三区 | 91亚洲国产成人精品一区二区三| 午夜私人影院久久久久| 中文字幕国产一区| 日韩免费视频线观看| 欧美在线观看视频一区二区| 国产成人在线视频网站| 日韩专区欧美专区| 亚洲精品第一国产综合野| 国产日产欧美精品一区二区三区| 欧美一区二区三区免费在线看| 99视频在线观看一区三区| 国内成人精品2018免费看| 天天操天天色综合| 亚洲一区二区三区自拍| 亚洲欧美一区二区三区极速播放 | 欧美精品视频www在线观看| jlzzjlzz亚洲女人18| 裸体歌舞表演一区二区| 日韩高清不卡一区二区三区| 玉米视频成人免费看| 国产精品国产a级| 国产视频一区在线播放| 日韩免费视频一区二区| 日韩欧美一区二区视频| 欧美放荡的少妇| 欧美日韩国产高清一区二区| 在线观看av一区二区| 色一情一乱一乱一91av| 色悠久久久久综合欧美99| 成人动漫中文字幕| 99国产精品久久久久久久久久 | 91官网在线免费观看| av电影一区二区| zzijzzij亚洲日本少妇熟睡| 成人精品一区二区三区四区| 丁香激情综合国产| 97久久超碰国产精品| 色系网站成人免费| 欧美天天综合网| 欧美性猛交xxxxxxxx| 在线91免费看| 日韩精品中文字幕在线一区| 日韩欧美在线观看一区二区三区| 日韩美女视频在线| 亚洲视频网在线直播| 国产精品久久久久久亚洲毛片| 国产精品福利在线播放| 中文字幕在线观看不卡视频| 亚洲日本成人在线观看| 亚洲一区二区在线观看视频| 午夜av一区二区三区| 伦理电影国产精品| 国产v日产∨综合v精品视频| 99精品国产99久久久久久白柏| 欧美亚洲一区二区在线| 91麻豆精品国产91久久久使用方法 | 91社区在线播放| 在线日韩一区二区| 欧美一区二区三区视频免费播放| 精品久久国产97色综合| 国产精品色噜噜| 亚洲二区在线视频| 久久99精品久久久久| www.亚洲色图| 欧美日韩国产综合草草| 精品国产一区久久| 国产精品久久久久久久久久免费看| 亚洲人精品午夜| 天涯成人国产亚洲精品一区av| 国产做a爰片久久毛片| 不卡高清视频专区| 欧美顶级少妇做爰| 国产精品麻豆欧美日韩ww| 婷婷丁香久久五月婷婷| 国产成人精品一区二区三区四区| 91亚洲国产成人精品一区二区三 | 91浏览器入口在线观看| 3d成人动漫网站| 国产精品网站导航| 日韩成人一区二区| www.亚洲激情.com| 欧美大黄免费观看| 一区二区三区在线免费观看| 麻豆精品一区二区综合av| 9久草视频在线视频精品| 这里只有精品视频在线观看| 国产精品三级视频| 美美哒免费高清在线观看视频一区二区 | 国产成人在线视频免费播放| 欧美日韩精品是欧美日韩精品| 国产人妖乱国产精品人妖| 亚洲狠狠爱一区二区三区| 国产精品一品视频| 欧美男同性恋视频网站| 国产亚洲美州欧州综合国| 性做久久久久久免费观看| 国产精品77777竹菊影视小说| 日韩一区二区免费视频| 亚洲线精品一区二区三区| 国产风韵犹存在线视精品| 欧美日韩另类一区| 亚洲一区二区三区四区五区中文| 欧美在线视频不卡| 亚洲成av人片在www色猫咪| 99视频精品免费视频| 国产婷婷色一区二区三区在线| 国产精品99久久久久久宅男| 91亚洲国产成人精品一区二区三| 久久在线免费观看| 奇米影视一区二区三区| 国产精品灌醉下药二区| 欧美三级电影精品| 国产成人精品一区二区三区四区 | 亚洲欧洲无码一区二区三区| 狠狠色丁香九九婷婷综合五月| 欧美亚洲国产bt| 一区二区三区av电影| 日本乱码高清不卡字幕| 亚洲女女做受ⅹxx高潮| 色综合激情久久| 午夜视频在线观看一区二区| 91麻豆精品国产91久久久久| 亚洲影院在线观看| 欧美一区二区三区四区在线观看| 狠狠色2019综合网| 国产精品久久久久影视| 一本色道久久综合精品竹菊| 亚洲小少妇裸体bbw| 日韩欧美亚洲另类制服综合在线| 亚洲电影第三页| 欧美日韩激情一区二区三区| 日本怡春院一区二区| 国产女主播一区| 欧美日韩中字一区| 国产精品一区二区久久不卡 | 亚洲最大的成人av| 精品1区2区3区| eeuss鲁一区二区三区| 亚洲精品日韩一| 国产日韩在线不卡| 国产精品正在播放| 亚洲色图视频网| 日韩精品在线一区二区| 色呦呦日韩精品| 激情五月激情综合网| 一区二区三区在线不卡| 国产午夜三级一区二区三| 91精品欧美久久久久久动漫 | 国产精品高潮呻吟久久| 国产亚洲欧美一区在线观看| 亚洲高清免费观看| 成人高清免费在线播放| 欧美成人一区二区三区| 一区二区久久久| 97se狠狠狠综合亚洲狠狠| 欧美精品一区在线观看| 秋霞午夜鲁丝一区二区老狼| 97久久精品人人澡人人爽| 久久这里只有精品首页| 亚洲国产aⅴ成人精品无吗| 国产黄色精品网站| 在线不卡欧美精品一区二区三区| 99久久精品一区| 欧美成人乱码一区二区三区| 亚洲欧美欧美一区二区三区| 国产成人免费视频网站高清观看视频 | 成人黄色一级视频| 欧美激情一区二区三区四区| 喷水一区二区三区| 日韩视频国产视频| 免费成人av在线| 精品国精品国产| 国产河南妇女毛片精品久久久| 精品国产99国产精品| 国模少妇一区二区三区| 亚洲精品一线二线三线| 国产一区二区久久| 国产拍欧美日韩视频二区| 成人激情av网| 亚洲一区二区偷拍精品| 在线综合亚洲欧美在线视频| 全国精品久久少妇| 久久影院午夜论| 北条麻妃国产九九精品视频| 亚洲人成7777| 91精品国产色综合久久不卡蜜臀| 麻豆免费精品视频| 国产精品全国免费观看高清| 一本一本久久a久久精品综合麻豆| 亚洲一区二区中文在线| 精品国免费一区二区三区| 91在线看国产| 国产一区在线观看视频|