123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524 |
- <!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.9.1"/>
- <title>My Project: Referencia de la Clase Sniffer</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="search/search.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="search/searchdata.js"></script>
- <script type="text/javascript" src="search/search.js"></script>
- <script type="text/javascript">
- $(document).ready(function() { init_search(); });
- </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 style="padding-left: 0.5em;">
- <div id="projectname">My Project
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!-- end header part -->
- <!-- Generado por Doxygen 1.8.9.1 -->
- <script type="text/javascript">
- var searchBox = new SearchBox("searchBox", "search",false,'Buscar');
- </script>
- <div id="navrow1" class="tabs">
- <ul class="tablist">
- <li><a href="index.html"><span>Página principal</span></a></li>
- <li class="current"><a href="annotated.html"><span>Clases</span></a></li>
- <li><a href="files.html"><span>Archivos</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="Buscar" 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="annotated.html"><span>Lista de clases</span></a></li>
- <li><a href="classes.html"><span>Índice de clases</span></a></li>
- <li><a href="hierarchy.html"><span>Jerarquía de la clase</span></a></li>
- <li><a href="functions.html"><span>Miembros de las clases</span></a></li>
- </ul>
- </div>
- <!-- window showing the filter options -->
- <div id="MSearchSelectWindow"
- onmouseover="return searchBox.OnSearchSelectShow()"
- onmouseout="return searchBox.OnSearchSelectHide()"
- onkeydown="return searchBox.OnSearchSelectKey(event)">
- </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><!-- top -->
- <div class="header">
- <div class="summary">
- <a href="#pub-slots">Slots públicos</a> |
- <a href="#signals">Señales</a> |
- <a href="#pub-methods">Métodos públicos</a> |
- <a href="#pri-methods">Métodos privados</a> |
- <a href="#pri-attribs">Atributos privados</a> |
- <a href="class_sniffer-members.html">Lista de todos los miembros</a> </div>
- <div class="headertitle">
- <div class="title">Referencia de la Clase Sniffer</div> </div>
- </div><!--header-->
- <div class="contents">
-
- <p>The <a class="el" href="class_sniffer.html" title="The Sniffer class is the one that use the pcap library to extract the packet information. It discards any packet that is not Ethernet->IP->(TCP|UDP), and pass up to the GUI the packets that are Ethernet->IP->(TCP|UDP). ">Sniffer</a> class is the one that use the pcap library to extract the packet information. It discards any packet that is not Ethernet->IP->(TCP|UDP), and pass up to the GUI the packets that are Ethernet->IP->(TCP|UDP).
- <a href="class_sniffer.html#details">Más...</a></p>
-
- <p><code>#include <<a class="el" href="sniffer_8h_source.html">sniffer.h</a>></code></p>
- <div class="dynheader">
- Diagrama de herencias de Sniffer</div>
- <div class="dyncontent">
- <div class="center">
- <img src="class_sniffer.png" usemap="#Sniffer_map" alt=""/>
- <map id="Sniffer_map" name="Sniffer_map">
- </map>
- </div></div>
- <table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-slots"></a>
- Slots públicos</h2></td></tr>
- <tr class="memitem:a6fc78b66d2f4dce0cc3662dacf171514"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6fc78b66d2f4dce0cc3662dacf171514"></a>
- void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sniffer.html#a6fc78b66d2f4dce0cc3662dacf171514">process</a> ()</td></tr>
- <tr class="memdesc:a6fc78b66d2f4dce0cc3662dacf171514"><td class="mdescLeft"> </td><td class="mdescRight">El sniffer se corre como un hilo por separado y la funcion process es la funcion principal de el hilo. Es el sniffer. <br /></td></tr>
- <tr class="separator:a6fc78b66d2f4dce0cc3662dacf171514"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="signals"></a>
- Señales</h2></td></tr>
- <tr class="memitem:a7d0fd40379b7e5f49aff18ac20cb1c45"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7d0fd40379b7e5f49aff18ac20cb1c45"></a>
- void </td><td class="memItemRight" valign="bottom"><b>resultReady</b> (unsigned long index)</td></tr>
- <tr class="separator:a7d0fd40379b7e5f49aff18ac20cb1c45"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
- Métodos públicos</h2></td></tr>
- <tr class="memitem:a8039cbd5f487a357321d57337a664d3d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8039cbd5f487a357321d57337a664d3d"></a>
-  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sniffer.html#a8039cbd5f487a357321d57337a664d3d">Sniffer</a> ()</td></tr>
- <tr class="memdesc:a8039cbd5f487a357321d57337a664d3d"><td class="mdescLeft"> </td><td class="mdescRight">Constructor, no hace nada. <br /></td></tr>
- <tr class="separator:a8039cbd5f487a357321d57337a664d3d"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a8e5f1474f756be527b4c39a3e9a83893"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sniffer.html#a8e5f1474f756be527b4c39a3e9a83893">Sniffer</a> (QWaitCondition *pw, QMutex *mx, int *ps)</td></tr>
- <tr class="memdesc:a8e5f1474f756be527b4c39a3e9a83893"><td class="mdescLeft"> </td><td class="mdescRight">Ajusta los mutexes para la inter comunicacion entre el sniffer y el GUI. <a href="#a8e5f1474f756be527b4c39a3e9a83893">Más...</a><br /></td></tr>
- <tr class="separator:a8e5f1474f756be527b4c39a3e9a83893"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a8ad3b97292e2cc274f31d87701f92be2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8ad3b97292e2cc274f31d87701f92be2"></a>
-  </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sniffer.html#a8ad3b97292e2cc274f31d87701f92be2">~Sniffer</a> ()</td></tr>
- <tr class="memdesc:a8ad3b97292e2cc274f31d87701f92be2"><td class="mdescLeft"> </td><td class="mdescRight">Destructor, no hace nada. <br /></td></tr>
- <tr class="separator:a8ad3b97292e2cc274f31d87701f92be2"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a791027d276cfcc5e6849132ecf8e80b6"><td class="memItemLeft" align="right" valign="top">vector< <a class="el" href="classip__packet.html">ip_packet</a> > * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sniffer.html#a791027d276cfcc5e6849132ecf8e80b6">getPacketList</a> ()</td></tr>
- <tr class="memdesc:a791027d276cfcc5e6849132ecf8e80b6"><td class="mdescLeft"> </td><td class="mdescRight">Devuelve la lista de paquetes que contiene los paquetes que son Ethernet -> IP -> (TCP|UDP) <a href="#a791027d276cfcc5e6849132ecf8e80b6">Más...</a><br /></td></tr>
- <tr class="separator:a791027d276cfcc5e6849132ecf8e80b6"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a3dd95c60c5b8554e1bedc22b36ae488c"><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sniffer.html#a3dd95c60c5b8554e1bedc22b36ae488c">format_payload</a> (const char *payload, int len)</td></tr>
- <tr class="memdesc:a3dd95c60c5b8554e1bedc22b36ae488c"><td class="mdescLeft"> </td><td class="mdescRight">Formatea la carga de un torrente de bytes a un cadena de caracteres ascii. <a href="#a3dd95c60c5b8554e1bedc22b36ae488c">Más...</a><br /></td></tr>
- <tr class="separator:a3dd95c60c5b8554e1bedc22b36ae488c"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a02101b56a75804d1ed39a1c04ba36ab2"><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sniffer.html#a02101b56a75804d1ed39a1c04ba36ab2">format_hex_ascii_line</a> (const char *payload, int len, int offset)</td></tr>
- <tr class="memdesc:a02101b56a75804d1ed39a1c04ba36ab2"><td class="mdescLeft"> </td><td class="mdescRight">Devuelve una cadena de caracteres con los bytes de una linea de la carga en ascii. <a href="#a02101b56a75804d1ed39a1c04ba36ab2">Más...</a><br /></td></tr>
- <tr class="separator:a02101b56a75804d1ed39a1c04ba36ab2"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a94d7cd87d0f181c3cf2e5ec851e370b6"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sniffer.html#a94d7cd87d0f181c3cf2e5ec851e370b6">find_devices</a> (vector< string > &)</td></tr>
- <tr class="memdesc:a94d7cd87d0f181c3cf2e5ec851e370b6"><td class="mdescLeft"> </td><td class="mdescRight">Encuentra los dispositivos de red en la computadora, y los almacena en el vector devs. <a href="#a94d7cd87d0f181c3cf2e5ec851e370b6">Más...</a><br /></td></tr>
- <tr class="separator:a94d7cd87d0f181c3cf2e5ec851e370b6"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ab706811aa2b285e4c0f55491703c105a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sniffer.html#ab706811aa2b285e4c0f55491703c105a">setDevice</a> (string)</td></tr>
- <tr class="memdesc:ab706811aa2b285e4c0f55491703c105a"><td class="mdescLeft"> </td><td class="mdescRight">Ajusta el dispositivo para caputurar paquetes a dev. <a href="#ab706811aa2b285e4c0f55491703c105a">Más...</a><br /></td></tr>
- <tr class="separator:ab706811aa2b285e4c0f55491703c105a"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
- Métodos privados</h2></td></tr>
- <tr class="memitem:ac05f935a6ec2830d6bf42b607f071910"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sniffer.html#ac05f935a6ec2830d6bf42b607f071910">print_payload</a> (const u_char *payload, int len)</td></tr>
- <tr class="memdesc:ac05f935a6ec2830d6bf42b607f071910"><td class="mdescLeft"> </td><td class="mdescRight">Imprime la carga en ascii. <a href="#ac05f935a6ec2830d6bf42b607f071910">Más...</a><br /></td></tr>
- <tr class="separator:ac05f935a6ec2830d6bf42b607f071910"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a70598d5001a30cc8e801f1262770cdf6"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sniffer.html#a70598d5001a30cc8e801f1262770cdf6">print_hex_ascii_line</a> (const u_char *payload, int len, int offset)</td></tr>
- <tr class="memdesc:a70598d5001a30cc8e801f1262770cdf6"><td class="mdescLeft"> </td><td class="mdescRight">Imprime la carga en ascii a std output. <a href="#a70598d5001a30cc8e801f1262770cdf6">Más...</a><br /></td></tr>
- <tr class="separator:a70598d5001a30cc8e801f1262770cdf6"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a0179e32fee6a0f7c2a13f37d64a7fae0"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_sniffer.html#a0179e32fee6a0f7c2a13f37d64a7fae0">got_packet</a> (const struct pcap_pkthdr *header, const u_char *packet)</td></tr>
- <tr class="memdesc:a0179e32fee6a0f7c2a13f37d64a7fae0"><td class="mdescLeft"> </td><td class="mdescRight">Secciona el paquete recibido. Extrae la informacion necesaria. <a href="#a0179e32fee6a0f7c2a13f37d64a7fae0">Más...</a><br /></td></tr>
- <tr class="separator:a0179e32fee6a0f7c2a13f37d64a7fae0"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
- Atributos privados</h2></td></tr>
- <tr class="memitem:ad3ad83091913a50effd7468d8d7ca590"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad3ad83091913a50effd7468d8d7ca590"></a>
- vector< <a class="el" href="classip__packet.html">ip_packet</a> > </td><td class="memItemRight" valign="bottom"><b>packet_list</b></td></tr>
- <tr class="separator:ad3ad83091913a50effd7468d8d7ca590"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a36e1964fbc960b60a09b425a7cd1c0f6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a36e1964fbc960b60a09b425a7cd1c0f6"></a>
- QWaitCondition * </td><td class="memItemRight" valign="bottom"><b>wait_pause</b></td></tr>
- <tr class="separator:a36e1964fbc960b60a09b425a7cd1c0f6"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ae0d6a92d2224a8c927afe861d45ab182"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae0d6a92d2224a8c927afe861d45ab182"></a>
- QMutex * </td><td class="memItemRight" valign="bottom"><b>mutex</b></td></tr>
- <tr class="separator:ae0d6a92d2224a8c927afe861d45ab182"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ac35f2e04e7f7668243a75bd9b9b44028"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac35f2e04e7f7668243a75bd9b9b44028"></a>
- string </td><td class="memItemRight" valign="bottom"><b>device</b></td></tr>
- <tr class="separator:ac35f2e04e7f7668243a75bd9b9b44028"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:abb7dd6858499a14bcf002ba86e2d3f7f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abb7dd6858499a14bcf002ba86e2d3f7f"></a>
- string </td><td class="memItemRight" valign="bottom"><b>filter</b></td></tr>
- <tr class="separator:abb7dd6858499a14bcf002ba86e2d3f7f"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a2fde6ba65f629b1c74b1fcd1b8d2c022"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2fde6ba65f629b1c74b1fcd1b8d2c022"></a>
- int * </td><td class="memItemRight" valign="bottom"><b>pause</b></td></tr>
- <tr class="separator:a2fde6ba65f629b1c74b1fcd1b8d2c022"><td class="memSeparator" colspan="2"> </td></tr>
- </table>
- <a name="details" id="details"></a><h2 class="groupheader">Descripción detallada</h2>
- <div class="textblock"><p>The <a class="el" href="class_sniffer.html" title="The Sniffer class is the one that use the pcap library to extract the packet information. It discards any packet that is not Ethernet->IP->(TCP|UDP), and pass up to the GUI the packets that are Ethernet->IP->(TCP|UDP). ">Sniffer</a> class is the one that use the pcap library to extract the packet information. It discards any packet that is not Ethernet->IP->(TCP|UDP), and pass up to the GUI the packets that are Ethernet->IP->(TCP|UDP). </p>
- </div><h2 class="groupheader">Documentación del constructor y destructor</h2>
- <a class="anchor" id="a8e5f1474f756be527b4c39a3e9a83893"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">Sniffer::Sniffer </td>
- <td>(</td>
- <td class="paramtype">QWaitCondition * </td>
- <td class="paramname"><em>pw</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">QMutex * </td>
- <td class="paramname"><em>mx</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int * </td>
- <td class="paramname"><em>ps</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>Ajusta los mutexes para la inter comunicacion entre el sniffer y el GUI. </p>
- <dl class="params"><dt>Parámetros</dt><dd>
- <table class="params">
- <tr><td class="paramname">pw</td><td>se usa para pausar la captura de paquetes </td></tr>
- <tr><td class="paramname">mx</td><td>usado para proteger la region critica </td></tr>
- <tr><td class="paramname">ps</td><td>bandera para pausar la captura de paquetes </td></tr>
- </table>
- </dd>
- </dl>
-
- </div>
- </div>
- <h2 class="groupheader">Documentación de las funciones miembro</h2>
- <a class="anchor" id="a94d7cd87d0f181c3cf2e5ec851e370b6"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void Sniffer::find_devices </td>
- <td>(</td>
- <td class="paramtype">vector< string > & </td>
- <td class="paramname"><em>devs</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>Encuentra los dispositivos de red en la computadora, y los almacena en el vector devs. </p>
- <dl class="params"><dt>Parámetros</dt><dd>
- <table class="params">
- <tr><td class="paramname">devs</td><td>vector de cadenas de caracteres para los nombres </td></tr>
- </table>
- </dd>
- </dl>
-
- </div>
- </div>
- <a class="anchor" id="a02101b56a75804d1ed39a1c04ba36ab2"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">string Sniffer::format_hex_ascii_line </td>
- <td>(</td>
- <td class="paramtype">const char * </td>
- <td class="paramname"><em>payload</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>len</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>offset</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>Devuelve una cadena de caracteres con los bytes de una linea de la carga en ascii. </p>
- <dl class="params"><dt>Parámetros</dt><dd>
- <table class="params">
- <tr><td class="paramname">payload</td><td>carga del paquete </td></tr>
- <tr><td class="paramname">len</td><td>largo del paquete </td></tr>
- <tr><td class="paramname">offset</td><td>distancia del paquete </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Devuelve</dt><dd>a string with the bytes of a payload line in ascii </dd></dl>
-
- </div>
- </div>
- <a class="anchor" id="a3dd95c60c5b8554e1bedc22b36ae488c"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">string Sniffer::format_payload </td>
- <td>(</td>
- <td class="paramtype">const char * </td>
- <td class="paramname"><em>payload</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>len</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>Formatea la carga de un torrente de bytes a un cadena de caracteres ascii. </p>
- <dl class="params"><dt>Parámetros</dt><dd>
- <table class="params">
- <tr><td class="paramname">payload</td><td>carga del paquete </td></tr>
- <tr><td class="paramname">len</td><td>largo del paquete </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Devuelve</dt><dd>la carga en una cadena de caracteres ascii </dd></dl>
-
- </div>
- </div>
- <a class="anchor" id="a791027d276cfcc5e6849132ecf8e80b6"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">vector< <a class="el" href="classip__packet.html">ip_packet</a> > * Sniffer::getPacketList </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>Devuelve la lista de paquetes que contiene los paquetes que son Ethernet -> IP -> (TCP|UDP) </p>
- <dl class="section return"><dt>Devuelve</dt><dd>vector de paquetes </dd></dl>
-
- </div>
- </div>
- <a class="anchor" id="a0179e32fee6a0f7c2a13f37d64a7fae0"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">void Sniffer::got_packet </td>
- <td>(</td>
- <td class="paramtype">const struct pcap_pkthdr * </td>
- <td class="paramname"><em>header</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const u_char * </td>
- <td class="paramname"><em>packet</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">private</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>Secciona el paquete recibido. Extrae la informacion necesaria. </p>
- <dl class="params"><dt>Parámetros</dt><dd>
- <table class="params">
- <tr><td class="paramname">pcap_pkthdr</td><td>encabezado del paquete de pcap </td></tr>
- <tr><td class="paramname">packet</td><td>paquete recibido </td></tr>
- </table>
- </dd>
- </dl>
-
- </div>
- </div>
- <a class="anchor" id="a70598d5001a30cc8e801f1262770cdf6"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">void Sniffer::print_hex_ascii_line </td>
- <td>(</td>
- <td class="paramtype">const u_char * </td>
- <td class="paramname"><em>payload</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>len</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>offset</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">private</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>Imprime la carga en ascii a std output. </p>
- <dl class="params"><dt>Parámetros</dt><dd>
- <table class="params">
- <tr><td class="paramname">payload</td><td>carga del paquete </td></tr>
- <tr><td class="paramname">len</td><td>largo de la carga </td></tr>
- <tr><td class="paramname">offset</td><td>distancia </td></tr>
- </table>
- </dd>
- </dl>
-
- </div>
- </div>
- <a class="anchor" id="ac05f935a6ec2830d6bf42b607f071910"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">void Sniffer::print_payload </td>
- <td>(</td>
- <td class="paramtype">const u_char * </td>
- <td class="paramname"><em>payload</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>len</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">private</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>Imprime la carga en ascii. </p>
- <dl class="params"><dt>Parámetros</dt><dd>
- <table class="params">
- <tr><td class="paramname">payload</td><td>carga del paquete </td></tr>
- <tr><td class="paramname">len</td><td>largo de la carga </td></tr>
- </table>
- </dd>
- </dl>
-
- </div>
- </div>
- <a class="anchor" id="ab706811aa2b285e4c0f55491703c105a"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void Sniffer::setDevice </td>
- <td>(</td>
- <td class="paramtype">string </td>
- <td class="paramname"><em>dev</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>Ajusta el dispositivo para caputurar paquetes a dev. </p>
- <dl class="params"><dt>Parámetros</dt><dd>
- <table class="params">
- <tr><td class="paramname">dev</td><td>nombre del dispositivo </td></tr>
- </table>
- </dd>
- </dl>
-
- </div>
- </div>
- <hr/>La documentación para esta clase fue generada a partir de los siguientes ficheros:<ul>
- <li><a class="el" href="sniffer_8h_source.html">sniffer.h</a></li>
- <li>sniffer.cpp</li>
- </ul>
- </div><!-- contents -->
- <!-- start footer part -->
- <hr class="footer"/><address class="footer"><small>
- Generado el Miércoles, 24 de Junio de 2015 15:25:33 para My Project por  <a href="http://www.doxygen.org/index.html">
- <img class="footer" src="doxygen.png" alt="doxygen"/>
- </a> 1.8.9.1
- </small></address>
- </body>
- </html>
|