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

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

?? dhcpccommonlib.c

?? vxwork源代碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
    pMbuf = bcopy_to_mbufs (pData, size, 0, pIf, NONE);    if (pMbuf == NULL)        return (ERROR);    if (broadcastFlag)        pMbuf->mBlkHdr.mFlags |= M_BCAST;    level = splnet ();    result = pIf->if_output (pIf, pMbuf, (struct sockaddr *)pDest, NULL);    splx (level);    if (result)        return (ERROR);    return (OK);    }/********************************************************************************* dhcpcRead - handle all incoming DHCP messages** This routine monitors all active BPF devices for new DHCP messages and* signals the lease monitor task when a valid message arrives. It is the* entry point for the data retrieval task created during the library* initialization and should only be called internally.** RETURNS: N/A** ERRNO: N/A** NOMANUAL*/void dhcpcRead (void)    {    STATUS 	result;    EVENT_DATA 	newEvent;    int key;    char * 	pMsgData = NULL;    BOOL 	dataFlag;    fd_set 	readFds;    int 	fileNum = 0;    int 	maxFileNum;    int 	slot = 0; 	/* Current buffer for holding messages. */    int 	maxSlot = 10; 	/* Matches size of event ring. */    int 	loop;    int 	bufSize = 0;    struct bpf_hdr * 	pMsgHdr;    int 	msglen;    int 	curlen;    int 	totlen; 	/* Amount of data in BPF buffer. */    struct timeval timeout;    timeout.tv_sec = timeout.tv_usec = 0;     FOREVER        {        /*         * Wait until a message arrives or a new DHCP session is available.         * The dhcpcInit() routine forces the read task to rebuild the list         * of active devices by sending an empty message to the selected DHCP         * client port so that the select routine exits.         */        FD_ZERO (&readFds);        maxFileNum = 0;        if (!_dhcpcBootFlag)            {            /*             * Runtime DHCP sessions monitor a UDP socket bound to the             * DHCP port to read and discard messages which were already             * processed through the Berkeley Packet Filters. This socket             * also allows the read loop to restart when a new DHCP session             * begins. The boot time DHCP session is unable to use any             * sockets since no fully configured devices exist.             */                        FD_SET (dhcpcDataSock, &readFds);            maxFileNum = dhcpcDataSock;            }        /* Create list of active BPF devices for monitoring. */        for (loop = 0; loop < dhcpcMaxLeases; loop++)            {            if (dhcpcLeaseList [loop] != NULL &&                    dhcpcLeaseList [loop]->initFlag)                {                fileNum = dhcpcLeaseList [loop]->ifData.bpfDev;                FD_SET (fileNum, &readFds);                if (fileNum > maxFileNum)                    maxFileNum = fileNum;                }            }        /*         * No BPF devices will be active until a lease session starts         * which uses an interface without an assigned IP address.         */        maxFileNum++;     /* Adjust maximum for select() routine. */        /*         * Check for an incoming DHCP message. None may be available         * if a new session started.         */        result = select (maxFileNum, &readFds, NULL, NULL, NULL);        if (result <= 0)            continue;        /*         * Ignore the message if the current buffer is full. That         * condition indicates an overflow of the message "ring".         */        if (dhcpcMessageList [slot].writeFlag == FALSE)            continue;        dhcpcMessageList [slot].writeFlag = FALSE;        pMsgData = dhcpcMessageList [slot].msgBuffer;        if (!_dhcpcBootFlag)            {            /*             * For runtime DHCP sessions, read and discard any DHCP             * messages which reach the socket layer. An (empty)             * DHCP message is sent to the loopback address when a             * new session begins. This operation also removes             * messages which were already handled by the Berkeley             * Packet Filter, but also reach the socket layer if             * any device is configured with an IP address. Creating             * a socket to receive them prevents the transmission of             * ICMP errors.             */            dataFlag = FD_ISSET (dhcpcDataSock, &readFds);            if (dataFlag)                {                read (dhcpcDataSock, pMsgData, dhcpcBufSize);                dhcpcMessageList [slot].writeFlag = TRUE;                continue;                }            }        /* Read the first available DHCP message. */        for (loop = 0; loop < dhcpcMaxLeases; loop++)            {            if (dhcpcLeaseList [loop]->initFlag)                {                fileNum = dhcpcLeaseList [loop]->ifData.bpfDev;                dataFlag = FD_ISSET (fileNum, &readFds);                if (dataFlag)                    {                    /*                     * Any users must read an entire BPF buffer. The size                     * is set during the initialization for each lease.                     */                    bufSize = dhcpcLeaseList [loop]->ifData.bufSize;                    break;                    }                }            }        if (loop == dhcpcMaxLeases)            {            /* No DHCP sessions are using the BPF devices. */            continue;            }         /*         * Ignore any read errors. The DHCP protocol is designed to handle         * any problems with false arrival notifications or invalid messages.         */        totlen = read (fileNum, pMsgData, bufSize);        /* Signal lease monitor for each DHCP message in the BPF buffer. */        newEvent.source = DHCP_AUTO_EVENT;        newEvent.type = DHCP_MSG_ARRIVED;        newEvent.leaseId = dhcpcLeaseList [loop];        newEvent.slot = slot;        msglen = curlen = 0;        pMsgHdr = (struct bpf_hdr *)pMsgData;        while (curlen < totlen)            {            msglen = BPF_WORDALIGN(pMsgHdr->bh_hdrlen + pMsgHdr->bh_caplen);            curlen += msglen;            /* Set the pointer to skip the BPF and link level headers. */            newEvent.pMsg = pMsgData + pMsgHdr->bh_hdrlen +                                pMsgHdr->bh_linklen;            if (curlen < totlen)                newEvent.lastFlag = FALSE;            else                newEvent.lastFlag = TRUE;            /* Lock interrupts to prevent conflicts with timeout thread. */            key = intLock ();            rngBufPut (dhcpcEventRing, (char *) &newEvent, sizeof(newEvent));            intUnlock (key);            semGive (dhcpcEventSem);            pMsgData = pMsgData + msglen;            pMsgHdr = (struct bpf_hdr *)pMsgData;            }        /* Advance to next element in message ring. */        slot = (slot + 1) % maxSlot;        }    }/********************************************************************************* dhcpcOptionSet - add an option to the option request list** This routine specifies which options the lease indicated by the <pCookie>* parameter will request from a server.  The <option> parameter specifies an * option tag as defined in RFC 2132.  See the dhcp/dhcp.h include file for a* listing of defined aliases for the available option tags. This routine will* not accept the following <option> values, which are either used by the* server for control purposes or only supplied by the client:**     _DHCP_PAD_TAG*     _DHCP_REQUEST_IPADDR_TAG *     _DHCP_LEASE_TIME_TAG  *     _DHCP_OPT_OVERLOAD_TAG*     _DHCP_MSGTYPE_TAG*     _DHCP_SERVER_ID_TAG*     _DHCP_REQ_LIST_TAG *     _DHCP_ERRMSG_TAG *     _DHCP_MAXMSGSIZE_TAG*     _DHCP_CLASS_ID_TAG *     _DHCP_CLIENT_ID_TAG *     _DHCP_END_TAG** This routine also will not accept <option> values 62 or 63, which are not* currently defined.** The maximum length of the option field in a DHCP message depends on the* MTU size of the associated interface and the maximum DHCP message size set* during the DHCP library initialization. Both the option request list and* the options sent by the client through the dhcpcOptionAdd() routine share* that field. Options which exceed the limit will not be stored.** NOTE: The boot program automatically requests all options necessary for* default target configuration. This routine is only necessary to support* special circumstances in which additional options are required. Any* options requested in that case may be retrieved after the runtime image* has started.* * NOTE: The DHCP specification forbids changing the option request list after* a lease has been established.  Therefore, this routine must not be used* after the dhcpcBind() call (in a runtime image) or the dhcpcBootBind() call* (for a boot image).  Changing the request list at that point could have* unpredictable results.** NOTE: Options are added directly to outgoing DHCP messages, and numeric* options (e.g. lease duration time) are expected to be provided in network* byte order. Care must be taken on little-endian hosts to insure that* numeric arguments are properly byte-swapped before being passed to this* routine.** RETURNS: OK if the option was set successfully, or ERROR if the option* is invalid or storage failed.** ERRNO: S_dhcpcLib_BAD_OPTION, S_dhcpcLib_OPTION_NOT_STORED**/STATUS dhcpcOptionSet    (    void * 	pCookie, 	/* identifier returned by dhcpcInit() */    int 	option		/* RFC 2132 tag of desired option */    )    {    LEASE_DATA *	 	pLeaseData;    struct dhcp_reqspec * 	pReqSpec;    struct dhcpcOpts * 		pOptList;    int msglen = 0; 	/* Length of DHCP message after inserting option */    /*     * 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 *)pCookie;    pReqSpec = &pLeaseData->leaseReqSpec;    /* Check for restricted or undefined options. */    switch (option)        {        case _DHCP_PAD_TAG: 		/* fall-through */        case _DHCP_REQUEST_IPADDR_TAG: 	/* fall-through */        case _DHCP_LEASE_TIME_TAG: 	/* fall-through */        case _DHCP_OPT_OVERLOAD_TAG: 	/* fall-through */        case _DHCP_MSGTYPE_TAG: 	/* fall-through */        case _DHCP_SERVER_ID_TAG: 	/* fall-through */        case _DHCP_REQ_LIST_TAG: 	/* fall-through */        case _DHCP_ERRMSG_TAG: 		/* fall-through */        case _DHCP_MAXMSGSIZE_TAG: 	/* fall-through */        case _DHCP_CLASS_ID_TAG: 	/* fall-through */        case _DHCP_CLIENT_ID_TAG: 	/* fall-through */        case _DHCP_END_TAG:            errno = S_dhcpcLib_BAD_OPTION;            return (ERROR);            break;        default:            break;        }    if (option == 62 || option == 63)        {        errno = S_dhcpcLib_BAD_OPTION;        return (ERROR);        }            if (option < 0 || option > _DHCP_LAST_OPTION)        {        errno = S_dhcpcLib_BAD_OPTION;        return (ERROR);        }    /*     * Verify that the option won't exceed the MTU size for a message.     * Start with an initial length equal to the UDP and IP headers and     * the fixed-length portion of a DHCP message.     */    msglen = UDPHL + IPHL + (DFLTDHCPLEN - DFLTOPTLEN);    /* Include size of existing options and option request list. */    pOptList = pReqSpec->pOptList;    if (pOptList)        msglen += pReqSpec->pOptList->optlen;    msglen += (pReqSpec->reqlist.len + 1);    /*     * Include space for required magic cookie (4 bytes), message     * type option (3 bytes), maximum message size (4 bytes), and     * server identifier option (6 bytes).     */    msglen += 17;    /* Include space for required requested IP address option (6 bytes). */    msglen += 6;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
五月激情丁香一区二区三区| 国产欧美一区二区精品久导航| 亚洲激情图片一区| 在线观看视频91| 视频一区二区三区中文字幕| 91精品综合久久久久久| 久热成人在线视频| 欧美韩日一区二区三区四区| 成人黄色软件下载| 一区二区三区电影在线播| 欧美精品三级在线观看| 精品亚洲欧美一区| 中文字幕欧美日韩一区| 欧美午夜一区二区三区免费大片| 日韩二区三区四区| 国产欧美日韩久久| 欧美在线影院一区二区| 美女网站色91| 国产精品国产三级国产三级人妇| 色婷婷久久久亚洲一区二区三区 | 精品福利一区二区三区| 成人综合婷婷国产精品久久| 亚洲日本中文字幕区| 91麻豆精品国产91久久久更新时间| 国产又黄又大久久| 一区二区三区国产精品| 久久麻豆一区二区| 欧美亚洲动漫另类| 国产二区国产一区在线观看| 性欧美大战久久久久久久久| 国产三级精品在线| 欧美日韩极品在线观看一区| 国产成人鲁色资源国产91色综| 一区二区在线观看视频| 欧美精品一区二区三区蜜桃视频 | 韩国v欧美v日本v亚洲v| 成人欧美一区二区三区1314| 欧美一区二区精品| 99久久免费视频.com| 久久激情五月婷婷| 亚洲一区二区三区自拍| 国产人伦精品一区二区| 日韩亚洲欧美在线| 91国偷自产一区二区开放时间| 国产精品资源站在线| 五月天一区二区| 亚洲欧美偷拍卡通变态| 国产偷国产偷精品高清尤物 | 2024国产精品| 欧美乱妇15p| 91国偷自产一区二区三区观看| 高清av一区二区| 久久成人麻豆午夜电影| 一区二区不卡在线视频 午夜欧美不卡在 | 精品国偷自产国产一区| 欧美日韩一本到| 在线亚洲一区观看| 色美美综合视频| 91丨porny丨户外露出| 国产精品一卡二卡在线观看| 乱一区二区av| 免费高清在线视频一区·| 亚洲v中文字幕| 亚洲最新视频在线播放| 亚洲日本va在线观看| 中文字幕亚洲区| 国产精品的网站| 欧美国产日产图区| 欧美韩国日本不卡| 亚洲国产精品ⅴa在线观看| 国产亚洲欧美日韩俺去了| 精品999在线播放| 精品少妇一区二区三区免费观看 | 欧美揉bbbbb揉bbbbb| 欧洲亚洲精品在线| 欧美三级电影网站| 欧美美女一区二区在线观看| 4hu四虎永久在线影院成人| 欧美理论片在线| 777午夜精品视频在线播放| 777午夜精品免费视频| 91麻豆精品91久久久久久清纯| 2019国产精品| 久久综合九色综合欧美就去吻| 欧美电视剧在线观看完整版| 日韩午夜精品电影| 337p粉嫩大胆噜噜噜噜噜91av| 精品剧情v国产在线观看在线| 精品三级在线观看| 国产亚洲欧美激情| 亚洲人成在线观看一区二区| 亚洲国产婷婷综合在线精品| 日本欧美一区二区在线观看| 美女久久久精品| 国产乱人伦精品一区二区在线观看 | 欧美日韩在线三级| 日韩欧美二区三区| 国产日韩成人精品| 一区二区三区不卡视频在线观看| 午夜亚洲国产au精品一区二区| 麻豆精品视频在线| 粉嫩av一区二区三区| 色婷婷精品大视频在线蜜桃视频| 欧美久久免费观看| 久久久亚洲精品石原莉奈| 成人免费在线视频| 日韩电影网1区2区| 成人免费电影视频| 欧美日韩另类国产亚洲欧美一级| 欧美大黄免费观看| 亚洲欧美激情在线| 美国十次了思思久久精品导航| 国产高清不卡一区二区| 欧美亚洲综合久久| 欧美精品一区二区三区蜜臀| 亚洲免费av观看| 韩国欧美国产一区| 色视频欧美一区二区三区| 欧美大片顶级少妇| 一区二区三区**美女毛片| 激情成人午夜视频| 欧洲激情一区二区| 国产清纯白嫩初高生在线观看91 | 亚洲精品第1页| 黄页视频在线91| 久久亚洲捆绑美女| 久久精品国产成人一区二区三区| 亚洲国产成人一区二区三区| 69p69国产精品| 欧美日韩国产一区二区三区地区| 欧美哺乳videos| 国产精品视频一二三| 日韩av电影免费观看高清完整版在线观看 | 国产91丝袜在线18| 欧美日韩精品一区二区三区 | 夜夜嗨av一区二区三区网页| 国产一级精品在线| 欧美老年两性高潮| 亚洲精品乱码久久久久久黑人| 国产乱人伦精品一区二区在线观看| 欧美一区二区三区免费观看视频| 国产精品久久久久影院色老大 | 99久久婷婷国产综合精品| 精品国产一区二区三区忘忧草| 亚洲国产中文字幕| 色综合天天狠狠| 国产精品毛片大码女人| 国产精品一区二区在线观看网站 | 久久久噜噜噜久久人人看| 偷拍日韩校园综合在线| 色婷婷久久久亚洲一区二区三区| 国产精品美女www爽爽爽| 国精品**一区二区三区在线蜜桃| 69堂精品视频| 亚洲午夜电影在线| 在线观看视频91| 亚洲最新视频在线观看| 日本电影欧美片| 亚洲精品视频一区二区| 99久久婷婷国产| 亚洲天堂网中文字| 99v久久综合狠狠综合久久| 国产精品电影一区二区| www.欧美精品一二区| 中文一区二区在线观看| 国产91高潮流白浆在线麻豆| 国产偷国产偷精品高清尤物| 国产一区91精品张津瑜| 久久久久久麻豆| 国产精品88av| 中国色在线观看另类| 99久久免费精品| 一区二区三区 在线观看视频| 在线免费av一区| 性久久久久久久久| 日韩欧美在线网站| 韩国欧美国产1区| 国产网站一区二区三区| 成人av在线影院| 亚洲一区二区三区免费视频| 制服丝袜亚洲播放| 久久成人久久爱| 国产免费久久精品| 色狠狠综合天天综合综合| 亚洲mv大片欧洲mv大片精品| 欧美一区二区免费视频| 国产很黄免费观看久久| 日韩美女啊v在线免费观看| 欧美午夜精品久久久久久孕妇| 秋霞成人午夜伦在线观看| 亚洲精品一区二区三区福利| 丁香婷婷综合网| 亚洲国产日韩一级| 欧美一区二区三区色| 大胆亚洲人体视频| 亚洲成a人片综合在线| 亚洲精品一区二区三区香蕉 | 国产精品一区二区无线| 一区二区三区四区激情| 国产精品美女久久久久av爽李琼|