No Description

classip__packet.html 30KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.9.1"/>
  7. <title>My Project: Referencia de la Clase ip_packet</title>
  8. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  9. <script type="text/javascript" src="jquery.js"></script>
  10. <script type="text/javascript" src="dynsections.js"></script>
  11. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  12. <script type="text/javascript" src="search/searchdata.js"></script>
  13. <script type="text/javascript" src="search/search.js"></script>
  14. <script type="text/javascript">
  15. $(document).ready(function() { init_search(); });
  16. </script>
  17. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  18. </head>
  19. <body>
  20. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  21. <div id="titlearea">
  22. <table cellspacing="0" cellpadding="0">
  23. <tbody>
  24. <tr style="height: 56px;">
  25. <td style="padding-left: 0.5em;">
  26. <div id="projectname">My Project
  27. </div>
  28. </td>
  29. </tr>
  30. </tbody>
  31. </table>
  32. </div>
  33. <!-- end header part -->
  34. <!-- Generado por Doxygen 1.8.9.1 -->
  35. <script type="text/javascript">
  36. var searchBox = new SearchBox("searchBox", "search",false,'Buscar');
  37. </script>
  38. <div id="navrow1" class="tabs">
  39. <ul class="tablist">
  40. <li><a href="index.html"><span>Página&#160;principal</span></a></li>
  41. <li class="current"><a href="annotated.html"><span>Clases</span></a></li>
  42. <li><a href="files.html"><span>Archivos</span></a></li>
  43. <li>
  44. <div id="MSearchBox" class="MSearchBoxInactive">
  45. <span class="left">
  46. <img id="MSearchSelect" src="search/mag_sel.png"
  47. onmouseover="return searchBox.OnSearchSelectShow()"
  48. onmouseout="return searchBox.OnSearchSelectHide()"
  49. alt=""/>
  50. <input type="text" id="MSearchField" value="Buscar" accesskey="S"
  51. onfocus="searchBox.OnSearchFieldFocus(true)"
  52. onblur="searchBox.OnSearchFieldFocus(false)"
  53. onkeyup="searchBox.OnSearchFieldChange(event)"/>
  54. </span><span class="right">
  55. <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
  56. </span>
  57. </div>
  58. </li>
  59. </ul>
  60. </div>
  61. <div id="navrow2" class="tabs2">
  62. <ul class="tablist">
  63. <li><a href="annotated.html"><span>Lista&#160;de&#160;clases</span></a></li>
  64. <li><a href="classes.html"><span>Índice&#160;de&#160;clases</span></a></li>
  65. <li><a href="hierarchy.html"><span>Jerarquía&#160;de&#160;la&#160;clase</span></a></li>
  66. <li><a href="functions.html"><span>Miembros&#160;de&#160;las&#160;clases</span></a></li>
  67. </ul>
  68. </div>
  69. <!-- window showing the filter options -->
  70. <div id="MSearchSelectWindow"
  71. onmouseover="return searchBox.OnSearchSelectShow()"
  72. onmouseout="return searchBox.OnSearchSelectHide()"
  73. onkeydown="return searchBox.OnSearchSelectKey(event)">
  74. </div>
  75. <!-- iframe showing the search results (closed by default) -->
  76. <div id="MSearchResultsWindow">
  77. <iframe src="javascript:void(0)" frameborder="0"
  78. name="MSearchResults" id="MSearchResults">
  79. </iframe>
  80. </div>
  81. </div><!-- top -->
  82. <div class="header">
  83. <div class="summary">
  84. <a href="#pub-methods">Métodos públicos</a> &#124;
  85. <a href="#pri-attribs">Atributos privados</a> &#124;
  86. <a href="classip__packet-members.html">Lista de todos los miembros</a> </div>
  87. <div class="headertitle">
  88. <div class="title">Referencia de la Clase ip_packet</div> </div>
  89. </div><!--header-->
  90. <div class="contents">
  91. <p>The <a class="el" href="classip__packet.html" title="The ip_packet class contains the information extracted from a packet received using pcap for packets ...">ip_packet</a> class contains the information extracted from a packet received using pcap for packets that are IP/TCP or IP/UDP. We only save src and dst addresses and ports, and type of Transport protocol. The class hinerates the fields hardware address field because every IP packet is part of a ethernet packet. The remaining packet is stored as payload.
  92. <a href="classip__packet.html#details">Más...</a></p>
  93. <p><code>#include &lt;<a class="el" href="ip__packet_8h_source.html">ip_packet.h</a>&gt;</code></p>
  94. <div class="dynheader">
  95. Diagrama de herencias de ip_packet</div>
  96. <div class="dyncontent">
  97. <div class="center">
  98. <img src="classip__packet.png" usemap="#ip_packet_map" alt=""/>
  99. <map id="ip_packet_map" name="ip_packet_map">
  100. <area href="classethernet__packet.html" title="The ethernet_packet class contains function to change the ethernet information in bytes from the ethe..." alt="ethernet_packet" shape="rect" coords="0,0,102,24"/>
  101. </map>
  102. </div></div>
  103. <table class="memberdecls">
  104. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  105. Métodos públicos</h2></td></tr>
  106. <tr class="memitem:a331b530912b6fa3b2bbc9a6f0dbe6d90"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a331b530912b6fa3b2bbc9a6f0dbe6d90"></a>
  107. &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#a331b530912b6fa3b2bbc9a6f0dbe6d90">ip_packet</a> ()</td></tr>
  108. <tr class="memdesc:a331b530912b6fa3b2bbc9a6f0dbe6d90"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
  109. <tr class="separator:a331b530912b6fa3b2bbc9a6f0dbe6d90"><td class="memSeparator" colspan="2">&#160;</td></tr>
  110. <tr class="memitem:a5542509eb012fbf4f831dfec39f27307"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#a5542509eb012fbf4f831dfec39f27307">setIPSAddress</a> (string)</td></tr>
  111. <tr class="memdesc:a5542509eb012fbf4f831dfec39f27307"><td class="mdescLeft">&#160;</td><td class="mdescRight">Guarda la direccion IP fuente en formato de cadena de caracteres. <a href="#a5542509eb012fbf4f831dfec39f27307">Más...</a><br /></td></tr>
  112. <tr class="separator:a5542509eb012fbf4f831dfec39f27307"><td class="memSeparator" colspan="2">&#160;</td></tr>
  113. <tr class="memitem:a6083cc5d06be5bb11c266efbdd961f61"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#a6083cc5d06be5bb11c266efbdd961f61">setIPDAddress</a> (string)</td></tr>
  114. <tr class="memdesc:a6083cc5d06be5bb11c266efbdd961f61"><td class="mdescLeft">&#160;</td><td class="mdescRight">Guarda la direccion IP destino en formato de cadena de caracteres. <a href="#a6083cc5d06be5bb11c266efbdd961f61">Más...</a><br /></td></tr>
  115. <tr class="separator:a6083cc5d06be5bb11c266efbdd961f61"><td class="memSeparator" colspan="2">&#160;</td></tr>
  116. <tr class="memitem:a661b3d3c30388290ce4f479c6a00b38c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#a661b3d3c30388290ce4f479c6a00b38c">setIPProto</a> (char)</td></tr>
  117. <tr class="memdesc:a661b3d3c30388290ce4f479c6a00b38c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Guarda el protocolo de IP a (TCP|UDP) <a href="#a661b3d3c30388290ce4f479c6a00b38c">Más...</a><br /></td></tr>
  118. <tr class="separator:a661b3d3c30388290ce4f479c6a00b38c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  119. <tr class="memitem:a33ac2122569abba5eea67bd117e3790e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#a33ac2122569abba5eea67bd117e3790e">setIPSPort</a> (unsigned short)</td></tr>
  120. <tr class="memdesc:a33ac2122569abba5eea67bd117e3790e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Guarda el puerto fuente. <a href="#a33ac2122569abba5eea67bd117e3790e">Más...</a><br /></td></tr>
  121. <tr class="separator:a33ac2122569abba5eea67bd117e3790e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  122. <tr class="memitem:a96103b6cecb324c633e5bd74fee281e2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#a96103b6cecb324c633e5bd74fee281e2">setIPDPort</a> (unsigned short)</td></tr>
  123. <tr class="memdesc:a96103b6cecb324c633e5bd74fee281e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Guarda el puerto destino. <a href="#a96103b6cecb324c633e5bd74fee281e2">Más...</a><br /></td></tr>
  124. <tr class="separator:a96103b6cecb324c633e5bd74fee281e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  125. <tr class="memitem:ac46158915c7d7a4a652ede4246fad8df"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#ac46158915c7d7a4a652ede4246fad8df">setPayload</a> (char *, int)</td></tr>
  126. <tr class="memdesc:ac46158915c7d7a4a652ede4246fad8df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Guarda la carga del paquete de una cadena de caracteres a un string. <a href="#ac46158915c7d7a4a652ede4246fad8df">Más...</a><br /></td></tr>
  127. <tr class="separator:ac46158915c7d7a4a652ede4246fad8df"><td class="memSeparator" colspan="2">&#160;</td></tr>
  128. <tr class="memitem:ac4baa351e90aa90ee8bedd1239d24183"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#ac4baa351e90aa90ee8bedd1239d24183">getIPSAddress</a> ()</td></tr>
  129. <tr class="memdesc:ac4baa351e90aa90ee8bedd1239d24183"><td class="mdescLeft">&#160;</td><td class="mdescRight">Devuelve la dirección IP fuente. <a href="#ac4baa351e90aa90ee8bedd1239d24183">Más...</a><br /></td></tr>
  130. <tr class="separator:ac4baa351e90aa90ee8bedd1239d24183"><td class="memSeparator" colspan="2">&#160;</td></tr>
  131. <tr class="memitem:a5396956d60ddb6a1bb1bd2f6f2b4751b"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#a5396956d60ddb6a1bb1bd2f6f2b4751b">getIPDAddress</a> ()</td></tr>
  132. <tr class="memdesc:a5396956d60ddb6a1bb1bd2f6f2b4751b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Devuelve la dirección IP destino. <a href="#a5396956d60ddb6a1bb1bd2f6f2b4751b">Más...</a><br /></td></tr>
  133. <tr class="separator:a5396956d60ddb6a1bb1bd2f6f2b4751b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  134. <tr class="memitem:a8b774913ecf9d9cda07dd088818ef481"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#a8b774913ecf9d9cda07dd088818ef481">getPayload</a> ()</td></tr>
  135. <tr class="memdesc:a8b774913ecf9d9cda07dd088818ef481"><td class="mdescLeft">&#160;</td><td class="mdescRight">Devuelve la carga del paquete de IP. <a href="#a8b774913ecf9d9cda07dd088818ef481">Más...</a><br /></td></tr>
  136. <tr class="separator:a8b774913ecf9d9cda07dd088818ef481"><td class="memSeparator" colspan="2">&#160;</td></tr>
  137. <tr class="memitem:a78e1e0e7d107ac449fe224d95bcbd999"><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#a78e1e0e7d107ac449fe224d95bcbd999">getIPProto</a> ()</td></tr>
  138. <tr class="memdesc:a78e1e0e7d107ac449fe224d95bcbd999"><td class="mdescLeft">&#160;</td><td class="mdescRight">Devuelve el tipo de protocolo IP. <a href="#a78e1e0e7d107ac449fe224d95bcbd999">Más...</a><br /></td></tr>
  139. <tr class="separator:a78e1e0e7d107ac449fe224d95bcbd999"><td class="memSeparator" colspan="2">&#160;</td></tr>
  140. <tr class="memitem:a9697bad155ec10c25151a6c1f5a434b0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9697bad155ec10c25151a6c1f5a434b0"></a>
  141. unsigned short&#160;</td><td class="memItemRight" valign="bottom"><b>getIPSPort</b> ()</td></tr>
  142. <tr class="separator:a9697bad155ec10c25151a6c1f5a434b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  143. <tr class="memitem:a1a31307b3e7912ba3a1817041725660e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1a31307b3e7912ba3a1817041725660e"></a>
  144. unsigned short&#160;</td><td class="memItemRight" valign="bottom"><b>getIPDPort</b> ()</td></tr>
  145. <tr class="separator:a1a31307b3e7912ba3a1817041725660e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  146. <tr class="inherit_header pub_methods_classethernet__packet"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classethernet__packet')"><img src="closed.png" alt="-"/>&#160;Métodos públicos heredados desde <a class="el" href="classethernet__packet.html">ethernet_packet</a></td></tr>
  147. <tr class="memitem:a4986a171f2710d2f7385adc9698be32c inherit pub_methods_classethernet__packet"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4986a171f2710d2f7385adc9698be32c"></a>
  148. &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classethernet__packet.html#a4986a171f2710d2f7385adc9698be32c">ethernet_packet</a> ()</td></tr>
  149. <tr class="memdesc:a4986a171f2710d2f7385adc9698be32c inherit pub_methods_classethernet__packet"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor, no hace nada. <br /></td></tr>
  150. <tr class="separator:a4986a171f2710d2f7385adc9698be32c inherit pub_methods_classethernet__packet"><td class="memSeparator" colspan="2">&#160;</td></tr>
  151. <tr class="memitem:acd600b879a9ea2b3753680c5e8a3ef88 inherit pub_methods_classethernet__packet"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classethernet__packet.html#acd600b879a9ea2b3753680c5e8a3ef88">setEtherDHost</a> (u_char[])</td></tr>
  152. <tr class="memdesc:acd600b879a9ea2b3753680c5e8a3ef88 inherit pub_methods_classethernet__packet"><td class="mdescLeft">&#160;</td><td class="mdescRight">Recibe el arreglo de 6 bytes de un computadora destino. <a href="#acd600b879a9ea2b3753680c5e8a3ef88">Más...</a><br /></td></tr>
  153. <tr class="separator:acd600b879a9ea2b3753680c5e8a3ef88 inherit pub_methods_classethernet__packet"><td class="memSeparator" colspan="2">&#160;</td></tr>
  154. <tr class="memitem:aab9239c39e891929b316654b77ff9c38 inherit pub_methods_classethernet__packet"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classethernet__packet.html#aab9239c39e891929b316654b77ff9c38">setEtherSHost</a> (u_char[])</td></tr>
  155. <tr class="memdesc:aab9239c39e891929b316654b77ff9c38 inherit pub_methods_classethernet__packet"><td class="mdescLeft">&#160;</td><td class="mdescRight">Recibe el arreglo de 6 bytes de la computadora de origen. <a href="#aab9239c39e891929b316654b77ff9c38">Más...</a><br /></td></tr>
  156. <tr class="separator:aab9239c39e891929b316654b77ff9c38 inherit pub_methods_classethernet__packet"><td class="memSeparator" colspan="2">&#160;</td></tr>
  157. <tr class="memitem:ad42d30ecbabfbce466fbbf9153977fc8 inherit pub_methods_classethernet__packet"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classethernet__packet.html#ad42d30ecbabfbce466fbbf9153977fc8">setEtherType</a> (u_short)</td></tr>
  158. <tr class="memdesc:ad42d30ecbabfbce466fbbf9153977fc8 inherit pub_methods_classethernet__packet"><td class="mdescLeft">&#160;</td><td class="mdescRight">Ajusta el tipo de Ethernet. <a href="#ad42d30ecbabfbce466fbbf9153977fc8">Más...</a><br /></td></tr>
  159. <tr class="separator:ad42d30ecbabfbce466fbbf9153977fc8 inherit pub_methods_classethernet__packet"><td class="memSeparator" colspan="2">&#160;</td></tr>
  160. <tr class="memitem:affa9f0bd4139a1b435e00401da1085f1 inherit pub_methods_classethernet__packet"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classethernet__packet.html#affa9f0bd4139a1b435e00401da1085f1">getEtherDHost</a> ()</td></tr>
  161. <tr class="memdesc:affa9f0bd4139a1b435e00401da1085f1 inherit pub_methods_classethernet__packet"><td class="mdescLeft">&#160;</td><td class="mdescRight">Devuelve la direccion de hardware destino en formato de caracteres. <a href="#affa9f0bd4139a1b435e00401da1085f1">Más...</a><br /></td></tr>
  162. <tr class="separator:affa9f0bd4139a1b435e00401da1085f1 inherit pub_methods_classethernet__packet"><td class="memSeparator" colspan="2">&#160;</td></tr>
  163. <tr class="memitem:aa86115cbbf7baab794766ced8b27edb3 inherit pub_methods_classethernet__packet"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classethernet__packet.html#aa86115cbbf7baab794766ced8b27edb3">getEtherSHost</a> ()</td></tr>
  164. <tr class="memdesc:aa86115cbbf7baab794766ced8b27edb3 inherit pub_methods_classethernet__packet"><td class="mdescLeft">&#160;</td><td class="mdescRight">Devuelve la direccion de hardware fuente en formato de caracteres. <a href="#aa86115cbbf7baab794766ced8b27edb3">Más...</a><br /></td></tr>
  165. <tr class="separator:aa86115cbbf7baab794766ced8b27edb3 inherit pub_methods_classethernet__packet"><td class="memSeparator" colspan="2">&#160;</td></tr>
  166. <tr class="memitem:a29151c42a4d2bbbec4909d7bed7592a6 inherit pub_methods_classethernet__packet"><td class="memItemLeft" align="right" valign="top">u_short&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classethernet__packet.html#a29151c42a4d2bbbec4909d7bed7592a6">getEtherType</a> ()</td></tr>
  167. <tr class="memdesc:a29151c42a4d2bbbec4909d7bed7592a6 inherit pub_methods_classethernet__packet"><td class="mdescLeft">&#160;</td><td class="mdescRight">Devuelve el tipo de Ethernet. <a href="#a29151c42a4d2bbbec4909d7bed7592a6">Más...</a><br /></td></tr>
  168. <tr class="separator:a29151c42a4d2bbbec4909d7bed7592a6 inherit pub_methods_classethernet__packet"><td class="memSeparator" colspan="2">&#160;</td></tr>
  169. </table><table class="memberdecls">
  170. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
  171. Atributos privados</h2></td></tr>
  172. <tr class="memitem:a4225b27fe714e0a321e1dd04355e5370"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4225b27fe714e0a321e1dd04355e5370"></a>
  173. string&#160;</td><td class="memItemRight" valign="bottom"><b>ip_src</b></td></tr>
  174. <tr class="separator:a4225b27fe714e0a321e1dd04355e5370"><td class="memSeparator" colspan="2">&#160;</td></tr>
  175. <tr class="memitem:af3a920730b654dc7d26e155d509234fc"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#af3a920730b654dc7d26e155d509234fc">ip_dst</a></td></tr>
  176. <tr class="separator:af3a920730b654dc7d26e155d509234fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
  177. <tr class="memitem:a6d562e562de60c518542cd250d9986b0"><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#a6d562e562de60c518542cd250d9986b0">ip_p</a></td></tr>
  178. <tr class="separator:a6d562e562de60c518542cd250d9986b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  179. <tr class="memitem:a51f1c0f6cc53460164467a7e80d849b5"><td class="memItemLeft" align="right" valign="top">unsigned short&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#a51f1c0f6cc53460164467a7e80d849b5">d_port</a></td></tr>
  180. <tr class="separator:a51f1c0f6cc53460164467a7e80d849b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
  181. <tr class="memitem:a12b33dcaa7ab59d15f3ce4b8ca6750fd"><td class="memItemLeft" align="right" valign="top">unsigned short&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#a12b33dcaa7ab59d15f3ce4b8ca6750fd">s_port</a></td></tr>
  182. <tr class="separator:a12b33dcaa7ab59d15f3ce4b8ca6750fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
  183. <tr class="memitem:a68c32f352a4f43fd910fb3bba3ddfae0"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#a68c32f352a4f43fd910fb3bba3ddfae0">payload</a></td></tr>
  184. <tr class="separator:a68c32f352a4f43fd910fb3bba3ddfae0"><td class="memSeparator" colspan="2">&#160;</td></tr>
  185. </table>
  186. <a name="details" id="details"></a><h2 class="groupheader">Descripción detallada</h2>
  187. <div class="textblock"><p>The <a class="el" href="classip__packet.html" title="The ip_packet class contains the information extracted from a packet received using pcap for packets ...">ip_packet</a> class contains the information extracted from a packet received using pcap for packets that are IP/TCP or IP/UDP. We only save src and dst addresses and ports, and type of Transport protocol. The class hinerates the fields hardware address field because every IP packet is part of a ethernet packet. The remaining packet is stored as payload. </p>
  188. </div><h2 class="groupheader">Documentación de las funciones miembro</h2>
  189. <a class="anchor" id="a5396956d60ddb6a1bb1bd2f6f2b4751b"></a>
  190. <div class="memitem">
  191. <div class="memproto">
  192. <table class="memname">
  193. <tr>
  194. <td class="memname">string ip_packet::getIPDAddress </td>
  195. <td>(</td>
  196. <td class="paramname"></td><td>)</td>
  197. <td></td>
  198. </tr>
  199. </table>
  200. </div><div class="memdoc">
  201. <p>Devuelve la dirección IP destino. </p>
  202. <dl class="section return"><dt>Devuelve</dt><dd>la direccion IP destino </dd></dl>
  203. </div>
  204. </div>
  205. <a class="anchor" id="a78e1e0e7d107ac449fe224d95bcbd999"></a>
  206. <div class="memitem">
  207. <div class="memproto">
  208. <table class="memname">
  209. <tr>
  210. <td class="memname">char ip_packet::getIPProto </td>
  211. <td>(</td>
  212. <td class="paramname"></td><td>)</td>
  213. <td></td>
  214. </tr>
  215. </table>
  216. </div><div class="memdoc">
  217. <p>Devuelve el tipo de protocolo IP. </p>
  218. <dl class="section return"><dt>Devuelve</dt><dd>el protocolo IP </dd></dl>
  219. </div>
  220. </div>
  221. <a class="anchor" id="ac4baa351e90aa90ee8bedd1239d24183"></a>
  222. <div class="memitem">
  223. <div class="memproto">
  224. <table class="memname">
  225. <tr>
  226. <td class="memname">string ip_packet::getIPSAddress </td>
  227. <td>(</td>
  228. <td class="paramname"></td><td>)</td>
  229. <td></td>
  230. </tr>
  231. </table>
  232. </div><div class="memdoc">
  233. <p>Devuelve la dirección IP fuente. </p>
  234. <dl class="section return"><dt>Devuelve</dt><dd>la direccion IP fuente </dd></dl>
  235. </div>
  236. </div>
  237. <a class="anchor" id="a8b774913ecf9d9cda07dd088818ef481"></a>
  238. <div class="memitem">
  239. <div class="memproto">
  240. <table class="memname">
  241. <tr>
  242. <td class="memname">string ip_packet::getPayload </td>
  243. <td>(</td>
  244. <td class="paramname"></td><td>)</td>
  245. <td></td>
  246. </tr>
  247. </table>
  248. </div><div class="memdoc">
  249. <p>Devuelve la carga del paquete de IP. </p>
  250. <dl class="section return"><dt>Devuelve</dt><dd>la carga del paquete de IP </dd></dl>
  251. </div>
  252. </div>
  253. <a class="anchor" id="a6083cc5d06be5bb11c266efbdd961f61"></a>
  254. <div class="memitem">
  255. <div class="memproto">
  256. <table class="memname">
  257. <tr>
  258. <td class="memname">void ip_packet::setIPDAddress </td>
  259. <td>(</td>
  260. <td class="paramtype">string&#160;</td>
  261. <td class="paramname"><em>addr</em></td><td>)</td>
  262. <td></td>
  263. </tr>
  264. </table>
  265. </div><div class="memdoc">
  266. <p>Guarda la direccion IP destino en formato de cadena de caracteres. </p>
  267. <dl class="params"><dt>Parámetros</dt><dd>
  268. <table class="params">
  269. <tr><td class="paramname">addr</td><td>direccion IP destino </td></tr>
  270. </table>
  271. </dd>
  272. </dl>
  273. </div>
  274. </div>
  275. <a class="anchor" id="a96103b6cecb324c633e5bd74fee281e2"></a>
  276. <div class="memitem">
  277. <div class="memproto">
  278. <table class="memname">
  279. <tr>
  280. <td class="memname">void ip_packet::setIPDPort </td>
  281. <td>(</td>
  282. <td class="paramtype">unsigned short&#160;</td>
  283. <td class="paramname"><em>port</em></td><td>)</td>
  284. <td></td>
  285. </tr>
  286. </table>
  287. </div><div class="memdoc">
  288. <p>Guarda el puerto destino. </p>
  289. <dl class="params"><dt>Parámetros</dt><dd>
  290. <table class="params">
  291. <tr><td class="paramname">port</td><td>puerto destino </td></tr>
  292. </table>
  293. </dd>
  294. </dl>
  295. </div>
  296. </div>
  297. <a class="anchor" id="a661b3d3c30388290ce4f479c6a00b38c"></a>
  298. <div class="memitem">
  299. <div class="memproto">
  300. <table class="memname">
  301. <tr>
  302. <td class="memname">void ip_packet::setIPProto </td>
  303. <td>(</td>
  304. <td class="paramtype">char&#160;</td>
  305. <td class="paramname"><em>proto</em></td><td>)</td>
  306. <td></td>
  307. </tr>
  308. </table>
  309. </div><div class="memdoc">
  310. <p>Guarda el protocolo de IP a (TCP|UDP) </p>
  311. <dl class="params"><dt>Parámetros</dt><dd>
  312. <table class="params">
  313. <tr><td class="paramname">proto</td><td>numero de protocolo (6 | 17) </td></tr>
  314. </table>
  315. </dd>
  316. </dl>
  317. </div>
  318. </div>
  319. <a class="anchor" id="a5542509eb012fbf4f831dfec39f27307"></a>
  320. <div class="memitem">
  321. <div class="memproto">
  322. <table class="memname">
  323. <tr>
  324. <td class="memname">void ip_packet::setIPSAddress </td>
  325. <td>(</td>
  326. <td class="paramtype">string&#160;</td>
  327. <td class="paramname"><em>addr</em></td><td>)</td>
  328. <td></td>
  329. </tr>
  330. </table>
  331. </div><div class="memdoc">
  332. <p>Guarda la direccion IP fuente en formato de cadena de caracteres. </p>
  333. <dl class="params"><dt>Parámetros</dt><dd>
  334. <table class="params">
  335. <tr><td class="paramname">addr</td><td>direccion IP fuente </td></tr>
  336. </table>
  337. </dd>
  338. </dl>
  339. </div>
  340. </div>
  341. <a class="anchor" id="a33ac2122569abba5eea67bd117e3790e"></a>
  342. <div class="memitem">
  343. <div class="memproto">
  344. <table class="memname">
  345. <tr>
  346. <td class="memname">void ip_packet::setIPSPort </td>
  347. <td>(</td>
  348. <td class="paramtype">unsigned short&#160;</td>
  349. <td class="paramname"><em>port</em></td><td>)</td>
  350. <td></td>
  351. </tr>
  352. </table>
  353. </div><div class="memdoc">
  354. <p>Guarda el puerto fuente. </p>
  355. <dl class="params"><dt>Parámetros</dt><dd>
  356. <table class="params">
  357. <tr><td class="paramname">port</td><td>puerto fuente </td></tr>
  358. </table>
  359. </dd>
  360. </dl>
  361. </div>
  362. </div>
  363. <a class="anchor" id="ac46158915c7d7a4a652ede4246fad8df"></a>
  364. <div class="memitem">
  365. <div class="memproto">
  366. <table class="memname">
  367. <tr>
  368. <td class="memname">void ip_packet::setPayload </td>
  369. <td>(</td>
  370. <td class="paramtype">char *&#160;</td>
  371. <td class="paramname"><em>pl</em>, </td>
  372. </tr>
  373. <tr>
  374. <td class="paramkey"></td>
  375. <td></td>
  376. <td class="paramtype">int&#160;</td>
  377. <td class="paramname"><em>len</em>&#160;</td>
  378. </tr>
  379. <tr>
  380. <td></td>
  381. <td>)</td>
  382. <td></td><td></td>
  383. </tr>
  384. </table>
  385. </div><div class="memdoc">
  386. <p>Guarda la carga del paquete de una cadena de caracteres a un string. </p>
  387. <dl class="params"><dt>Parámetros</dt><dd>
  388. <table class="params">
  389. <tr><td class="paramname">pl</td><td>la carga del paquete </td></tr>
  390. <tr><td class="paramname">len</td><td>el largo del paquete </td></tr>
  391. </table>
  392. </dd>
  393. </dl>
  394. </div>
  395. </div>
  396. <h2 class="groupheader">Documentación de los datos miembro</h2>
  397. <a class="anchor" id="a51f1c0f6cc53460164467a7e80d849b5"></a>
  398. <div class="memitem">
  399. <div class="memproto">
  400. <table class="mlabels">
  401. <tr>
  402. <td class="mlabels-left">
  403. <table class="memname">
  404. <tr>
  405. <td class="memname">unsigned short ip_packet::d_port</td>
  406. </tr>
  407. </table>
  408. </td>
  409. <td class="mlabels-right">
  410. <span class="mlabels"><span class="mlabel">private</span></span> </td>
  411. </tr>
  412. </table>
  413. </div><div class="memdoc">
  414. <p>destination port / puerto destino </p>
  415. </div>
  416. </div>
  417. <a class="anchor" id="af3a920730b654dc7d26e155d509234fc"></a>
  418. <div class="memitem">
  419. <div class="memproto">
  420. <table class="mlabels">
  421. <tr>
  422. <td class="mlabels-left">
  423. <table class="memname">
  424. <tr>
  425. <td class="memname">string ip_packet::ip_dst</td>
  426. </tr>
  427. </table>
  428. </td>
  429. <td class="mlabels-right">
  430. <span class="mlabels"><span class="mlabel">private</span></span> </td>
  431. </tr>
  432. </table>
  433. </div><div class="memdoc">
  434. <p>source and dest address / direccion fuente y destino </p>
  435. </div>
  436. </div>
  437. <a class="anchor" id="a6d562e562de60c518542cd250d9986b0"></a>
  438. <div class="memitem">
  439. <div class="memproto">
  440. <table class="mlabels">
  441. <tr>
  442. <td class="mlabels-left">
  443. <table class="memname">
  444. <tr>
  445. <td class="memname">char ip_packet::ip_p</td>
  446. </tr>
  447. </table>
  448. </td>
  449. <td class="mlabels-right">
  450. <span class="mlabels"><span class="mlabel">private</span></span> </td>
  451. </tr>
  452. </table>
  453. </div><div class="memdoc">
  454. <p>type of transport protocol (TCP|UDP) | tipo de protocolo de transporte (TCP|UDP) </p>
  455. </div>
  456. </div>
  457. <a class="anchor" id="a68c32f352a4f43fd910fb3bba3ddfae0"></a>
  458. <div class="memitem">
  459. <div class="memproto">
  460. <table class="mlabels">
  461. <tr>
  462. <td class="mlabels-left">
  463. <table class="memname">
  464. <tr>
  465. <td class="memname">string ip_packet::payload</td>
  466. </tr>
  467. </table>
  468. </td>
  469. <td class="mlabels-right">
  470. <span class="mlabels"><span class="mlabel">private</span></span> </td>
  471. </tr>
  472. </table>
  473. </div><div class="memdoc">
  474. <p>Data payload (content of the packet) / carga del paquete </p>
  475. </div>
  476. </div>
  477. <a class="anchor" id="a12b33dcaa7ab59d15f3ce4b8ca6750fd"></a>
  478. <div class="memitem">
  479. <div class="memproto">
  480. <table class="mlabels">
  481. <tr>
  482. <td class="mlabels-left">
  483. <table class="memname">
  484. <tr>
  485. <td class="memname">unsigned short ip_packet::s_port</td>
  486. </tr>
  487. </table>
  488. </td>
  489. <td class="mlabels-right">
  490. <span class="mlabels"><span class="mlabel">private</span></span> </td>
  491. </tr>
  492. </table>
  493. </div><div class="memdoc">
  494. <p>source port / puerto fuente </p>
  495. </div>
  496. </div>
  497. <hr/>La documentación para esta clase fue generada a partir de los siguientes ficheros:<ul>
  498. <li><a class="el" href="ip__packet_8h_source.html">ip_packet.h</a></li>
  499. <li>ip_packet.cpp</li>
  500. </ul>
  501. </div><!-- contents -->
  502. <!-- start footer part -->
  503. <hr class="footer"/><address class="footer"><small>
  504. Generado el Miércoles, 24 de Junio de 2015 15:25:32 para My Project por &#160;<a href="http://www.doxygen.org/index.html">
  505. <img class="footer" src="doxygen.png" alt="doxygen"/>
  506. </a> 1.8.9.1
  507. </small></address>
  508. </body>
  509. </html>