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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? lcp.c

?? vxworks的源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
		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.");        /* if server (OPT_PASSIVE flag is set) then close the connection and         * go to STOPPED state. If this is a client, kill the ppp link          */        if (!(f->flags & OPT_PASSIVE))            lcp_lowerdown(f->unit);	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) {        if (LcpSendEchoRequest (f) == FALSE) return;        delta = lcp_echo_interval * HZ;    }    delta /= HZ;#else /* Other implementations do not have ability to find delta */    if (LcpSendEchoRequest (f) == FALSE) return;    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 BOOLLcpSendEchoRequest (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;                     if ((pppHookRtns[f->unit] != NULL) &&                 (pppHookRtns[f->unit]->disconnectHook != NULL)) {                if (((*pppHookRtns[f->unit]->disconnectHook) (f->unit, ppp_if[f->unit]->fd))                       == ERROR) {                      syslog(LOG_WARNING, "disconnect hook failed");                }                syslog(LOG_INFO, "Disconnected...");            }            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);        return TRUE;    }    return FALSE;}/* * 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;    }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产亚洲精品中文字幕| 色www精品视频在线观看| 成人国产电影网| 在线视频国内自拍亚洲视频| 日韩限制级电影在线观看| 欧美精品一区视频| 亚洲欧洲性图库| 亚洲国产精品久久不卡毛片| 激情综合五月婷婷| 99精品热视频| 欧美一级片免费看| 国产精品欧美极品| 香港成人在线视频| 国产精品一二三| 欧美在线free| 久久精品视频一区二区三区| 亚洲一级片在线观看| 国内不卡的二区三区中文字幕| 99riav久久精品riav| 6080国产精品一区二区| 中文字幕免费观看一区| 亚洲成人在线免费| 大尺度一区二区| 欧美一区二区私人影院日本| 中文在线一区二区| 青青草一区二区三区| 99久久久久久99| 日韩精品中文字幕在线不卡尤物| 国产精品美女久久久久久久久 | 久久99久久久久久久久久久| 成人手机电影网| 日韩欧美卡一卡二| 亚洲一线二线三线视频| 国产69精品久久777的优势| 51午夜精品国产| 综合网在线视频| 国产精品伊人色| 69久久夜色精品国产69蝌蚪网| 成人免费在线视频| 国产一区二区精品久久99| 欧美日韩国产小视频| 亚洲欧洲日韩综合一区二区| 国产一区视频导航| 欧美一卡2卡三卡4卡5免费| 亚洲美女免费在线| 国产91综合一区在线观看| 精品黑人一区二区三区久久| 午夜精品一区二区三区三上悠亚| 91亚洲大成网污www| 国产欧美日韩另类视频免费观看| 麻豆国产欧美日韩综合精品二区| 91久久国产最好的精华液| 日本一区二区动态图| 国模一区二区三区白浆| 日韩欧美中文一区| 图片区日韩欧美亚洲| 欧美亚州韩日在线看免费版国语版| 一区免费观看视频| 成人高清视频免费观看| 日本一区二区在线不卡| 国产成人午夜片在线观看高清观看| 日韩欧美国产三级| 琪琪一区二区三区| 6080国产精品一区二区| 日韩国产欧美视频| 91精品国产一区二区人妖| 亚洲大片精品永久免费| 欧美性xxxxxx少妇| 亚洲123区在线观看| 欧美日韩精品一区视频| 亚洲二区在线视频| 欧美日韩国产一级| 日韩精彩视频在线观看| 欧美日韩夫妻久久| 日本人妖一区二区| 日韩精品中文字幕一区二区三区 | 日韩欧美成人午夜| 美腿丝袜亚洲一区| 2021久久国产精品不只是精品| 精东粉嫩av免费一区二区三区| 日韩免费成人网| 国产在线国偷精品免费看| 欧美精品一区二区三区很污很色的| 久久99深爱久久99精品| 久久久亚洲精品一区二区三区| 国产精品资源网| 欧美经典一区二区三区| 成人手机电影网| 亚洲精品中文字幕在线观看| 欧美最新大片在线看| 五月婷婷另类国产| 日韩欧美综合在线| 国产成人亚洲综合色影视| 国产精品成人免费精品自在线观看 | 在线精品视频免费观看| 偷拍一区二区三区| 精品日本一线二线三线不卡| 国产精品一区二区久激情瑜伽| 欧美极品aⅴ影院| 色婷婷精品久久二区二区蜜臂av| 亚洲国产欧美日韩另类综合| 91精品国产福利| 国产在线视视频有精品| 国产精品久久久久久久久免费樱桃| 成人va在线观看| 亚洲影院理伦片| 制服丝袜中文字幕一区| 国产成人综合亚洲91猫咪| 亚洲精品网站在线观看| 91精品国产全国免费观看| 国产真实乱偷精品视频免| 国产精品久久久久7777按摩| 欧美色大人视频| 国产乱码字幕精品高清av| 亚洲色图在线看| 日韩一区二区在线播放| 成人教育av在线| 天堂成人免费av电影一区| 国产精品久久久一本精品 | 日本在线观看不卡视频| 久久精品亚洲一区二区三区浴池| 99国产精品国产精品久久| 偷拍亚洲欧洲综合| 国产精品欧美综合在线| 91精品国产aⅴ一区二区| 成人99免费视频| 美女一区二区久久| 最新国产成人在线观看| 日韩欧美国产一区二区三区 | 日韩理论在线观看| 日韩手机在线导航| 99久久99久久精品免费看蜜桃| 蜜乳av一区二区| 一区二区三区四区国产精品| 欧美精品一区二区三区蜜桃| 精品视频一区 二区 三区| 国产成人精品亚洲午夜麻豆| 日日夜夜一区二区| 日韩一区日韩二区| 久久久精品人体av艺术| 欧美日韩亚洲国产综合| 成人综合日日夜夜| 久久国产婷婷国产香蕉| 一区二区三区欧美日韩| 欧美国产一区二区在线观看| 欧美一级片免费看| 欧美天天综合网| 91同城在线观看| 国产成人亚洲综合a∨婷婷| 奇米影视一区二区三区| 一区二区三区**美女毛片| 国产欧美日本一区视频| 日韩丝袜美女视频| 欧美三级日韩在线| 色噜噜久久综合| 成人高清免费观看| 国产精品亚洲第一区在线暖暖韩国| 视频一区免费在线观看| 亚洲一区二区五区| 亚洲精品视频自拍| 亚洲私人黄色宅男| 中文成人综合网| 国产欧美日本一区视频| 久久亚洲捆绑美女| 精品第一国产综合精品aⅴ| 91麻豆精品国产91久久久使用方法 | 久久久久97国产精华液好用吗| 欧美一区二区日韩一区二区| 欧美女孩性生活视频| 欧美色综合影院| 欧美午夜寂寞影院| 欧亚一区二区三区| 日本乱码高清不卡字幕| 99国产精品久| 色综合久久综合| 日本电影欧美片| 色婷婷久久99综合精品jk白丝| av不卡在线观看| 一本色道久久综合精品竹菊| 91热门视频在线观看| 99国产精品久久久久| 91丨porny丨最新| 99视频精品在线| 色综合久久综合中文综合网| 色婷婷av一区二区三区软件| 在线影院国内精品| 欧美午夜精品久久久久久超碰| 欧美日韩国产123区| 欧美电影影音先锋| 欧美一区2区视频在线观看| 日韩欧美亚洲一区二区| 欧美精品一区二区三| 国产亚洲女人久久久久毛片| 国产精品日产欧美久久久久| 日韩一区中文字幕| 亚洲永久精品大片| 日韩av电影免费观看高清完整版在线观看| 激情小说欧美图片| 国产精品综合视频| av中文一区二区三区|