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

📄 resolvlib.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 3 页
字号:
contains the expanded domain name.  Use the <i>length</i> parameter to pass inthe size of the buffer referenced by the <i>exp_dn</i> parameter.  <p></blockquote><h4>RETURNS</h4><blockquote><p>The length of the expanded domain name, or ERROR on failure.<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#resolvInit">resolvInit</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="resolvDNComp"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>resolvDNComp</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>resolvDNComp</i>(&nbsp;)</strong> - compress a DNS name in a DNS packet</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>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 <i>comp_dn</i> */    u_char * *     dnptrs,   /* ptr to a ptr list of compressed names */    u_char * *     lastdnptr /* ptr to the last entry pointed by <i>dnptrs</i> */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine takes the expanded domain name referenced in the <i>exp_dn</i> parameter, compresses it, and stores the compressed name in the locationpointed to by the <i>comp_dn</i> parameter.  The <i>length</i> parameter passes in the length of the buffer starting at <i>comp_dn</i>.  The <i>dnptrs</i> parameter is a pointer to a list of pointers to previously compressed names.  The <i>lastdnptr</i> parameter points to the last entry in the <i>dnptrs</i> array.<p></blockquote><h4>RETURNS</h4><blockquote><p>The size of the compressed name, or ERROR.<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#resolvInit">resolvInit</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="resolvQuery"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>resolvQuery</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>resolvQuery</i>(&nbsp;)</strong> - construct a query, send it, wait for a response</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>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 */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine constructs a query for the domain specified in the <i>name</i> parameter.  The <i>class</i> parameter specifies the class of the query. The <i>type</i> parameter specifies the type of query. The routine then sendsthe query to the DNS server.  When the server responds, the response is validated and copied to the buffer you supplied in the <i>answer</i> parameter.Use the <i>anslen</i> parameter to pass in the size of the buffer referencedin <i>answer</i>.<p></blockquote><h4>RETURNS</h4><blockquote><p>The length of the response or ERROR.<p></blockquote><h4>ERRNO</h4><blockquote><p><p>&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#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#resolvInit">resolvInit</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><hr><a name="resolvMkQuery"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>resolvMkQuery</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>resolvMkQuery</i>(&nbsp;)</strong> - create all types of DNS queries</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>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 */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine uses the input parameters to create a domain name query.You can set the <i>op</i> parameter to QUERY or IQUERY.  Specify the domain name in <i>dname</i>, the class in <i>class</i>, the query type in <i>type</i>.  Validvalues for type include <b>T_A</b>, <b>T_PTR</b>, and so on.  Use <i>data</i> to add Resource Record data to the query.  Use <i>datalen</i> to pass in the length of the data buffer.  Set <i>newrr_in</i> to NULL.  This parameter is reserved for future use.  The <i>buf</i> parameter expects a pointer to the output buffer for the constructed query.  Use <i>buflen</i> to pass in the length of the buffer referenced in <i>buf</i>.<p></blockquote><h4>RETURNS</h4><blockquote><p>The length of the constructed query or ERROR.<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#resolvParamsGet">resolvParamsGet</a></i>(&nbsp;)</b>,  <b><i><a href="./resolvLib.html#resolvInit">resolvInit</a></i>(&nbsp;)</b>, <b><i><a href="./resolvLib.html#resolvQuery">resolvQuery</a></i>(&nbsp;)</b><hr><a name="resolvSend"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>resolvSend</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>resolvSend</i>(&nbsp;)</strong> - send a pre-formatted query and return the answer</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int resolvSend    (    const char * buf,    /* pre-formatted query */    int          buflen, /* length of query */    char *       answer, /* buffer for answer */    int          anslen  /* length of answer */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine takes a pre-formatted DNS query and sends it to the domainserver.  Use <i>buf</i> to pass in a pointer to the query.  Use <i>buflen</i> to pass in the size of the buffer referenced in <i>buf</i>.  The <i>answer</i> parameterexpects a pointer to a buffer into which this routine can write the answer retrieved from the server.  Use <i>anslen</i> to pass in the size ofthe buffer you have provided in <i>anslen</i>.<p></blockquote><h4>RETURNS</h4><blockquote><p>The length of the response or ERROR.<p></blockquote><h4>ERRNO</h4><blockquote><p><p>&nbsp;S_resolvLib_TRY_AGAIN<br>&nbsp;ECONNREFUSE<br>&nbsp;ETIMEDOU<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#resolvInit">resolvInit</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></body></html>

⌨️ 快捷键说明

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