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

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

?? resolvlib.c

?? vxwork源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
    char *             pHostBuf,    int                bufLen    )    {    struct hostent *       pHostEnt;         /* Ptr to host entry */    if (pInetAddr == NULL || pHostBuf == NULL)        {        errnoSet (S_resolvLib_INVALID_PARAMETER);        return (NULL);        }    /* Format input buffer for use as a hostent structure */    pHostEnt = hostEntFormat (&pHostBuf, &bufLen, MAXALIASES, MAXADDRS);    if (pHostEnt == NULL)        {        errno = S_resolvLib_BUFFER_2_SMALL;        return (NULL);        }    /* Check the hostLib static host table first ? */    if (resolvParams.queryOrder == QUERY_LOCAL_FIRST)        {        if (resolvHostGetByAddr (pInetAddr, pHostEnt, pHostBuf, bufLen) != NULL)            {            return (pHostEnt);            }        }    /*      * Ask the DNS Server to resolve the query.  In the case of queryOrder set     * to QUERY_ DNS_ONLY, this is the only query done.     */    if (_gethostbyaddr (pInetAddr, 4, AF_INET, pHostEnt, pHostBuf, bufLen))        {        return (pHostEnt);      /* Got an answer from the DNS server */        }    /* We need to check the hostLib static host table next */    if (resolvParams.queryOrder == QUERY_DNS_FIRST)        {        if (resolvHostGetByAddr (pInetAddr, pHostEnt, pHostBuf, bufLen) != NULL)            {            return (pHostEnt);            }        }    return (NULL);             /* Host Name Not found */    }/********************************************************************************* resolvParamsSet - set the parameters which control the resolver library** This routine sets the resolver parameters.  <pResolvParams> passes in* a pointer to a RESOLV_PARAMS_S structure, which is defined as follows: * .CS*     typedef struct*        {*        char   queryOrder;*        char   domainName [MAXDNAME];*        char   nameServersAddr [MAXNS][MAXIPADDRLEN];*        } RESOLV_PARAMS_S;* .CE* Use the members of this structure to specify the settings you want to * apply to the resolver.  It is important to remember that multiple tasks * can use the resolver library and that the settings specified in * this RESOLV_PARAMS_S structure affect all queries from all tasks.  In * addition, you should set resolver parameters at initialization and not * while queries could be in progress. Otherwise, the results of the query * are unpredictable.  ** Before calling resolvParamsSet(), you should first call resolvParamsGet() * to populate a RESOLV_PARAMS_S structure with the current settings.  Then* you change the values of the members that interest you.    ** Valid values for the `queryOrder' member of RESOLV_PARAMS_S structure * are defined in resolvLib.h.  Set the `domainName' member to the domain to * which this resolver belongs.  Set the `nameServersAddr' member to the IP * addresses of the DNS server that the resolver can query.  You must specify * the IP addresses in standard dotted decimal notation.  This function tries * to validate the values in the `queryOrder' and `nameServerAddr' members.  * This function does not try to validate the domain name.  ** RETURNS: OK if the parameters are valid, ERROR otherwise.** SEE ALSO:* resolvGetHostByName(), resolvGetHostByAddr(), resolvDNExpand(),* resolvDNComp(), resolvSend(), resolvInit(), resolvParamsGet(),* resolvMkQuery(), resolvQuery()*/STATUS resolvParamsSet     (    RESOLV_PARAMS_S *  pResolvParams  /* ptr to resolver parameter struct */    )    {    struct in_addr   ipAddr;    int               index;   /* Validate queryOrder parameters */   if (pResolvParams->queryOrder != QUERY_LOCAL_FIRST &&        pResolvParams->queryOrder != QUERY_DNS_FIRST &&       pResolvParams->queryOrder != QUERY_DNS_ONLY)       return (ERROR);    /* Validate IP addresses */    for (index = 0 ; (index < MAXNS) && 	 (pResolvParams->nameServersAddr [index][0] != '\0'); index++)	{	if (inet_aton (pResolvParams->nameServersAddr [index], &ipAddr) != OK)		return(ERROR);	}    /* Update queryOrder parameter */    resolvParams.queryOrder = pResolvParams->queryOrder;    /* Update the name server IP addresses in decimal dot notation */    for (index = 0, _res.nscount = 0; (index < MAXNS) && 	 (pResolvParams->nameServersAddr [index][0] != '\0'); index++)	{		(void) inet_aton (pResolvParams->nameServersAddr [index], &ipAddr);	/* update the resolver server entry */	_res.nsaddr_list [index].sin_addr = ipAddr;	_res.nsaddr_list [index].sin_family = AF_INET;	_res.nsaddr_list [index].sin_port = htons(NAMESERVER_PORT);        _res.lookups [index] = 'b';        _res.nscount++;  /* Number of DNS servers to query */	}    _res.lookups [index] = 'f';    /* Update domain name; Assume a valid domain name */    (void) strcpy (_res.defdname, pResolvParams->domainName);    return (OK);    }/********************************************************************************* resolvParamsGet - get the parameters which control the resolver library** This routine copies the resolver parameters to the RESOLV_PARAMS_S* structure referenced in the <pResolvParms> parameter.  The RESOLV_PARAMS_S* structure is defined in resolvLib.h as follows: * .CS*     typedef struct*        {*        char   queryOrder;*        char   domainName [MAXDNAME];*        char   nameServersAddr [MAXNS][MAXIPADDRLEN];*        } RESOLV_PARAMS_S;* .CE* Typically, you call this function just before calling resolvParamsSet().* The resolvParamsGet() call populates the RESOLV_PARAMS_S structure. * You can then modify the default values just before calling * resolvParamsSet().  ** RETURNS: N/A** SEE ALSO:* resolvGetHostByName(), resolvGetHostByAddr(), resolvDNExpand(),* resolvDNComp(), resolvSend(), resolvParamsSet(), resolvInit(),* resolvMkQuery(), resolvQuery()*/void resolvParamsGet     (    RESOLV_PARAMS_S *     pResolvParams  /* ptr to resolver parameter struct */    )    {    int index;    pResolvParams->queryOrder = resolvParams.queryOrder;    (void) strcpy (pResolvParams->domainName, _res.defdname);        /* Copy the name server IP addresses in decimal dot notation */     for ( index = 0 ; index < MAXNS ; index++)	{ 	if (index < _res.nscount)	    {	    inet_ntoa_b (_res.nsaddr_list [index].sin_addr,			 pResolvParams->nameServersAddr [index]);	    }	else	    {	    pResolvParams->nameServersAddr [index][0] = 0;	    }	}    }/********************************************************************************* resolvHostLibGetByName - query the DNS server in behalf of hostGetByName** When the resolver library is installed, the routine hostGetByName() in the * hostLib library invokes this routine.  When the host name is not found by* hostGetByName in the static host table.  This feature allows existing * applications to take advantage of the resolver without any changes.** NOMANUAL** ERRNO:*  S_resolvLib_TRY_AGAIN*  S_resolvLib_HOST_NOT_FOUND*  S_resolvLib_NO_DATA*  S_resolvLib_NO_RECOVERY** RETURNS: IP address of host, or ERROR if the host was not found.*/LOCAL int resolvHostLibGetByName     (    char * pHostName       /* Pointer to host name */    )    {    char reqBuf [MAX_HOSTLIB_BUF];	       /* Holding buffer  */    char *     pHostBuf;    int        bufLen;    struct hostent *       pHostEnt;           /* Ptr to host entry */    /* Try to get the answer from the DNS Server */    pHostBuf = reqBuf;    bufLen   = sizeof(reqBuf);    pHostEnt = hostEntFormat (& pHostBuf, & bufLen, MAXALIASES, MAXADDRS);    pHostEnt = _gethostbyname (pHostName, pHostEnt, pHostBuf, bufLen);    if (pHostEnt != NULL)	{	return (*(int *)(pHostEnt->h_addr_list [0])); /* Host IP address */	}    return (ERROR);  /* Host IP address not found ! */    }/********************************************************************************* resolvHostLibGetByAddr - query the DNS server in behalf of hostGetByAddr()** When the resolver library is installed the routine hostGetByAddr() in the * hostLib library invokes this routine.  When the IP address is not found by* hostGetByAddr() in the static host table.  This feature allows existing * applications to take advantage of the resolver without any changes.  The* <addr> paramter specifies the IP address and <pHostName> points to the* official name of the host when the query is successful.** NOMANUAL** ERRNO:*  S_resolvLib_TRY_AGAIN*  S_resolvLib_HOST_NOT_FOUND*  S_resolvLib_NO_DATA*  S_resolvLib_NO_RECOVERY** RETURNS: OK, or ERROR if the host name was not found.*/LOCAL STATUS resolvHostLibGetByAddr    (    int   addr,			/* IP address of requested host name */    char * pHostName		/* host name output by this routine */    )    {    char reqBuf [MAX_HOSTLIB_BUF];	       /* Holding buffer  */    char *     pHostBuf;    int        bufLen;    struct hostent *       pHostEnt;           /* Ptr to host entry */    /* Try to get the answer from the DNS Server */    pHostBuf = reqBuf;    bufLen   = sizeof(reqBuf);    pHostEnt = hostEntFormat (& pHostBuf, & bufLen, MAXALIASES, MAXADDRS);    pHostEnt = _gethostbyaddr ((char *)&addr, 4, AF_INET, pHostEnt, 			       pHostBuf, bufLen);    if (pHostEnt != NULL)	{        strcpy (pHostName, pHostEnt->h_name);  /* Copy the host official name */	return (OK);	}    return (ERROR);    }/********************************************************************************* resolvDNExpand - expand a DNS compressed name from a DNS packet** This functions expands a compressed DNS name from a DNS packet.  The <msg>* parameter points to that start of the DNS packet.  The <eomorig> parameter* points to the last location of the DNS packet plus 1.  The <comp_dn> * parameter points to the compress domain name, and <exp_dn> parameter * expects a pointer to a buffer.  Upon function completion, this buffer * contains the expanded domain name.  Use the <length> parameter to pass in* the size of the buffer referenced by the <exp_dn> parameter.  ** RETURNS: The length of the expanded domain name, or ERROR on failure.** SEE ALSO:* resolvGetHostByName(), resolvGetHostByAddr(), resolvInit(),* resolvDNComp(), resolvSend(), resolvParamsSet(), resolvParamsGet(),* resolvMkQuery(), resolvQuery()*/int resolvDNExpand     (    const u_char * msg,     /* ptr to the start of the DNS packet */    const u_char * eomorig, /* ptr to the last location +1 of the DNS packet */    const u_char * comp_dn, /* ptr to the compressed domain name */          u_char * exp_dn,  /* ptr to where the expanded DN is output */          int      length   /* length of the buffer pointed by <expd_dn> */    );/********************************************************************************* resolvDNComp - compress a DNS name in a DNS packet** This routine takes the expanded domain name referenced in the <exp_dn> * parameter, compresses it, and stores the compressed name in the location* pointed to by the <comp_dn> parameter.  The <length> parameter passes in * the length of the buffer starting at <comp_dn>.  The <dnptrs> parameter * is a pointer to a list of pointers to previously compressed names.  The * <lastdnptr> parameter points to the last entry in the <dnptrs> array.** RETURNS: The size of the compressed name, or ERROR.** SEE ALSO:* resolvGetHostByName(), resolvGetHostByAddr(), resolvDNExpand(),* resolvInit(), resolvSend(), resolvParamsSet(), resolvParamsGet(),* resolvMkQuery(), resolvQuery()*/int resolvDNComp     (    const u_char *  exp_dn,   /* ptr to the expanded domain name */          u_char *  comp_dn,  /* ptr to where to output the compressed name */            int       length,   /* length of the buffer pointed by <comp_dn> */          u_char ** dnptrs,   /* ptr to a ptr list of compressed names */           u_char ** lastdnptr /* ptr to the last entry pointed by <dnptrs> */      );/********************************************************************************* resolvQuery - construct a query, send it, wait for a response** This routine constructs a query for the domain specified in the <name> * parameter.  The <class> parameter specifies the class of the query. * The <type> parameter specifies the type of query. The routine then sends* the query to the DNS server.  When the server responds, the response is * validated and copied to the buffer you supplied in the <answer> parameter.* Use the <anslen> parameter to pass in the size of the buffer referenced* in <answer>.** RETURNS: The length of the response or ERROR.** ERRNO:*  S_resolvLib_TRY_AGAIN*  S_resolvLib_HOST_NOT_FOUND*  S_resolvLib_NO_DATA*  S_resolvLib_NO_RECOVERY** SEE ALSO:* resolvGetHostByName(), resolvGetHostByAddr(), resolvDNExpand(),* resolvDNComp(), resolvInit(), resolvParamsSet(), resolvParamsGet(),* resolvMkQuery()*/int resolvQuery     (    char   *name,       /* domain name */    int    class,       /* query class for IP is C_IN */    int    type,        /* type is T_A, T_PTR, ... */    u_char *answer,     /* buffer to put answer */    int    anslen       /* length of answer buffer */    );/********************************************************************************* resolvMkQuery - create all types of DNS queries** This routine uses the input parameters to create a domain name query.* You can set the <op> parameter to QUERY or IQUERY.  Specify the domain * name in <dname>, the class in <class>, the query type in <type>.  Valid* values for type include T_A, T_PTR, and so on.  Use <data> to add Resource * Record data to the query.  Use <datalen> to pass in the length of the * data buffer.  Set <newrr_in> to NULL.  This parameter is reserved for * future use.  The <buf> parameter expects a pointer to the output buffer * for the constructed query.  Use <buflen> to pass in the length of the * buffer referenced in <buf>.** RETURNS: The length of the constructed query or ERROR.** SEE ALSO:* resolvGetHostByName(), resolvGetHostByAddr(), resolvDNExpand(),* resolvDNComp(), resolvSend(), resolvParamsSet(), resolvParamsGet(),* resolvInit(), resolvQuery()*/int resolvMkQuery     (          int     op,	       /* set to desire query QUERY or IQUERY */    const char *  dname,       /* domain name to be use in the query */    int           class,       /* query class for IP is C_IN */    int           type,        /* type is T_A, T_PTR, ... */    const char *  data,        /* resource Record (RR) data */    int           datalen,     /* length of the RR */    const char *  newrr_in,    /* not used always set to NULL */          char *  buf,         /* out of the constructed query */          int     buflen       /* length of the buffer for the query */    );/********************************************************************************* resolvSend - send a pre-formatted query and return the answer** This routine takes a pre-formatted DNS query and sends it to the domain* server.  Use <buf> to pass in a pointer to the query.  Use <buflen> to * pass in the size of the buffer referenced in <buf>.  The <answer> parameter* expects a pointer to a buffer into which this routine can write the * answer retrieved from the server.  Use <anslen> to pass in the size of* the buffer you have provided in <anslen>.** RETURNS: The length of the response or ERROR.** ERRNO:*  S_resolvLib_TRY_AGAIN*  ECONNREFUSE*  ETIMEDOU** SEE ALSO:* resolvGetHostByName(), resolvGetHostByAddr(), resolvDNExpand(),* resolvDNComp(), resolvInit(), resolvParamsSet(), resolvParamsGet(),* resolvMkQuery(), resolvQuery()*/int resolvSend     (    const char * buf,		/* pre-formatted query */          int    buflen,	/* length of query */          char * answer,	/* buffer for answer */          int    anslen		/* length of answer */    );

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产人成亚洲区| 国产超碰在线一区| 欧美久久高跟鞋激| 亚洲国产一区二区视频| 欧美久久久久中文字幕| 亚洲成a人在线观看| 91精品国产综合久久婷婷香蕉| 午夜精品福利一区二区三区蜜桃| 欧美老女人第四色| 久久www免费人成看片高清| 国产性色一区二区| 一本大道久久a久久精二百| 亚洲第一久久影院| 亚洲精品在线免费观看视频| 成人免费毛片高清视频| 亚洲综合在线免费观看| 日韩亚洲欧美综合| 成人动漫在线一区| 日本亚洲视频在线| 国产精品每日更新| 欧美撒尿777hd撒尿| 国产在线观看一区二区| 亚洲欧美激情插| 日韩欧美国产高清| 99热这里都是精品| 日本欧美在线看| 中文字幕在线不卡一区 | 蜜桃精品视频在线观看| 欧美激情资源网| 欧美人与禽zozo性伦| 岛国av在线一区| 日韩不卡手机在线v区| 国产精品每日更新在线播放网址 | 亚洲国产日产av| 久久久一区二区三区| 在线观看日韩电影| 国产高清不卡一区| 日本美女视频一区二区| 亚洲欧美一区二区视频| 亚洲精品一区二区三区福利| 日本高清不卡视频| 成人免费视频一区二区| 久久99精品久久久久久久久久久久| 亚洲欧美激情一区二区| 国产日韩视频一区二区三区| 337p亚洲精品色噜噜| 91色.com| 成人黄色在线视频| 狠狠色丁香婷综合久久| 石原莉奈在线亚洲二区| 亚洲精品伦理在线| 中文字幕在线播放不卡一区| 精品日产卡一卡二卡麻豆| 欧美日韩国产乱码电影| 色婷婷综合五月| 成人爱爱电影网址| 国产成人精品aa毛片| 久久精品国产精品青草| 男女视频一区二区| 日韩精品乱码av一区二区| 一区二区三区小说| 亚洲女同ⅹxx女同tv| 国产精品美女久久久久高潮| 国产亚洲一区二区三区四区| 日韩欧美国产麻豆| 日韩欧美激情四射| 欧美大尺度电影在线| 欧美一区二区三区爱爱| 欧美一区二区黄| 欧美一区三区四区| 日韩午夜电影av| 亚洲欧洲国产日韩| 国产精品久久久久桃色tv| 国产欧美日韩另类一区| 国产免费成人在线视频| 国产精品天干天干在线综合| 国产情人综合久久777777| 欧美经典一区二区| 亚洲欧洲精品一区二区精品久久久 | 欧美久久久影院| 欧美精品免费视频| 日韩欧美一区在线| 久久亚洲一级片| 国产亚洲一区二区三区四区| 亚洲国产精品成人综合 | 国产精品美女久久久久久2018| 久久久久国产成人精品亚洲午夜| 精品久久国产字幕高潮| 国产欧美一区二区三区鸳鸯浴| 国产欧美一区二区精品性| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 久久国产精品色| 精品一二三四在线| 国产不卡视频在线播放| 99久久久精品| 欧美亚洲日本国产| 日韩欧美国产午夜精品| 国产欧美日韩一区二区三区在线观看| 国产精品无遮挡| 一区二区三区在线影院| 日本欧美韩国一区三区| 国产成人av电影在线播放| 色婷婷综合久久| 欧美精品xxxxbbbb| 久久久精品国产99久久精品芒果 | 91久久精品一区二区三| 欧美日韩成人高清| 精品国产一区二区三区不卡| 国产精品理论片在线观看| 一区二区三区不卡在线观看| 日韩国产高清影视| 不卡的看片网站| 欧美精品 国产精品| 国产亚洲欧美中文| 亚洲影院在线观看| 国产a精品视频| 欧美精品aⅴ在线视频| 日本一区二区三区免费乱视频 | 91在线观看成人| 91麻豆精品国产91久久久久 | 精品影视av免费| 99精品久久免费看蜜臀剧情介绍| 在线成人av影院| 国产精品理论片| 美女精品自拍一二三四| 在线精品视频一区二区三四| 久久免费电影网| 日韩国产高清在线| 91黄色小视频| 国产精品女同互慰在线看| 免费xxxx性欧美18vr| 欧美专区在线观看一区| 国产欧美精品区一区二区三区| 青娱乐精品在线视频| 日本精品一区二区三区高清| 亚洲国产精品成人综合色在线婷婷| 免费观看成人鲁鲁鲁鲁鲁视频| 99riav久久精品riav| 国产无一区二区| 久久91精品国产91久久小草| 欧美性色黄大片| 一区二区视频在线看| 成人精品国产一区二区4080| 久久亚洲综合色| 久久精品国产亚洲一区二区三区| 欧美巨大另类极品videosbest| 亚洲精品中文在线观看| 波多野结衣欧美| 国产精品每日更新| 国产91高潮流白浆在线麻豆 | 日韩一二三区视频| 图片区小说区区亚洲影院| 欧洲精品在线观看| 亚洲男人都懂的| 色88888久久久久久影院野外| 中文字幕在线观看一区| 成人丝袜视频网| 国产精品久久久久婷婷| 不卡的电影网站| 成人欧美一区二区三区小说| 99视频一区二区| 亚洲欧美日韩电影| 色偷偷久久人人79超碰人人澡| 亚洲欧洲三级电影| 91在线视频观看| 亚洲精品老司机| 欧美色精品天天在线观看视频| 亚洲午夜久久久久久久久电影网| 91福利区一区二区三区| 性感美女极品91精品| 欧美日韩一区 二区 三区 久久精品 | 国产精品中文字幕一区二区三区| 精品国产三级电影在线观看| 久久av老司机精品网站导航| 久久久欧美精品sm网站| 国产成人av影院| 最好看的中文字幕久久| 色哟哟在线观看一区二区三区| 亚洲日本在线视频观看| 欧美亚洲综合久久| 日韩制服丝袜先锋影音| xfplay精品久久| 99热99精品| 婷婷久久综合九色综合伊人色| 91精品国产色综合久久不卡电影| 久久69国产一区二区蜜臀| 国产欧美日韩在线| 一本大道综合伊人精品热热 | 久久久久久久一区| 99久久综合狠狠综合久久| 一区二区三区四区国产精品| 欧美精品久久99久久在免费线| 美女免费视频一区二区| 欧美激情在线看| 欧美丝袜丝交足nylons图片| 免费不卡在线观看| 中文字幕在线观看不卡视频| 欧美另类高清zo欧美| 成人一区二区三区视频在线观看| 亚洲自拍偷拍麻豆|