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

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

?? dhcpcstate2.c

?? VxWorks下DHCP的源代碼!
?? C
?? 第 1 頁 / 共 5 頁
字號:
}/********************************************************************************* retrans_renewing - signal when reception interval for renewal reply expires** This routine sends a timeout notification to the client monitor task when * the interval for receiving a server reply to a renewal request expires. It* is called at interrupt level by a watchdog timer. The monitor task will * eventually execute the RENEWING state to process the timeout event and* retransmit the DHCP request message.** RETURNS: N/A** ERRNO: N/A** NOMANUAL*/void retrans_renewing (LEASE_DATA * pLeaseData  /* lease-specific status information */    ){    /*     * Ignore the timeout if a state transition occurred     * before processing completed.     */    if (pLeaseData->currState != RENEWING)        return;    /* Construct and send a timeout message to the lease monitor task. */    dhcpcEventAdd (DHCP_AUTO_EVENT, DHCP_TIMEOUT, pLeaseData, TRUE);    return;}/********************************************************************************* retrans_rebinding - signal when reception interval for rebind offer expires** This routine sends a timeout notification to the client monitor task when * the interval for receiving a lease offer from a different server expires. It* is called at interrupt level by a watchdog timer. The monitor task will * eventually execute the REBINDING state to process the timeout event and* retransmit the DHCP discover message.** RETURNS: N/A** ERRNO: N/A** NOMANUAL*/void retrans_rebinding (LEASE_DATA * pLeaseData /* lease-specific status information */    ){    /*     * Ignore the timeout if a state transition occurred     * before processing completed.     */    if (pLeaseData->currState != REBINDING)        return;    /* Construct and send a timeout message to the lease monitor task. */    dhcpcEventAdd (DHCP_AUTO_EVENT, DHCP_TIMEOUT, pLeaseData, TRUE);    return;}/********************************************************************************* retrans_reboot_verify - retransmission in rebooting state** This routine signals the DHCP client monitor task when the timeout interval * for receiving a server reply expires for the lease indicated by the * <pLeaseData> parameter. The client monitor task will pass the event to the * reboot_verify() routine in the finite state machine.* retrans_reboot_verify - signal when verification reception interval expires** This routine sends a timeout notification to the client monitor task when * the interval for receiving a server reply to a reboot (or verify) request * expires. It is called at interrupt level by a watchdog timer. The monitor * task will eventually execute the REBOOTING or VERIFYING state to process * the timeout event and retransmit the appropriate DHCP request message.** RETURNS: N/A** ERRNO: N/A** NOMANUAL*/void retrans_reboot_verify (LEASE_DATA * pLeaseData /* lease-specific status information */    ){    /*     * Ignore the timeout if a state transition occurred     * before processing completed.     */    if (pLeaseData->currState != REBOOTING && pLeaseData->currState != VERIFYING)        return;    /* Construct and send a timeout message to the lease monitor task. */    dhcpcEventAdd (DHCP_AUTO_EVENT, DHCP_TIMEOUT, pLeaseData, TRUE);    return;}/********************************************************************************* bound - Active state of client finite state machine** This routine contains the fourth state of the client finite state machine.* It accepts and services all user requests for BOOTP and infinite DHCP leases* throughout their lifetimes. For finite DHCP leases, it handles all processing* until one of the lease timers expires. At that point, processing continues * with the renewing() or rebinding() routines.* .IP* This routine is invoked by the event handler of the client monitor task,* and should only be called internally. Any arriving DHCP messages contain* stale offers or responses and are discarded. User requests generated* by calls to the dhcpcRelease() and dhcpcVerify() routines are accepted.** RETURNS: OK (processing complete), DHCPC_DONE (remove lease),*          DHCPC_MORE (continue), or ERROR.** ERRNO: N/A** NOMANUAL*/int bound (EVENT_DATA * pEvent  /* pointer to event descriptor */    ){    int timeout;                /* Epoch when intermediate lease timers expire. */    int limit;                  /* Epoch when lease expires. */    LEASE_DATA *pLeaseData;    int status;    int length;    time_t curr_epoch = 0;    struct sockaddr_in dest;    struct ifnet *pIf;    struct ifreq ifr;    /*     * 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;    /*      * Process events for BOOTP and infinite DHCP leases. Timeouts and     * incoming messages should never occur for either type of lease. Also,     * BOOTP leases require no special processing in response to user requests     * for verification or shutdown.     */    if (pLeaseData->dhcpcParam->lease_duration == ~0) {        /* Ignore timeouts and received DHCP messages. */        if (pEvent->source != DHCP_AUTO_EVENT) {            /* Process user requests. */            if (pEvent->type == DHCP_USER_RELEASE) {    /* Relinquish lease. */                if (pLeaseData->leaseType != DHCP_BOOTP)                    release (pLeaseData, TRUE);                return (DHCPC_DONE);            }            if (pEvent->type == DHCP_USER_VERIFY) { /* Verify lease. */                if (pLeaseData->leaseType != DHCP_BOOTP) {                    /* Set the lease data to execute verify() routine. */                    pLeaseData->prevState = BOUND;                    pLeaseData->currState = VERIFY;                    return (DHCPC_MORE);                }            }        }        return (OK);    }    /* The rest of the routine handles processing for finite DHCP leases. */    bzero (sbuf.buf, sbuf.size);    if (dhcpTime (&curr_epoch) == -1) {#ifdef DHCPC_DEBUG        logMsg ("time() error in bound()\n", 0, 0, 0, 0, 0, 0);#endif        return (ERROR);    }    if (pLeaseData->prevState != BOUND) {        /*          * The interval between lease acknowledgement and the entry to the          * bound() routine depends on the workload of the client monitor task          * and is completely unpredictable. Check all lease timers, since they          * might have expired during that time.         */        wdCancel (pLeaseData->timer);#ifdef DHCPC_DEBUG        logMsg ("dhcpc: Entering BOUND state.\n", 0, 0, 0, 0, 0, 0);#endif        timeout = pLeaseData->dhcpcParam->lease_origin + pLeaseData->dhcpcParam->dhcp_t2;        limit = pLeaseData->dhcpcParam->lease_origin + pLeaseData->dhcpcParam->lease_duration;        if (curr_epoch >= limit || timeout <= curr_epoch) {            /* Lease or second timer expired - create a timeout event. */            pEvent->source = DHCP_AUTO_EVENT;            pEvent->type = DHCP_TIMEOUT;        } else {            timeout = pLeaseData->dhcpcParam->lease_origin + pLeaseData->dhcpcParam->dhcp_t1;            if (timeout <= curr_epoch) {                /* First timer expired - create a timeout event. */                pEvent->source = DHCP_AUTO_EVENT;                pEvent->type = DHCP_TIMEOUT;            } else {                /* No timers expired - set to time remaining with T1. */                timeout = pLeaseData->dhcpcParam->lease_origin +                    pLeaseData->dhcpcParam->dhcp_t1 - curr_epoch;                wdStart (pLeaseData->timer, sysClkRateGet () * timeout,                         (FUNCPTR) alarm_bound, (int) pLeaseData);            }        }        pLeaseData->prevState = BOUND;#ifdef DHCPC_DEBUG        logMsg ("dhcpc: Ready for user requests.\n", 0, 0, 0, 0, 0, 0);#endif    }    if (pEvent->type == DHCPC_STATE_BEGIN)  /* Initial processing finished. */        return (OK);    if (pEvent->source == DHCP_AUTO_EVENT) {        /* If no timers have expired, ignore received DHCP messages. */        if (pEvent->type == DHCP_MSG_ARRIVED)            return (OK);        else {            /*             * Initiate renewal or rebinding when lease timers expire.             * If the client monitor task is overloaded, processing may             * occur well after the event notification is received.             * In the worst case, the lease could expire before any             * processing is performed. The timers can also expire             * during a requested lease verification. Excess timeout              * notifications which might be present from earlier states              * are ignored.             */            limit = pLeaseData->dhcpcParam->lease_origin + pLeaseData->dhcpcParam->lease_duration;            if (curr_epoch >= limit) {                /*                 * Lease expired between notification and processing.                 * Resume filtering with the BPF device (suspended before                 * entry to this routine) before restarting.                 */                bzero ((char *) &ifr, sizeof (struct ifreq));                sprintf (ifr.ifr_name, "%s%d",                         pLeaseData->ifData.iface->if_name, pLeaseData->ifData.iface->if_unit);                ioctl (pLeaseData->ifData.bpfDev, BIOCSTART, (int) &ifr);                pLeaseData->prevState = REQUESTING;                pLeaseData->currState = INIT;                return (DHCPC_MORE);            }            timeout = pLeaseData->dhcpcParam->lease_origin + pLeaseData->dhcpcParam->dhcp_t2;            if (timeout <= curr_epoch && curr_epoch < limit) {                /* Second timer expired: contact any server for parameters. */#ifdef DHCPC_DEBUG                logMsg ("Entering REBINDING state.\n", 0, 0, 0, 0, 0, 0);#endif                length = make_request (pLeaseData, REBINDING, TRUE);                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;                /* Remember to re-enable the BPF filter here. */                bzero ((char *) &ifr, sizeof (struct ifreq));                sprintf (ifr.ifr_name, "%s%d",                         pLeaseData->ifData.iface->if_name, pLeaseData->ifData.iface->if_unit);                ioctl (pLeaseData->ifData.bpfDev, BIOCSTART, (int) &ifr);                status = dhcpSend (pIf, &dest, sbuf.buf, length, TRUE);#ifdef DHCPC_DEBUG                if (status == ERROR)                    logMsg ("Can't send DHCPREQUEST(REBINDING)\n", 0, 0, 0, 0, 0, 0);#endif                pLeaseData->prevState = BOUND;                pLeaseData->currState = REBINDING;                /* Set a timeout in case we miss the reply. */                timeout = limit - curr_epoch;                timeout /= 2;                if (timeout < 60)                    timeout = 60;                wdStart (pLeaseData->timer, sysClkRateGet () * timeout,                         (FUNCPTR) retrans_rebinding, (int) pLeaseData);                return (OK);            }            timeout = pLeaseData->dhcpcParam->lease_origin + pLeaseData->dhcpcParam->dhcp_t1;            limit = pLeaseData->dhcpcParam->lease_origin + pLeaseData->dhcpcParam->dhcp_t2;            if (timeout <= curr_epoch && curr_epoch < limit) {                /*                 * First timer expired:                  * attempt to renew lease with current server.                 * Resume filtering with the BPF device (suspended while                  * bound).                 */                bzero ((char *) &ifr, sizeof (struct ifreq));                sprintf (ifr.ifr_name, "%s%d", pLeaseData->ifData.iface->if_name,                         pLeaseData->ifData.iface->if_unit);                ioctl (pLeaseData->ifData.bpfDev, BIOCSTART, (int) &ifr);#ifdef DHCPC_DEBUG                logMsg ("Entering RENEWING state.\n", 0, 0, 0, 0, 0, 0);#endif                length = make_request (pLeaseData, RENEWING, TRUE);                /* Ignore transmission failures for handling by timeout. */                status = send_unicast (&pLeaseData->dhcpcParam->server_id,                                       dhcpcMsgOut.dhcp, length);#ifdef DHCPC_DEBUG                if (status < 0)                    logMsg ("Can't send DHCPREQUEST(RENEWING)\n.", 0, 0, 0, 0, 0, 0);#endif

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人免费av在线| 9191国产精品| 国产精品996| 久久精品国产99国产| 日韩福利电影在线| 午夜欧美视频在线观看| 日韩精品免费视频人成| 婷婷综合在线观看| 日日摸夜夜添夜夜添精品视频| 午夜欧美在线一二页| 天天综合日日夜夜精品| 日韩电影在线一区二区三区| 日韩主播视频在线| 欧美aⅴ一区二区三区视频| 免费人成在线不卡| 国产麻豆精品在线| 成人性生交大片免费| 99热这里都是精品| 91成人免费在线| 9191久久久久久久久久久| 日韩亚洲欧美一区| 久久综合国产精品| 国产精品久久久久三级| 亚洲欧美韩国综合色| 午夜视频在线观看一区二区| 人妖欧美一区二区| 国产美女精品在线| 成人精品一区二区三区中文字幕| 99精品黄色片免费大全| 欧美午夜理伦三级在线观看| 欧美精品久久天天躁| 日韩精品一区二区在线观看| 久久久久国产精品麻豆ai换脸| 国产精品传媒在线| 五月激情综合色| 国内精品伊人久久久久av一坑| 成人h精品动漫一区二区三区| 97se亚洲国产综合在线| 欧美日本一区二区三区四区| 日韩免费视频一区| 国产精品色一区二区三区| 亚洲国产一二三| 国模冰冰炮一区二区| 99国产精品国产精品毛片| 欧美群妇大交群的观看方式| 久久影院午夜论| 国产精品国产三级国产a| 亚洲第一狼人社区| 国产成人综合在线播放| 国产日本欧美一区二区| 亚洲制服丝袜在线| 国产原创一区二区| 欧洲精品一区二区| 久久久不卡网国产精品一区| 一区二区三区在线播放| 六月婷婷色综合| 92精品国产成人观看免费 | 欧美日韩mp4| 久久天天做天天爱综合色| 一区二区三区四区不卡视频| 久久狠狠亚洲综合| 在线观看亚洲一区| 久久久久久**毛片大全| 亚洲国产精品嫩草影院| 不卡免费追剧大全电视剧网站| 3atv一区二区三区| 综合av第一页| 韩国av一区二区三区| 欧美日韩久久久一区| 国产精品久久久久久久久免费相片 | 中文字幕va一区二区三区| 亚洲地区一二三色| 成人免费视频app| 日韩欧美一区二区三区在线| 综合色天天鬼久久鬼色| 精东粉嫩av免费一区二区三区| 欧美视频在线一区二区三区| 国产人妖乱国产精品人妖| 另类人妖一区二区av| 日本大香伊一区二区三区| 欧美激情在线看| 久久99精品久久久久久动态图| 欧美三级中文字幕| 一区二区三区色| 成人免费视频播放| 久久久久久久综合狠狠综合| 美女www一区二区| 欧美精品日韩综合在线| 一区二区三区四区激情| 色综合天天综合网天天狠天天| 国产欧美精品在线观看| 国产剧情一区二区| 精品国产乱码久久久久久久久| 日本免费在线视频不卡一不卡二| 欧洲人成人精品| 一区二区三区四区激情 | 国产精品久久久久aaaa樱花| 激情综合网天天干| 欧美不卡一区二区三区四区| 视频精品一区二区| 欧美精品国产精品| 亚洲成a人v欧美综合天堂下载| 97久久精品人人澡人人爽| 中文字幕制服丝袜一区二区三区 | 欧美视频一区在线观看| 亚洲美女屁股眼交3| 91理论电影在线观看| 亚洲精品国久久99热| 一本大道av伊人久久综合| 亚洲人成7777| 欧美自拍偷拍午夜视频| 亚洲国产欧美另类丝袜| 欧美精品久久久久久久多人混战| 午夜亚洲福利老司机| 91精品国产丝袜白色高跟鞋| 日本特黄久久久高潮| 日韩一区二区三区观看| 美国av一区二区| 久久久不卡网国产精品二区| 成人午夜精品在线| 亚洲欧美另类久久久精品2019| 欧美怡红院视频| 日本怡春院一区二区| 日韩免费一区二区| 高清在线观看日韩| 日韩一区在线看| 91精品福利视频| 青娱乐精品视频| 久久久久久久久伊人| 9色porny自拍视频一区二区| 亚洲一区二区三区免费视频| 欧美一级一级性生活免费录像| 久久精品久久久精品美女| 国产婷婷色一区二区三区在线| 成人av在线资源网站| 亚洲成人一区在线| 久久一留热品黄| 91麻豆国产香蕉久久精品| 日韩中文字幕区一区有砖一区| 欧美精品一区二区在线播放| 成人av网站免费| 亚洲福利视频三区| 久久免费电影网| 在线区一区二视频| 国产毛片精品国产一区二区三区| 专区另类欧美日韩| 日韩一区二区免费在线电影| 国产精品自在欧美一区| 亚洲人成在线播放网站岛国| 日韩一级黄色大片| 国产传媒久久文化传媒| 亚洲高清免费视频| 国产欧美一区二区精品仙草咪| 色8久久精品久久久久久蜜| 久久黄色级2电影| 亚洲欧美日韩在线| 欧美v国产在线一区二区三区| 99在线精品一区二区三区| 日韩电影免费在线观看网站| 国产精品久久久久影院色老大 | 一区2区3区在线看| wwww国产精品欧美| 91成人免费在线视频| 国产成人亚洲精品青草天美| 三级一区在线视频先锋| 国产精品伦理一区二区| 欧美一级片在线观看| 99久久精品免费看| 人禽交欧美网站| 国产精品不卡一区二区三区| 日韩一区二区三区四区五区六区| av影院午夜一区| 国产中文字幕精品| 亚洲成a天堂v人片| 中文字幕一区在线观看视频| 日韩精品一区二区三区中文精品| 欧美伊人久久大香线蕉综合69| 国产成人亚洲综合色影视| 蜜臀av一区二区三区| 亚洲一区二区高清| 亚洲视频一二三| 久久久精品影视| 日韩欧美一区二区在线视频| 色婷婷精品久久二区二区蜜臀av| 国产激情精品久久久第一区二区| 美女被吸乳得到大胸91| 亚洲一区二区综合| 亚洲精品欧美专区| 中文字幕一区二区在线观看| 国产日韩av一区| 久久综合久久99| 欧美不卡视频一区| 欧美一区二区在线不卡| 欧美日本一区二区| 在线免费一区三区| 色婷婷av一区二区三区gif| av电影在线观看一区| 丁香婷婷综合激情五月色| 国产高清精品网站| 国产在线视频不卡二|