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

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

?? dhcpcstate1.c

?? VxWorks下DHCP的源代碼!
?? C
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):
     * sophisticated lookup at some point.     */    pLeaseData = (LEASE_DATA *) pEvent->leaseId;    /*     * The DHCP_USER_RELEASE event occurs in response to the dhcpcRelease()     * or dhcpcShutdown() call. Remove all data structures for this lease.     */    if (pEvent->type == DHCP_USER_RELEASE) {        dhcpcLeaseCleanup (pLeaseData);        return (DHCPC_DONE);    }    /* Ignore bind and verify user events, which are meaningless here. */    if (pEvent->source == DHCP_USER_EVENT)        return (OK);    bzero (errmsg, sizeof (errmsg));#ifdef DHCPC_DEBUG    logMsg ("dhcpc: Entered WAIT_OFFER state.\n", 0, 0, 0, 0, 0, 0);#endif    if (pLeaseData->prevState == INIT) {        /* Clear any previous parameter settings. */        if (pLeaseData->dhcpcParam != NULL) {            clean_param (pLeaseData->dhcpcParam);            free (pLeaseData->dhcpcParam);            pLeaseData->dhcpcParam = NULL;        }        pLeaseData->prevState = WAIT_OFFER;    }    if (pEvent->type == DHCP_TIMEOUT) {#ifdef DHCPC_DEBUG        logMsg ("dhcp: timed out in WAIT_OFFER state.\n", 0, 0, 0, 0, 0, 0);#endif        /* Handle timeout - no DHCP offers received yet. */        retry = pLeaseData->numRetry;        timer = pLeaseData->timeout;        retry++;        if (retry == DISCOVER_RETRANS) {    /* Retransmission limit reached. */#ifdef DHCPC_DEBUG            logMsg ("No lease offers received by client.\n", 0, 0, 0, 0, 0, 0);#endif            /*             * No response to new DHCP message format, which can be ignored             * by older DHCP servers as too short. Try the earlier format,             * which padded the options field to a minimum length. If             * successful, all subsequent messages will add that padding.             */            if (!pLeaseData->oldFlag) {                pLeaseData->oldFlag = TRUE;                timer = FIRSTTIMER / 2; /* Counteract later doubling. */                retry = 0;            } else                return (ERROR);        }        /* Try to retransmit appropriate DHCP message for current state. */        /* Recreate DHCP_DISCOVER message using the same transaction ID. */        length = make_discover (pLeaseData, FALSE);        gen_retransmit (pLeaseData, length);        if (timer < MAXTIMER) {            /* Double retransmission delay with each attempt. (RFC 1541). */            timer *= 2;        }        /* Set retransmission timer to randomized exponential backoff. */        wdStart (pLeaseData->timer, sysClkRateGet () * SLEEP_RANDOM (timer),                 (FUNCPTR) retrans_wait_offer, (int) pLeaseData);        pLeaseData->timeout = timer;        pLeaseData->numRetry = retry;    } else {        /*         * Process DHCP message stored in receive buffer by monitor task.          * The 4-byte alignment of the IP header needed by Sun BSP's is         * guaranteed by the Berkeley Packet Filter during input.         */        pMsgData = pLeaseData->msgBuffer;        align_msg (&dhcpcMsgIn, pMsgData);        /* Examine type of message. Accept DHCP offers or BOOTP replies. */        option = (char *) pickup_opt (dhcpcMsgIn.dhcp, DHCPLEN (dhcpcMsgIn.udp), _DHCP_MSGTYPE_TAG);        if (option == NULL) {            /*              * Message type not found - check message length. Ignore             * untyped DHCP messages, but accept (shorter) BOOTP replies.             * This test might still treat (illegal) untyped DHCP messages             * like BOOTP messages if they are short enough, but that case             * can't be avoided.             */            if (DHCPLEN (dhcpcMsgIn.udp) > DFLTBOOTPLEN)                return (OK);        } else {            if (*OPTBODY (option) != DHCPOFFER)                return (OK);        }        /* Allocate memory for configuration parameters. */        pParams = (struct dhcp_param *) calloc (1, sizeof (struct dhcp_param));        if (pParams == NULL)            return (OK);        /* Fill in host requirements defaults. */        dhcpcDefaultsSet (pParams);        /* Check offered parameters. Save in lease structure if acceptable. */        if (dhcp_msgtoparam (dhcpcMsgIn.dhcp, DHCPLEN (dhcpcMsgIn.udp), pParams) == OK) {            /*              * Accept static BOOTP address or verify that the             * address offered by the DHCP server is non-zero             * and check offered lease length against minimum value.             */            if ((pParams->msgtype == DHCP_BOOTP ||                 pParams->server_id.s_addr != 0) && pParams->lease_duration >= dhcpcMinLease) {                /*                 * Initial offer accepted. Set lease data                 * to execute next routine and start timer.                 */                pParams->lease_origin = pLeaseData->initEpoch;                pLeaseData->dhcpcParam = pParams;                pLeaseData->currState = SELECTING;                /*                 * Reset timer from retransmission                 * interval to limit for collecting replies.                  */                wdCancel (pLeaseData->timer);                wdStart (pLeaseData->timer, sysClkRateGet () *                         pLeaseData->leaseReqSpec.waitsecs,                         (FUNCPTR) alarm_selecting, (int) pLeaseData);            } else {                /*                  * Offer is insufficient. Remove stored parameters                 * and set lease data to repeat current routine.                  */                pLeaseData->currState = WAIT_OFFER;                clean_param (pParams);                free (pParams);            }        } else {            /*             * Conversion unsuccessful - remove stored parameters             * and set lease data to repeat current routine.             */            pLeaseData->currState = WAIT_OFFER;            clean_param (pParams);            free (pParams);        }    }    return (OK);}/********************************************************************************* selecting - Second offering state of client finite state machine** This routine continues the second state of the finite state machine. * It compares additional offers received from DHCP servers to the current* offer, and selects the offer which provides the longest lease. When the * time limit specified by the DHCPC_OFFER_TIMEOUT definition passes,* processing of the selected DHCP offer will continue with the requesting() * routine. If no DHCP offers were received, the BOOTP reply selected by the * wait_offer() routine will be used by the lease.** .IP* This routine is invoked by the event handler of the client monitor task,* and should only be called internally. Any user requests generated by* incorrect calls or delayed responses to the dhcpcBind() and dhcpcVerify() * routines are ignored.** RETURNS: OK (processing complete), DHCPC_DONE (remove lease),*          DHCPC_MORE (continue), or ERROR.** ERRNO: N/A** NOMANUAL*/int selecting (EVENT_DATA * pEvent  /* pointer to event descriptor */    ){    struct dhcp_param *pParams = NULL;    struct sockaddr_in dest;    struct ifnet *pIf;    int status;    LEASE_DATA *pLeaseData = NULL;    char *pMsgData;    int length;    char *option;#ifdef DHCPC_DEBUG    logMsg ("dhcp: Entered SELECTING state.\n", 0, 0, 0, 0, 0, 0);#endif    /*     * Use the cookie to access the lease-specific data structures. For now,     * just typecast the cookie. This translation could be replaced with a more     * sophisticated lookup at some point.     */    pLeaseData = (LEASE_DATA *) pEvent->leaseId;    /*     * The DHCP_USER_RELEASE event occurs in response to the dhcpcRelease()     * or dhcpcShutdown() call. Remove all data structures for this lease.     */    if (pEvent->type == DHCP_USER_RELEASE) {        dhcpcLeaseCleanup (pLeaseData);        return (DHCPC_DONE);    }    /* Ignore bind and verify user events, which are meaningless here. */    if (pEvent->source == DHCP_USER_EVENT)        return (OK);    if (pEvent->type == DHCP_TIMEOUT) {        /* Collection time ended - parameters structure holds chosen offer. */        if (pLeaseData->dhcpcParam->msgtype == DHCP_BOOTP) {            /*              * No DHCP request is needed if a BOOTP reply is chosen. Set             * lease data to process future events with the bound() routine.             */            pLeaseData->leaseType = DHCP_BOOTP;            pLeaseData->prevState = SELECTING;            pLeaseData->currState = BOUND;            status = use_parameter (pLeaseData->dhcpcParam, pLeaseData);            semTake (dhcpcMutexSem, WAIT_FOREVER);            if (status != 0) {#ifdef DHCPC_DEBUG                logMsg ("Error configuring network. Shutting down.\n", 0, 0, 0, 0, 0, 0);#endif                pLeaseData->leaseGood = FALSE;            } else {                pLeaseData->leaseGood = TRUE;            }            semGive (dhcpcMutexSem);            return (OK);        }        /*          * A DHCP offer was selected. Build and send the DHCP request using         * the original transaction ID from the discover message.         */        length = make_request (pLeaseData, REQUESTING, FALSE);        if (length < 0) {#ifdef DHCPC_DEBUG            logMsg ("Error making DHCP request. Entering INIT state.\n", 0, 0, 0, 0, 0, 0);#endif            pLeaseData->prevState = SELECTING;            pLeaseData->currState = INIT;            return (DHCPC_MORE);        }        dhcpcMsgOut.udp->uh_sum = 0;        dhcpcMsgOut.udp->uh_sum = udp_cksum (&spudph, (char *) dhcpcMsgOut.udp,                                             ntohs (spudph.ulen));        bzero ((char *) &dest, sizeof (struct sockaddr_in));        dest.sin_len = sizeof (struct sockaddr_in);        dest.sin_family = AF_INET;        dest.sin_addr.s_addr = dhcpcMsgOut.ip->ip_dst.s_addr;        pIf = pLeaseData->ifData.iface;        if (dhcpSend (pIf, &dest, sbuf.buf, length, TRUE) == ERROR) {#ifdef DHCPC_DEBUG            logMsg ("Can't send DHCPREQUEST\n", 0, 0, 0, 0, 0, 0);#endif            pLeaseData->prevState = SELECTING;            pLeaseData->currState = INIT;            return (DHCPC_MORE);        }        /*         * DHCP request sent. Set lease data to execute next state and         * start the retransmission timer.         */        pLeaseData->prevState = SELECTING;        pLeaseData->currState = REQUESTING;        pLeaseData->timeout = FIRSTTIMER;        pLeaseData->numRetry = 0;        wdStart (pLeaseData->timer, sysClkRateGet () *                 SLEEP_RANDOM (pLeaseData->timeout),                 (FUNCPTR) retrans_requesting, (int) pLeaseData);    } else {        /*         * Process DHCP message stored in receive buffer by monitor task.          * The 4-byte alignment of the IP header needed by Sun BSP's is         * guaranteed by the Berkeley Packet Filter during input.         */        pMsgData = pLeaseData->msgBuffer;        align_msg (&dhcpcMsgIn, pMsgData);        /* Examine type of message. Only accept DHCP offers. */        option = (char *) pickup_opt (dhcpcMsgIn.dhcp, DHCPLEN (dhcpcMsgIn.udp), _DHCP_MSGTYPE_TAG);        if (option == NULL) {            /*             * Message type not found -  discard untyped DHCP messages, and             * any BOOTP replies.             */            return (OK);        } else {            if (*OPTBODY (option) != DHCPOFFER)

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品成a人| 欧美蜜桃一区二区三区| 56国语精品自产拍在线观看| 中文字幕高清不卡| 久久99九九99精品| 欧美日韩一区二区三区在线看| 国产喷白浆一区二区三区| 奇米影视一区二区三区小说| 欧美三级蜜桃2在线观看| 国产亚洲人成网站| 蜜臀精品一区二区三区在线观看| 欧美日韩久久不卡| 一区二区三区欧美激情| 日本韩国欧美在线| 亚洲日本丝袜连裤袜办公室| 成人精品国产福利| 国产肉丝袜一区二区| 国产精品1024久久| 精品国产sm最大网站| 免播放器亚洲一区| 久久久久久久久99精品| 国产精品一区一区三区| 中文字幕av一区二区三区 | 国产米奇在线777精品观看| 日韩精品一区二区三区在线| 精品一区二区三区视频在线观看 | 1区2区3区国产精品| 不卡视频一二三| 国产精品久久久久四虎| 国产精品自拍在线| 亚洲欧美激情一区二区| 欧美日韩久久久| 精品一区二区三区在线视频| 亚洲国产精品成人综合色在线婷婷 | 久久国产夜色精品鲁鲁99| 久久夜色精品一区| 成人午夜又粗又硬又大| 亚洲国产一区二区三区青草影视 | 亚洲国产视频直播| 在线精品视频免费播放| 免费一级片91| 日韩伦理电影网| 日韩精品一区二区三区中文精品 | 亚洲一区二区不卡免费| 欧美一区二区三区在线观看| 成人av在线一区二区三区| 一区二区三区自拍| 日韩小视频在线观看专区| 国产不卡在线播放| 日本不卡的三区四区五区| 国产精品国产三级国产普通话蜜臀 | 亚洲一区二区三区影院| 久久男人中文字幕资源站| 色噜噜狠狠色综合中国| 成人综合激情网| 国产乱人伦精品一区二区在线观看 | 亚洲国产欧美在线人成| 国产精品三级电影| 精品99久久久久久| 91麻豆精品国产91久久久久| 99精品国产99久久久久久白柏| 精品亚洲成a人在线观看| 手机精品视频在线观看| 亚洲国产精品久久艾草纯爱| 国产精品国产三级国产普通话三级| 精品日韩在线一区| 精品三级av在线| 精品国产伦一区二区三区观看方式| 国产精品久久久一区麻豆最新章节| 精品理论电影在线| 欧美一级艳片视频免费观看| 5月丁香婷婷综合| 91精品午夜视频| 日韩欧美一区二区免费| 欧美疯狂做受xxxx富婆| 在线免费观看一区| 欧美亚洲国产一区二区三区| 91麻豆文化传媒在线观看| 91论坛在线播放| 欧美亚洲一区二区在线观看| 欧美猛男超大videosgay| 欧美高清一级片在线| 91精品国产麻豆国产自产在线| 精品久久久久久久久久久久包黑料 | 男女视频一区二区| 久久精品久久综合| 国产成人综合视频| 97久久超碰国产精品电影| 91成人在线精品| 91精选在线观看| 国产欧美一区二区三区鸳鸯浴 | 国产精品色哟哟| 国产精品丝袜久久久久久app| 综合久久国产九一剧情麻豆| 午夜精品视频一区| 国产一区二区剧情av在线| 一本到不卡精品视频在线观看| 91美女视频网站| 欧美xxxxxxxxx| 日韩一区在线免费观看| 美女性感视频久久| 97国产一区二区| 欧美不卡一区二区| 中文字幕一区二区不卡 | 色94色欧美sute亚洲线路一ni| 日韩三级免费观看| 亚洲男人的天堂av| 久草在线在线精品观看| 色av一区二区| 国产精品嫩草久久久久| 九色porny丨国产精品| 色中色一区二区| 国产欧美日韩精品a在线观看| 午夜成人在线视频| 972aa.com艺术欧美| 国产片一区二区| 韩日av一区二区| 欧美精品粉嫩高潮一区二区| 国产精品免费av| 国产精品自拍一区| 精品粉嫩aⅴ一区二区三区四区 | 亚洲精品免费看| 懂色av中文一区二区三区| 久久在线免费观看| 久久www免费人成看片高清| 91精品久久久久久蜜臀| 日韩中文字幕麻豆| 欧美日韩在线亚洲一区蜜芽| 中文字幕一区av| 99久久精品费精品国产一区二区| 国产区在线观看成人精品| 国产成人综合视频| 中文字幕成人av| 大美女一区二区三区| 久久女同性恋中文字幕| 国产一区不卡精品| 国产精品网曝门| 色94色欧美sute亚洲13| 一区二区三区加勒比av| 欧美日韩精品综合在线| 久久99九九99精品| 国产精品美女久久久久av爽李琼| 成人av电影免费观看| 亚洲一区二区欧美激情| 欧美久久一二区| 国产一区91精品张津瑜| 一区二区三区在线免费观看| 在线不卡一区二区| 国产成人啪午夜精品网站男同| 国产精品看片你懂得| 欧美精品色一区二区三区| 日本成人在线网站| 国产拍揄自揄精品视频麻豆| 欧美伊人精品成人久久综合97 | 欧美精品免费视频| 国产一区在线观看视频| 亚洲手机成人高清视频| 欧美一二区视频| 91色在线porny| 激情小说亚洲一区| 亚洲一区二区三区四区不卡| 精品久久久久一区| 欧美三级日韩三级| 99国产欧美另类久久久精品| 激情小说欧美图片| 亚洲v日本v欧美v久久精品| 国产亚洲1区2区3区| 欧美最猛黑人xxxxx猛交| 国产999精品久久久久久绿帽| 日本欧美大码aⅴ在线播放| 亚洲欧美在线高清| 欧美高清一级片在线观看| 欧美成人艳星乳罩| 日本高清不卡一区| www.综合网.com| 国产成人精品亚洲午夜麻豆| 国产综合久久久久影院| 日本va欧美va精品| 偷窥国产亚洲免费视频| 一区二区不卡在线视频 午夜欧美不卡在| 精品国产亚洲一区二区三区在线观看| 欧美女孩性生活视频| 欧美午夜精品久久久久久超碰| 色综合夜色一区| 日本伦理一区二区| 欧美视频中文字幕| 色婷婷激情一区二区三区| 色先锋资源久久综合| 欧美国产精品劲爆| 国产精品乱人伦中文| 日韩美女视频19| 亚洲中国最大av网站| 亚洲国产视频在线| 亚洲成人一二三| 久久99精品国产.久久久久久| 国产中文一区二区三区| 国产黄色91视频| 91高清视频在线| 884aa四虎影成人精品一区| 日韩一区二区在线观看视频播放|