Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 550bbe86d83a7870fdddc73c68e5d2b2 > files > 176

libunbound-devel-1.3.4-1mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>unbound: iterator/iter_resptype.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.9 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="dir_fb9f2b54f370aa6f4de91e34db18da16.html">iterator</a>
  </div>
</div>
<div class="contents">
<h1>iter_resptype.c File Reference</h1>This file defines the response type.  
<a href="#_details">More...</a>
<p>
<code>#include &quot;config.h&quot;</code><br>
<code>#include &quot;<a class="el" href="iter__resptype_8h.html">iterator/iter_resptype.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="iter__delegpt_8h.html">iterator/iter_delegpt.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="dns_8h.html">services/cache/dns.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="net__help_8h.html">util/net_help.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="dname_8h.html">util/data/dname.h</a>&quot;</code><br>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum <a class="el" href="iter__resptype_8h.html#3fd7592f4abddb72bb94a501da12a99b">response_type</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="iter__resptype_8c.html#2fd6476e18d09dc5049896787dc94e26">response_type_from_cache</a> (struct <a class="el" href="structdns__msg.html">dns_msg</a> *msg, struct <a class="el" href="structquery__info.html">query_info</a> *request)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Classifies a response message from cache based on the current request.  <a href="#2fd6476e18d09dc5049896787dc94e26"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum <a class="el" href="iter__resptype_8h.html#3fd7592f4abddb72bb94a501da12a99b">response_type</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="iter__resptype_8c.html#c02e335cbeb743e1edfa19ca04374b44">response_type_from_server</a> (int rdset, struct <a class="el" href="structdns__msg.html">dns_msg</a> *msg, struct <a class="el" href="structquery__info.html">query_info</a> *request, struct <a class="el" href="structdelegpt.html">delegpt</a> *dp)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Classifies a response message (from the wire) based on the current request.  <a href="#c02e335cbeb743e1edfa19ca04374b44"></a><br></td></tr>
</table>
<hr><h2>Detailed Description</h2>
This file defines the response type. 
<p>
DNS Responses can be classified as one of the response types. <hr><h2>Function Documentation</h2>
<a class="anchor" name="2fd6476e18d09dc5049896787dc94e26"></a><!-- doxytag: member="iter_resptype.c::response_type_from_cache" ref="2fd6476e18d09dc5049896787dc94e26" args="(struct dns_msg *msg, struct query_info *request)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="iter__resptype_8h.html#3fd7592f4abddb72bb94a501da12a99b">response_type</a> response_type_from_cache           </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structdns__msg.html">dns_msg</a> *&nbsp;</td>
          <td class="paramname"> <em>msg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structquery__info.html">query_info</a> *&nbsp;</td>
          <td class="paramname"> <em>request</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Classifies a response message from cache based on the current request. 
<p>
Note that this routine assumes that THROWAWAY or LAME responses will not occur. Also, it will not detect REFERRAL type messages, since those are (currently) automatically classified based on how they came from the cache (findDelegation() instead of <a class="el" href="unbound-host_8c.html#053ec6be2bdfe7482481337abb03aee3" title="perform host lookup">lookup()</a>).<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>msg,:</em>&nbsp;</td><td>the message from the cache. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>request,:</em>&nbsp;</td><td>the request that generated the response. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the response type (CNAME or ANSWER). </dd></dl>

<p>References <a class="el" href="msgreply_8h_source.html#l00133">reply_info::an_numrrsets</a>, <a class="el" href="packed__rrset_8h_source.html#l00064">packed_rrset_key::dname</a>, <a class="el" href="msgreply_8h_source.html#l00099">reply_info::flags</a>, <a class="el" href="net__help_8h_source.html#l00070">FLAGS_GET_RCODE</a>, <a class="el" href="packed__rrset_8c_source.html#l00193">get_cname_target()</a>, <a class="el" href="msgreply_8h_source.html#l00070">query_info::qclass</a>, <a class="el" href="msgreply_8h_source.html#l00064">query_info::qname</a>, <a class="el" href="msgreply_8h_source.html#l00066">query_info::qname_len</a>, <a class="el" href="msgreply_8h_source.html#l00068">query_info::qtype</a>, <a class="el" href="dname_8c_source.html#l00096">query_dname_compare()</a>, <a class="el" href="dns_8h_source.html#l00059">dns_msg::rep</a>, <a class="el" href="iter__resptype_8h_source.html#l00063">RESPONSE_TYPE_ANSWER</a>, <a class="el" href="iter__resptype_8h_source.html#l00072">RESPONSE_TYPE_CNAME</a>, <a class="el" href="packed__rrset_8h_source.html#l00105">ub_packed_rrset_key::rk</a>, <a class="el" href="packed__rrset_8h_source.html#l00077">packed_rrset_key::rrset_class</a>, <a class="el" href="msgreply_8h_source.html#l00150">reply_info::rrsets</a>, and <a class="el" href="packed__rrset_8h_source.html#l00075">packed_rrset_key::type</a>.</p>

<p>Referenced by <a class="el" href="iterator_8c_source.html#l00827">processInitRequest()</a>.</p>

</div>
</div><p>
<a class="anchor" name="c02e335cbeb743e1edfa19ca04374b44"></a><!-- doxytag: member="iter_resptype.c::response_type_from_server" ref="c02e335cbeb743e1edfa19ca04374b44" args="(int rdset, struct dns_msg *msg, struct query_info *request, struct delegpt *dp)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="iter__resptype_8h.html#3fd7592f4abddb72bb94a501da12a99b">response_type</a> response_type_from_server           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>rdset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structdns__msg.html">dns_msg</a> *&nbsp;</td>
          <td class="paramname"> <em>msg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structquery__info.html">query_info</a> *&nbsp;</td>
          <td class="paramname"> <em>request</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structdelegpt.html">delegpt</a> *&nbsp;</td>
          <td class="paramname"> <em>dp</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Classifies a response message (from the wire) based on the current request. 
<p>
NOTE: currently this routine uses the AA bit in the response to help distinguish between some non-standard referrals and answers. It also relies somewhat on the originating zone to be accurate (for lameness detection, mostly).<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>rdset,:</em>&nbsp;</td><td>if RD bit was sent in query sent by unbound. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>msg,:</em>&nbsp;</td><td>the message from the cache. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>request,:</em>&nbsp;</td><td>the request that generated the response. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dp,:</em>&nbsp;</td><td>The delegation point that was being queried when the response was returned. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>the response type (CNAME or ANSWER). </dd></dl>

<p>References <a class="el" href="msgreply_8h_source.html#l00133">reply_info::an_numrrsets</a>, <a class="el" href="net__help_8h_source.html#l00066">BIT_AA</a>, <a class="el" href="net__help_8h_source.html#l00060">BIT_RA</a>, <a class="el" href="packed__rrset_8h_source.html#l00064">packed_rrset_key::dname</a>, <a class="el" href="dname_8c_source.html#l00580">dname_strict_subdomain_c()</a>, <a class="el" href="dname_8c_source.html#l00587">dname_subdomain_c()</a>, <a class="el" href="msgreply_8h_source.html#l00099">reply_info::flags</a>, <a class="el" href="net__help_8h_source.html#l00070">FLAGS_GET_RCODE</a>, <a class="el" href="packed__rrset_8c_source.html#l00193">get_cname_target()</a>, <a class="el" href="iter__delegpt_8h_source.html#l00059">delegpt::name</a>, <a class="el" href="iter__delegpt_8h_source.html#l00061">delegpt::namelen</a>, <a class="el" href="msgreply_8h_source.html#l00136">reply_info::ns_numrrsets</a>, <a class="el" href="msgreply_8h_source.html#l00070">query_info::qclass</a>, <a class="el" href="msgreply_8h_source.html#l00064">query_info::qname</a>, <a class="el" href="msgreply_8h_source.html#l00066">query_info::qname_len</a>, <a class="el" href="msgreply_8h_source.html#l00068">query_info::qtype</a>, <a class="el" href="dname_8c_source.html#l00096">query_dname_compare()</a>, <a class="el" href="dns_8h_source.html#l00059">dns_msg::rep</a>, <a class="el" href="iter__resptype_8h_source.html#l00063">RESPONSE_TYPE_ANSWER</a>, <a class="el" href="iter__resptype_8h_source.html#l00072">RESPONSE_TYPE_CNAME</a>, <a class="el" href="iter__resptype_8h_source.html#l00084">RESPONSE_TYPE_LAME</a>, <a class="el" href="iter__resptype_8h_source.html#l00091">RESPONSE_TYPE_REC_LAME</a>, <a class="el" href="iter__resptype_8h_source.html#l00066">RESPONSE_TYPE_REFERRAL</a>, <a class="el" href="iter__resptype_8h_source.html#l00078">RESPONSE_TYPE_THROWAWAY</a>, <a class="el" href="packed__rrset_8h_source.html#l00105">ub_packed_rrset_key::rk</a>, <a class="el" href="packed__rrset_8h_source.html#l00077">packed_rrset_key::rrset_class</a>, <a class="el" href="msgreply_8h_source.html#l00150">reply_info::rrsets</a>, and <a class="el" href="packed__rrset_8h_source.html#l00075">packed_rrset_key::type</a>.</p>

<p>Referenced by <a class="el" href="iterator_8c_source.html#l01748">processPrimeResponse()</a>, and <a class="el" href="iterator_8c_source.html#l01454">processQueryResponse()</a>.</p>

</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Tue Oct 13 06:46:30 2009 for unbound by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
</body>
</html>