netsukuku/d8/da0/qspn_8h_source.html
2014-02-19 16:30:40 -08:00

274 lines
39 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>The Netsukuku Project: src/qspn.h Source File</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="../../Logo_netsukuku.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">The Netsukuku Project
&#160;<span id="projectnumber">0.0.9</span>
</div>
<div id="projectbrief">An Alternative routing method</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="../../index.html"><span>Main&#160;Page</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>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="../../search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
</span>
</div>
</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><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('d8/da0/qspn_8h_source.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">qspn.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="../../d8/da0/qspn_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/* This file is part of Netsukuku</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * (c) Copyright 2004 Andrea Lo Pumo aka AlpT &lt;alpt@freaknet.org&gt;</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * This source code is free software; you can redistribute it and/or</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> * modify it under the terms of the GNU General Public License as published </span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * by the Free Software Foundation; either version 2 of the License,</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> * or (at your option) any later version.</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * This source code is distributed in the hope that it will be useful,</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * Please refer to the GNU Public License for more details.</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * You should have received a copy of the GNU Public License along with</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> * this source code; if not, write to:</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;</div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="preprocessor">#ifndef QSPN_H</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#define QSPN_H</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;</div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="../../d7/d3b/gmap_8h.html">gmap.h</a>&quot;</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;</div>
<div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="../../d8/da0/qspn_8h.html#a92655b607960af188bc0b093314ef164"> 24</a></span>&#160;<span class="preprocessor">#define QSPN_WAIT_ROUND 32 </span><span class="comment">/*This is a crucial value. It is the number of </span></div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="comment"> seconds to be waited before the next qspn_round </span></div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="comment"> can be sent*/</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="../../d8/da0/qspn_8h.html#a4501642a2f00aceda8bdfd8cd12c8deb"> 27</a></span>&#160;<span class="preprocessor">#define QSPN_WAIT_ROUND_MS QSPN_WAIT_ROUND*1000</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="../../d8/da0/qspn_8h.html#af9d45d1418ce8ca77e84e64df6340740"> 28</a></span>&#160;<span class="preprocessor">#define QSPN_WAIT_DELTA_MS 64 </span><span class="comment">/*If a qspn_round is sent while </span></div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="comment"> qspn_round_left() &lt; QSPN_WAIT_DELTA_MS,</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="comment"> then it is acceptable*/</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;</div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="preprocessor">#ifdef DEBUG</span></div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="preprocessor">#undef QSPN_WAIT_ROUND</span></div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="preprocessor">#define QSPN_WAIT_ROUND 8</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="comment">/*Wait time bound to a specific level: y = (w/2)*x + w/(x+1) */</span></div>
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="../../d8/da0/qspn_8h.html#a8d6acb8a59cd922e4078753ca15ed3be"> 38</a></span>&#160;<span class="preprocessor">#define QSPN_WAIT_ROUND_LVL(level) ((level)*(QSPN_WAIT_ROUND/2) + \</span></div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;<span class="preprocessor"> QSPN_WAIT_ROUND/((level)+1))</span></div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="../../d8/da0/qspn_8h.html#ad5404f8472abfeb9a35cbfdead283137"> 40</a></span>&#160;<span class="preprocessor">#define QSPN_WAIT_ROUND_MS_LVL(level) (QSPN_WAIT_ROUND_LVL(level)*1000)</span></div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;</div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;<span class="comment">/* The delta grows in this way: y = x*(w/2) + 2*w*x + w; */</span></div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="../../d8/da0/qspn_8h.html#a4a21b8a839346e0e2f22f980204f9b22"> 43</a></span>&#160;<span class="preprocessor">#define QSPN_WAIT_DELTA_MS_LVL(level) ((level)*(QSPN_WAIT_DELTA_MS/2) + \</span></div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;<span class="preprocessor"> 2*QSPN_WAIT_DELTA_MS*(level) + QSPN_WAIT_DELTA_MS)</span></div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;</div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;<span class="comment">/* This list keeps tracks of the qspn_pkts sent or</span></div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;<span class="comment"> * received by our rnodes*/</span></div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="../../d1/d00/structqspn__buffer.html"> 49</a></span>&#160;<span class="keyword">struct </span><a class="code" href="../../d1/d00/structqspn__buffer.html">qspn_buffer</a></div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;{ </div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="../../d1/d00/structqspn__buffer.html#a23f830e5f1dfb9851a8c3a83b0b12e50"> 51</a></span>&#160; <a class="code" href="../../d4/de1/llist_8c.html#ac92348e99cfae025c3893c07fee7b263">LLIST_HDR</a> (<span class="keyword">struct</span> <a class="code" href="../../d1/d00/structqspn__buffer.html">qspn_buffer</a>);</div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; </div>
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="../../d1/d00/structqspn__buffer.html#ac9b9fed388cfda938171ddcb1685fff1"> 53</a></span>&#160; <a class="code" href="../../d6/d1c/structmap__node.html">map_node</a> * <a class="code" href="../../d1/d00/structqspn__buffer.html#ac9b9fed388cfda938171ddcb1685fff1">rnode</a>; <span class="comment">/* the rnode this buf is referring to */</span></div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="../../d1/d00/structqspn__buffer.html#a517f5c2286ffa0919bed01a479ed1b56"> 54</a></span>&#160; u_int <a class="code" href="../../d1/d00/structqspn__buffer.html#a517f5c2286ffa0919bed01a479ed1b56">replies</a>; <span class="comment">/* How many replies we forwarded/sent</span></div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;<span class="comment"> to `rnode&#39; */</span></div>
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="../../d1/d00/structqspn__buffer.html#a7c231646e0a130082b6cd06102ce1570"> 56</a></span>&#160; u_char * <a class="code" href="../../d1/d00/structqspn__buffer.html#a7c231646e0a130082b6cd06102ce1570">replier</a>; <span class="comment">/* Who has sent these replies (qspn_sub_id) */</span></div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="../../d1/d00/structqspn__buffer.html#aa870e4f709cd778c04948a3758fa9761"> 57</a></span>&#160; u_short * <a class="code" href="../../d1/d00/structqspn__buffer.html#aa870e4f709cd778c04948a3758fa9761">flags</a>;</div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;};</div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;</div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160;</div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;<span class="comment"> * * * Global vars * * *</span></div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;</div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="../../d8/da0/qspn_8h.html#a1f03e7fddbc0d8b9a547fbc8ae1d1838"> 65</a></span>&#160;<span class="keyword">struct </span><a class="code" href="../../d1/d00/structqspn__buffer.html">qspn_buffer</a> **<a class="code" href="../../d8/da0/qspn_8h.html#a1f03e7fddbc0d8b9a547fbc8ae1d1838">qspn_b</a>; <span class="comment">/*It is sizeof(struct qspn_buffer *)*levels big*/</span></div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;</div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="../../d8/da0/qspn_8h.html#a7376bee5662f5931615b3648fb8e21b5"> 67</a></span>&#160;<span class="keywordtype">int</span> *<a class="code" href="../../d8/da0/qspn_8h.html#a7376bee5662f5931615b3648fb8e21b5">qspn_send_mutex</a>; <span class="comment">/*It is sizeof(int)*levels big.*/</span></div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;</div>
<div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="../../d8/da0/qspn_8h.html#ae43980163dccdef6bba0624790470ac3"> 69</a></span>&#160;<span class="preprocessor">#define GCOUNT_LEVELS (MAX_LEVELS-ZERO_LEVEL+UNITY_LEVEL)</span></div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;<span class="comment"> * qspn_gnode_count[x] is the number of nodes present in the gnode</span></div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;<span class="comment"> * me.cur_quadg.gnode[x], it is updated at each qspn_round.</span></div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;<span class="comment"> * Use the _EL() macro!</span></div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160;<span class="comment"> */</span> </div>
<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="../../d8/da0/qspn_8h.html#a8edbe568d66e8391fcbcd54b6da14aed"> 75</a></span>&#160;u_int <a class="code" href="../../d8/da0/qspn_8h.html#a8edbe568d66e8391fcbcd54b6da14aed">qspn_gnode_count</a>[<a class="code" href="../../d8/da0/qspn_8h.html#ae43980163dccdef6bba0624790470ac3">GCOUNT_LEVELS</a>];</div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160;</div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160;<span class="comment">/* gcount of the previous qspn_round */</span></div>
<div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="../../d8/da0/qspn_8h.html#aa18d7561dde3a10dc067d0da6357c18a"> 78</a></span>&#160;u_int <a class="code" href="../../d8/da0/qspn_8h.html#aa18d7561dde3a10dc067d0da6357c18a">qspn_old_gcount</a>[<a class="code" href="../../d8/da0/qspn_8h.html#ae43980163dccdef6bba0624790470ac3">GCOUNT_LEVELS</a>]; </div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160;</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160;</div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;<span class="comment"> * * Functions declaration * *</span></div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d8/da0/qspn_8h.html#ae829542b920ee60cf45ec71a3ca765f5">qspn_time_reset</a>(<span class="keywordtype">int</span> start_level, <span class="keywordtype">int</span> end_level, <span class="keywordtype">int</span> levels);</div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d8/da0/qspn_8h.html#a40d1fdcd6e95b3b04b67babf6bb72f14">qspn_reset_counters</a>(u_char levels);</div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d8/da0/qspn_8h.html#aa4732df7308d4e5ab35303e776e2380a">qspn_reset</a>(u_char levels);</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d8/da0/qspn_8h.html#a6c5c062e24ec079201aea53899af3e28">qspn_init</a>(u_char levels);</div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d8/da0/qspn_8h.html#a8e01d03af3860d083a330dfad626d239">qspn_free</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d8/da0/qspn_8h.html#a7d4488a7a0d0eb767588a5afb7f85e47">qspn_set_map_vars</a>(u_char level, <a class="code" href="../../d6/d1c/structmap__node.html">map_node</a> **map, <a class="code" href="../../d6/d1c/structmap__node.html">map_node</a> **root_node, </div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; <span class="keywordtype">int</span> *root_node_pos, <a class="code" href="../../d5/d7c/structmap__gnode.html">map_gnode</a> **gmap);</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;</div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d8/da0/qspn_8h.html#a2bc4cdc2b729d5b3626481db29789e05">qspn_b_clean</a>(u_char level);</div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../d8/da0/qspn_8h.html#ade9d52b888ef2388737a05b2345caec4">qspn_b_add</a>(<span class="keyword">struct</span> <a class="code" href="../../d1/d00/structqspn__buffer.html">qspn_buffer</a> *qb, u_char <a class="code" href="../../d1/d00/structqspn__buffer.html#a7c231646e0a130082b6cd06102ce1570">replier</a>, u_short <a class="code" href="../../d7/de2/if_8c.html#ac8bf36fe0577cba66bccda3a6f7e80a4">flags</a>);</div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../d8/da0/qspn_8h.html#ac2ca7c6fd9c6e9b984e3f4f439090711">qspn_b_find_reply</a>(<span class="keyword">struct</span> <a class="code" href="../../d1/d00/structqspn__buffer.html">qspn_buffer</a> *qb, <span class="keywordtype">int</span> sub_id);</div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160;<span class="keyword">struct </span><a class="code" href="../../d1/d00/structqspn__buffer.html">qspn_buffer</a> *<a class="code" href="../../d8/da0/qspn_8h.html#a496ce3e87caec7ce73e3ccc9990cea49">qspn_b_find_rnode</a>(<span class="keyword">struct</span> <a class="code" href="../../d1/d00/structqspn__buffer.html">qspn_buffer</a> *qb, <a class="code" href="../../d6/d1c/structmap__node.html">map_node</a> *<a class="code" href="../../d1/d00/structqspn__buffer.html#ac9b9fed388cfda938171ddcb1685fff1">rnode</a>);</div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../d8/da0/qspn_8h.html#a3a6fd647a6c1d1d519d16de9a4395678">qspn_b_del_dead_rnodes</a>(<span class="keyword">struct</span> <a class="code" href="../../d1/d00/structqspn__buffer.html">qspn_buffer</a> **qb, <a class="code" href="../../d6/d1c/structmap__node.html">map_node</a> *root_node);</div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d8/da0/qspn_8h.html#ad5629aab4eceb4a0ea97a417bf085f66">qspn_b_del_all_dead_rnodes</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160;</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../d8/da0/qspn_8h.html#aaa5e9fc3e6827c9f4593a3812ef14f0d">qspn_round_left</a>(u_char level);</div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d8/da0/qspn_8h.html#ad5239640aec880598ca4e773a6ab96b9">update_qspn_time</a>(u_char level, u_int new_qspn_time);</div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;</div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d8/da0/qspn_8h.html#a02f16027494ad99d0d705595d5d757e1">qspn_inc_gcount</a>(u_int *gcount, <span class="keywordtype">int</span> level, <span class="keywordtype">int</span> inc);</div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d8/da0/qspn_8h.html#a916a1d446a6a10cea404b88096fe7a6b">qspn_dec_gcount</a>(u_int *gcount, <span class="keywordtype">int</span> level, <span class="keywordtype">int</span> dec);</div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d8/da0/qspn_8h.html#a96119d495d6670ec51c1b7c28df7c681">qspn_reset_gcount</a>(u_int *gcount, <span class="keywordtype">int</span> level, <span class="keywordtype">int</span> value);</div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d8/da0/qspn_8h.html#a8620dcb680cc1a57630fe2a2112d74f5">qspn_backup_gcount</a>(u_int *old_gcount, <span class="keywordtype">int</span> *gcount);</div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160;</div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160;<span class="keywordtype">void</span> <a class="code" href="../../d8/da0/qspn_8h.html#ab2f4bfac6bcea3379068bf4aab92e381">qspn_new_round</a>(u_char level, <span class="keywordtype">int</span> new_qspn_id, u_int new_qspn_time);</div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160;</div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../d8/da0/qspn_8h.html#a0c2ef8efd5611e3ed71086a267af7915">qspn_send</a>(u_char level);</div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../d8/da0/qspn_8h.html#ab70abece99b6ae77b078ec100c35912a">qspn_close</a>(<a class="code" href="../../d6/dbc/structPACKET.html">PACKET</a> rpkt);</div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../d8/da0/qspn_8h.html#a6df687dad6a64c0807fbfc105cf244c5">qspn_open</a>(<a class="code" href="../../d6/dbc/structPACKET.html">PACKET</a> rpkt);</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160;</div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/*QSPN_H*/</span><span class="preprocessor"></span></div>
<div class="ttc" id="gmap_8h_html"><div class="ttname"><a href="../../d7/d3b/gmap_8h.html">gmap.h</a></div></div>
<div class="ttc" id="qspn_8h_html_ad5239640aec880598ca4e773a6ab96b9"><div class="ttname"><a href="../../d8/da0/qspn_8h.html#ad5239640aec880598ca4e773a6ab96b9">update_qspn_time</a></div><div class="ttdeci">void update_qspn_time(u_char level, u_int new_qspn_time)</div><div class="ttdef"><b>Definition:</b> qspn.c:267</div></div>
<div class="ttc" id="qspn_8h_html_ac2ca7c6fd9c6e9b984e3f4f439090711"><div class="ttname"><a href="../../d8/da0/qspn_8h.html#ac2ca7c6fd9c6e9b984e3f4f439090711">qspn_b_find_reply</a></div><div class="ttdeci">int qspn_b_find_reply(struct qspn_buffer *qb, int sub_id)</div><div class="ttdef"><b>Definition:</b> qspn.c:175</div></div>
<div class="ttc" id="qspn_8h_html_ade9d52b888ef2388737a05b2345caec4"><div class="ttname"><a href="../../d8/da0/qspn_8h.html#ade9d52b888ef2388737a05b2345caec4">qspn_b_add</a></div><div class="ttdeci">int qspn_b_add(struct qspn_buffer *qb, u_char replier, u_short flags)</div><div class="ttdef"><b>Definition:</b> qspn.c:154</div></div>
<div class="ttc" id="qspn_8h_html_a496ce3e87caec7ce73e3ccc9990cea49"><div class="ttname"><a href="../../d8/da0/qspn_8h.html#a496ce3e87caec7ce73e3ccc9990cea49">qspn_b_find_rnode</a></div><div class="ttdeci">struct qspn_buffer * qspn_b_find_rnode(struct qspn_buffer *qb, map_node *rnode)</div><div class="ttdef"><b>Definition:</b> qspn.c:167</div></div>
<div class="ttc" id="qspn_8h_html_a2bc4cdc2b729d5b3626481db29789e05"><div class="ttname"><a href="../../d8/da0/qspn_8h.html#a2bc4cdc2b729d5b3626481db29789e05">qspn_b_clean</a></div><div class="ttdeci">void qspn_b_clean(u_char level)</div><div class="ttdef"><b>Definition:</b> qspn.c:133</div></div>
<div class="ttc" id="qspn_8h_html_a3a6fd647a6c1d1d519d16de9a4395678"><div class="ttname"><a href="../../d8/da0/qspn_8h.html#a3a6fd647a6c1d1d519d16de9a4395678">qspn_b_del_dead_rnodes</a></div><div class="ttdeci">int qspn_b_del_dead_rnodes(struct qspn_buffer **qb, map_node *root_node)</div><div class="ttdef"><b>Definition:</b> qspn.c:193</div></div>
<div class="ttc" id="qspn_8h_html_a7376bee5662f5931615b3648fb8e21b5"><div class="ttname"><a href="../../d8/da0/qspn_8h.html#a7376bee5662f5931615b3648fb8e21b5">qspn_send_mutex</a></div><div class="ttdeci">int * qspn_send_mutex</div><div class="ttdef"><b>Definition:</b> qspn.h:67</div></div>
<div class="ttc" id="structmap__node_html"><div class="ttname"><a href="../../d6/d1c/structmap__node.html">map_node</a></div><div class="ttdef"><b>Definition:</b> map.h:125</div></div>
<div class="ttc" id="qspn_8h_html_a0c2ef8efd5611e3ed71086a267af7915"><div class="ttname"><a href="../../d8/da0/qspn_8h.html#a0c2ef8efd5611e3ed71086a267af7915">qspn_send</a></div><div class="ttdeci">int qspn_send(u_char level)</div><div class="ttdef"><b>Definition:</b> qspn.c:579</div></div>
<div class="ttc" id="qspn_8h_html_a40d1fdcd6e95b3b04b67babf6bb72f14"><div class="ttname"><a href="../../d8/da0/qspn_8h.html#a40d1fdcd6e95b3b04b67babf6bb72f14">qspn_reset_counters</a></div><div class="ttdeci">void qspn_reset_counters(u_char levels)</div><div class="ttdef"><b>Definition:</b> qspn.c:84</div></div>
<div class="ttc" id="qspn_8h_html_ae43980163dccdef6bba0624790470ac3"><div class="ttname"><a href="../../d8/da0/qspn_8h.html#ae43980163dccdef6bba0624790470ac3">GCOUNT_LEVELS</a></div><div class="ttdeci">#define GCOUNT_LEVELS</div><div class="ttdef"><b>Definition:</b> qspn.h:69</div></div>
<div class="ttc" id="qspn_8h_html_a8edbe568d66e8391fcbcd54b6da14aed"><div class="ttname"><a href="../../d8/da0/qspn_8h.html#a8edbe568d66e8391fcbcd54b6da14aed">qspn_gnode_count</a></div><div class="ttdeci">u_int qspn_gnode_count[((14+(1+1))-1+1)]</div><div class="ttdef"><b>Definition:</b> qspn.h:75</div></div>
<div class="ttc" id="qspn_8h_html_ab70abece99b6ae77b078ec100c35912a"><div class="ttname"><a href="../../d8/da0/qspn_8h.html#ab70abece99b6ae77b078ec100c35912a">qspn_close</a></div><div class="ttdeci">int qspn_close(PACKET rpkt)</div><div class="ttdef"><b>Definition:</b> qspn.c:838</div></div>
<div class="ttc" id="structqspn__buffer_html_ac9b9fed388cfda938171ddcb1685fff1"><div class="ttname"><a href="../../d1/d00/structqspn__buffer.html#ac9b9fed388cfda938171ddcb1685fff1">qspn_buffer::rnode</a></div><div class="ttdeci">map_node * rnode</div><div class="ttdef"><b>Definition:</b> qspn.h:53</div></div>
<div class="ttc" id="qspn_8h_html_a8620dcb680cc1a57630fe2a2112d74f5"><div class="ttname"><a href="../../d8/da0/qspn_8h.html#a8620dcb680cc1a57630fe2a2112d74f5">qspn_backup_gcount</a></div><div class="ttdeci">void qspn_backup_gcount(u_int *old_gcount, int *gcount)</div><div class="ttdef"><b>Definition:</b> qspn.c:360</div></div>
<div class="ttc" id="qspn_8h_html_ae829542b920ee60cf45ec71a3ca765f5"><div class="ttname"><a href="../../d8/da0/qspn_8h.html#ae829542b920ee60cf45ec71a3ca765f5">qspn_time_reset</a></div><div class="ttdeci">void qspn_time_reset(int start_level, int end_level, int levels)</div><div class="ttdef"><b>Definition:</b> qspn.c:65</div></div>
<div class="ttc" id="qspn_8h_html_aa4732df7308d4e5ab35303e776e2380a"><div class="ttname"><a href="../../d8/da0/qspn_8h.html#aa4732df7308d4e5ab35303e776e2380a">qspn_reset</a></div><div class="ttdeci">void qspn_reset(u_char levels)</div><div class="ttdef"><b>Definition:</b> qspn.c:92</div></div>
<div class="ttc" id="qspn_8h_html_a96119d495d6670ec51c1b7c28df7c681"><div class="ttname"><a href="../../d8/da0/qspn_8h.html#a96119d495d6670ec51c1b7c28df7c681">qspn_reset_gcount</a></div><div class="ttdeci">void qspn_reset_gcount(u_int *gcount, int level, int value)</div><div class="ttdef"><b>Definition:</b> qspn.c:346</div></div>
<div class="ttc" id="qspn_8h_html_a02f16027494ad99d0d705595d5d757e1"><div class="ttname"><a href="../../d8/da0/qspn_8h.html#a02f16027494ad99d0d705595d5d757e1">qspn_inc_gcount</a></div><div class="ttdeci">void qspn_inc_gcount(u_int *gcount, int level, int inc)</div><div class="ttdef"><b>Definition:</b> qspn.c:307</div></div>
<div class="ttc" id="structqspn__buffer_html"><div class="ttname"><a href="../../d1/d00/structqspn__buffer.html">qspn_buffer</a></div><div class="ttdef"><b>Definition:</b> qspn.h:49</div></div>
<div class="ttc" id="qspn_8h_html_ab2f4bfac6bcea3379068bf4aab92e381"><div class="ttname"><a href="../../d8/da0/qspn_8h.html#ab2f4bfac6bcea3379068bf4aab92e381">qspn_new_round</a></div><div class="ttdeci">void qspn_new_round(u_char level, int new_qspn_id, u_int new_qspn_time)</div><div class="ttdef"><b>Definition:</b> qspn.c:478</div></div>
<div class="ttc" id="qspn_8h_html_ad5629aab4eceb4a0ea97a417bf085f66"><div class="ttname"><a href="../../d8/da0/qspn_8h.html#ad5629aab4eceb4a0ea97a417bf085f66">qspn_b_del_all_dead_rnodes</a></div><div class="ttdeci">void qspn_b_del_all_dead_rnodes(void)</div><div class="ttdef"><b>Definition:</b> qspn.c:211</div></div>
<div class="ttc" id="qspn_8h_html_aaa5e9fc3e6827c9f4593a3812ef14f0d"><div class="ttname"><a href="../../d8/da0/qspn_8h.html#aaa5e9fc3e6827c9f4593a3812ef14f0d">qspn_round_left</a></div><div class="ttdeci">int qspn_round_left(u_char level)</div><div class="ttdef"><b>Definition:</b> qspn.c:226</div></div>
<div class="ttc" id="structqspn__buffer_html_aa870e4f709cd778c04948a3758fa9761"><div class="ttname"><a href="../../d1/d00/structqspn__buffer.html#aa870e4f709cd778c04948a3758fa9761">qspn_buffer::flags</a></div><div class="ttdeci">u_short * flags</div><div class="ttdef"><b>Definition:</b> qspn.h:57</div></div>
<div class="ttc" id="structqspn__buffer_html_a517f5c2286ffa0919bed01a479ed1b56"><div class="ttname"><a href="../../d1/d00/structqspn__buffer.html#a517f5c2286ffa0919bed01a479ed1b56">qspn_buffer::replies</a></div><div class="ttdeci">u_int replies</div><div class="ttdef"><b>Definition:</b> qspn.h:54</div></div>
<div class="ttc" id="structPACKET_html"><div class="ttname"><a href="../../d6/dbc/structPACKET.html">PACKET</a></div><div class="ttdef"><b>Definition:</b> pkts.h:118</div></div>
<div class="ttc" id="llist_8c_html_ac92348e99cfae025c3893c07fee7b263"><div class="ttname"><a href="../../d4/de1/llist_8c.html#ac92348e99cfae025c3893c07fee7b263">LLIST_HDR</a></div><div class="ttdeci">#define LLIST_HDR(_struct)</div><div class="ttdef"><b>Definition:</b> llist.c:44</div></div>
<div class="ttc" id="if_8c_html_ac8bf36fe0577cba66bccda3a6f7e80a4"><div class="ttname"><a href="../../d7/de2/if_8c.html#ac8bf36fe0577cba66bccda3a6f7e80a4">flags</a></div><div class="ttdeci">int flags</div><div class="ttdef"><b>Definition:</b> if.c:39</div></div>
<div class="ttc" id="structqspn__buffer_html_a7c231646e0a130082b6cd06102ce1570"><div class="ttname"><a href="../../d1/d00/structqspn__buffer.html#a7c231646e0a130082b6cd06102ce1570">qspn_buffer::replier</a></div><div class="ttdeci">u_char * replier</div><div class="ttdef"><b>Definition:</b> qspn.h:56</div></div>
<div class="ttc" id="qspn_8h_html_a8e01d03af3860d083a330dfad626d239"><div class="ttname"><a href="../../d8/da0/qspn_8h.html#a8e01d03af3860d083a330dfad626d239">qspn_free</a></div><div class="ttdeci">void qspn_free(void)</div><div class="ttdef"><b>Definition:</b> qspn.c:121</div></div>
<div class="ttc" id="qspn_8h_html_aa18d7561dde3a10dc067d0da6357c18a"><div class="ttname"><a href="../../d8/da0/qspn_8h.html#aa18d7561dde3a10dc067d0da6357c18a">qspn_old_gcount</a></div><div class="ttdeci">u_int qspn_old_gcount[((14+(1+1))-1+1)]</div><div class="ttdef"><b>Definition:</b> qspn.h:78</div></div>
<div class="ttc" id="structmap__gnode_html"><div class="ttname"><a href="../../d5/d7c/structmap__gnode.html">map_gnode</a></div><div class="ttdef"><b>Definition:</b> gmap.h:37</div></div>
<div class="ttc" id="qspn_8h_html_a7d4488a7a0d0eb767588a5afb7f85e47"><div class="ttname"><a href="../../d8/da0/qspn_8h.html#a7d4488a7a0d0eb767588a5afb7f85e47">qspn_set_map_vars</a></div><div class="ttdeci">void qspn_set_map_vars(u_char level, map_node **map, map_node **root_node, int *root_node_pos, map_gnode **gmap)</div><div class="ttdef"><b>Definition:</b> qspn.c:38</div></div>
<div class="ttc" id="qspn_8h_html_a6df687dad6a64c0807fbfc105cf244c5"><div class="ttname"><a href="../../d8/da0/qspn_8h.html#a6df687dad6a64c0807fbfc105cf244c5">qspn_open</a></div><div class="ttdeci">int qspn_open(PACKET rpkt)</div><div class="ttdef"><b>Definition:</b> qspn.c:1089</div></div>
<div class="ttc" id="qspn_8h_html_a1f03e7fddbc0d8b9a547fbc8ae1d1838"><div class="ttname"><a href="../../d8/da0/qspn_8h.html#a1f03e7fddbc0d8b9a547fbc8ae1d1838">qspn_b</a></div><div class="ttdeci">struct qspn_buffer ** qspn_b</div><div class="ttdef"><b>Definition:</b> qspn.h:65</div></div>
<div class="ttc" id="qspn_8h_html_a6c5c062e24ec079201aea53899af3e28"><div class="ttname"><a href="../../d8/da0/qspn_8h.html#a6c5c062e24ec079201aea53899af3e28">qspn_init</a></div><div class="ttdeci">void qspn_init(u_char levels)</div><div class="ttdef"><b>Definition:</b> qspn.c:101</div></div>
<div class="ttc" id="qspn_8h_html_a916a1d446a6a10cea404b88096fe7a6b"><div class="ttname"><a href="../../d8/da0/qspn_8h.html#a916a1d446a6a10cea404b88096fe7a6b">qspn_dec_gcount</a></div><div class="ttdeci">void qspn_dec_gcount(u_int *gcount, int level, int dec)</div><div class="ttdef"><b>Definition:</b> qspn.c:327</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="../../d8/da0/qspn_8h.html">qspn.h</a></li>
<li class="footer">Generated on Wed Feb 19 2014 16:28:40 for The Netsukuku Project by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
</ul>
</div>
</body>
</html>