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

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

?? dhcpcshow.c

?? vxworks的完整的源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* dhcpcShow.c - DHCP run-time client information display routines *//* Copyright 1984 - 2001 Wind River Systems, Inc.  */#include "copyright_wrs.h"/*modification history--------------------01q,12may02,kbw  man page edits01p,10may02,kbw  making man page edits01o,23apr02,wap  use dhcpTime() instead of time() (SPR #68900)01n,15oct01,rae  merge from truestack ver 01m, base 01l01m,16oct00,niq  Integrating T3 DHCP01l,17jan98,kbw  removed NOMANUAL from dhcpcShowInit()01k,14dec97,kbw  making minor man page fixes01j,10dec97,kbw  making minor man page fixes01i,04dec97,spm  added code review modifications01h,21oct97,kbw  making minor man page fixes01g,26aug97,spm  major overhaul: changed user interface to support multiple                  leases at run-time; changed function names and renamed                 module to comply with coding standards01f,06aug97,spm  removed parameters linked list to reduce memory required01e,30jul97,kbw  fixed man page problems found in beta review01d,02jun97,spm  updated man pages and added ERRNO entries01c,17apr97,kbw  fixed minor format errors in man page, spell-checked01b,07apr97,spm  corrected array indexing bugs, modified displayed parameter                  descriptions, rewrote documentation01a,31jan97,spm  created by extracting routines from netShow.c*//*DESCRIPTIONThis library provides routines that display various data related tothe DHCP run-time client library such as the lease timers and responding server.  The dhcpcShowInit() routine links the show facility into the VxWorksimage.  This happens automatically if INCLUDE_NET_SHOW and INCLUDE_DHCPC are defined at the time the image is built.INCLUDE FILES: dhcpcLib.hSEE ALSO: dhcpcLib*/#include <stdio.h>#include "vxWorks.h"#include "inetLib.h"#include "dhcpcLib.h"#include "dhcp/dhcpcCommonLib.h"#include "dhcp/dhcpcStateLib.h"#include "time.h"IMPORT SEM_ID           dhcpcMutexSem;   /* protects the status indicators *//* forward declarations */STATUS dhcpcServerShow (void *);STATUS dhcpcTimersShow (void *);STATUS dhcpcParamsShow (void *);/******************************************************************************** dhcpcShowInit - initialize the DHCP show facility** This routine links the DHCP show facility into the VxWorks system image. * It is called from usrNetwork.c automatically if INCLUDE_DHCP and * INCLUDE_NET_SHOW are defined at the time the image is constructed.**/void dhcpcShowInit (void)    {    return;    }/********************************************************************************* dhcpcServerShow - display current DHCP server** This routine prints the IP address of the DHCP server that provided the * parameters for the lease identified by <pCookie>.  It has no effect if the* indicated lease is not currently active.** RETURNS: OK, or ERROR if lease identifier unknown.** ERRNO: *  S_dhcpcLib_BAD_COOKIE**/STATUS dhcpcServerShow     (    void * 	pCookie 	/* identifier returned by dhcpcInit() */    )    {    int 		offset;    LEASE_DATA * 	pLeaseData = NULL;    char 		addrBuf [INET_ADDR_LEN];    STATUS 		result = OK;    /*     * 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;    for (offset = 0; offset < dhcpcMaxLeases; offset++)        if (dhcpcLeaseList [offset] != NULL &&                dhcpcLeaseList [offset] == pLeaseData)            break;    if (offset == dhcpcMaxLeases)        {        errno = S_dhcpcLib_BAD_COOKIE;        return (ERROR);        }    /* Ignore show request if lease is not initialized or not bound.  */    if (!dhcpcInitialized || !pLeaseData->initFlag)        return (OK);    semTake (dhcpcMutexSem, WAIT_FOREVER);    if (!pLeaseData->leaseGood)        result = ERROR;    semGive (dhcpcMutexSem);    if (result == ERROR)        return (OK);    if (pLeaseData->leaseType == DHCP_BOOTP)        {        printf ("DHCP server (BOOTP proxy): ");         inet_ntoa_b (pLeaseData->dhcpcParam->siaddr, addrBuf);        printf ("%-18s\n", addrBuf);        return (OK);        }    printf ("DHCP server: ");    inet_ntoa_b (pLeaseData->dhcpcParam->server_id, addrBuf);    printf("%-18s\n", addrBuf);    return (OK);    }/********************************************************************************* dhcpcTimersShow - display current lease timers** This routine prints the time remaining with each of the DHCP lease timers* for the lease identified by <pCookie>.  It has no effect if the indicated* lease is not currently active.** RETURNS: OK if show routine completes, or ERROR otherwise.** ERRNO: *  S_dhcpcLib_BAD_COOKIE**/STATUS dhcpcTimersShow    (    void * 	pCookie 	/* identifier returned by dhcpcInit() */    )    {    int 		offset;    LEASE_DATA * 	pLeaseData = NULL;    STATUS 		result = OK;    time_t current = 0;    long t1;    long t2;    /*     * 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;    for (offset = 0; offset < dhcpcMaxLeases; offset++)        if (dhcpcLeaseList [offset] != NULL &&                dhcpcLeaseList [offset] == pLeaseData)            break;    if (offset == dhcpcMaxLeases)        {        errno = S_dhcpcLib_BAD_COOKIE;        return (ERROR);        }    /* Ignore show request if lease is not initialized or not bound.  */    if (!dhcpcInitialized || !pLeaseData->initFlag)        return (OK);    semTake (dhcpcMutexSem, WAIT_FOREVER);    if (!pLeaseData->leaseGood)        result = ERROR;    semGive (dhcpcMutexSem);    if (result == ERROR)        return (OK);    if (pLeaseData->leaseType == DHCP_BOOTP)        {        printf ("No timer values: BOOTP reply accepted.\n");        return (OK);        }     if (dhcpTime (&current) == -1)        {        printf ("time() error in dhcpcTimerShow() routine.\n");        return (ERROR);        }    t1 = pLeaseData->dhcpcParam->lease_origin +              pLeaseData->dhcpcParam->dhcp_t1 - current;    t2 = pLeaseData->dhcpcParam->lease_origin +              pLeaseData->dhcpcParam->dhcp_t2 - current;       if (t1 <= 0)        printf ("Timer T1 expired.\n");    else        printf ("Timer T1: %ld seconds remaining.\n", t1);       if (t2 <= 0)        printf ("Timer T2 expired.\n");    else        printf ("Timer T2: %ld seconds remaining.\n", t2);    return (OK);    }/******************************************************************************** dhcpcParamsShow - display current lease parameters** This routine prints all lease parameters for the lease identified by * <pCookie>.  It has no effect if the indicated lease is not currently active.* * RETURNS: OK, or ERROR if lease identifier unknown.** ERRNO: *  S_dhcpcLib_BAD_COOKIE**/STATUS dhcpcParamsShow    (    void * 	pCookie 	/* identifier returned by dhcpcInit() */    )    {    int 		offset;    LEASE_DATA * 	pLeaseData = NULL;    STATUS 		result = OK;    int loop;    struct dhcp_param * 	pDhcpcParam;    char addrBuf [INET_ADDR_LEN];    /*     * 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;    for (offset = 0; offset < dhcpcMaxLeases; offset++)        if (dhcpcLeaseList [offset] != NULL &&                dhcpcLeaseList [offset] == pLeaseData)            break;    if (offset == dhcpcMaxLeases)        {        errno = S_dhcpcLib_BAD_COOKIE;        return (ERROR);        }    /* Ignore show request if lease is not initialized or not bound.  */    if (!dhcpcInitialized || !pLeaseData->initFlag)        return (OK);    semTake (dhcpcMutexSem, WAIT_FOREVER);    if (!pLeaseData->leaseGood)        result = ERROR;    semGive (dhcpcMutexSem);    if (result == ERROR)        return (OK);    if (pLeaseData->leaseType == DHCP_BOOTP)        {        printf ("No parameter values: BOOTP reply accepted.\n");        return (OK);        }    pDhcpcParam = pLeaseData->dhcpcParam;    /* Print any string parameters.  */    if (pDhcpcParam->sname != NULL)        printf ("DHCP server name: %s\n", pDhcpcParam->sname);     if (pDhcpcParam->file != NULL)        printf ("Boot file name: %s\n", pDhcpcParam->file);    if (pDhcpcParam->hostname != NULL)        printf ("DHCP client name: %s\n", pDhcpcParam->hostname);    if (pDhcpcParam->merit_dump != NULL)        printf ("Merit dump file: %s\n", pDhcpcParam->merit_dump);    if (pDhcpcParam->dns_domain != NULL)        printf ("DNS domain name: %s\n", pDhcpcParam->dns_domain);    if (pDhcpcParam->root_path != NULL)        printf ("Client root path: %s\n", pDhcpcParam->root_path);    if (pDhcpcParam->extensions_path != NULL)        printf ("Options extension path: %s\n", pDhcpcParam->extensions_path);    if (pDhcpcParam->nis_domain != NULL)        printf ("NIS domain: %s\n", pDhcpcParam->nis_domain);    if (pDhcpcParam->nb_scope != NULL)        printf ("NetBIOS over TCP/IP scope: %s\n", pDhcpcParam->nb_scope);    if (pDhcpcParam->errmsg != NULL)        printf ("Error message: %s\n", pDhcpcParam->errmsg);    if (pDhcpcParam->nisp_domain != NULL)        printf ("NIS+ domain: %s\n", pDhcpcParam->nisp_domain);    /* Print all TRUE boolean parameters.  */    if (pDhcpcParam->ip_forward)        printf ("IP forwarding enabled.\n");    if (pDhcpcParam->nonlocal_srcroute)        printf ("Non-local source route forwarding enabled.\n");    if (pDhcpcParam->all_subnet_local)        printf ("All subnets are local is TRUE.\n");     if (pDhcpcParam->mask_discover)        printf ("ICMP mask discovery enabled.\n");    if (pDhcpcParam->mask_supplier)        printf ("ICMP mask supplier is TRUE.\n");    if (pDhcpcParam->router_discover)        printf ("Router discovery enabled.\n");    if (pDhcpcParam->trailer)        printf ("ARP trailers enabled.\n");      if (pDhcpcParam->ether_encap)        printf ("RFC 1042 Ethernet encapsulation enabled.\n");    else        printf ("RFC 894 Ethernet encapsulation enabled.\n");    if (pDhcpcParam->keepalive_garba)        printf ("TCP keepalive garbage octet enabled.\n");    /* Print all non-zero single numeric parameters.  */    if (pDhcpcParam->time_offset != 0)        printf ("Client time offset: %ld\n", pDhcpcParam->time_offset);    if (pDhcpcParam->bootsize != 0)        printf ("Boot image size: %d\n", pDhcpcParam->bootsize);     if (pDhcpcParam->max_dgram_size != 0)        printf ("Maximum datagram size: %d\n", pDhcpcParam->max_dgram_size);    if (pDhcpcParam->default_ip_ttl != 0)        printf ("Default IP Time-to-live: %d\n",                pDhcpcParam->default_ip_ttl);    if (pDhcpcParam->mtu_aging_timeout != 0)        printf ("Path MTU timeout: %ld\n", pDhcpcParam->mtu_aging_timeout);    if (pDhcpcParam->intf_mtu != 0)        printf ("Interface MTU: %d\n", pDhcpcParam->intf_mtu);    if (pDhcpcParam->arp_cache_timeout != 0)        printf ("ARP cache timeout: %ld\n", pDhcpcParam->arp_cache_timeout);    if (pDhcpcParam->default_tcp_ttl != 0)        printf ("Default TCP Time-to-live: %d\n",                pDhcpcParam->default_tcp_ttl);    if (pDhcpcParam->keepalive_inter != 0)        printf ("TCP keepalive interval: %ld\n",                pDhcpcParam->keepalive_inter);    if (pDhcpcParam->nb_nodetype != 0)        printf ("NetBIOS node type: %d\n", pDhcpcParam->nb_nodetype);    printf ("Client lease origin: %ld\n", pDhcpcParam->lease_origin);    printf ("Client lease duration: %ld\n", pDhcpcParam->lease_duration);    if (pDhcpcParam->dhcp_t1 != 0)        printf ("Client renewal (T1) time value: %ld\n",                pDhcpcParam->dhcp_t1);    if (pDhcpcParam->dhcp_t2 != 0)        printf ("Client rebinding (T2) time value: %ld\n",                pDhcpcParam->dhcp_t2);    /* Print multiple numeric parameters.  */    if (pDhcpcParam->mtu_plateau_table != NULL)        {         printf ("MTU plateau table:\n ");         if (pDhcpcParam->mtu_plateau_table->shortnum != NULL)            {            for (loop = 0; loop < pDhcpcParam->mtu_plateau_table->num; loop++)               printf ("%d ", pDhcpcParam->mtu_plateau_table->shortnum [loop]);            printf ("\n");            }         else            printf ("empty.\n");        }    /* Print any single IP addresses.  */    if (pDhcpcParam->server_id.s_addr != 0)        {        printf ("DHCP server: ");        inet_ntoa_b (pDhcpcParam->server_id, addrBuf);        printf ("%-18s\n", addrBuf);        }    if (pDhcpcParam->ciaddr.s_addr != 0)        {        printf ("Client IP address: ");        inet_ntoa_b (pDhcpcParam->ciaddr, addrBuf);        printf ("%-18s\n", addrBuf);        }    if (pDhcpcParam->yiaddr.s_addr != 0)        {        printf ("Assigned IP address: ");        inet_ntoa_b (pDhcpcParam->yiaddr, addrBuf);        printf ("%-18s\n", addrBuf);        }    if (pDhcpcParam->siaddr.s_addr != 0)        {        printf ("Next server IP address: ");        inet_ntoa_b (pDhcpcParam->siaddr, addrBuf);        printf ("%-18s\n", addrBuf);        }    if (pDhcpcParam->giaddr.s_addr != 0)        {        printf ("Relay agent IP address: ");        inet_ntoa_b (pDhcpcParam->giaddr, addrBuf);        printf ("%-18s\n", addrBuf);        }    if (pDhcpcParam->subnet_mask != NULL)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成a人片在线观看中文| 国产精品视频一二三区 | 亚洲日穴在线视频| 粉嫩aⅴ一区二区三区四区| 久久亚洲春色中文字幕久久久| 三级精品在线观看| 欧美三级视频在线播放| 亚洲一级片在线观看| 91成人免费在线视频| 亚洲第一二三四区| 欧美三级电影在线观看| 日韩美一区二区三区| 午夜久久久影院| 亚洲人成小说网站色在线| 色综合天天视频在线观看| 丝袜美腿高跟呻吟高潮一区| 日韩视频一区二区三区在线播放| 久久不见久久见免费视频1| 久久在线观看免费| 亚洲在线观看免费视频| 欧美日韩成人高清| 亚洲精品视频一区| 欧美日韩mp4| 91香蕉视频mp4| 麻豆国产欧美一区二区三区| 日本一二三四高清不卡| 色就色 综合激情| 偷拍一区二区三区四区| 国产日韩欧美精品一区| 欧美视频精品在线| 成人三级伦理片| 老司机免费视频一区二区| 亚洲欧洲精品成人久久奇米网| 成人午夜视频在线观看| ww久久中文字幕| 欧美高清视频一二三区| 成人激情动漫在线观看| 久久机这里只有精品| 亚洲国产成人自拍| 日韩欧美国产综合一区 | 日韩美女视频一区二区在线观看| 粉嫩av一区二区三区| 麻豆精品一区二区三区| 三级欧美在线一区| 亚洲成人在线观看视频| 中文字幕一区二区视频| 国产亚洲精品免费| 欧美刺激脚交jootjob| 亚洲黄色小视频| 人妖欧美一区二区| 免费视频一区二区| 日本成人中文字幕| 午夜电影久久久| 天天综合色天天| 免费一级片91| 另类调教123区| 国产精品一卡二卡在线观看| 韩国一区二区视频| 国产成人啪免费观看软件| 国产成人一级电影| av中文字幕在线不卡| 国产精品综合久久| 欧美日韩1234| 国产亚洲婷婷免费| 最新成人av在线| 国产精品久久久久一区| 欧美精品免费视频| 欧美一区二区视频在线观看2020| 日韩视频一区二区在线观看| 精品国产一区二区在线观看| 欧美日韩精品是欧美日韩精品| av在线播放一区二区三区| 精品免费日韩av| 一区二区三区欧美视频| 另类小说欧美激情| 色偷偷久久人人79超碰人人澡| 欧美日韩在线亚洲一区蜜芽| 日韩精品一区二区在线| 亚洲欧洲国产日韩| 秋霞国产午夜精品免费视频| 99久久夜色精品国产网站| 4438x成人网最大色成网站| 中文字幕在线观看不卡| 日韩国产一二三区| 91极品美女在线| 宅男噜噜噜66一区二区66| 2014亚洲片线观看视频免费| 中文字幕亚洲不卡| 国产不卡在线视频| 日韩一区二区免费电影| 亚洲第一成年网| 91视频在线观看免费| 欧美国产精品一区| 免费黄网站欧美| 91精品久久久久久久99蜜桃| 亚洲精品国产a| 色一情一伦一子一伦一区| 国产欧美日韩综合精品一区二区| 久久91精品国产91久久小草| 国产不卡免费视频| 91久久香蕉国产日韩欧美9色| 亚洲美女视频一区| 北条麻妃国产九九精品视频| 精品国产一区二区三区四区四| 国产精品久久久久久一区二区三区| 亚洲自拍与偷拍| 欧美中文字幕一区二区三区亚洲| 亚洲欧美日韩小说| 91国产免费看| 717成人午夜免费福利电影| 亚洲激情五月婷婷| 99国产精品一区| 亚洲欧美日韩在线| 欧美影片第一页| 亚洲黄色片在线观看| jiyouzz国产精品久久| 激情综合色综合久久综合| 国产精品久久久爽爽爽麻豆色哟哟 | 欧美高清在线一区| 成人高清视频在线| 亚洲一区二区三区中文字幕在线| 欧美性生活久久| 国产一区二区三区观看| 中文字幕不卡在线观看| 91女厕偷拍女厕偷拍高清| 五月天激情综合| 欧美极品美女视频| 777a∨成人精品桃花网| 日韩精品乱码av一区二区| 一区二区三区中文在线观看| 欧美一级高清片在线观看| caoporn国产精品| 久久aⅴ国产欧美74aaa| 中文字幕日本乱码精品影院| 在线观看亚洲一区| 国产精品一区二区你懂的| 一区二区三区精品视频在线| 日韩亚洲欧美在线| 在线影视一区二区三区| 欧美图区在线视频| 91免费在线视频观看| 久国产精品韩国三级视频| 国产一区高清在线| 99精品热视频| 欧美丰满一区二区免费视频 | 九九热在线视频观看这里只有精品| 免费成人av在线| 成人毛片视频在线观看| 欧美亚洲国产一区在线观看网站 | 日韩免费观看高清完整版在线观看| 精品久久久久久最新网址| 欧美激情一二三区| 午夜精品福利久久久| 成人黄色av电影| 欧美二区在线观看| 国产精品国产三级国产三级人妇| 亚洲国产一区视频| 国产原创一区二区三区| 91蝌蚪porny| 久久久久国产精品麻豆| 亚洲一区二区成人在线观看| 国产成人无遮挡在线视频| 欧美日韩精品一区视频| 国产精品久久午夜| 国产精品亚洲第一| 日韩欧美一二三四区| 亚洲精品第一国产综合野| 成人动漫一区二区| 日韩视频一区二区在线观看| 亚洲精品中文在线影院| 成人美女视频在线看| 久久久美女毛片| 蜜臀国产一区二区三区在线播放| 91在线观看视频| 亚洲久草在线视频| 波多野结衣的一区二区三区| 久久久夜色精品亚洲| 国产精品1区2区| 国产精品久99| 成人国产在线观看| 欧美激情一区二区三区四区| 国产sm精品调教视频网站| 久久九九久久九九| 成人美女在线观看| 国产区在线观看成人精品| 青青草91视频| 国产亚洲一二三区| 99久久婷婷国产综合精品电影 | 在线观看免费视频综合| 午夜成人在线视频| 91精品视频网| 国产+成+人+亚洲欧洲自线| 国产精品欧美经典| 欧美日韩精品欧美日韩精品 | 欧美一a一片一级一片| 欧美aaa在线| 日韩美女啊v在线免费观看| 欧美色手机在线观看| 国内精品不卡在线| 一区二区三区免费观看|