netsukuku/da/db5/tracer_8h_source.html
2014-02-19 16:30:40 -08:00

269 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/tracer.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('da/db5/tracer_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">tracer.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="../../da/db5/tracer_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 TRACER_H</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#define TRACER_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="../../d5/d89/pkts_8h.html">pkts.h</a>&quot;</span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="../../d5/dbf/bmap_8h.html">bmap.h</a>&quot;</span></div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;</div>
<div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="../../da/db5/tracer_8h.html#a2a249f3d46291721d1b33135ab389b9b"> 26</a></span>&#160;<span class="preprocessor">#define TRACER_RQ_TIMEOUT 16 </span><span class="comment">/* seconds */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;</div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="comment"> * Tracer_hdr flags</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="comment"> */</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"><a class="line" href="../../da/db5/tracer_8h.html#a025c5b2fd91790a9dbe079048e4bbf82"> 32</a></span>&#160;<span class="preprocessor">#define TRCR_BBLOCK 1 </span><span class="comment">/* In this tracer_pkt there are </span></div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="comment"> encapsulated bblocks */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="../../da/db5/tracer_8h.html#a55e87cbed702590efdc62fba8b8669cb"> 34</a></span>&#160;<span class="preprocessor">#define TRCR_IGW (1&lt;&lt;1) </span><span class="comment">/* Internet Gateways are encapsulated</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="comment"> in the pkt */</span><span class="preprocessor"></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">/*</span></div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;<span class="comment"> * * Tracer packet. It is encapsulated in a broadcast pkt *</span></div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</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; u_char <a class="code" href="../../d7/de2/if_8c.html#ac8bf36fe0577cba66bccda3a6f7e80a4">flags</a>;</div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="../../d3/d5a/struct__PACKED__.html#a9209d0bdfb7eebb4e4aba9ea332a3b3c"> 43</a></span>&#160; u_short <a class="code" href="../../d3/d5a/struct__PACKED__.html#a9209d0bdfb7eebb4e4aba9ea332a3b3c">hops</a>;</div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="../../d3/d5a/struct__PACKED__.html#a02c8a4688819551a51b78c8c99a70538"> 44</a></span>&#160; u_short <a class="code" href="../../d3/d5a/struct__PACKED__.html#a02c8a4688819551a51b78c8c99a70538">first_qspn_open_chunk</a>;</div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;}<a class="code" href="../../d3/d5a/struct__PACKED__.html">_PACKED_</a> tracer_hdr;</div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="../../da/db5/tracer_8h.html#aba61c91c84ce6d5df02925e1e8d3e326"> 46</a></span>&#160;<a class="code" href="../../dc/d3e/endianness_8h.html#a3e44b8503d7a90af675c81800fe6d275">INT_INFO</a> <a class="code" href="../../da/db5/tracer_8h.html#aba61c91c84ce6d5df02925e1e8d3e326">tracer_hdr_iinfo</a> = { 2,</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; { <a class="code" href="../../dc/d3e/endianness_8h.html#a66b75e81c28419f622f82e631e5da9bc">INT_TYPE_16BIT</a>, <a class="code" href="../../dc/d3e/endianness_8h.html#a66b75e81c28419f622f82e631e5da9bc">INT_TYPE_16BIT</a> }, </div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; { <span class="keyword">sizeof</span>(u_char), <span class="keyword">sizeof</span>(u_char)+<span class="keyword">sizeof</span>(u_short) },</div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; { 1, 1 }</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"> 51</span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></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="../../d3/d5a/struct__PACKED__.html#a4e971802e441661de901388c3b707133"> 53</a></span>&#160; u_char <a class="code" href="../../d3/d5a/struct__PACKED__.html#a4e971802e441661de901388c3b707133">node</a>;</div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; u_int rtt; <span class="comment">/* The rtt to reach the `node&#39; of the previous</span></div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;<span class="comment"> chunk from the node of the current `one&#39;. </span></div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;<span class="comment"> (in milliseconds) */</span></div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="../../d3/d5a/struct__PACKED__.html#a7faba333583b9c978d58698bbd1d3cb4"> 57</a></span>&#160; u_int <a class="code" href="../../d3/d5a/struct__PACKED__.html#a7faba333583b9c978d58698bbd1d3cb4">gcount</a>; <span class="comment">/* how many nodes there are in the `node&#39; </span></div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;<span class="comment"> gnode */</span></div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;}<a class="code" href="../../d3/d5a/struct__PACKED__.html">_PACKED_</a> tracer_chunk;</div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="../../da/db5/tracer_8h.html#a77fd86ee01564932abd590b280daa6bf"> 60</a></span>&#160;<a class="code" href="../../dc/d3e/endianness_8h.html#a3e44b8503d7a90af675c81800fe6d275">INT_INFO</a> <a class="code" href="../../da/db5/tracer_8h.html#a77fd86ee01564932abd590b280daa6bf">tracer_chunk_iinfo</a> = { 2, </div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; { <a class="code" href="../../dc/d3e/endianness_8h.html#acc663d0291dd4a32c1dfbed3167bd58b">INT_TYPE_32BIT</a>, <a class="code" href="../../dc/d3e/endianness_8h.html#acc663d0291dd4a32c1dfbed3167bd58b">INT_TYPE_32BIT</a> }, </div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; { <span class="keyword">sizeof</span>(char), <span class="keyword">sizeof</span>(<span class="keywordtype">char</span>)+<span class="keyword">sizeof</span>(u_int) }, </div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; { 1, 1 } </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="../../da/db5/tracer_8h.html#aac7d2ea210782c1890839ac7569dc85c"> 65</a></span>&#160;<span class="preprocessor">#define TRACERPKT_SZ(hops) (sizeof(tracer_hdr)+(sizeof(tracer_chunk)*(hops)))</span></div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="../../da/db5/tracer_8h.html#abf192235cdfe6b134ee84b1413a15c9b"> 66</a></span>&#160;<span class="preprocessor">#define TRACER_HDR_PTR(msg) ((tracer_hdr *)(((char *)BRDCAST_HDR_PTR((msg)))+sizeof(brdcast_hdr)))</span></div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="../../da/db5/tracer_8h.html#aeb02c6167fa4cadf6bf59a840e923488"> 67</a></span>&#160;<span class="preprocessor">#define TRACER_CHUNK_PTR(msg) ((tracer_chunk *)(((char *)TRACER_HDR_PTR(msg))+sizeof(tracer_hdr)))</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="../../da/db5/tracer_8h.html#ac90a270a849ce681c52a612c50df51d8"> 69</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../da/db5/tracer_8h.html#ac90a270a849ce681c52a612c50df51d8">tracer_pkt_start_mutex</a>;</div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;</div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;<span class="comment">/*Functions definition. Damn I hate to use functions with a lot of args. It isn&#39;t elegant*/</span></div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../da/db5/tracer_8h.html#a809840aac9f63a3ba74995665fda8341">ip_to_rfrom</a>(<a class="code" href="../../da/d1d/structinet__prefix.html">inet_prefix</a> rip, <a class="code" href="../../d0/d3b/structquadro__group.html">quadro_group</a> *rip_quadg,</div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; <a class="code" href="../../d0/d3b/structquadro__group.html">quadro_group</a> *new_quadg, <span class="keywordtype">char</span> quadg_flags);</div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160;tracer_chunk *<a class="code" href="../../da/db5/tracer_8h.html#a37d8ffa039513fb421b5923e35c15ae6">tracer_add_entry</a>(<span class="keywordtype">void</span> *void_map, <span class="keywordtype">void</span> *void_node,</div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; tracer_chunk *tracer, u_int *hops, u_char level);</div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../da/db5/tracer_8h.html#adc77fff22a19df060d7e8c0f39f0307d">tracer_add_rtt</a>(<span class="keywordtype">int</span> rpos, tracer_chunk *tracer, u_short hop);</div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160;u_short <a class="code" href="../../da/db5/tracer_8h.html#aaa9412b8510a84314cde4dbe100483d0">tracer_split_bblock</a>(<span class="keywordtype">void</span> *, <span class="keywordtype">size_t</span>, bnode_hdr ***, bnode_chunk ****, <span class="keywordtype">size_t</span> *);</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../da/db5/tracer_8h.html#aa5421753dff7e95e17506259688267ad">tracer_get_trtt</a>(<span class="keywordtype">int</span> from_rnode_pos, tracer_hdr *trcr_hdr,</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; tracer_chunk *tracer, u_int *trtt);</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../da/db5/tracer_8h.html#a12c03f2eaa97e2c644dcdd892e0fa758">tracer_store_pkt</a>(<a class="code" href="../../da/d1d/structinet__prefix.html">inet_prefix</a>, <a class="code" href="../../d0/d3b/structquadro__group.html">quadro_group</a> *, u_char, tracer_hdr *, </div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; tracer_chunk *, <span class="keywordtype">void</span> *, <span class="keywordtype">size_t</span>, u_short *, <span class="keywordtype">char</span> **, <span class="keywordtype">size_t</span> *);</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../da/db5/tracer_8h.html#accaeb87ef08184699f87a7dda50909ab">tracer_unpack_pkt</a>(<a class="code" href="../../d6/dbc/structPACKET.html">PACKET</a>, brdcast_hdr **, tracer_hdr **, tracer_chunk **, </div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; bnode_hdr **, <span class="keywordtype">size_t</span> *, <a class="code" href="../../d0/d3b/structquadro__group.html">quadro_group</a> *, <span class="keywordtype">int</span> *);</div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../da/db5/tracer_8h.html#aedc888fcd3fe8dafa7e3a6199190e476">tracer_pkt_build</a>(u_char, <span class="keywordtype">int</span>, <span class="keywordtype">int</span>, <span class="keywordtype">int</span>, u_char, brdcast_hdr *, tracer_hdr *,</div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; tracer_chunk *, u_short, <span class="keywordtype">char</span> *, <span class="keywordtype">size_t</span>, <a class="code" href="../../d6/dbc/structPACKET.html">PACKET</a> *);</div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160;</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;<span class="comment"> * TRACER_PKT_EXCLUDE_VARS:</span></div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;<span class="comment"> * `e_rnode&#39;: if the dst is an external rnode, the relative one is passed.</span></div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160;<span class="comment"> * `node&#39;: the destination node/gnode we are sending the pkt to.</span></div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;<span class="comment"> * `from_rpos&#39;: the position in the root_node&#39;s rnodes of the node from </span></div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160;<span class="comment"> * which the pkt was sent to us.</span></div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160;<span class="comment"> * `pos&#39; : the position of the `node&#39; in the root_node&#39;s rnodes.</span></div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160;<span class="comment"> * `level&#39;: The level where there is the gnode the pkt is restricted to.</span></div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160;<span class="comment"> * `sub_id&#39;: If the pkt is a qspn_open, it is the qspn open sub_id of </span></div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160;<span class="comment"> * the pkt.</span></div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="../../da/db5/tracer_8h.html#a603cd5535d60565f7b18d50cf236acf9"> 98</a></span>&#160;<span class="preprocessor">#define TRACER_PKT_EXCLUDE_VARS ext_rnode *e_rnode, map_node *node, \</span></div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160;<span class="preprocessor"> int from_rpos, int pos, \</span></div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160;<span class="preprocessor"> u_char excl_level, int sub_id</span></div>
<div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="../../da/db5/tracer_8h.html#a353dac0dc28caf10c9a28cca2155b8f5"> 101</a></span>&#160;<span class="preprocessor">#define TRACER_PKT_EXCLUDE_VARS_NAME e_rnode, node, from_rpos, pos, \</span></div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160;<span class="preprocessor"> excl_level, sub_id</span></div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../da/db5/tracer_8h.html#add8a05e0cb98370b058e9a4906bcc463">flood_pkt_send</a>(<span class="keywordtype">int</span>(*is_node_excluded)(<a class="code" href="../../da/db5/tracer_8h.html#a603cd5535d60565f7b18d50cf236acf9">TRACER_PKT_EXCLUDE_VARS</a>), u_char level,</div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; <span class="keywordtype">int</span> sub_id, <span class="keywordtype">int</span> from_rpos, <a class="code" href="../../d6/dbc/structPACKET.html">PACKET</a> pkt);</div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../da/db5/tracer_8h.html#a7a8a697051696a65c6fd157245fb78bc">exclude_from</a>(<a class="code" href="../../da/db5/tracer_8h.html#a603cd5535d60565f7b18d50cf236acf9">TRACER_PKT_EXCLUDE_VARS</a>);</div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../da/db5/tracer_8h.html#ad25e8b2a612d95d7be851a8fd6fd91fb">exclude_glevel</a>(<a class="code" href="../../da/db5/tracer_8h.html#a603cd5535d60565f7b18d50cf236acf9">TRACER_PKT_EXCLUDE_VARS</a>);</div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../da/db5/tracer_8h.html#a39969e2b292b816ddb59129c9360422c">exclude_all_but_notfrom</a>(<a class="code" href="../../da/db5/tracer_8h.html#a603cd5535d60565f7b18d50cf236acf9">TRACER_PKT_EXCLUDE_VARS</a>);</div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../da/db5/tracer_8h.html#a241c64e2efee2847e8ac96eb843c4c07">exclude_from_and_glevel</a>(<a class="code" href="../../da/db5/tracer_8h.html#a603cd5535d60565f7b18d50cf236acf9">TRACER_PKT_EXCLUDE_VARS</a>);</div>
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160;</div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160;<span class="keywordtype">int</span> <a class="code" href="../../da/db5/tracer_8h.html#ab53c5821a9d4215b3d5ba16fd95e8297">tracer_pkt_recv</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="../../da/db5/tracer_8h.html#ac9c1eb29dad329c4ce003e9f770859c7">tracer_pkt_start</a>(u_char level);</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">/*TRACER_H*/</span><span class="preprocessor"></span></div>
<div class="ttc" id="tracer_8h_html_accaeb87ef08184699f87a7dda50909ab"><div class="ttname"><a href="../../da/db5/tracer_8h.html#accaeb87ef08184699f87a7dda50909ab">tracer_unpack_pkt</a></div><div class="ttdeci">int tracer_unpack_pkt(PACKET, brdcast_hdr **, tracer_hdr **, tracer_chunk **, bnode_hdr **, size_t *, quadro_group *, int *)</div><div class="ttdef"><b>Definition:</b> tracer.c:645</div></div>
<div class="ttc" id="tracer_8h_html_adc77fff22a19df060d7e8c0f39f0307d"><div class="ttname"><a href="../../da/db5/tracer_8h.html#adc77fff22a19df060d7e8c0f39f0307d">tracer_add_rtt</a></div><div class="ttdeci">int tracer_add_rtt(int rpos, tracer_chunk *tracer, u_short hop)</div><div class="ttdef"><b>Definition:</b> tracer.c:242</div></div>
<div class="ttc" id="tracer_8h_html_a77fd86ee01564932abd590b280daa6bf"><div class="ttname"><a href="../../da/db5/tracer_8h.html#a77fd86ee01564932abd590b280daa6bf">tracer_chunk_iinfo</a></div><div class="ttdeci">static const int_info tracer_chunk_iinfo</div><div class="ttdef"><b>Definition:</b> tracer.h:60</div></div>
<div class="ttc" id="pkts_8h_html"><div class="ttname"><a href="../../d5/d89/pkts_8h.html">pkts.h</a></div></div>
<div class="ttc" id="tracer_8h_html_a37d8ffa039513fb421b5923e35c15ae6"><div class="ttname"><a href="../../da/db5/tracer_8h.html#a37d8ffa039513fb421b5923e35c15ae6">tracer_add_entry</a></div><div class="ttdeci">tracer_chunk * tracer_add_entry(void *void_map, void *void_node, tracer_chunk *tracer, u_int *hops, u_char level)</div><div class="ttdef"><b>Definition:</b> tracer.c:163</div></div>
<div class="ttc" id="endianness_8h_html_a66b75e81c28419f622f82e631e5da9bc"><div class="ttname"><a href="../../dc/d3e/endianness_8h.html#a66b75e81c28419f622f82e631e5da9bc">INT_TYPE_16BIT</a></div><div class="ttdeci">#define INT_TYPE_16BIT</div><div class="ttdef"><b>Definition:</b> endianness.h:36</div></div>
<div class="ttc" id="tracer_8h_html_aa5421753dff7e95e17506259688267ad"><div class="ttname"><a href="../../da/db5/tracer_8h.html#aa5421753dff7e95e17506259688267ad">tracer_get_trtt</a></div><div class="ttdeci">int tracer_get_trtt(int from_rnode_pos, tracer_hdr *trcr_hdr, tracer_chunk *tracer, u_int *trtt)</div><div class="ttdef"><b>Definition:</b> tracer.c:254</div></div>
<div class="ttc" id="structinet__prefix_html"><div class="ttname"><a href="../../da/d1d/structinet__prefix.html">inet_prefix</a></div><div class="ttdef"><b>Definition:</b> inet.h:73</div></div>
<div class="ttc" id="structquadro__group_html"><div class="ttname"><a href="../../d0/d3b/structquadro__group.html">quadro_group</a></div><div class="ttdef"><b>Definition:</b> gmap.h:127</div></div>
<div class="ttc" id="struct__PACKED___html_a9209d0bdfb7eebb4e4aba9ea332a3b3c"><div class="ttname"><a href="../../d3/d5a/struct__PACKED__.html#a9209d0bdfb7eebb4e4aba9ea332a3b3c">_PACKED_::hops</a></div><div class="ttdeci">u_short hops</div><div class="ttdef"><b>Definition:</b> tracer.h:43</div></div>
<div class="ttc" id="tracer_8h_html_a7a8a697051696a65c6fd157245fb78bc"><div class="ttname"><a href="../../da/db5/tracer_8h.html#a7a8a697051696a65c6fd157245fb78bc">exclude_from</a></div><div class="ttdeci">int exclude_from(ext_rnode *e_rnode, map_node *node, int from_rpos, int pos, u_char excl_level, int sub_id)</div><div class="ttdef"><b>Definition:</b> tracer.c:1359</div></div>
<div class="ttc" id="struct__PACKED___html_a7faba333583b9c978d58698bbd1d3cb4"><div class="ttname"><a href="../../d3/d5a/struct__PACKED__.html#a7faba333583b9c978d58698bbd1d3cb4">_PACKED_::gcount</a></div><div class="ttdeci">u_int gcount</div><div class="ttdef"><b>Definition:</b> tracer.h:57</div></div>
<div class="ttc" id="tracer_8h_html_a809840aac9f63a3ba74995665fda8341"><div class="ttname"><a href="../../da/db5/tracer_8h.html#a809840aac9f63a3ba74995665fda8341">ip_to_rfrom</a></div><div class="ttdeci">int ip_to_rfrom(inet_prefix rip, quadro_group *rip_quadg, quadro_group *new_quadg, char quadg_flags)</div><div class="ttdef"><b>Definition:</b> tracer.c:45</div></div>
<div class="ttc" id="tracer_8h_html_a603cd5535d60565f7b18d50cf236acf9"><div class="ttname"><a href="../../da/db5/tracer_8h.html#a603cd5535d60565f7b18d50cf236acf9">TRACER_PKT_EXCLUDE_VARS</a></div><div class="ttdeci">#define TRACER_PKT_EXCLUDE_VARS</div><div class="ttdef"><b>Definition:</b> tracer.h:98</div></div>
<div class="ttc" id="tracer_8h_html_a39969e2b292b816ddb59129c9360422c"><div class="ttname"><a href="../../da/db5/tracer_8h.html#a39969e2b292b816ddb59129c9360422c">exclude_all_but_notfrom</a></div><div class="ttdeci">int exclude_all_but_notfrom(ext_rnode *e_rnode, map_node *node, int from_rpos, int pos, u_char excl_level, int sub_id)</div><div class="ttdef"><b>Definition:</b> tracer.c:1367</div></div>
<div class="ttc" id="tracer_8h_html_ad25e8b2a612d95d7be851a8fd6fd91fb"><div class="ttname"><a href="../../da/db5/tracer_8h.html#ad25e8b2a612d95d7be851a8fd6fd91fb">exclude_glevel</a></div><div class="ttdeci">int exclude_glevel(ext_rnode *e_rnode, map_node *node, int from_rpos, int pos, u_char excl_level, int sub_id)</div><div class="ttdef"><b>Definition:</b> tracer.c:1340</div></div>
<div class="ttc" id="tracer_8h_html_ac90a270a849ce681c52a612c50df51d8"><div class="ttname"><a href="../../da/db5/tracer_8h.html#ac90a270a849ce681c52a612c50df51d8">tracer_pkt_start_mutex</a></div><div class="ttdeci">int tracer_pkt_start_mutex</div><div class="ttdef"><b>Definition:</b> tracer.h:69</div></div>
<div class="ttc" id="tracer_8h_html_a12c03f2eaa97e2c644dcdd892e0fa758"><div class="ttname"><a href="../../da/db5/tracer_8h.html#a12c03f2eaa97e2c644dcdd892e0fa758">tracer_store_pkt</a></div><div class="ttdeci">int tracer_store_pkt(inet_prefix, quadro_group *, u_char, tracer_hdr *, tracer_chunk *, void *, size_t, u_short *, char **, size_t *)</div><div class="ttdef"><b>Definition:</b> tracer.c:1069</div></div>
<div class="ttc" id="endianness_8h_html_a3e44b8503d7a90af675c81800fe6d275"><div class="ttname"><a href="../../dc/d3e/endianness_8h.html#a3e44b8503d7a90af675c81800fe6d275">INT_INFO</a></div><div class="ttdeci">#define INT_INFO</div><div class="ttdef"><b>Definition:</b> endianness.h:90</div></div>
<div class="ttc" id="tracer_8h_html_ac9c1eb29dad329c4ce003e9f770859c7"><div class="ttname"><a href="../../da/db5/tracer_8h.html#ac9c1eb29dad329c4ce003e9f770859c7">tracer_pkt_start</a></div><div class="ttdeci">int tracer_pkt_start(u_char level)</div><div class="ttdef"><b>Definition:</b> tracer.c:1516</div></div>
<div class="ttc" id="tracer_8h_html_aaa9412b8510a84314cde4dbe100483d0"><div class="ttname"><a href="../../da/db5/tracer_8h.html#aaa9412b8510a84314cde4dbe100483d0">tracer_split_bblock</a></div><div class="ttdeci">u_short tracer_split_bblock(void *, size_t, bnode_hdr ***, bnode_chunk ****, size_t *)</div><div class="ttdef"><b>Definition:</b> tracer.c:747</div></div>
<div class="ttc" id="tracer_8h_html_aba61c91c84ce6d5df02925e1e8d3e326"><div class="ttname"><a href="../../da/db5/tracer_8h.html#aba61c91c84ce6d5df02925e1e8d3e326">tracer_hdr_iinfo</a></div><div class="ttdeci">static const int_info tracer_hdr_iinfo</div><div class="ttdef"><b>Definition:</b> tracer.h:46</div></div>
<div class="ttc" id="bmap_8h_html"><div class="ttname"><a href="../../d5/dbf/bmap_8h.html">bmap.h</a></div></div>
<div class="ttc" id="tracer_8h_html_add8a05e0cb98370b058e9a4906bcc463"><div class="ttname"><a href="../../da/db5/tracer_8h.html#add8a05e0cb98370b058e9a4906bcc463">flood_pkt_send</a></div><div class="ttdeci">int flood_pkt_send(int(*is_node_excluded)(ext_rnode *e_rnode, map_node *node, int from_rpos, int pos, u_char excl_level, int sub_id), u_char level, int sub_id, int from_rpos, PACKET pkt)</div><div class="ttdef"><b>Definition:</b> tracer.c:1277</div></div>
<div class="ttc" id="tracer_8h_html_a241c64e2efee2847e8ac96eb843c4c07"><div class="ttname"><a href="../../da/db5/tracer_8h.html#a241c64e2efee2847e8ac96eb843c4c07">exclude_from_and_glevel</a></div><div class="ttdeci">int exclude_from_and_glevel(ext_rnode *e_rnode, map_node *node, int from_rpos, int pos, u_char excl_level, int sub_id)</div><div class="ttdef"><b>Definition:</b> tracer.c:1374</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="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="endianness_8h_html_acc663d0291dd4a32c1dfbed3167bd58b"><div class="ttname"><a href="../../dc/d3e/endianness_8h.html#acc663d0291dd4a32c1dfbed3167bd58b">INT_TYPE_32BIT</a></div><div class="ttdeci">#define INT_TYPE_32BIT</div><div class="ttdef"><b>Definition:</b> endianness.h:35</div></div>
<div class="ttc" id="tracer_8h_html_aedc888fcd3fe8dafa7e3a6199190e476"><div class="ttname"><a href="../../da/db5/tracer_8h.html#aedc888fcd3fe8dafa7e3a6199190e476">tracer_pkt_build</a></div><div class="ttdeci">int tracer_pkt_build(u_char, int, int, int, u_char, brdcast_hdr *, tracer_hdr *, tracer_chunk *, u_short, char *, size_t, PACKET *)</div><div class="ttdef"><b>Definition:</b> tracer.c:429</div></div>
<div class="ttc" id="struct__PACKED___html_a4e971802e441661de901388c3b707133"><div class="ttname"><a href="../../d3/d5a/struct__PACKED__.html#a4e971802e441661de901388c3b707133">_PACKED_::node</a></div><div class="ttdeci">u_char node</div><div class="ttdef"><b>Definition:</b> tracer.h:53</div></div>
<div class="ttc" id="struct__PACKED___html"><div class="ttname"><a href="../../d3/d5a/struct__PACKED__.html">_PACKED_</a></div><div class="ttdef"><b>Definition:</b> bmap.h:89</div></div>
<div class="ttc" id="struct__PACKED___html_a02c8a4688819551a51b78c8c99a70538"><div class="ttname"><a href="../../d3/d5a/struct__PACKED__.html#a02c8a4688819551a51b78c8c99a70538">_PACKED_::first_qspn_open_chunk</a></div><div class="ttdeci">u_short first_qspn_open_chunk</div><div class="ttdef"><b>Definition:</b> tracer.h:44</div></div>
<div class="ttc" id="tracer_8h_html_ab53c5821a9d4215b3d5ba16fd95e8297"><div class="ttname"><a href="../../da/db5/tracer_8h.html#ab53c5821a9d4215b3d5ba16fd95e8297">tracer_pkt_recv</a></div><div class="ttdeci">int tracer_pkt_recv(PACKET rpkt)</div><div class="ttdef"><b>Definition:</b> tracer.c:1388</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="../../da/db5/tracer_8h.html">tracer.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>