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

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

?? dhcpslib.c

?? vxwork源代碼
?? C
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):
    if (pTarget->policy_filter.addr2 != NULL)        free (pTarget->policy_filter.addr2);    if (pTarget->static_route.addr1 != NULL)        free (pTarget->static_route.addr1);    if (pTarget->static_route.addr2 != NULL)        free (pTarget->static_route.addr2);    free (pTarget);    return;    }/********************************************************************************* dhcpsLeaseEntryAdd - add another entry to the address pool** This routine allows the user to add new entries to the address pool without* rebuilding the VxWorks image.  The routine requires a unique entry name of up* to eight characters, starting and ending IP addresses, and a colon-separated * list of parameters.  Possible values for the parameters are listed in the * reference entry for dhcpsLib.  The parameters also determine the type of * lease, which the server uses to determine priority when assigning lease * addresses.  For examples of the possible lease types, see the reference * entry for dhcpsLib.** RETURNS: OK if entry read successfully, or ERROR otherwise.** ERRNO: N/A*/STATUS dhcpsLeaseEntryAdd    (    char *	pName, 		/* name of lease entry */    char *	pStartIp, 	/* first IP address to assign */    char * 	pEndIp, 	/* last IP address in assignment range */    char *	pParams 	/* formatted string of lease parameters */    )    {    struct dhcp_resource *pResData = NULL;    DHCPS_ENTRY_DESC	entryData;    struct hash_member *pListElem = NULL;    int result;    char tmp [10];  /* sizeof ("tblc=dlft") for host requirements defaults. */    char entryName [BASE_NAME + 1];   /* User-given name for address range. */    char newName [MAX_NAME + 1];    /* Unique name for each entry in range. */    char newAddress [INET_ADDR_LEN];    struct in_addr nextAddr;    int len;    char *pTmp;    u_long start = 0;    u_long end = 0;    u_long loop;    u_long limit;    /* Ignore bad values for range. */    if (pStartIp != NULL && pEndIp == NULL)        return (ERROR);    if (pStartIp == NULL && pEndIp != NULL)        return (ERROR);    /* If no address specified, just process parameters once. */    if (pStartIp == NULL && pEndIp == NULL)        {        start = 0;        end = 0;        }    else        {        start = inet_addr (pStartIp);        end = inet_addr (pEndIp);        if (start == ERROR || end == ERROR)            return (ERROR);        }    entryData.pName = newName;    entryData.pAddress = newAddress;    entryData.pParams = pParams;    len = strlen (pName);    if (len > BASE_NAME)        {        bcopy (pName, entryName, BASE_NAME);        entryName [BASE_NAME] = '\0';        }    else        {        bcopy (pName, entryName, len);        entryName [len] = '\0';        }    limit = ntohl (end);    for (loop = ntohl (start); loop <= limit; loop++)        {        pResData = (struct dhcp_resource *)calloc (1,                                                 sizeof (struct dhcp_resource));        if (pResData == NULL)            {            return (ERROR);            }        /* Generate a unique name by appending IP address value. */        sprintf (entryData.pName, "%s%lx", entryName, loop);        /* Assign current IP address in range. */        nextAddr.s_addr = htonl (loop);        inet_ntoa_b (nextAddr, entryData.pAddress);        /* Critical section with message processing routines. */         semTake (dhcpsMutexSem, WAIT_FOREVER);         if (process_entry (pResData, &entryData) < 0)            {            semGive (dhcpsMutexSem);            dhcpsFreeResource (pResData);            return (ERROR);            }        /*          * Add Host Requirements defaults to resource entry. Do not add         * to entries containing client-specific or class-specific          * parameters.          */        if (ISCLR (pResData->valid, S_PARAM_ID) &&            ISCLR (pResData->valid, S_CLASS_ID))            {            sprintf (tmp, "%s", "tblc=dflt");            pTmp = tmp;            eval_symbol (&pTmp, pResData);            }        /* Set default values for entry, if not already assigned. */        if (ISSET (pResData->valid, S_IP_ADDR))            set_default (pResData);        /*         * Append entries to lease descriptor list. Exclude entries which         * specify additional client- or class-specific parameters.         */        if (ISCLR (pResData->valid, S_PARAM_ID) &&             ISCLR (pResData->valid, S_CLASS_ID))            {            pListElem = reslist;            while (pListElem->next != NULL)                pListElem = pListElem->next;                pListElem->next =                 (struct hash_member *)calloc (1, sizeof (struct hash_member));            if (pListElem->next == NULL)                {                semGive (dhcpsMutexSem);                dhcpsFreeResource (pResData);                return (ERROR);                }            pListElem = pListElem->next;            pListElem->next = NULL;            pListElem->data = (void *)pResData;            /* Add entryname to appropriate hash table. */            result = hash_ins (&nmhashtable, pResData->entryname,                                strlen (pResData->entryname), resnmcmp,                                pResData->entryname, pResData);            if (result < 0)                {                semGive (dhcpsMutexSem);                return (ERROR);                }            if (ISSET (pResData->valid, S_IP_ADDR))                if (hash_ins (&iphashtable, (char *)&pResData->ip_addr.s_addr,                              sizeof (u_long), resipcmp, &pResData->ip_addr,                               pResData) < 0)                    {                    semGive (dhcpsMutexSem);                    return (ERROR);                    }            }        semGive (dhcpsMutexSem);        }    /* Save entry in permanent storage, if hook is provided. */    if (dhcpsAddressHookRtn != NULL)        (* dhcpsAddressHookRtn) (DHCPS_STORAGE_WRITE, pName,                                 pStartIp, pEndIp, pParams);    return (OK);    }/******************************************************************************** * dhcpsLeaseHookAdd - assign a permanent lease storage hook for the server* * This routine allows the server to access some form of permanent storage* that it can use to store current lease information across restarts.  The * only argument to dhcpsLeaseHookAdd() is a pointer to a storage routine * with the following interface: * .CS*     STATUS dhcpsStorageHook (int op, char *buffer, int datalen);* .CE* The first parameter of the storage routine specifies one of the following * operations: * *     DHCPS_STORAGE_START*     DHCPS_STORAGE_READ*     DHCPS_STORAGE_WRITE*     DHCPS_STORAGE_STOP*     DHCPS_STORAGE_CLEAR* * In response to START, the storage routine should prepare to return data or * overwrite data provided by earlier WRITEs.  For a WRITE the storage routine * must save the contents of the buffer to permanent storage.  For a READ, the * storage routine should copy data previously stored into the provided buffer * as a NULL-terminated string in FIFO order.  For a CLEAR, the storage routine * should discard currently stored data.  After a CLEAR, the READ operation* must return ERROR until additional data is stored.  For a STOP, the storage * routine must handle cleanup.  After a STOP, READ and WRITE operations must* return error until a START is received.  Each of these operations must * return OK if successful, or ERROR otherwise.* * Before the server is initialized, VxWorks automatically calls * dhcpsLeaseHookAdd(), passing in the routine name defined by DHCPS_LEASE_HOOK.* * RETURNS: OK, or ERROR if routine is NULL.* * ERRNO: N/A*/STATUS dhcpsLeaseHookAdd    (    FUNCPTR pCacheHookRtn 	/* routine to store/retrieve lease records */    )    {    if (pCacheHookRtn != NULL)        {        dhcpsLeaseHookRtn = pCacheHookRtn;        return (OK);        }    return (ERROR);    }/********************************************************************************* dhcpsAddressHookAdd - assign a permanent address storage hook for the server** This routine allows the server to access some form of permanent storage* to preserve additional address entries across restarts.  This routine is* not required, but leases using unsaved addresses are not renewed.  The * only argument provided is the name of a function with the following interface:* .CS*     STATUS dhcpsAddressStorageHook (int op,*                                     char *name, char *start, char *end, *                                     char *params);* .CE* The first parameter of this storage routine specifies one of the following * operations: **     DHCPS_STORAGE_START*     DHCPS_STORAGE_READ*     DHCPS_STORAGE_WRITE*     DHCPS_STORAGE_STOP ** In response to a START, the storage routine should prepare to return* data or overwrite data provided by earlier WRITE operations.  For a * WRITE, the storage routine must save the contents of the four buffers * to permanent storage.  Those buffers contain the NULL-terminated * strings received by the dhcpsLeaseEntryAdd() routine.  For a READ, the* storage routine should copy previously stored data (as NULL-terminated * strings) into the provided buffers in the order received by earlier WRITE* operations.  For a STOP, the storage routine should do any necessary cleanup. * After a STOP, the storage routine should return an ERROR for all operations * except START.  However, the STOP operation does not normally occur since* the server only deliberately exits following an unrecoverable error.  This* storage routine must not rely on that operation to handle READ, WRITE, or* new START attempts.* * The storage routine should return OK if successful, ERROR otherwise.** Note that, unlike the lease storage routine, there is no CLEAR operation.** Before the server is initialized, VxWorks calls this routine automatically * passing in the function named in DHCPS_ADDRESS_HOOK.** RETURNS: OK, or ERROR if function pointer is NULL.** ERRNO: N/A*/STATUS dhcpsAddressHookAdd    (    FUNCPTR pCacheHookRtn 	/* routine to store/retrieve lease entries */    )    {    /*      * The hook routine is deliberately assigned before testing for NULL     * so that this routine can be used to delete an existing address hook.     * In that case, the user would just ignore the return value of ERROR.     */    dhcpsAddressHookRtn = pCacheHookRtn;    if (pCacheHookRtn == NULL)        return (ERROR);    return (OK);    }/********************************************************************************* alloc_sbuf - create message transmission buffers** This routine creates two transmission buffers for storing outgoing DHCP* messages.  The first buffer has a fixed size equal to that of a standard * DHCP message as defined in the RFC.  The second buffer contains the* remaining number of bytes needed to send the largest supported message.* That buffer is only used if additional space for DHCP options is needed* and if the requesting client accepts larger DHCP messages.  The two buffers* are stored in a global "buffer vector" structure and are also accessible* through individual global variables.* * RETURNS: N/A* * ERRNO: N/A** NOMANUAL*/LOCAL STATUS alloc_sbuf    (    int 	maxSize 	/* largest supported message size, in bytes */    )    {    char *pSendBuf;    int sbufsize;    /*     * Allocate transmission buffer using aligned memory to provide      * IP header alignment needed by Sun BSP's.      */    sbufsize = IPHL + UDPHL + DFLTDHCPLEN;    pSendBuf = (char *)memalign (4, maxSize);    if (pSendBuf == NULL)        return (-1);    dhcpsSendBuf = pSendBuf;    /* Buffer for default DHCP message. */    bzero (dhcpsSendBuf, sbufsize);    sbufvec[0].iov_len = IPHL + UDPHL + DFLTDHCPLEN;    sbufvec[0].iov_base = dhcpsSendBuf;    dhcpsMsgOut.ip = (struct ip *)dhcpsSendBuf;    dhcpsMsgOut.udp = (struct udphdr *)&dhcpsSendBuf [IPHL];    dhcpsMsgOut.dhcp = (struct dhcp *)&dhcpsSendBuf [IPHL + UDPHL];    dhcpsOverflowBuf = &pSendBuf [sbufsize];  /* Buffer for larger messages */    sbufvec[1].iov_base = dhcpsOverflowBuf;    sbufvec[1].iov_len = 0;   /* Contains length of bytes in use, not size. */    return (OK);    }

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
另类专区欧美蜜桃臀第一页| 一区二区三区在线观看动漫 | 欧美精品一区在线观看| 欧美亚一区二区| 91久久国产综合久久| 在线观看一区日韩| 欧美性做爰猛烈叫床潮| 欧洲视频一区二区| 欧美亚洲一区二区在线观看| 欧美亚洲动漫精品| 欧美福利视频导航| 日韩精品中文字幕在线不卡尤物 | 久久精品在这里| 国产欧美在线观看一区| 最新不卡av在线| 亚洲国产精品天堂| 精品一区二区三区免费观看| 国产一区二区三区免费观看| 精品亚洲porn| 久久精品国产99国产精品| 国产一区三区三区| 99久久久国产精品| 67194成人在线观看| 久久综合九色综合97_久久久| 国产亚洲美州欧州综合国| 日本一区二区成人在线| 亚洲图片有声小说| 国产激情视频一区二区三区欧美 | 国产成人在线观看| 色综合久久久久综合体 | 精品一区二区成人精品| 国产91精品入口| 欧美亚洲综合在线| 久久久99免费| 亚洲国产综合色| 狠狠色丁香久久婷婷综合丁香| 成人免费视频视频在线观看免费| 日本福利一区二区| 亚洲精品一区二区三区在线观看| 亚洲人成在线观看一区二区| 蜜桃一区二区三区在线| av电影天堂一区二区在线| 欧美日本在线播放| 中文字幕第一区综合| 天堂久久一区二区三区| 成年人国产精品| 日韩亚洲欧美综合| 午夜久久电影网| 99精品一区二区| 日韩一级大片在线| 亚洲曰韩产成在线| 成人网在线免费视频| 欧美成人a视频| 亚洲大片精品永久免费| jizz一区二区| 欧美韩国一区二区| 精品一区二区三区免费毛片爱| 欧美日韩精品欧美日韩精品一 | 欧洲在线/亚洲| 中文字幕不卡的av| 国产一区二区在线电影| 91精品国产色综合久久不卡蜜臀 | 欧美又粗又大又爽| 国产精品狼人久久影院观看方式| 久久国产综合精品| 日韩欧美一区二区免费| 五月天激情综合| 欧美丰满一区二区免费视频| 一区二区三区免费看视频| 国产美女视频91| 99久久综合狠狠综合久久| 国产精品国产自产拍高清av王其| 一本在线高清不卡dvd| 丁香一区二区三区| 免费成人深夜小野草| 日本一区二区三区久久久久久久久不 | 9191成人精品久久| 天堂一区二区在线免费观看| 国产麻豆精品95视频| 美洲天堂一区二卡三卡四卡视频| 欧美日韩一区久久| 日韩精彩视频在线观看| 欧美一区二区视频网站| 免费在线观看视频一区| 欧美成人精品福利| 夫妻av一区二区| 成人欧美一区二区三区| 日本高清不卡在线观看| 日韩黄色片在线观看| 日韩欧美一级精品久久| 国产精品一区二区男女羞羞无遮挡| 国产欧美日韩另类一区| 91片黄在线观看| 日韩黄色一级片| 国产婷婷色一区二区三区| 不卡一区二区在线| 亚洲午夜羞羞片| 欧美一二三区在线观看| 国产成人激情av| 有码一区二区三区| 2024国产精品视频| 成人激情电影免费在线观看| 亚洲自拍偷拍网站| 久久色在线观看| 色999日韩国产欧美一区二区| 久久精品亚洲麻豆av一区二区 | 最新久久zyz资源站| 亚洲三级在线免费观看| 欧美日韩免费观看一区三区| 亚洲国产精品一区二区久久| 亚洲国产sm捆绑调教视频 | 国产亚洲精品7777| 欧美色网站导航| 日韩精品一区二区三区三区免费 | 日本韩国欧美国产| 精品视频免费在线| 欧美va亚洲va| 久久精品国产精品亚洲综合| 欧洲精品中文字幕| 亚洲精品久久久蜜桃| 久久综合色一综合色88| 午夜一区二区三区在线观看| 6080午夜不卡| 不卡影院免费观看| 一区二区三区在线视频观看58 | 麻豆91精品视频| 国产乱国产乱300精品| 91精品国产麻豆国产自产在线| 国产欧美一区二区三区沐欲 | 亚洲图片另类小说| 激情文学综合插| 精品伦理精品一区| 亚洲欧美偷拍另类a∨色屁股| 国产精品自拍三区| 欧美电影免费观看高清完整版在线| 亚洲国产日韩一级| 欧美系列日韩一区| 亚洲第一在线综合网站| 成人精品高清在线| 国产一区二区不卡| 午夜电影网一区| 国产精品免费丝袜| 7777精品久久久大香线蕉| 成人av在线播放网址| 午夜精品视频一区| 91精品国产91久久综合桃花 | 丁香激情综合五月| 色综合久久久久网| 国产成人夜色高潮福利影视| 日本成人中文字幕在线视频| 亚洲1区2区3区视频| 一区二区三区在线播放| 中文字幕一区视频| 综合久久久久综合| 亚洲另类在线视频| 一级中文字幕一区二区| 一区二区三区四区激情| 日韩理论在线观看| 一区二区三区高清不卡| 夜夜精品浪潮av一区二区三区| 亚洲精品福利视频网站| 亚洲国产精品久久人人爱蜜臀| 一区二区三区在线不卡| 亚洲h精品动漫在线观看| 日韩精品亚洲专区| 久久99久国产精品黄毛片色诱| 国产在线精品视频| 国产成人在线网站| 91免费观看在线| 欧美日韩亚洲另类| 日韩视频123| 国产日韩欧美不卡在线| 亚洲人亚洲人成电影网站色| 亚洲综合一二区| 美女国产一区二区| 粉嫩av一区二区三区| 91蝌蚪porny九色| 日韩美女在线视频| 亚洲人精品午夜| 蜜臀a∨国产成人精品| 成人黄色av电影| 欧美日韩电影在线| 欧美激情在线看| 亚洲高清一区二区三区| 国产麻豆精品视频| 在线国产电影不卡| 久久精品亚洲精品国产欧美kt∨| 亚洲人成亚洲人成在线观看图片| 免费看欧美美女黄的网站| 成人伦理片在线| 这里是久久伊人| 国产精品萝li| 久久99这里只有精品| 91亚洲大成网污www| 日韩情涩欧美日韩视频| 中文字幕佐山爱一区二区免费| 美女高潮久久久| 欧美视频在线一区| 国产精品久久久久久一区二区三区 | 91黄色免费网站|