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

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

?? dhcpcstate1.c

?? VxWorks下DHCP的源代碼!
?? C
?? 第 1 頁 / 共 4 頁
字號:
#endif    return;}/********************************************************************************* retrans_requesting - signal when reception interval for initial reply expires** This routine sends a timeout notification to the client monitor task when* the interval for receiving a server reply to a lease request expires. It* is called at interrupt level by a watchdog timer. The monitor task will * eventually execute the REQUESTING state to process the timeout event and * retransmit the DHCP request message.** RETURNS: N/A** ERRNO: N/A** NOMANUAL*/void retrans_requesting (LEASE_DATA * pLeaseData    /* lease-specific status information */    ){    /*      * Ignore the timeout if a state transition occurred during      * the scheduled timer interval.     */    if (pLeaseData->currState != REQUESTING)        return;    /* Construct and send a timeout message to the lease monitor task. */    dhcpcEventAdd (DHCP_AUTO_EVENT, DHCP_TIMEOUT, pLeaseData, TRUE);#ifdef DHCPC_DEBUG    logMsg ("retransmit DHCPREQUEST(REQUESTING)\n", 0, 0, 0, 0, 0, 0);#endif    return;}/********************************************************************************* inform - external configuration state of client finite state machine** This routine begins the inform message process, which obtains additional* parameters for a host configured with an external address. This processing* is isolated from the normal progression through the state machine. Like the* DHCP discover message, the inform message is the first transmission. * However, the only valid response is an acknowledgement by a server. As a* result, the process is a hybrid between the implementations of the initial* state and the requesting state which finalizes the lease establishment.** The routine implements the initial state of the finite state machine for an* externally assigned IP address. It is invoked by the event handler of the* client monitor task, and should only be called internally.** RETURNS: OK (processing completes), DHCPC_DONE (remove lease), or ERROR.** ERRNO: N/A** NOMANUAL*/int inform (EVENT_DATA * pEvent /* pointer to event descriptor */    ){    LEASE_DATA *pLeaseData = NULL;    struct sockaddr_in dest;    struct ifnet *pIf;    int length;                 /* Amount of data in message */    if (pEvent->source == DHCP_AUTO_EVENT) {        /*         * Received DHCP messages or timeouts can only reach this         * routine when repeating the DHCP INFORM message exchange.         * Ignore these stale notifications.         */        return (OK);    }    bzero (sbuf.buf, sbuf.size);#ifdef DHCPC_DEBUG    logMsg ("dhcpc: Entered INFORM 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;    wdCancel (pLeaseData->timer);   /* Reset watchdog timer. */    /*     * 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);    }    /*     * Set lease to generate newer RFC 2131 messages. Older servers might     * ignore messages if their length is less than the minimum length     * obtained with a fixed options field, but will not recognize an     * inform message anyway.     */    pLeaseData->oldFlag = FALSE;    /* Create DHCP INFORM message and assign new transaction ID. */    length = make_request (pLeaseData, INFORMING, TRUE);    if (length < 0) {#ifdef DHCPC_DEBUG        logMsg ("Error making DHCP inform message. Can't continue.\n", 0, 0, 0, 0, 0, 0);#endif        return (ERROR);    }    dhcpcMsgOut.dhcp->secs = 0;    dhcpcMsgOut.udp->uh_sum = 0;    dhcpcMsgOut.udp->uh_sum = udp_cksum (&spudph, (char *) dhcpcMsgOut.udp, ntohs (spudph.ulen));#ifdef DHCPC_DEBUG    logMsg ("Sending DHCPINFORM.\n", 0, 0, 0, 0, 0, 0);#endif    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 DHCPINFORM.\n", 0, 0, 0, 0, 0, 0);#endif        return (ERROR);    }    /* Set lease data to execute next state and start retransmission timer. */    pLeaseData->prevState = INFORMING;    pLeaseData->currState = REQUESTING;    pLeaseData->timeout = FIRSTTIMER;    pLeaseData->numRetry = 0;    wdStart (pLeaseData->timer, sysClkRateGet () *             SLEEP_RANDOM (pLeaseData->timeout), (FUNCPTR) retrans_requesting, (int) pLeaseData);    return (OK);                /* Next state is REQUESTING */}/********************************************************************************* init - initial state of client finite state machine** This routine implements the initial state of the finite state machine. * After a random backoff delay, it resets the network interface if necessary* and transmits the DHCP discover message. This state may be repeated after a * later state if a lease is not renewed or a recoverable error occurs. It * could also be executed following unrecoverable errors. The routine is * invoked by the event handler of the client monitor task, and should only be * called internally.** RETURNS: OK (processing completes), DHCPC_DONE (remove lease), or ERROR.** ERRNO: N/A** NOMANUAL*/int init (EVENT_DATA * pEvent   /* pointer to event descriptor */    ){    LEASE_DATA *pLeaseData = NULL;    STATUS result;    struct sockaddr_in dest;    struct ifnet *pIf;    int length;    bzero (sbuf.buf, sbuf.size);#ifdef DHCPC_DEBUG    logMsg ("dhcpc: Entered INIT 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;    wdCancel (pLeaseData->timer);   /* Reset watchdog timer. */    /*     * 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);    }    /*      * Unrecoverable errors are only removed when the dhcpcBind() call sets     * the state indicators to INIT_REBOOT. Ignore all other events until then.     */    if (pLeaseData->prevState == DHCPC_ERROR)        return (OK);    semTake (dhcpcMutexSem, WAIT_FOREVER);  /* Reset status indicator. */    pLeaseData->leaseGood = FALSE;    semGive (dhcpcMutexSem);    /*     * Set lease to generate newer RFC 2131 messages initially. The client     * will revert to the older message format if it does not receive a     * response to the initial set of discover messages. Older servers might     * ignore messages less than the minimum length obtained with a fixed     * options field. The older format pads the field to reach that length.     */    pLeaseData->oldFlag = FALSE;    /* Create DHCP_DISCOVER message and assign new transaction ID. */    length = make_discover (pLeaseData, TRUE);    /*      * Random delay from one to ten seconds to avoid startup congestion.     * (Delay length specified in RFC 1541).     *     */    taskDelay (sysClkRateGet () * (1 + (rand () % INIT_WAITING)));    /*      * If an event notification hook is present, send a notification of     * the lease expiration when appropriate. (None is needed after a reboot).     */    if (pLeaseData->eventHookRtn != NULL) {        if (pLeaseData->prevState != REBOOTING && pLeaseData->prevState != INIT_REBOOT)            result = (*pLeaseData->eventHookRtn) (DHCPC_LEASE_INVALID, pEvent->leaseId);    }    /*      * Reset the network interface if it used the address     * information provided by the indicated lease.     */    if (pLeaseData->autoConfig || pLeaseData->leaseType == DHCP_AUTOMATIC) {        reset_if (&pLeaseData->ifData);    }    dhcpcMsgOut.dhcp->secs = 0;    dhcpcMsgOut.udp->uh_sum = 0;    dhcpcMsgOut.udp->uh_sum = udp_cksum (&spudph, (char *) dhcpcMsgOut.udp, ntohs (spudph.ulen));    if (dhcpTime (&pLeaseData->initEpoch) == -1) {#ifdef DHCPC_DEBUG        logMsg ("time() error setting initEpoch\n", 0, 0, 0, 0, 0, 0);#endif        return (ERROR);    }#ifdef DHCPC_DEBUG    logMsg ("Sending DHCPDISCOVER\n", 0, 0, 0, 0, 0, 0);#endif    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 DHCPDISCOVER\n", 0, 0, 0, 0, 0, 0);#endif        return (ERROR);    }    /* Set lease data to execute next state and start retransmission timer. */    pLeaseData->prevState = INIT;    pLeaseData->currState = WAIT_OFFER;    pLeaseData->timeout = FIRSTTIMER;    pLeaseData->numRetry = 0;    wdStart (pLeaseData->timer, sysClkRateGet () *             SLEEP_RANDOM (pLeaseData->timeout), (FUNCPTR) retrans_wait_offer, (int) pLeaseData);    return (OK);                /* Next state is WAIT_OFFER */}/********************************************************************************* wait_offer - Initial offering state of client finite state machine** This routine contains the initial part of the second state of the finite * state machine. It handles all processing until an acceptable DHCP offer is * received. If a timeout occurred, it retransmits the DHCP discover message. * Otherwise, it evaluates the parameters contained in the received DHCP offer. * If the minimum requirements are met, processing will continue with the * selecting() routine. If no offer is received before the retransmission* limit is reached, the negotiation process fails.* .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 completes), DHCPC_DONE (remove lease), or ERROR.** ERRNO: N/A** NOMANUAL*/int wait_offer (EVENT_DATA * pEvent /* pointer to event descriptor */    ){    char errmsg[255];    char *option;    int timer = 0;    int retry = 0;    struct dhcp_param *pParams = NULL;    LEASE_DATA *pLeaseData = NULL;    char *pMsgData;    int length;    /*     * Use the cookie to access the lease-specific data structures. For now,     * just typecast the cookie. This translation could be replaced with a more

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久99在线观看| 中文字幕欧美区| 日韩一区二区三区高清免费看看| 欧美性xxxxxxxx| 欧美精品18+| 欧美日韩视频在线第一区 | 日韩欧美成人激情| 久久综合九色综合欧美98| 久久综合色8888| 亚洲欧洲99久久| 亚洲青青青在线视频| 亚洲精品乱码久久久久久久久| 亚洲色图制服诱惑 | 国产精品视频你懂的| 国产精品拍天天在线| 亚洲欧美日韩综合aⅴ视频| 亚洲精品午夜久久久| 亚洲午夜av在线| 麻豆91在线看| 99久久精品费精品国产一区二区| 高清av一区二区| 91美女片黄在线观看91美女| 欧美在线观看18| 久久亚洲精精品中文字幕早川悠里| 中文一区在线播放| 亚洲成人三级小说| 久久久久99精品国产片| 欧美国产禁国产网站cc| 伊人色综合久久天天人手人婷| 免费在线成人网| 成人激情免费电影网址| 国产黄色精品网站| 欧美乱妇20p| 欧美成人精品福利| 欧美精品日韩综合在线| 中文字幕av一区 二区| 午夜激情久久久| 成人av网在线| 欧美本精品男人aⅴ天堂| 精品日韩欧美一区二区| 午夜视黄欧洲亚洲| 99在线精品观看| 久久影院午夜论| 五月天精品一区二区三区| 成人性生交大片免费看中文| 国产一区二区三区国产| 欧美日韩免费视频| 亚洲欧美日韩国产成人精品影院| 蜜臀av在线播放一区二区三区| 99热这里都是精品| 亚洲高清一区二区三区| 韩国三级电影一区二区| 欧美日高清视频| 亚洲日本电影在线| 国产91精品在线观看| 日韩一区二区三区在线观看| 国产精品久久久久一区二区三区 | 欧美一区二区观看视频| 国产日韩欧美激情| 国产综合色视频| 日韩一卡二卡三卡国产欧美| 日韩美女久久久| 中文字幕不卡一区| 午夜精品在线视频一区| av在线一区二区三区| 欧美主播一区二区三区美女| 国产欧美精品日韩区二区麻豆天美| 国产一区二区导航在线播放| 欧美国产日本视频| 欧美日韩国产欧美日美国产精品| 国产一区在线看| 亚洲品质自拍视频| 日韩免费视频线观看| 成人一区二区三区中文字幕| 无吗不卡中文字幕| 中文字幕不卡在线| 欧美一区二区成人| 在线观看日韩一区| 国产91精品一区二区麻豆亚洲| 国产精品一区二区视频| 亚洲综合小说图片| 欧美成人免费网站| 在线精品视频免费播放| 国产精品综合在线视频| 亚洲国产aⅴ成人精品无吗| 日本一区二区三区免费乱视频 | 久久99精品久久久久久国产越南| 国产精品久久久久久亚洲毛片| 欧美日本乱大交xxxxx| 成人精品一区二区三区中文字幕| 无码av免费一区二区三区试看| 欧美国产视频在线| 久久天堂av综合合色蜜桃网| 欧美精品一级二级三级| 色久优优欧美色久优优| 国产九色精品成人porny| 日韩高清一级片| 亚洲一区二区五区| 一区二区三区中文字幕精品精品| 久久久久久久久久久黄色| 91精品欧美久久久久久动漫 | 亚洲精品中文在线影院| 欧美国产日韩精品免费观看| 久久久亚洲午夜电影| 欧美性淫爽ww久久久久无| 色综合一区二区三区| 暴力调教一区二区三区| 国产精品亚洲综合一区在线观看| 久久精品国内一区二区三区| 日韩电影在线观看一区| 午夜精品福利在线| 五月婷婷综合激情| 婷婷开心激情综合| 天堂va蜜桃一区二区三区| 国产一区二区成人久久免费影院| 另类中文字幕网| 国产精品一区二区三区99| 韩日欧美一区二区三区| 韩国女主播一区| 国产91在线|亚洲| 不卡的av网站| 色婷婷久久一区二区三区麻豆| 91一区二区三区在线观看| 色综合久久中文综合久久97| 日本韩国一区二区三区| 色av综合在线| 欧美精品v国产精品v日韩精品| 3751色影院一区二区三区| 日韩一区二区三区免费看| 日韩一区二区免费视频| 久久亚洲影视婷婷| 国产精品福利一区二区| 一区二区三区成人在线视频| 亚洲成av人影院| 国产伦精品一区二区三区免费迷| 国产高清精品网站| 一本一道综合狠狠老| 欧美老女人在线| 久久久精品日韩欧美| 亚洲欧洲综合另类| 日韩成人一级大片| 国产成人亚洲精品青草天美| 91香蕉视频黄| 日韩欧美国产1| 国产精品久久影院| 天天综合网天天综合色| 国产一区不卡精品| 91麻豆精东视频| 日韩欧美一级特黄在线播放| 国产色爱av资源综合区| 亚洲一区二区精品久久av| 精久久久久久久久久久| 99精品国产一区二区三区不卡| 欧美乱妇15p| 成人欧美一区二区三区小说| 午夜精品一区在线观看| 成人蜜臀av电影| 91精品国产综合久久福利软件| 国产日韩精品一区二区浪潮av| 亚洲综合激情网| 国产成人亚洲综合色影视| 欧美性色黄大片| 中文在线一区二区| 蜜桃91丨九色丨蝌蚪91桃色| 91丨九色丨国产丨porny| 欧美www视频| 亚洲综合成人在线视频| 精品视频123区在线观看| 久久久久一区二区三区四区| 怡红院av一区二区三区| 国产一区二区三区国产| 一本一道波多野结衣一区二区| 日韩精品综合一本久道在线视频| 亚洲免费在线播放| 成人avav影音| 国产人成一区二区三区影院| 蜜臀久久99精品久久久久宅男| 色琪琪一区二区三区亚洲区| 国产精品视频你懂的| 国产麻豆视频一区二区| 日韩一区二区免费在线观看| 亚洲高清不卡在线| 欧美性生交片4| 综合网在线视频| 丰满岳乱妇一区二区三区| 日韩久久免费av| 日本成人在线看| 欧美精品久久99久久在免费线 | 精品视频一区二区三区免费| 1区2区3区精品视频| 成人av网址在线观看| 中文字幕av一区 二区| 国产传媒欧美日韩成人| 久久亚洲影视婷婷| 国产成人精品影视| 国产亚洲欧美激情| 风间由美一区二区av101| 国产日韩欧美综合在线| 菠萝蜜视频在线观看一区| 国产情人综合久久777777|