⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 resolvlib.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./resolvLib.html#top">resolvLib</a></b>, <b><i><a href="./resolvLib.html#resolvInit">resolvInit</a></i>(&nbsp;)</b>, <b><i><a href="./resolvLib.html#resolvGetHostByAddr">resolvGetHostByAddr</a></i>(&nbsp;)</b>, <b><i><a href="./resolvLib.html#resolvDNExpand">resolvDNExpand</a></i>(&nbsp;)</b>,  <b><i><a href="./resolvLib.html#resolvDNComp">resolvDNComp</a></i>(&nbsp;)</b>, <b><i><a href="./resolvLib.html#resolvSend">resolvSend</a></i>(&nbsp;)</b>, <b><i><a href="./resolvLib.html#resolvParamsSet">resolvParamsSet</a></i>(&nbsp;)</b>, <b><i><a href="./resolvLib.html#resolvParamsGet">resolvParamsGet</a></i>(&nbsp;)</b>,  <b><i><a href="./resolvLib.html#resolvMkQuery">resolvMkQuery</a></i>(&nbsp;)</b>, <b><i><a href="./resolvLib.html#resolvQuery">resolvQuery</a></i>(&nbsp;)</b><hr><a name="resolvGetHostByAddr"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>resolvGetHostByAddr</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>resolvGetHostByAddr</i>(&nbsp;)</strong> - query the DNS server for the host name of an IP address</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>struct hostent * resolvGetHostByAddr    (    const char * pInetAddr,    char *       pHostBuf,    int          bufLen    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function returns a <b>hostent</b> structure, which is defined as follows:<p><pre>struct   hostent     {    char *   h_name;            /* official name of host */    char **  h_aliases;         /* alias list */    int      h_addrtype;        /* address type */    int      h_length;          /* length of address */    char **  h_addr_list;       /* list of addresses from name server */    unsigned int h_ttl;         /* Time to Live in Seconds for this entry */    }</pre>The <b>h_aliases</b> and <b>h_addr_type</b> vectors are NULL-terminated.<p>The <i>pinetAddr</i> parameter passes in the IP address (in network byte order)for the host whose name you want to discover.  The <i>pBuf</i> and <i>bufLen</i> parameters specify the location and size (512 bytes or more) of the buffer that is to receive the hostent structure.  <b><i><a href="./resolvLib.html#resolvGetHostByAddr">resolvGetHostByAddr</a></i>(&nbsp;)</b> returns host addresses are returned in network byte order. <p></blockquote><h4>RETURNS</h4><blockquote><p>A pointer to a <b>hostent</b> structure if the host is found, or NULL if the parameters are invalid, host is not found, or the buffer is too small.<p></blockquote><h4>ERRNO</h4><blockquote><p><p>&nbsp;S_resolvLib_INVALID_PARAMETER<br>&nbsp;S_resolvLib_BUFFER_2_SMALL<br>&nbsp;S_resolvLib_TRY_AGAIN<br>&nbsp;S_resolvLib_HOST_NOT_FOUND<br>&nbsp;S_resolvLib_NO_DATA<br>&nbsp;S_resolvLib_NO_RECOVERY<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./resolvLib.html#top">resolvLib</a></b>, <b><i><a href="./resolvLib.html#resolvGetHostByName">resolvGetHostByName</a></i>(&nbsp;)</b>, <b><i><a href="./resolvLib.html#resolvInit">resolvInit</a></i>(&nbsp;)</b>, <b><i><a href="./resolvLib.html#resolvDNExpand">resolvDNExpand</a></i>(&nbsp;)</b>,  <b><i><a href="./resolvLib.html#resolvDNComp">resolvDNComp</a></i>(&nbsp;)</b>, <b><i><a href="./resolvLib.html#resolvSend">resolvSend</a></i>(&nbsp;)</b>, <b><i><a href="./resolvLib.html#resolvParamsSet">resolvParamsSet</a></i>(&nbsp;)</b>, <b><i><a href="./resolvLib.html#resolvParamsGet">resolvParamsGet</a></i>(&nbsp;)</b>,  <b><i><a href="./resolvLib.html#resolvMkQuery">resolvMkQuery</a></i>(&nbsp;)</b>, <b><i><a href="./resolvLib.html#resolvQuery">resolvQuery</a></i>(&nbsp;)</b><hr><a name="resolvParamsSet"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>resolvParamsSet</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>resolvParamsSet</i>(&nbsp;)</strong> - set the parameters which control the resolver library</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS resolvParamsSet    (    RESOLV_PARAMS_S * pResolvParams /* ptr to resolver parameter struct */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets the resolver parameters.  <i>pResolvParams</i> passes ina pointer to a <b>RESOLV_PARAMS_S</b> structure, which is defined as follows: <pre>    typedef struct       {       char   queryOrder;       char   domainName [MAXDNAME];       char   nameServersAddr [MAXNS][MAXIPADDRLEN];       } RESOLV_PARAMS_S;</pre>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 <b>RESOLV_PARAMS_S</b> 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.  <p>Before calling <b><i><a href="./resolvLib.html#resolvParamsSet">resolvParamsSet</a></i>(&nbsp;)</b>, you should first call <b><i><a href="./resolvLib.html#resolvParamsGet">resolvParamsGet</a></i>(&nbsp;)</b> to populate a <b>RESOLV_PARAMS_S</b> structure with the current settings.  Thenyou change the values of the members that interest you.    <p>Valid values for the <b>queryOrder</b> member of <b>RESOLV_PARAMS_S</b> structure are defined in <b>resolvLib.h</b>.  Set the <b>domainName</b> member to the domain to which this resolver belongs.  Set the <b>nameServersAddr</b> 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 <b>queryOrder</b> and <b>nameServerAddr</b> members.  This function does not try to validate the domain name.  <p></blockquote><h4>RETURNS</h4><blockquote><p>OK if the parameters are valid, ERROR otherwise.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./resolvLib.html#top">resolvLib</a></b>, <b><i><a href="./resolvLib.html#resolvGetHostByName">resolvGetHostByName</a></i>(&nbsp;)</b>, <b><i><a href="./resolvLib.html#resolvGetHostByAddr">resolvGetHostByAddr</a></i>(&nbsp;)</b>, <b><i><a href="./resolvLib.html#resolvDNExpand">resolvDNExpand</a></i>(&nbsp;)</b>,  <b><i><a href="./resolvLib.html#resolvDNComp">resolvDNComp</a></i>(&nbsp;)</b>, <b><i><a href="./resolvLib.html#resolvSend">resolvSend</a></i>(&nbsp;)</b>, <b><i><a href="./resolvLib.html#resolvInit">resolvInit</a></i>(&nbsp;)</b>, <b><i><a href="./resolvLib.html#resolvParamsGet">resolvParamsGet</a></i>(&nbsp;)</b>,  <b><i><a href="./resolvLib.html#resolvMkQuery">resolvMkQuery</a></i>(&nbsp;)</b>, <b><i><a href="./resolvLib.html#resolvQuery">resolvQuery</a></i>(&nbsp;)</b><hr><a name="resolvParamsGet"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>resolvParamsGet</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>resolvParamsGet</i>(&nbsp;)</strong> - get the parameters which control the resolver library</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void resolvParamsGet    (    RESOLV_PARAMS_S * pResolvParams /* ptr to resolver parameter struct */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine copies the resolver parameters to the <b>RESOLV_PARAMS_S</b>structure referenced in the <i>pResolvParms</i> parameter.  The <b>RESOLV_PARAMS_S</b>structure is defined in <b>resolvLib.h</b> as follows: <pre>    typedef struct       {       char   queryOrder;       char   domainName [MAXDNAME];       char   nameServersAddr [MAXNS][MAXIPADDRLEN];       } RESOLV_PARAMS_S;</pre>Typically, you call this function just before calling <b><i><a href="./resolvLib.html#resolvParamsSet">resolvParamsSet</a></i>(&nbsp;)</b>.The <b><i><a href="./resolvLib.html#resolvParamsGet">resolvParamsGet</a></i>(&nbsp;)</b> call populates the <b>RESOLV_PARAMS_S</b> structure. You can then modify the default values just before calling <b><i><a href="./resolvLib.html#resolvParamsSet">resolvParamsSet</a></i>(&nbsp;)</b>.  <p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./resolvLib.html#top">resolvLib</a></b>, <b><i><a href="./resolvLib.html#resolvGetHostByName">resolvGetHostByName</a></i>(&nbsp;)</b>, <b><i><a href="./resolvLib.html#resolvGetHostByAddr">resolvGetHostByAddr</a></i>(&nbsp;)</b>, <b><i><a href="./resolvLib.html#resolvDNExpand">resolvDNExpand</a></i>(&nbsp;)</b>,  <b><i><a href="./resolvLib.html#resolvDNComp">resolvDNComp</a></i>(&nbsp;)</b>, <b><i><a href="./resolvLib.html#resolvSend">resolvSend</a></i>(&nbsp;)</b>, <b><i><a href="./resolvLib.html#resolvParamsSet">resolvParamsSet</a></i>(&nbsp;)</b>, <b><i><a href="./resolvLib.html#resolvInit">resolvInit</a></i>(&nbsp;)</b>,  <b><i><a href="./resolvLib.html#resolvMkQuery">resolvMkQuery</a></i>(&nbsp;)</b>, <b><i><a href="./resolvLib.html#resolvQuery">resolvQuery</a></i>(&nbsp;)</b><hr><a name="resolvDNExpand"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>resolvDNExpand</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>resolvDNExpand</i>(&nbsp;)</strong> - expand a DNS compressed name from a DNS packet</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>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 <i>expd_dn</i> */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This functions expands a compressed DNS name from a DNS packet.  The <i>msg</i>parameter points to that start of the DNS packet.  The <i>eomorig</i> parameterpoints to the last location of the DNS packet plus 1.  The <i>comp_dn</i> parameter points to the compress domain name, and <i>exp_dn</i> parameter expects a pointer to a buffer.  Upon function completion, this buffer 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -