mirror of
https://github.com/BlackLight/Snort_AIPreproc.git
synced 2024-12-29 12:05:11 +01:00
215 lines
12 KiB
HTML
215 lines
12 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"/>
|
||
|
<title>Snort AI preprocessor module: Manage streams, sorting them into hash tables and linked lists</title>
|
||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||
|
<script type="text/javaScript" src="search/search.js"></script>
|
||
|
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
|
||
|
</head>
|
||
|
<body onload='searchBox.OnSelectItem(0);'>
|
||
|
<!-- Generated by Doxygen 1.7.1 -->
|
||
|
<script type="text/javascript"><!--
|
||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||
|
--></script>
|
||
|
<div class="navigation" id="top">
|
||
|
<div class="tabs">
|
||
|
<ul class="tablist">
|
||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||
|
<li id="searchli">
|
||
|
<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>
|
||
|
<div class="header">
|
||
|
<div class="summary">
|
||
|
<a href="#func-members">Functions</a> </div>
|
||
|
<div class="headertitle">
|
||
|
<h1>Manage streams, sorting them into hash tables and linked lists</h1> </div>
|
||
|
</div>
|
||
|
<div class="contents">
|
||
|
<table class="memberdecls">
|
||
|
<tr><td colspan="2"><h2><a name="func-members"></a>
|
||
|
Functions</h2></td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">PRIVATE void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__stream.html#ga80016adf701c717a6ebfb5b15b8a5749">_AI_stream_free</a> (struct <a class="el" href="structpkt__info.html">pkt_info</a> *stream)</td></tr>
|
||
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Remove a stream from the hash table (private function). <a href="#ga80016adf701c717a6ebfb5b15b8a5749"></a><br/></td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__stream.html#ga24b1131374e5059564b8a12380c4eb75">AI_hashcleanup_thread</a> (void *arg)</td></tr>
|
||
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Thread called for cleaning up the hash table from the traffic streams older than a certain threshold. <a href="#ga24b1131374e5059564b8a12380c4eb75"></a><br/></td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__stream.html#ga7d71c5645b9baff7b6c4b9a181bf80c5">AI_pkt_enqueue</a> (SFSnortPacket *pkt)</td></tr>
|
||
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Function called for appending a new packet to the hash table, creating a new stream or appending it to an existing stream. <a href="#ga7d71c5645b9baff7b6c4b9a181bf80c5"></a><br/></td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structpkt__info.html">pkt_info</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__stream.html#ga2efedcabbfd12c5345f0c93a3dd4735c">AI_get_stream_by_key</a> (struct <a class="el" href="structpkt__key.html">pkt_key</a> key)</td></tr>
|
||
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get a TCP stream by key. <a href="#ga2efedcabbfd12c5345f0c93a3dd4735c"></a><br/></td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__stream.html#ga8749989cee2ac05a7de058faac280c02">AI_set_stream_observed</a> (struct <a class="el" href="structpkt__key.html">pkt_key</a> key)</td></tr>
|
||
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the flag "observed" on a stream associated to a security alert, so that it won't be removed from the hash table. <a href="#ga8749989cee2ac05a7de058faac280c02"></a><br/></td></tr>
|
||
|
</table>
|
||
|
<hr/><h2>Function Documentation</h2>
|
||
|
<a class="anchor" id="ga80016adf701c717a6ebfb5b15b8a5749"></a><!-- doxytag: member="stream.c::_AI_stream_free" ref="ga80016adf701c717a6ebfb5b15b8a5749" args="(struct pkt_info *stream)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">PRIVATE void _AI_stream_free </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">struct <a class="el" href="structpkt__info.html">pkt_info</a> * </td>
|
||
|
<td class="paramname"> <em>stream</em></td>
|
||
|
<td> ) </td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
<p>Remove a stream from the hash table (private function). </p>
|
||
|
<dl><dt><b>Parameters:</b></dt><dd>
|
||
|
<table border="0" cellspacing="2" cellpadding="0">
|
||
|
<tr><td valign="top"></td><td valign="top"><em>stream</em> </td><td>Stream to be removed </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ga2efedcabbfd12c5345f0c93a3dd4735c"></a><!-- doxytag: member="stream.c::AI_get_stream_by_key" ref="ga2efedcabbfd12c5345f0c93a3dd4735c" args="(struct pkt_key key)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">struct <a class="el" href="structpkt__info.html">pkt_info</a>* AI_get_stream_by_key </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">struct <a class="el" href="structpkt__key.html">pkt_key</a> </td>
|
||
|
<td class="paramname"> <em>key</em></td>
|
||
|
<td> ) </td>
|
||
|
<td><code> [read]</code></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
<p>Get a TCP stream by key. </p>
|
||
|
<dl><dt><b>Parameters:</b></dt><dd>
|
||
|
<table border="0" cellspacing="2" cellpadding="0">
|
||
|
<tr><td valign="top"></td><td valign="top"><em>key</em> </td><td>Key of the stream to be picked up (struct <a class="el" href="structpkt__key.html">pkt_key</a>) </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="return"><dt><b>Returns:</b></dt><dd>A <a class="el" href="structpkt__info.html">pkt_info</a> pointer to the stream if found, NULL otherwise </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ga24b1131374e5059564b8a12380c4eb75"></a><!-- doxytag: member="stream.c::AI_hashcleanup_thread" ref="ga24b1131374e5059564b8a12380c4eb75" args="(void *arg)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void* AI_hashcleanup_thread </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">void * </td>
|
||
|
<td class="paramname"> <em>arg</em></td>
|
||
|
<td> ) </td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
<p>Thread called for cleaning up the hash table from the traffic streams older than a certain threshold. </p>
|
||
|
<dl><dt><b>Parameters:</b></dt><dd>
|
||
|
<table border="0" cellspacing="2" cellpadding="0">
|
||
|
<tr><td valign="top"></td><td valign="top"><em>arg</em> </td><td>Pointer to the <a class="el" href="structAI__config.html">AI_config</a> struct </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ga7d71c5645b9baff7b6c4b9a181bf80c5"></a><!-- doxytag: member="stream.c::AI_pkt_enqueue" ref="ga7d71c5645b9baff7b6c4b9a181bf80c5" args="(SFSnortPacket *pkt)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void AI_pkt_enqueue </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">SFSnortPacket * </td>
|
||
|
<td class="paramname"> <em>pkt</em></td>
|
||
|
<td> ) </td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
<p>Function called for appending a new packet to the hash table, creating a new stream or appending it to an existing stream. </p>
|
||
|
<dl><dt><b>Parameters:</b></dt><dd>
|
||
|
<table border="0" cellspacing="2" cellpadding="0">
|
||
|
<tr><td valign="top"></td><td valign="top"><em>pkt</em> </td><td>Packet to be appended </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ga8749989cee2ac05a7de058faac280c02"></a><!-- doxytag: member="stream.c::AI_set_stream_observed" ref="ga8749989cee2ac05a7de058faac280c02" args="(struct pkt_key key)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void AI_set_stream_observed </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">struct <a class="el" href="structpkt__key.html">pkt_key</a> </td>
|
||
|
<td class="paramname"> <em>key</em></td>
|
||
|
<td> ) </td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
<p>Set the flag "observed" on a stream associated to a security alert, so that it won't be removed from the hash table. </p>
|
||
|
<dl><dt><b>Parameters:</b></dt><dd>
|
||
|
<table border="0" cellspacing="2" cellpadding="0">
|
||
|
<tr><td valign="top"></td><td valign="top"><em>key</em> </td><td>Key of the stream to be set as "observed" </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<!--- 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"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Defines</a></div>
|
||
|
|
||
|
<!-- iframe showing the search results (closed by default) -->
|
||
|
<div id="MSearchResultsWindow">
|
||
|
<iframe src="" frameborder="0"
|
||
|
name="MSearchResults" id="MSearchResults">
|
||
|
</iframe>
|
||
|
</div>
|
||
|
|
||
|
<hr class="footer"/><address class="footer"><small>Generated on Sat Sep 4 2010 21:30:42 for Snort AI preprocessor module by
|
||
|
<a href="http://www.doxygen.org/index.html">
|
||
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
|
||
|
</body>
|
||
|
</html>
|