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

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

?? ipxcp.c

?? 自己精簡過的PPPD代碼。在嵌入中應用可以更好的發揮。比原先的小了很多
?? C
?? 第 1 頁 / 共 3 頁
字號:
		PUTLONG (wo->our_network, p);		orc = CONFNAK;/* * We don't have one. Reject the value. */	    } else		orc = CONFREJ;	    break;/* * The node number is required */	case IPX_NODE_NUMBER:	    /* if we wont negotiate the node number or the length is wrong	       then reject the option */	    if ( cilen != CILEN_NODEN ) {		orc = CONFREJ;		break;	    }	    copy_node (p, ho->his_node);	    ho->neg_node = 1;/* * If the remote does not have a number and we do then NAK it with the value * which we have for it. (We never have a default value of zero.) */	    if (zero_node (ho->his_node)) {		orc = CONFNAK;		copy_node (wo->his_node, p);		INCPTR (sizeof (wo->his_node), p);		break;	    }/* * If you have given me the expected network node number then I'll accept * it now. */	    if (compare_node (wo->his_node, ho->his_node)) {		orc = CONFACK;		ho->neg_node = 1;		INCPTR (sizeof (wo->his_node), p);		break;	    }/* * If his node number is the same as ours then ask him to try the next * value. */	    if (compare_node (ho->his_node, go->our_node)) {		inc_node (ho->his_node);		orc = CONFNAK;		copy_node (ho->his_node, p);		INCPTR (sizeof (wo->his_node), p);		break;	    }/* * If we don't accept a new value then NAK it. */	    if (! ao->accept_remote) {		copy_node (wo->his_node, p);		INCPTR (sizeof (wo->his_node), p);		orc = CONFNAK;		break;	    }	    orc = CONFACK;	    ho->neg_node = 1;	    INCPTR (sizeof (wo->his_node), p);	    break;/* * Compression is not desired at this time. It is always rejected. */	case IPX_COMPRESSION_PROTOCOL:	    orc = CONFREJ;	    break;/* * The routing protocol is a bitmask of various types. Any combination * of the values RIP_SAP and NLSP are permissible. 'IPX_NONE' for no * routing protocol must be specified only once. */	case IPX_ROUTER_PROTOCOL:	    if ( !ao->neg_router || cilen < CILEN_PROTOCOL ) {		orc = CONFREJ;		break;			    }	    GETSHORT (cishort, p);	    if (wo->neg_router == 0) {	        wo->neg_router = 1;		wo->router     = BIT(IPX_NONE);	    }	    if ((cishort == IPX_NONE && ho->router != 0) ||		(ho->router & BIT(IPX_NONE))) {		orc = CONFREJ;		break;	    }	    cishort = BIT(cishort);	    if (ho->router & cishort) {		orc = CONFREJ;		break;	    }	    ho->router	  |= cishort;	    ho->neg_router = 1;	    /* Finally do not allow a router protocol which we do not	       support. */	    if ((cishort & (ao->router | BIT(IPX_NONE))) == 0) {	        int protocol;		if (cishort == BIT(NLSP) &&		    (ao->router & BIT(RIP_SAP)) &&		    !wo->tried_rip) {		    protocol      = RIP_SAP;		    wo->tried_rip = 1;		} else		    protocol = IPX_NONE;		DECPTR (sizeof (u_int16_t), p);		PUTSHORT (protocol, p);		orc = CONFNAK;	    }	    break;/* * The router name is advisorary. Just accept it if it is not too large. */	case IPX_ROUTER_NAME:	    if (cilen >= CILEN_NAME) {		int name_size = cilen - CILEN_NAME;		if (name_size > sizeof (ho->name))		    name_size = sizeof (ho->name) - 1;		memset (ho->name, 0, sizeof (ho->name));		memcpy (ho->name, p, name_size);		ho->name [name_size] = '\0';		ho->neg_name = 1;		orc = CONFACK;		break;	    }	    orc = CONFREJ;	    break;/* * This is advisorary. */	case IPX_COMPLETE:	    if (cilen != CILEN_COMPLETE)		orc = CONFREJ;	    else {		ho->neg_complete = 1;		orc = CONFACK;	    }	    break;/* * All other entries are not known at this time. */	default:	    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? */		orc = CONFREJ;		/* Get tough if so */	    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 IPX_NODE_NUMBER option appended. We assume the     * input buffer is long enough that we can append the extra     * option safely.     */    if (rc != CONFREJ && !ho->neg_node &&	wo->req_nn && !reject_if_disagree) {	if (rc == CONFACK) {	    rc = CONFNAK;	    wo->req_nn = 0;		/* don't ask again */	    ucp = inp;			/* reset pointer */	}	if (zero_node (wo->his_node))	    inc_node (wo->his_node);	PUTCHAR (IPX_NODE_NUMBER, ucp);	PUTCHAR (CILEN_NODEN, ucp);	copy_node (wo->his_node, ucp);	INCPTR (sizeof (wo->his_node), ucp);    }    *len = ucp - inp;			/* Compute output length */    IPXCPDEBUG(("ipxcp: returning Configure-%s", CODENAME(rc)));    return (rc);			/* Return final code */}/* * ipxcp_up - IPXCP has come UP. * * Configure the IP network interface appropriately and bring it up. */static voidipxcp_up(f)    fsm *f;{    int unit = f->unit;    IPXCPDEBUG(("ipxcp: up"));    /* The default router protocol is RIP/SAP. */    if (ho->router == 0)        ho->router = BIT(RIP_SAP);    if (go->router == 0)        go->router = BIT(RIP_SAP);    /* Fetch the network number */    if (!ho->neg_nn)	ho->his_network = wo->his_network;    if (!ho->neg_node)	copy_node (wo->his_node, ho->his_node);    if (!wo->neg_node && !go->neg_node)	copy_node (wo->our_node, go->our_node);    if (zero_node (go->our_node)) {        static char errmsg[] = "Could not determine local IPX node address";	if (debug)	    error(errmsg);	ipxcp_close(f->unit, errmsg);	return;    }    go->network = go->our_network;    if (ho->his_network != 0 && ho->his_network > go->network)	go->network = ho->his_network;    if (go->network == 0) {        static char errmsg[] = "Can not determine network number";	if (debug)	    error(errmsg);	ipxcp_close (unit, errmsg);	return;    }    /* bring the interface up */    if (!sifup(unit)) {	if (debug)	    warn("sifup failed (IPX)");	ipxcp_close(unit, "Interface configuration failed");	return;    }    ipxcp_is_up = 1;    /* set the network number for IPX */    if (!sipxfaddr(unit, go->network, go->our_node)) {	if (debug)	    warn("sipxfaddr failed");	ipxcp_close(unit, "Interface configuration failed");	return;    }    np_up(f->unit, PPP_IPX);    /*     * Execute the ipx-up script, like this:     *	/etc/ppp/ipx-up interface tty speed local-IPX remote-IPX     */    ipxcp_script (f, _PATH_IPXUP);}/* * ipxcp_down - IPXCP has gone DOWN. * * Take the IP network interface down, clear its addresses * and delete routes through it. */static voidipxcp_down(f)    fsm *f;{    IPXCPDEBUG(("ipxcp: down"));    if (!ipxcp_is_up)	return;    ipxcp_is_up = 0;    np_down(f->unit, PPP_IPX);    cipxfaddr(f->unit);    sifnpmode(f->unit, PPP_IPX, NPMODE_DROP);    sifdown(f->unit);    ipxcp_script (f, _PATH_IPXDOWN);}/* * ipxcp_finished - possibly shut down the lower layers. */static voidipxcp_finished(f)    fsm *f;{    np_finished(f->unit, PPP_IPX);}/* * ipxcp_script - Execute a script with arguments * interface-name tty-name speed local-IPX remote-IPX networks. */static voidipxcp_script(f, script)    fsm *f;    char *script;{    char strspeed[32],	 strlocal[32],	   strremote[32];    char strnetwork[32], strpid[32];    char *argv[14],	 strproto_lcl[32], strproto_rmt[32];    slprintf(strpid, sizeof(strpid), "%d", getpid());    slprintf(strspeed, sizeof(strspeed),"%d", baud_rate);    strproto_lcl[0] = '\0';    if (go->neg_router && ((go->router & BIT(IPX_NONE)) == 0)) {	if (go->router & BIT(RIP_SAP))	    strlcpy (strproto_lcl, "RIP ", sizeof(strproto_lcl));	if (go->router & BIT(NLSP))	    strlcat (strproto_lcl, "NLSP ", sizeof(strproto_lcl));    }    if (strproto_lcl[0] == '\0')	strlcpy (strproto_lcl, "NONE ", sizeof(strproto_lcl));    strproto_lcl[strlen (strproto_lcl)-1] = '\0';    strproto_rmt[0] = '\0';    if (ho->neg_router && ((ho->router & BIT(IPX_NONE)) == 0)) {	if (ho->router & BIT(RIP_SAP))	    strlcpy (strproto_rmt, "RIP ", sizeof(strproto_rmt));	if (ho->router & BIT(NLSP))	    strlcat (strproto_rmt, "NLSP ", sizeof(strproto_rmt));    }    if (strproto_rmt[0] == '\0')	strlcpy (strproto_rmt, "NONE ", sizeof(strproto_rmt));    strproto_rmt[strlen (strproto_rmt)-1] = '\0';    strlcpy (strnetwork, ipx_ntoa (go->network), sizeof(strnetwork));    slprintf (strlocal, sizeof(strlocal), "%0.6B", go->our_node);    slprintf (strremote, sizeof(strremote), "%0.6B", ho->his_node);    argv[0]  = script;    argv[1]  = ifname;    argv[2]  = devnam;    argv[3]  = strspeed;    argv[4]  = strnetwork;    argv[5]  = strlocal;    argv[6]  = strremote;    argv[7]  = strproto_lcl;    argv[8]  = strproto_rmt;    argv[9]  = go->name;    argv[10] = ho->name;    argv[11] = ipparam;    argv[12] = strpid;    argv[13] = NULL;    run_program(script, argv, 0, NULL, NULL, 0);}/* * ipxcp_printpkt - print the contents of an IPXCP packet. */static char *ipxcp_codenames[] = {    "ConfReq", "ConfAck", "ConfNak", "ConfRej",    "TermReq", "TermAck", "CodeRej"};static intipxcp_printpkt(p, plen, printer, arg)    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(ipxcp_codenames) / sizeof(char *))	printer(arg, " %s", ipxcp_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 < CILEN_VOID || olen > len) {		break;	    }	    printer(arg, " <");	    len -= olen;	    optend = p + olen;	    switch (code) {	    case IPX_NETWORK_NUMBER:		if (olen == CILEN_NETN) {		    p += 2;		    GETLONG(cilong, p);		    printer (arg, "network %s", ipx_ntoa (cilong));		}		break;	    case IPX_NODE_NUMBER:		if (olen == CILEN_NODEN) {		    p += 2;		    printer (arg, "node ");		    while (p < optend) {			GETCHAR(code, p);			printer(arg, "%.2x", (int) (unsigned int) (unsigned char) code);		    }		}		break;	    case IPX_COMPRESSION_PROTOCOL:		if (olen == CILEN_COMPRESS) {		    p += 2;		    GETSHORT (cishort, p);		    printer (arg, "compression %d", (int) cishort);		}		break;	    case IPX_ROUTER_PROTOCOL:		if (olen == CILEN_PROTOCOL) {		    p += 2;		    GETSHORT (cishort, p);		    printer (arg, "router proto %d", (int) cishort);		}		break;	    case IPX_ROUTER_NAME:		if (olen >= CILEN_NAME) {		    p += 2;		    printer (arg, "router name \"");		    while (p < optend) {			GETCHAR(code, p);			if (code >= 0x20 && code <= 0x7E)			    printer (arg, "%c", (int) (unsigned int) (unsigned char) code);			else			    printer (arg, " \\%.2x", (int) (unsigned int) (unsigned char) code);		    }		    printer (arg, "\"");		}		break;	    case IPX_COMPLETE:		if (olen == CILEN_COMPLETE) {		    p += 2;		    printer (arg, "complete");		}		break;	    default:		break;	    }	    while (p < optend) {		GETCHAR(code, p);		printer(arg, " %.2x", (int) (unsigned int) (unsigned char) 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;    }    /* print the rest of the bytes in the packet */    for (; len > 0; --len) {	GETCHAR(code, p);	printer(arg, " %.2x", (int) (unsigned int) (unsigned char) code);    }    return p - pstart;}#endif /* ifdef IPX_CHANGE */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久99久久精品国产片果冻| 日本伊人午夜精品| 精品粉嫩aⅴ一区二区三区四区| 欧美最新大片在线看| 色婷婷综合五月| 一本大道久久a久久精品综合| 一本久久综合亚洲鲁鲁五月天 | 国产一区免费电影| 日本免费新一区视频| 日韩主播视频在线| 狠狠色伊人亚洲综合成人| 精品一区二区三区在线观看国产| 国模无码大尺度一区二区三区| 国精品**一区二区三区在线蜜桃| 国产精品性做久久久久久| 粉嫩av一区二区三区| 色成年激情久久综合| 欧美日韩高清影院| 欧美精品一区二区三区在线| 国产校园另类小说区| 亚洲欧美日韩国产综合在线 | 精品欧美一区二区三区精品久久| 91麻豆精品国产91久久久资源速度 | 日韩午夜av电影| 久久综合资源网| 亚洲另类中文字| 免费的国产精品| jlzzjlzz欧美大全| 69成人精品免费视频| 久久久久9999亚洲精品| 亚洲精品高清视频在线观看| 麻豆极品一区二区三区| 91在线小视频| 精品少妇一区二区三区视频免付费| 欧美国产1区2区| 亚洲h动漫在线| 国产成人免费在线观看| 欧美欧美欧美欧美首页| 国产精品午夜春色av| 亚洲3atv精品一区二区三区| 国产91露脸合集magnet| 欧美日韩国产高清一区二区三区| 久久久久久久综合狠狠综合| 亚洲一区二区三区四区中文字幕| 国内成人精品2018免费看| 欧美艳星brazzers| 国产欧美一区二区三区鸳鸯浴| 一区二区三区欧美| 国产成+人+日韩+欧美+亚洲| 6080午夜不卡| 一区二区三区在线影院| 成人激情黄色小说| 欧美一区二区三区男人的天堂| 亚洲婷婷在线视频| 国产精品亚洲专一区二区三区| 欧美日韩高清影院| 一区二区免费视频| 99亚偷拍自图区亚洲| 国产婷婷色一区二区三区在线| 午夜精品久久久久| 在线看日本不卡| 1000精品久久久久久久久| 精品无码三级在线观看视频| 欧美日韩午夜在线| 亚洲国产精品视频| 在线观看亚洲专区| 一区二区三区国产精华| 97久久人人超碰| 亚洲美女一区二区三区| 99久久精品99国产精品| 亚洲国产激情av| 成人精品视频一区二区三区| 欧美成人午夜电影| 亚洲影院久久精品| 一区二区三区欧美激情| 国产片一区二区三区| 成人av高清在线| 日韩制服丝袜av| 国产精品成人网| 日韩午夜精品视频| 日本电影欧美片| 国产91精品一区二区麻豆亚洲| 一区二区三区在线免费| 亚洲影院理伦片| 久久久不卡网国产精品一区| 欧美在线视频日韩| 国产成人aaaa| 精品在线观看免费| 亚洲综合一区二区三区| 国产精品乱码久久久久久| 欧美精品视频www在线观看| 成人在线一区二区三区| 久久99国产精品免费| 五月婷婷另类国产| 亚洲精品亚洲人成人网在线播放| 2023国产精品| 欧美大片在线观看| 制服丝袜亚洲色图| 欧美色国产精品| 色偷偷久久一区二区三区| 成人免费视频app| 国产高清精品久久久久| 美女网站色91| 青娱乐精品视频| 三级久久三级久久| 亚洲第一精品在线| 香蕉加勒比综合久久| 亚洲一区二区五区| 一区二区在线电影| 亚洲精品视频自拍| 中文字幕亚洲一区二区av在线| 久久久777精品电影网影网 | 日韩欧美电影一区| 这里只有精品视频在线观看| 欧美猛男男办公室激情| 欧亚一区二区三区| 欧美美女直播网站| 欧美日韩国产精品自在自线| 欧美人与z0zoxxxx视频| 3d成人动漫网站| 日韩欧美三级在线| 日韩欧美国产高清| 久久综合色综合88| 亚洲国产精品成人综合| 亚洲欧洲日韩在线| 亚洲国产美女搞黄色| 午夜精品久久久久影视| 久久国产麻豆精品| 国产精品888| 91女厕偷拍女厕偷拍高清| 91国偷自产一区二区三区观看 | 国产偷国产偷亚洲高清人白洁| 久久毛片高清国产| 国产精品午夜在线| 亚洲精品菠萝久久久久久久| 亚洲一区二区三区自拍| 青青草视频一区| 国产精品资源在线观看| 91论坛在线播放| 欧美一区二区私人影院日本| 国产亚洲短视频| 一区二区三区四区乱视频| 午夜免费久久看| 国产一区二区免费在线| 一本一本大道香蕉久在线精品 | 亚洲精品一卡二卡| 日韩成人免费看| 国产精一品亚洲二区在线视频| 不卡的av中国片| 91精品国产色综合久久不卡电影| 2020国产精品久久精品美国| 亚洲人成在线观看一区二区| 天堂资源在线中文精品| 国产老女人精品毛片久久| 91视频www| 精品久久久久久综合日本欧美| 国产精品免费久久久久| 丝袜a∨在线一区二区三区不卡| 国产麻豆午夜三级精品| 在线免费观看日本一区| 欧美tickling挠脚心丨vk| 一区二区三区在线视频播放| 国产一区二区调教| 欧美日本一区二区在线观看| 国产午夜久久久久| 日本视频免费一区| 91一区二区在线| 久久综合九色综合97_久久久| 亚洲精品国久久99热| 国产成人精品午夜视频免费| 91精品福利在线一区二区三区| 1区2区3区欧美| 国产精品一区二区久激情瑜伽| 欧美日韩精品一区视频| 国产精品电影院| 国产剧情一区二区| 欧美一级搡bbbb搡bbbb| 亚洲综合激情另类小说区| 国产乱色国产精品免费视频| 51精品视频一区二区三区| 亚洲精品成人悠悠色影视| 不卡欧美aaaaa| 欧美高清在线视频| 国产精品性做久久久久久| 日韩精品中午字幕| 日本不卡视频在线观看| 在线观看91视频| 一区二区三区自拍| 91美女视频网站| 亚洲三级电影全部在线观看高清| 国产一区在线不卡| 久久奇米777| 国产精品白丝av| 国产清纯在线一区二区www| 国产一区二区三区黄视频| 久久久久久久免费视频了| 国产综合久久久久影院| 欧美成人福利视频| 激情国产一区二区| 久久精品一级爱片|