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

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

?? lcp.c

?? vxwork源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
	    }	    /*	     * We don't recognize the protocol they're asking for.	     * Nak it with something we're willing to do.	     * (At this point we know ao->neg_upap || ao->neg_chap.)	     */	    orc = CONFNAK;	    PUTCHAR(CI_AUTHTYPE, nakp);	    if (ao->neg_chap) {		PUTCHAR(CILEN_CHAP, nakp);		PUTSHORT(CHAP, nakp);		PUTCHAR(ao->chap_mdtype, nakp);	    } else {		PUTCHAR(CILEN_SHORT, nakp);		PUTSHORT(UPAP, nakp);	    }	    break;            	case CI_QUALITY:	    LCPDEBUG((LOG_INFO, "lcp_reqci: rcvd QUALITY"));	    if (!ao->neg_lqr ||		cilen != CILEN_LQR) {		orc = CONFREJ;		break;	    }	    GETSHORT(cishort, p);	    GETLONG(cilong, p);	    LCPDEBUG((LOG_INFO, "(%x %lx)", cishort, cilong));	    /*	     * Check the protocol and the reporting period.	     * XXX When should we Nak this, and what with?	     */	    if (cishort != LQR) {		orc = CONFNAK;		PUTCHAR(CI_QUALITY, nakp);		PUTCHAR(CILEN_LQR, nakp);		PUTSHORT(LQR, nakp);		PUTLONG(ao->lqr_period, nakp);		break;	    }	    break;	case CI_MAGICNUMBER:	    LCPDEBUG((LOG_INFO, "lcp_reqci: rcvd MAGICNUMBER"));	    if (!(ao->neg_magicnumber || go->neg_magicnumber) ||		cilen != CILEN_LONG) {		orc = CONFREJ;		break;	    }	    GETLONG(cilong, p);	    LCPDEBUG((LOG_INFO, "(%lx)", cilong));	    /*	     * He must have a different magic number.	     */	    if (go->neg_magicnumber &&		cilong == go->magicnumber) {		orc = CONFNAK;		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:	    LCPDEBUG((LOG_INFO, "lcp_reqci: rcvd PCOMPRESSION"));	    if (!ao->neg_pcompression ||		cilen != CILEN_VOID) {		orc = CONFREJ;		break;	    }	    ho->neg_pcompression = 1;	    break;	case CI_ACCOMPRESSION:	    LCPDEBUG((LOG_INFO, "lcp_reqci: rcvd ACCOMPRESSION"));	    if (!ao->neg_accompression ||		cilen != CILEN_VOID) {		orc = CONFREJ;		break;	    }	    ho->neg_accompression = 1;	    break;	default:	    LCPDEBUG((LOG_INFO, "lcp_reqci: rcvd unknown option %d",		      citype));	    orc = CONFREJ;	    break;	}endswitch:	LCPDEBUG((LOG_INFO, " (%s)", CODENAME(orc)));	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 = next - inp;	break;    case CONFNAK:	/*	 * Copy the Nak'd options from the nak_buffer to the caller's buffer.	 */	*lenp = nakp - nak_buffer;	BCOPY(nak_buffer, inp, *lenp);	break;    case CONFREJ:	*lenp = rejp - inp;	break;    }    LCPDEBUG((LOG_INFO, "lcp_reqci: returning CONF%s.", CODENAME(rc)));    return (rc);			/* Return final code */}/* * lcp_up - LCP has come UP. * * Start UPAP, IPCP, etc. */static voidlcp_up(f)    fsm *f;{    lcp_options *wo = &ppp_if[f->unit]->lcp_wantoptions;    lcp_options *ho = &ppp_if[f->unit]->lcp_hisoptions;    lcp_options *go = &ppp_if[f->unit]->lcp_gotoptions;    lcp_options *ao = &ppp_if[f->unit]->lcp_allowoptions;    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? ao->mru: MTU, (ho->neg_mru? ho->mru: MTU)),		    (ho->neg_asyncmap? ho->asyncmap: 0xffffffff),		    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): MTU),                    (go->neg_asyncmap? go->asyncmap: 0x00000000),                    go->neg_pcompression, go->neg_accompression);    if (ho->neg_mru)	ppp_if[f->unit]->peer_mru = ho->mru;    ChapLowerUp(f->unit);	/* Enable CHAP */    upap_lowerup(f->unit);	/* Enable UPAP */    ipcp_lowerup(f->unit);	/* Enable IPCP */    lcp_echo_lowerup(f->unit);  /* Enable echo messages */    link_established(f->unit);}/* * lcp_down - LCP has gone DOWN. * * Alert other protocols. */static voidlcp_down(f)    fsm *f;{    lcp_echo_lowerdown(f->unit);    ipcp_lowerdown(f->unit);    ChapLowerDown(f->unit);    upap_lowerdown(f->unit);    sifdown(f->unit);    ppp_send_config(f->unit, MTU, 0xffffffff, 0, 0);    ppp_recv_config(f->unit, MTU, 0x00000000, 0, 0);    ppp_if[f->unit]->peer_mru = MTU;    link_down(f->unit);}/* * lcp_starting - LCP needs the lower layer up. */static voidlcp_starting(f)    fsm *f;{    link_required(f->unit);}/* * lcp_finished - LCP has finished with the lower layer. */static voidlcp_finished(f)    fsm *f;{    /* if passive or silent flags set and if lcp state is STOPPED or CLOSED      * then reopen the link for the next connection     */    if (((f->state == STOPPED) || (f->state == CLOSED)) && 	(f->flags & OPT_RESTART))	fsm_open (f);     else 	link_terminated(f->unit);}/* * lcp_printpkt - print the contents of an LCP packet. */char *lcp_codenames[] = {    "ConfReq", "ConfAck", "ConfNak", "ConfRej",    "TermReq", "TermAck", "CodeRej", "ProtRej",    "EchoReq", "EchoRep", "DiscReq"};intlcp_printpkt(p, plen, printer, arg)    u_char *p;    int plen;    void (*printer) __ARGS((void *, char *, ...));    void *arg;{    int code, id, len, olen;    u_char *pstart, *optend;    u_short cishort;    u_long 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%x", cilong);                }                break;            case CI_AUTHTYPE:                if (olen >= CILEN_SHORT) {                    p += 2;                    printer(arg, "auth ");                    GETSHORT(cishort, p);                    switch (cishort) {                    case UPAP:                        printer(arg, "upap");                        break;                    case 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 LQR:                        printer(arg, "lqr");                        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;    }    /* print the rest of the bytes in the packet */    for (; len > 0; --len) {        GETCHAR(code, p);        printer(arg, " %.2x", code);    }    return p - pstart;}/* * Time to shut down the link because there is nothing out there. */staticvoid LcpLinkFailure (f)    fsm *f;{    if (f->state == OPENED) {        syslog (LOG_NOTICE, "Excessive lack of response to LCP echo frames.");        lcp_lowerdown(f->unit);         /* Reset connection */	ppp_if[f->unit]->phase = PHASE_TERMINATE;    }}/* * Timer expired for the LCP echo requests from this process. */static voidLcpEchoCheck (f)    fsm *f;{    u_long             delta;#ifdef __linux__    struct ppp_ddinfo  ddinfo;    u_long             latest;/* * Read the time since the last packet was received. */    if (ioctl (fd, PPPIOCGTIME, &ddinfo) < 0) {        syslog (LOG_ERR, "ioctl(PPPIOCGTIME): %m");        die (1);    }/* * Choose the most recient frame received. It may be an IP or NON-IP frame. */    latest = ddinfo.nip_rjiffies < ddinfo.ip_rjiffies ? ddinfo.nip_rjiffies                                                      : ddinfo.ip_rjiffies;/* * Compute the time since the last packet was received. If the timer *  has expired then send the echo request and reset the timer to maximum. */    delta = (lcp_echo_interval * HZ) - latest;    if (delta < HZ || latest < 0L) {        LcpSendEchoRequest (f);        delta = lcp_echo_interval * HZ;    }    delta /= HZ;#else /* Other implementations do not have ability to find delta */    LcpSendEchoRequest (f);    delta = ppp_if[f->unit]->lcp_echo_interval;#endif/* * Start the timer for the next interval. */    assert (ppp_if[f->unit]->lcp_echo_timer_running==0);    PPP_TIMEOUT (LcpEchoTimeout, (caddr_t) f, delta);    ppp_if[f->unit]->lcp_echo_timer_running = 1;}/* * LcpEchoTimeout - Timer expired on the LCP echo */static voidLcpEchoTimeout (arg)    caddr_t arg;{    fsm *f = (fsm *)arg;    if (ppp_if[f->unit]->lcp_echo_timer_running != 0) {        ppp_if[f->unit]->lcp_echo_timer_running = 0;        LcpEchoCheck ((fsm *) arg);    }}/* * LcpEchoReply - LCP has received a reply to the echo */static voidlcp_received_echo_reply (f, id, inp, len)    fsm *f;    int id; u_char *inp; int len;{    u_long magic;    /* Check the magic number - don't count replies from ourselves. */#ifdef	notyet    if (len < CILEN_LONG)        return;#endif	/* notyet */    GETLONG(magic, inp);    if (ppp_if[f->unit]->lcp_gotoptions.neg_magicnumber        && magic == ppp_if[f->unit]->lcp_gotoptions.magicnumber)        return;    /* Reset the number of outstanding echo frames */    ppp_if[f->unit]->lcp_echos_pending = 0;}/* * LcpSendEchoRequest - Send an echo request frame to the peer */static voidLcpSendEchoRequest (f)    fsm *f;{    u_long lcp_magic;    u_char pkt[4], *pktp;/* * Detect the failure of the peer at this point. */    if (ppp_if[f->unit]->lcp_echo_fails != 0) {        if (ppp_if[f->unit]->lcp_echos_pending++ >= ppp_if[f->unit]->lcp_echo_fails) {            LcpLinkFailure(f);            ppp_if[f->unit]->lcp_echos_pending = 0;	    die(f->unit, 1);        }    }/* * Make and send the echo request frame. */    if (f->state == OPENED) {        lcp_magic = ppp_if[f->unit]->lcp_gotoptions.neg_magicnumber                    ? ppp_if[f->unit]->lcp_gotoptions.magicnumber                    : 0L;        pktp = pkt;        PUTLONG(lcp_magic, pktp);        fsm_sdata(f, ECHOREQ,                  ppp_if[f->unit]->lcp_echo_number++ & 0xFF, pkt, pktp - pkt);    }}/* * lcp_echo_lowerup - Start the timer for the LCP frame */static voidlcp_echo_lowerup (unit)    int unit;{    fsm *f = &ppp_if[unit]->lcp_fsm;    /* Clear the parameters for generating echo frames */    ppp_if[unit]->lcp_echos_pending      = 0;    ppp_if[unit]->lcp_echo_number        = 0;    ppp_if[unit]->lcp_echo_timer_running = 0;    /* If a timeout interval is specified then start the timer */    if (ppp_if[unit]->lcp_echo_interval != 0)        LcpEchoCheck (f);}/* * lcp_echo_lowerdown - Stop the timer for the LCP frame */static voidlcp_echo_lowerdown (unit)    int unit;{    fsm *f = &ppp_if[unit]->lcp_fsm;    if (ppp_if[unit]->lcp_echo_timer_running != 0) {        PPP_UNTIMEOUT (LcpEchoTimeout, (caddr_t) f);        ppp_if[unit]->lcp_echo_timer_running = 0;    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色噜噜狠狠色综合中国| 精品一区二区在线观看| 国产精品美女久久久久aⅴ| 久久亚洲精华国产精华液| 日韩精品在线网站| 日韩精品一区二区在线观看| 91精品国产高清一区二区三区蜜臀 | 欧美蜜桃一区二区三区| 欧美色精品在线视频| 欧美精品在欧美一区二区少妇| 欧美日韩一区二区三区四区| 欧美日韩国产片| 欧美一区二区黄| 久久―日本道色综合久久 | 精品在线你懂的| 精品一区二区免费看| 国产在线观看免费一区| 奇米精品一区二区三区四区| 一区二区三区加勒比av| 91麻豆精品国产91久久久更新时间| 91片在线免费观看| 国产伦精品一区二区三区视频青涩| 一区二区视频免费在线观看| 欧美韩日一区二区三区四区| 制服丝袜亚洲播放| 欧美日本乱大交xxxxx| 色狠狠一区二区| 欧美福利视频导航| 欧美日韩免费观看一区二区三区| 成+人+亚洲+综合天堂| 国产91富婆露脸刺激对白| 亚洲午夜激情网页| 麻豆视频一区二区| 亚洲v中文字幕| 亚洲精品乱码久久久久久 | 中文字幕综合网| 亚洲国产精品ⅴa在线观看| 在线成人小视频| 精品福利av导航| 日韩精品一区国产麻豆| 日韩免费看的电影| 日韩欧美一级片| 在线电影欧美成精品| 欧美日韩国产另类不卡| 欧美女孩性生活视频| 色偷偷88欧美精品久久久| 91女厕偷拍女厕偷拍高清| 色综合天天做天天爱| 91欧美一区二区| 久久99久久久久久久久久久| 99国产精品国产精品毛片| 99久久免费视频.com| 99在线精品观看| 欧美综合久久久| 久久久欧美精品sm网站| 久久日韩粉嫩一区二区三区| 日韩精品一区二区三区在线播放 | 亚洲视频免费在线观看| 亚洲一二三区不卡| 亚洲一二三四区不卡| 亚洲免费观看高清完整版在线观看 | 2欧美一区二区三区在线观看视频| 日韩一区二区三免费高清| 欧美日韩一区视频| 欧美日本视频在线| 欧美日韩大陆一区二区| 在线观看91视频| 欧美精品vⅰdeose4hd| 欧美成人三级在线| 国产精品人妖ts系列视频| 午夜激情一区二区三区| 精品一二三四区| 久久精品国产77777蜜臀| 国产成人免费在线视频| 免费在线观看一区二区三区| 色婷婷综合久久久中文一区二区| 欧美日韩国产首页| www久久精品| 亚洲嫩草精品久久| 成人激情免费视频| 欧美日韩亚洲综合| 国产日韩av一区| 亚洲综合激情小说| 91麻豆免费看| 日韩视频不卡中文| 国产欧美精品在线观看| 亚洲成人动漫在线观看| 国产a区久久久| 欧美在线视频日韩| 国产三级三级三级精品8ⅰ区| 一区二区三区成人| 精品第一国产综合精品aⅴ| 午夜天堂影视香蕉久久| 一区二区三区91| 狠狠色丁香婷综合久久| 日本高清视频一区二区| 专区另类欧美日韩| 久久国产精品免费| av电影一区二区| 日韩一区二区不卡| wwwwww.欧美系列| 亚洲六月丁香色婷婷综合久久| 美女高潮久久久| 色哟哟亚洲精品| 26uuu国产一区二区三区| 亚洲精品少妇30p| 另类欧美日韩国产在线| 欧美一区二区三区免费视频| 国产欧美日韩卡一| 蜜臀av性久久久久蜜臀aⅴ四虎| 国产精品一区二区视频| 欧美色综合天天久久综合精品| 国产suv精品一区二区883| 成人精品一区二区三区中文字幕 | 欧美日韩专区在线| 中文字幕欧美三区| 精品在线免费视频| 老司机午夜精品| 精品成a人在线观看| 日韩av电影一区| 日本韩国欧美一区| 久久综合狠狠综合久久综合88| 国产一区二区电影| 51午夜精品国产| 一区二区在线观看视频在线观看| 日本在线观看不卡视频| 日韩欧美不卡在线观看视频| 丝袜国产日韩另类美女| 在线精品视频免费播放| 综合久久久久综合| 99在线精品一区二区三区| 欧美精品一区二区三区视频| 成人综合婷婷国产精品久久蜜臀| 日韩亚洲欧美在线| 天堂va蜜桃一区二区三区| 欧美日韩国产色站一区二区三区| 欧美在线综合视频| 中文字幕一区在线观看视频| 1区2区3区精品视频| 欧美性淫爽ww久久久久无| 亚洲欧美色一区| 国产乱妇无码大片在线观看| 91久久精品网| 亚洲美女屁股眼交3| 日本精品免费观看高清观看| 国产精品久久久久9999吃药| 欧美日韩电影一区| 婷婷综合另类小说色区| 欧美日韩大陆在线| 一区二区三区精品久久久| 日韩欧美你懂的| 日本不卡在线视频| 欧美大胆一级视频| 日本精品视频一区二区| 亚洲国产精品影院| 欧美日韩aaaaa| 亚洲最大成人综合| 久久人人97超碰com| 国产激情精品久久久第一区二区| 久久先锋影音av鲁色资源| 在线观看免费亚洲| 日韩精品视频网站| 欧美亚洲综合另类| 久久国内精品视频| 久久蜜桃香蕉精品一区二区三区| 国产精品99久久久久久似苏梦涵| 亚洲午夜精品网| 69p69国产精品| 久久精工是国产品牌吗| 91久久免费观看| 国产+成+人+亚洲欧洲自线| 制服丝袜亚洲色图| 蜜臀av一区二区在线免费观看| 欧美福利视频一区| 国产乱子伦一区二区三区国色天香| 国产欧美日韩视频在线观看| 亚洲一级二级在线| 国产精品毛片a∨一区二区三区| 91国产成人在线| 免费观看成人鲁鲁鲁鲁鲁视频| 色天使久久综合网天天| 韩国精品免费视频| |精品福利一区二区三区| 欧美日韩国产高清一区| 99视频在线观看一区三区| 亚洲第一电影网| 26uuu亚洲综合色欧美| 风流少妇一区二区| 亚洲综合图片区| 精品粉嫩超白一线天av| 成人性色生活片免费看爆迷你毛片| 日本va欧美va精品发布| 国产精品久久久久久久久久久免费看| 91免费国产在线| 成人黄色片在线观看| 一区二区三区四区精品在线视频| 7777精品久久久大香线蕉| 国产成人一区在线| 国产一区二区三区四区在线观看| 国产精品久久久久久久久果冻传媒 |