2010-08-14 14:30:41 +02:00
<!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: stream.c File Reference< / 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 class = "current" > < 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 class = "tabs2" >
< ul class = "tablist" >
< li > < a href = "files.html" > < span > File List< / span > < / a > < / li >
< li > < a href = "globals.html" > < span > Globals< / span > < / a > < / li >
< / ul >
< / div >
< / div >
< div class = "header" >
< div class = "summary" >
< a href = "#func-members" > Functions< / a > |
< a href = "#var-members" > Variables< / a > < / div >
< div class = "headertitle" >
< h1 > stream.c File Reference< / h1 > < / div >
< / div >
< div class = "contents" >
< code > #include " < a class = "el" href = "spp__ai_8h_source.html" > spp_ai.h< / a > " < / code > < br / >
< code > #include < stdio.h> < / code > < br / >
< code > #include < stdlib.h> < / code > < br / >
< code > #include < time.h> < / code > < br / >
< code > #include < unistd.h> < / code > < br / >
2010-09-04 21:33:53 +02:00
< code > #include < pthread.h> < / code > < br / >
2010-08-14 14:30:41 +02:00
< table class = "memberdecls" >
< tr > < td colspan = "2" > < h2 > < a name = "func-members" > < / a >
Functions< / h2 > < / td > < / tr >
2010-09-04 21:33:53 +02:00
< 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 = "group__stream.html#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 = "group__stream.html#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 = "group__stream.html#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 = "group__stream.html#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 = "group__stream.html#ga8749989cee2ac05a7de058faac280c02" > < / a > < br / > < / td > < / tr >
2010-08-14 14:30:41 +02:00
< tr > < td colspan = "2" > < h2 > < a name = "var-members" > < / a >
Variables< / h2 > < / td > < / tr >
2010-08-16 22:09:34 +02:00
< tr > < td class = "memItemLeft" align = "right" valign = "top" > PRIVATE struct < a class = "el" href = "structpkt__info.html" > pkt_info< / a > * < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "stream_8c.html#a57e23cda853e9d11c37723a962ef2f68" > hash< / a > = NULL< / td > < / tr >
< tr > < td class = "memItemLeft" align = "right" valign = "top" > PRIVATE time_t < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "stream_8c.html#a0597864b078ff448f28432db86950309" > start_time< / a > = 0< / td > < / tr >
2010-09-04 21:33:53 +02:00
< tr > < td class = "memItemLeft" align = "right" valign = "top" > PRIVATE pthread_mutex_t < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "stream_8c.html#a4e01edd07102e71480b323db2b8f57c8" > hash_mutex< / a > = PTHREAD_MUTEX_INITIALIZER< / td > < / tr >
2010-08-14 14:30:41 +02:00
< / table >
2010-09-04 21:33:53 +02:00
< hr / > < h2 > Variable Documentation< / h2 >
< a class = "anchor" id = "a57e23cda853e9d11c37723a962ef2f68" > < / a > <!-- doxytag: member="stream.c::hash" ref="a57e23cda853e9d11c37723a962ef2f68" args="" -->
2010-08-16 22:09:34 +02:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2010-09-04 21:33:53 +02:00
< td class = "memname" > PRIVATE struct < a class = "el" href = "structpkt__info.html" > pkt_info< / a > * < a class = "el" href = "stream_8c.html#a57e23cda853e9d11c37723a962ef2f68" > hash< / a > = NULL< / td >
2010-08-16 22:09:34 +02:00
< / tr >
< / table >
< / div >
< div class = "memdoc" >
2010-08-14 14:30:41 +02:00
< / div >
< / div >
2010-09-04 21:33:53 +02:00
< a class = "anchor" id = "a4e01edd07102e71480b323db2b8f57c8" > < / a > <!-- doxytag: member="stream.c::hash_mutex" ref="a4e01edd07102e71480b323db2b8f57c8" args="" -->
2010-08-16 22:09:34 +02:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2010-09-04 21:33:53 +02:00
< td class = "memname" > PRIVATE pthread_mutex_t < a class = "el" href = "stream_8c.html#a4e01edd07102e71480b323db2b8f57c8" > hash_mutex< / a > = PTHREAD_MUTEX_INITIALIZER< / td >
2010-08-16 22:09:34 +02:00
< / tr >
< / table >
< / div >
< div class = "memdoc" >
2010-09-04 21:33:53 +02:00
< p > pthread mutex for managing the access of multiple readers/writers to the hash table < / p >
2010-08-16 22:09:34 +02:00
< / div >
< / div >
< a class = "anchor" id = "a0597864b078ff448f28432db86950309" > < / a > <!-- doxytag: member="stream.c::start_time" ref="a0597864b078ff448f28432db86950309" args="" -->
2010-08-14 14:30:41 +02:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2010-08-16 22:09:34 +02:00
< td class = "memname" > PRIVATE time_t < a class = "el" href = "stream_8c.html#a0597864b078ff448f28432db86950309" > start_time< / a > = 0< / td >
2010-08-14 14:30:41 +02:00
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< / 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 >
2010-09-11 02:12:39 +02:00
< hr class = "footer" / > < address class = "footer" > < small > Generated on Fri Sep 10 2010 02:56:16 for Snort AI preprocessor module by
2010-08-14 14:30:41 +02:00
< a href = "http://www.doxygen.org/index.html" >
< img class = "footer" src = "doxygen.png" alt = "doxygen" / > < / a > 1.7.1 < / small > < / address >
< / body >
< / html >