Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > e3a718fcad37ff363f65d6a6e994e272 > files > 208

ldns-devel-1.6.12-1.fc15.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type"
content="text/html;charset=iso-8859-1">
<title>ldns documentation</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<div class="logo">
<img src="LogoInGradientBar2-y100.png"/>
</div>
<!-- Generated by Doxygen 1.7.4 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;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 id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="dir_7a7a565456b510ac01baf8655647d8a2.html">ldns</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">parse.h</div>  </div>
</div>
<div class="contents">
<a href="parse_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * parse.h </span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> * a Net::DNS like library for C</span>
<a name="l00005"></a>00005 <span class="comment"> * LibDNS Team @ NLnet Labs</span>
<a name="l00006"></a>00006 <span class="comment"> * (c) NLnet Labs, 2005-2006</span>
<a name="l00007"></a>00007 <span class="comment"> * See the file LICENSE for the license</span>
<a name="l00008"></a>00008 <span class="comment"> */</span>
<a name="l00009"></a>00009 
<a name="l00010"></a>00010 <span class="preprocessor">#ifndef LDNS_PARSE_H</span>
<a name="l00011"></a>00011 <span class="preprocessor"></span><span class="preprocessor">#define LDNS_PARSE_H</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span>
<a name="l00013"></a>00013 <span class="preprocessor">#include &lt;<a class="code" href="common_8h.html" title="Common definitions for LDNS.">ldns/common.h</a>&gt;</span>
<a name="l00014"></a>00014 <span class="preprocessor">#include &lt;<a class="code" href="buffer_8h.html" title="This file contains the definition of ldns_buffer, and functions to manipulate those.">ldns/buffer.h</a>&gt;</span>
<a name="l00015"></a>00015 
<a name="l00016"></a>00016 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {
<a name="l00018"></a>00018 <span class="preprocessor">#endif</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span>
<a name="l00020"></a><a class="code" href="parse_8h.html#a55bb73c2d561409989e1d69eae4f61ee">00020</a> <span class="preprocessor">#define LDNS_PARSE_SKIP_SPACE           &quot;\f\n\r\v&quot;</span>
<a name="l00021"></a><a class="code" href="parse_8h.html#aa07777e1a38886b0c233972bdabefaea">00021</a> <span class="preprocessor"></span><span class="preprocessor">#define LDNS_PARSE_NORMAL               &quot; \f\n\r\t\v&quot;</span>
<a name="l00022"></a><a class="code" href="parse_8h.html#aa49e53b5a9bd238300e071cff3069598">00022</a> <span class="preprocessor"></span><span class="preprocessor">#define LDNS_PARSE_NO_NL                &quot; \t&quot;</span>
<a name="l00023"></a><a class="code" href="parse_8h.html#a5e0b586eee52cb7d411f758a286e8e3f">00023</a> <span class="preprocessor"></span><span class="preprocessor">#define LDNS_MAX_LINELEN                10230</span>
<a name="l00024"></a><a class="code" href="parse_8h.html#a5aa3bc050b1a087437652ed75c921bb7">00024</a> <span class="preprocessor"></span><span class="preprocessor">#define LDNS_MAX_KEYWORDLEN             32</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span>
<a name="l00026"></a>00026 
<a name="l00039"></a><a class="code" href="parse_8h.html#a761a2ab65920950766fed7502f932bb7">00039</a> <span class="keyword">enum</span> <a class="code" href="parse_8h.html#a761a2ab65920950766fed7502f932bb7" title="different type of directives in zone files We now deal with $TTL, $ORIGIN and $INCLUDE.">ldns_enum_directive</a>
<a name="l00040"></a>00040 {
<a name="l00041"></a><a class="code" href="parse_8h.html#a761a2ab65920950766fed7502f932bb7a01921e71ce58f83c08996290d3690945">00041</a>         <a class="code" href="parse_8h.html#a761a2ab65920950766fed7502f932bb7a01921e71ce58f83c08996290d3690945">LDNS_DIR_TTL</a>,
<a name="l00042"></a><a class="code" href="parse_8h.html#a761a2ab65920950766fed7502f932bb7adfec44e021d7b4144b352a0714547e92">00042</a>         <a class="code" href="parse_8h.html#a761a2ab65920950766fed7502f932bb7adfec44e021d7b4144b352a0714547e92">LDNS_DIR_ORIGIN</a>,
<a name="l00043"></a><a class="code" href="parse_8h.html#a761a2ab65920950766fed7502f932bb7a72f07f2810d39b5698b266f00a05dd29">00043</a>         <a class="code" href="parse_8h.html#a761a2ab65920950766fed7502f932bb7a72f07f2810d39b5698b266f00a05dd29">LDNS_DIR_INCLUDE</a>
<a name="l00044"></a>00044 };
<a name="l00045"></a><a class="code" href="parse_8h.html#a23fbecc1a48239fa30c47f3cbfd7dfce">00045</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> <a class="code" href="parse_8h.html#a761a2ab65920950766fed7502f932bb7" title="different type of directives in zone files We now deal with $TTL, $ORIGIN and $INCLUDE.">ldns_enum_directive</a> <a class="code" href="parse_8h.html#a23fbecc1a48239fa30c47f3cbfd7dfce">ldns_directive</a>;
<a name="l00046"></a>00046 
<a name="l00057"></a>00057 ssize_t <a class="code" href="parse_8c.html#a500eff9b2558a70b4ff479f2c2630312" title="returns a token/char from the stream F.">ldns_fget_token</a>(FILE *f, <span class="keywordtype">char</span> *token, <span class="keyword">const</span> <span class="keywordtype">char</span> *delim, <span class="keywordtype">size_t</span> limit);
<a name="l00058"></a>00058 
<a name="l00070"></a>00070 ssize_t <a class="code" href="parse_8c.html#a0871ab9743d5418ca159ca3e02cef1d7" title="returns a token/char from the stream F.">ldns_fget_token_l</a>(FILE *f, <span class="keywordtype">char</span> *token, <span class="keyword">const</span> <span class="keywordtype">char</span> *delim, <span class="keywordtype">size_t</span> limit, <span class="keywordtype">int</span> *line_nr);
<a name="l00071"></a>00071 
<a name="l00082"></a>00082 ssize_t <a class="code" href="parse_8c.html#a9e2a87caeb3e9d983e461da182e2723b" title="returns a token/char from the buffer b.">ldns_bget_token</a>(<a class="code" href="structldns__struct__buffer.html" title="implementation of buffers to ease operations">ldns_buffer</a> *b, <span class="keywordtype">char</span> *token, <span class="keyword">const</span> <span class="keywordtype">char</span> *delim, <span class="keywordtype">size_t</span> limit);
<a name="l00083"></a>00083 
<a name="l00084"></a>00084 <span class="comment">/*</span>
<a name="l00085"></a>00085 <span class="comment"> * searches for keyword and delim in a file. Gives everything back</span>
<a name="l00086"></a>00086 <span class="comment"> * after the keyword + k_del until we hit d_del</span>
<a name="l00087"></a>00087 <span class="comment"> * \param[in] f file pointer to read from</span>
<a name="l00088"></a>00088 <span class="comment"> * \param[in] keyword keyword to look for</span>
<a name="l00089"></a>00089 <span class="comment"> * \param[in] k_del keyword delimeter </span>
<a name="l00090"></a>00090 <span class="comment"> * \param[out] data the data found </span>
<a name="l00091"></a>00091 <span class="comment"> * \param[in] d_del the data delimeter</span>
<a name="l00092"></a>00092 <span class="comment"> * \param[in] data_limit maximum size the the data buffer</span>
<a name="l00093"></a>00093 <span class="comment"> * \return the number of character read</span>
<a name="l00094"></a>00094 <span class="comment"> */</span>
<a name="l00095"></a>00095 ssize_t <a class="code" href="parse_8c.html#a22b581152a65f9eed8dc60e25f9bfc1d">ldns_fget_keyword_data</a>(FILE *f, <span class="keyword">const</span> <span class="keywordtype">char</span> *keyword, <span class="keyword">const</span> <span class="keywordtype">char</span> *k_del, <span class="keywordtype">char</span> *data, <span class="keyword">const</span> <span class="keywordtype">char</span> *d_del, <span class="keywordtype">size_t</span> data_limit);
<a name="l00096"></a>00096 
<a name="l00097"></a>00097 <span class="comment">/*</span>
<a name="l00098"></a>00098 <span class="comment"> * searches for keyword and delim. Gives everything back</span>
<a name="l00099"></a>00099 <span class="comment"> * after the keyword + k_del until we hit d_del</span>
<a name="l00100"></a>00100 <span class="comment"> * \param[in] f file pointer to read from</span>
<a name="l00101"></a>00101 <span class="comment"> * \param[in] keyword keyword to look for</span>
<a name="l00102"></a>00102 <span class="comment"> * \param[in] k_del keyword delimeter </span>
<a name="l00103"></a>00103 <span class="comment"> * \param[out] data the data found </span>
<a name="l00104"></a>00104 <span class="comment"> * \param[in] d_del the data delimeter</span>
<a name="l00105"></a>00105 <span class="comment"> * \param[in] data_limit maximum size the the data buffer</span>
<a name="l00106"></a>00106 <span class="comment"> * \param[in] line_nr pointer to an integer containing the current line number (for</span>
<a name="l00107"></a>00107 <span class="comment">debugging purposes)</span>
<a name="l00108"></a>00108 <span class="comment"> * \return the number of character read</span>
<a name="l00109"></a>00109 <span class="comment"> */</span>
<a name="l00110"></a>00110 ssize_t <a class="code" href="parse_8c.html#a9aec3a54a2727f5b7e2adb30691795dd">ldns_fget_keyword_data_l</a>(FILE *f, <span class="keyword">const</span> <span class="keywordtype">char</span> *keyword, <span class="keyword">const</span> <span class="keywordtype">char</span> *k_del, <span class="keywordtype">char</span> *data, <span class="keyword">const</span> <span class="keywordtype">char</span> *d_del, <span class="keywordtype">size_t</span> data_limit, <span class="keywordtype">int</span> *line_nr);
<a name="l00111"></a>00111 
<a name="l00112"></a>00112 <span class="comment">/*</span>
<a name="l00113"></a>00113 <span class="comment"> * searches for keyword and delim in a buffer. Gives everything back</span>
<a name="l00114"></a>00114 <span class="comment"> * after the keyword + k_del until we hit d_del</span>
<a name="l00115"></a>00115 <span class="comment"> * \param[in] b buffer pointer to read from</span>
<a name="l00116"></a>00116 <span class="comment"> * \param[in] keyword keyword to look for</span>
<a name="l00117"></a>00117 <span class="comment"> * \param[in] k_del keyword delimeter </span>
<a name="l00118"></a>00118 <span class="comment"> * \param[out] data the data found </span>
<a name="l00119"></a>00119 <span class="comment"> * \param[in] d_del the data delimeter</span>
<a name="l00120"></a>00120 <span class="comment"> * \param[in] data_limit maximum size the the data buffer</span>
<a name="l00121"></a>00121 <span class="comment"> * \return the number of character read</span>
<a name="l00122"></a>00122 <span class="comment"> */</span>
<a name="l00123"></a>00123 ssize_t <a class="code" href="parse_8c.html#a285db74d20812bb98686b78a596e972a">ldns_bget_keyword_data</a>(<a class="code" href="structldns__struct__buffer.html" title="implementation of buffers to ease operations">ldns_buffer</a> *b, <span class="keyword">const</span> <span class="keywordtype">char</span> *keyword, <span class="keyword">const</span> <span class="keywordtype">char</span> *k_del, <span class="keywordtype">char</span> *data, <span class="keyword">const</span> <span class="keywordtype">char</span> *d_del, <span class="keywordtype">size_t</span> data_limit);
<a name="l00124"></a>00124 
<a name="l00132"></a>00132 <span class="keywordtype">int</span> <a class="code" href="buffer_8c.html#ac133a49136532ac36150f4378c45bd28" title="returns the next character from a buffer.">ldns_bgetc</a>(<a class="code" href="structldns__struct__buffer.html" title="implementation of buffers to ease operations">ldns_buffer</a> *buffer);
<a name="l00133"></a>00133 
<a name="l00141"></a>00141 <span class="keywordtype">void</span> <a class="code" href="parse_8c.html#a7ddb65911b6145e775e8e535dc03f554" title="skips all of the characters in the given string in the buffer, moving the position to the first chara...">ldns_bskipcs</a>(<a class="code" href="structldns__struct__buffer.html" title="implementation of buffers to ease operations">ldns_buffer</a> *buffer, <span class="keyword">const</span> <span class="keywordtype">char</span> *s);
<a name="l00142"></a>00142 
<a name="l00150"></a>00150 <span class="keywordtype">void</span> <a class="code" href="parse_8c.html#a734bc38729fdf6d0d63c748ef364a9e8" title="skips all of the characters in the given string in the fp, moving the position to the first character...">ldns_fskipcs</a>(FILE *fp, <span class="keyword">const</span> <span class="keywordtype">char</span> *s);
<a name="l00151"></a>00151 
<a name="l00152"></a>00152 
<a name="l00161"></a>00161 <span class="keywordtype">void</span> <a class="code" href="parse_8c.html#a95423f483aa20df6327f274a4ad0f581" title="skips all of the characters in the given string in the fp, moving the position to the first character...">ldns_fskipcs_l</a>(FILE *fp, <span class="keyword">const</span> <span class="keywordtype">char</span> *s, <span class="keywordtype">int</span> *line_nr);
<a name="l00162"></a>00162 
<a name="l00163"></a>00163 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00164"></a>00164 <span class="preprocessor"></span>}
<a name="l00165"></a>00165 <span class="preprocessor">#endif</span>
<a name="l00166"></a>00166 <span class="preprocessor"></span>
<a name="l00167"></a>00167 <span class="preprocessor">#endif </span><span class="comment">/* LDNS_PARSE_H */</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Wed Jan 11 2012 for ldns by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>