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

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

?? resolvlib.c

?? vxworks source code, used for develop vxworks system.
?? 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一区二区三区免费野_久草精品视频
亚洲图片欧美视频| 精品中文字幕一区二区小辣椒| 国产精品欧美一区二区三区| 国产精品久久久久aaaa樱花| 一区av在线播放| 麻豆精品国产91久久久久久| 国产成人精品免费在线| 色久综合一二码| 99免费精品在线| 欧美一级艳片视频免费观看| 国产欧美日韩另类视频免费观看 | 大胆亚洲人体视频| 91在线云播放| 欧美成人性福生活免费看| 亚洲欧洲精品天堂一级| 天堂影院一区二区| av毛片久久久久**hd| 日韩午夜激情视频| 欧美成人国产一区二区| 国产亚洲精品中文字幕| 亚洲一区二区三区在线看| 激情文学综合网| 欧美三级乱人伦电影| 久久免费的精品国产v∧| 一个色在线综合| 国产91色综合久久免费分享| 欧美精品丝袜久久久中文字幕| 日韩精品一区二区三区在线播放| 中文字幕亚洲一区二区av在线| 日本伊人色综合网| 在线免费观看不卡av| 国产精品理论片在线观看| 免费人成精品欧美精品| 国产精品一卡二卡| 欧美一级xxx| 午夜av电影一区| 91看片淫黄大片一级在线观看| 久久综合国产精品| 婷婷国产v国产偷v亚洲高清| 91视频观看视频| 国产欧美一区二区精品性| 久久国内精品自在自线400部| 精品视频免费在线| 一区二区三区在线视频观看| 波多野结衣亚洲一区| 91麻豆精品91久久久久同性| 亚洲制服丝袜在线| 欧洲日韩一区二区三区| 亚洲欧洲日韩女同| zzijzzij亚洲日本少妇熟睡| 欧美韩日一区二区三区四区| 国产精品正在播放| 精品国产凹凸成av人网站| 麻豆一区二区99久久久久| 这里只有精品视频在线观看| 亚瑟在线精品视频| 色综合婷婷久久| 亚洲第一av色| 91精品在线免费| 老司机精品视频线观看86| 日韩一区和二区| 老司机午夜精品| 精品国产乱码久久久久久浪潮| 精品在线你懂的| 精品久久久久久久久久久久久久久久久| 日韩经典中文字幕一区| 日韩一区二区影院| 国产资源在线一区| 日韩精品最新网址| 激情综合色丁香一区二区| 久久蜜桃av一区精品变态类天堂 | 亚洲一区成人在线| 精品污污网站免费看| 日韩电影在线观看电影| 欧美岛国在线观看| 成人一二三区视频| 一区二区三区成人| 日本黄色一区二区| 亚洲激情在线激情| 欧美老肥妇做.爰bbww| 毛片基地黄久久久久久天堂| 国产喂奶挤奶一区二区三区| 国产黑丝在线一区二区三区| 欧美激情一区二区| 欧美三级在线看| 国内成+人亚洲+欧美+综合在线| 欧美韩日一区二区三区四区| 欧美在线视频日韩| 久久av资源站| 亚洲人成在线播放网站岛国| 在线成人av网站| 国产91清纯白嫩初高中在线观看| 亚洲狠狠丁香婷婷综合久久久| av综合在线播放| 视频一区二区三区入口| 国产午夜精品久久| 精品视频色一区| 国产91露脸合集magnet| 中文字幕国产一区二区| 8x福利精品第一导航| 波多野结衣的一区二区三区| 三级亚洲高清视频| 久久精品日产第一区二区三区高清版| 91激情在线视频| 国产一区福利在线| 亚洲国产日产av| 中文字幕精品—区二区四季| 日韩欧美国产精品一区| 在线观看www91| 成人性视频免费网站| 亚洲精品视频在线| 日韩欧美国产精品一区| 欧美中文字幕一区二区三区 | 久久久久久久综合日本| 欧美日韩国产影片| 国产一区二区三区电影在线观看 | 狠狠网亚洲精品| 视频精品一区二区| 亚洲尤物视频在线| 亚洲靠逼com| 中文字幕高清一区| 国产日韩欧美麻豆| 精品免费一区二区三区| 欧美人与性动xxxx| 国产盗摄女厕一区二区三区| 亚洲sss视频在线视频| 亚洲免费观看高清完整版在线观看 | 欧美在线不卡一区| 九九九久久久精品| 欧美aaa在线| 亚洲.国产.中文慕字在线| 伊人开心综合网| 最好看的中文字幕久久| 国产精品私人影院| 欧美不卡123| 欧美性一二三区| 欧亚洲嫩模精品一区三区| 99精品视频中文字幕| 99re8在线精品视频免费播放| 成人性生交大合| 国产剧情一区二区三区| 九色综合国产一区二区三区| 久久国产日韩欧美精品| 加勒比av一区二区| 精品无人码麻豆乱码1区2区| 久草中文综合在线| 国产一区二区三区视频在线播放| 韩国精品在线观看| 91丨九色porny丨蝌蚪| 777色狠狠一区二区三区| 久久久久久久综合| 亚洲一区欧美一区| 国产在线播放一区三区四| 97久久超碰国产精品电影| 欧美日本国产一区| 中文字幕+乱码+中文字幕一区| 一区二区三区四区中文字幕| 久久成人精品无人区| 91蜜桃网址入口| 精品国产乱码久久久久久闺蜜| 亚洲人成网站精品片在线观看| 午夜电影网亚洲视频| 波波电影院一区二区三区| 91精品国产欧美日韩| 亚洲欧洲综合另类在线| 久久99国产精品尤物| 日本电影亚洲天堂一区| www久久久久| 视频一区二区三区在线| 99国产欧美另类久久久精品| 精品美女在线观看| 亚洲一区二区黄色| 99精品视频一区| 国产亚洲一区二区三区| 三级久久三级久久| 欧美在线高清视频| 中文字幕在线一区| 国产一区二区日韩精品| 欧美一区二区三区四区在线观看 | 国产资源在线一区| 91精品国产色综合久久| 一卡二卡三卡日韩欧美| 99久久99久久久精品齐齐| 久久久久久久久久久久久夜| 日韩激情视频在线观看| 欧美色图第一页| 一区二区三区四区在线| 99久久精品国产一区二区三区 | 884aa四虎影成人精品一区| 亚洲精品日产精品乱码不卡| 成人国产精品免费观看视频| 337p粉嫩大胆噜噜噜噜噜91av | 欧美日韩一区二区三区免费看| 国产精品久久久久精k8| 国产69精品一区二区亚洲孕妇| 欧美大度的电影原声| 日本不卡视频一二三区| 日韩午夜在线观看视频| 奇米在线7777在线精品| 日韩欧美国产电影|