123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576 |
- <!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: ip_packet Class Reference</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 -->
- <!-- Generated by Doxygen 1.8.9.1 -->
- <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 Page</span></a></li>
- <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
- <li><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="annotated.html"><span>Class List</span></a></li>
- <li><a href="classes.html"><span>Class Index</span></a></li>
- <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
- <li><a href="functions.html"><span>Class Members</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-methods">Public Member Functions</a> |
- <a href="#pri-attribs">Private Attributes</a> |
- <a href="classip__packet-members.html">List of all members</a> </div>
- <div class="headertitle">
- <div class="title">ip_packet Class Reference</div> </div>
- </div><!--header-->
- <div class="contents">
-
- <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.
- <a href="classip__packet.html#details">More...</a></p>
-
- <p><code>#include <<a class="el" href="ip__packet_8h_source.html">ip_packet.h</a>></code></p>
- <div class="dynheader">
- Inheritance diagram for ip_packet:</div>
- <div class="dyncontent">
- <div class="center">
- <img src="classip__packet.png" usemap="#ip_packet_map" alt=""/>
- <map id="ip_packet_map" name="ip_packet_map">
- <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"/>
- </map>
- </div></div>
- <table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
- Public Member Functions</h2></td></tr>
- <tr class="memitem:a331b530912b6fa3b2bbc9a6f0dbe6d90"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a331b530912b6fa3b2bbc9a6f0dbe6d90"></a>
-  </td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#a331b530912b6fa3b2bbc9a6f0dbe6d90">ip_packet</a> ()</td></tr>
- <tr class="memdesc:a331b530912b6fa3b2bbc9a6f0dbe6d90"><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <br /></td></tr>
- <tr class="separator:a331b530912b6fa3b2bbc9a6f0dbe6d90"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a5542509eb012fbf4f831dfec39f27307"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#a5542509eb012fbf4f831dfec39f27307">setIPSAddress</a> (string)</td></tr>
- <tr class="memdesc:a5542509eb012fbf4f831dfec39f27307"><td class="mdescLeft"> </td><td class="mdescRight">Saves the source IP address in std string format. <a href="#a5542509eb012fbf4f831dfec39f27307">More...</a><br /></td></tr>
- <tr class="separator:a5542509eb012fbf4f831dfec39f27307"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a6083cc5d06be5bb11c266efbdd961f61"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#a6083cc5d06be5bb11c266efbdd961f61">setIPDAddress</a> (string)</td></tr>
- <tr class="memdesc:a6083cc5d06be5bb11c266efbdd961f61"><td class="mdescLeft"> </td><td class="mdescRight">Saves the destination IP address in std string format. <a href="#a6083cc5d06be5bb11c266efbdd961f61">More...</a><br /></td></tr>
- <tr class="separator:a6083cc5d06be5bb11c266efbdd961f61"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a661b3d3c30388290ce4f479c6a00b38c"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#a661b3d3c30388290ce4f479c6a00b38c">setIPProto</a> (char)</td></tr>
- <tr class="memdesc:a661b3d3c30388290ce4f479c6a00b38c"><td class="mdescLeft"> </td><td class="mdescRight">Saves the IP protocol to (TCP|UDP) <a href="#a661b3d3c30388290ce4f479c6a00b38c">More...</a><br /></td></tr>
- <tr class="separator:a661b3d3c30388290ce4f479c6a00b38c"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a33ac2122569abba5eea67bd117e3790e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#a33ac2122569abba5eea67bd117e3790e">setIPSPort</a> (unsigned short)</td></tr>
- <tr class="memdesc:a33ac2122569abba5eea67bd117e3790e"><td class="mdescLeft"> </td><td class="mdescRight">Saves the source port. <a href="#a33ac2122569abba5eea67bd117e3790e">More...</a><br /></td></tr>
- <tr class="separator:a33ac2122569abba5eea67bd117e3790e"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a96103b6cecb324c633e5bd74fee281e2"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#a96103b6cecb324c633e5bd74fee281e2">setIPDPort</a> (unsigned short)</td></tr>
- <tr class="memdesc:a96103b6cecb324c633e5bd74fee281e2"><td class="mdescLeft"> </td><td class="mdescRight">Saves the destinaation port. <a href="#a96103b6cecb324c633e5bd74fee281e2">More...</a><br /></td></tr>
- <tr class="separator:a96103b6cecb324c633e5bd74fee281e2"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ac46158915c7d7a4a652ede4246fad8df"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#ac46158915c7d7a4a652ede4246fad8df">setPayload</a> (char *, int)</td></tr>
- <tr class="memdesc:ac46158915c7d7a4a652ede4246fad8df"><td class="mdescLeft"> </td><td class="mdescRight">Saves the payload string of bytes into a string. <a href="#ac46158915c7d7a4a652ede4246fad8df">More...</a><br /></td></tr>
- <tr class="separator:ac46158915c7d7a4a652ede4246fad8df"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ac4baa351e90aa90ee8bedd1239d24183"><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#ac4baa351e90aa90ee8bedd1239d24183">getIPSAddress</a> ()</td></tr>
- <tr class="memdesc:ac4baa351e90aa90ee8bedd1239d24183"><td class="mdescLeft"> </td><td class="mdescRight">Returns the source IP address. <a href="#ac4baa351e90aa90ee8bedd1239d24183">More...</a><br /></td></tr>
- <tr class="separator:ac4baa351e90aa90ee8bedd1239d24183"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a5396956d60ddb6a1bb1bd2f6f2b4751b"><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#a5396956d60ddb6a1bb1bd2f6f2b4751b">getIPDAddress</a> ()</td></tr>
- <tr class="memdesc:a5396956d60ddb6a1bb1bd2f6f2b4751b"><td class="mdescLeft"> </td><td class="mdescRight">Returns the destination IP address. <a href="#a5396956d60ddb6a1bb1bd2f6f2b4751b">More...</a><br /></td></tr>
- <tr class="separator:a5396956d60ddb6a1bb1bd2f6f2b4751b"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a8b774913ecf9d9cda07dd088818ef481"><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#a8b774913ecf9d9cda07dd088818ef481">getPayload</a> ()</td></tr>
- <tr class="memdesc:a8b774913ecf9d9cda07dd088818ef481"><td class="mdescLeft"> </td><td class="mdescRight">Returns the IP packet payload. <a href="#a8b774913ecf9d9cda07dd088818ef481">More...</a><br /></td></tr>
- <tr class="separator:a8b774913ecf9d9cda07dd088818ef481"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a78e1e0e7d107ac449fe224d95bcbd999"><td class="memItemLeft" align="right" valign="top">char </td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#a78e1e0e7d107ac449fe224d95bcbd999">getIPProto</a> ()</td></tr>
- <tr class="memdesc:a78e1e0e7d107ac449fe224d95bcbd999"><td class="mdescLeft"> </td><td class="mdescRight">Returns the IP protocol type. <a href="#a78e1e0e7d107ac449fe224d95bcbd999">More...</a><br /></td></tr>
- <tr class="separator:a78e1e0e7d107ac449fe224d95bcbd999"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a9697bad155ec10c25151a6c1f5a434b0"><td class="memItemLeft" align="right" valign="top">unsigned short </td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#a9697bad155ec10c25151a6c1f5a434b0">getIPSPort</a> ()</td></tr>
- <tr class="memdesc:a9697bad155ec10c25151a6c1f5a434b0"><td class="mdescLeft"> </td><td class="mdescRight">Returns the source port. <a href="#a9697bad155ec10c25151a6c1f5a434b0">More...</a><br /></td></tr>
- <tr class="separator:a9697bad155ec10c25151a6c1f5a434b0"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a1a31307b3e7912ba3a1817041725660e"><td class="memItemLeft" align="right" valign="top">unsigned short </td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#a1a31307b3e7912ba3a1817041725660e">getIPDPort</a> ()</td></tr>
- <tr class="memdesc:a1a31307b3e7912ba3a1817041725660e"><td class="mdescLeft"> </td><td class="mdescRight">Returns the destination port. <a href="#a1a31307b3e7912ba3a1817041725660e">More...</a><br /></td></tr>
- <tr class="separator:a1a31307b3e7912ba3a1817041725660e"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="inherit_header pub_methods_classethernet__packet"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classethernet__packet')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classethernet__packet.html">ethernet_packet</a></td></tr>
- <tr class="memitem:a4986a171f2710d2f7385adc9698be32c inherit pub_methods_classethernet__packet"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4986a171f2710d2f7385adc9698be32c"></a>
-  </td><td class="memItemRight" valign="bottom"><a class="el" href="classethernet__packet.html#a4986a171f2710d2f7385adc9698be32c">ethernet_packet</a> ()</td></tr>
- <tr class="memdesc:a4986a171f2710d2f7385adc9698be32c inherit pub_methods_classethernet__packet"><td class="mdescLeft"> </td><td class="mdescRight">Constructor, does nothing. <br /></td></tr>
- <tr class="separator:a4986a171f2710d2f7385adc9698be32c inherit pub_methods_classethernet__packet"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:acd600b879a9ea2b3753680c5e8a3ef88 inherit pub_methods_classethernet__packet"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classethernet__packet.html#acd600b879a9ea2b3753680c5e8a3ef88">setEtherDHost</a> (u_char[])</td></tr>
- <tr class="memdesc:acd600b879a9ea2b3753680c5e8a3ef88 inherit pub_methods_classethernet__packet"><td class="mdescLeft"> </td><td class="mdescRight">Receives the array of 6 bytes of a destination host. <a href="#acd600b879a9ea2b3753680c5e8a3ef88">More...</a><br /></td></tr>
- <tr class="separator:acd600b879a9ea2b3753680c5e8a3ef88 inherit pub_methods_classethernet__packet"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aab9239c39e891929b316654b77ff9c38 inherit pub_methods_classethernet__packet"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classethernet__packet.html#aab9239c39e891929b316654b77ff9c38">setEtherSHost</a> (u_char[])</td></tr>
- <tr class="memdesc:aab9239c39e891929b316654b77ff9c38 inherit pub_methods_classethernet__packet"><td class="mdescLeft"> </td><td class="mdescRight">Receives the array of 6 bytes of a source host. <a href="#aab9239c39e891929b316654b77ff9c38">More...</a><br /></td></tr>
- <tr class="separator:aab9239c39e891929b316654b77ff9c38 inherit pub_methods_classethernet__packet"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ad42d30ecbabfbce466fbbf9153977fc8 inherit pub_methods_classethernet__packet"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classethernet__packet.html#ad42d30ecbabfbce466fbbf9153977fc8">setEtherType</a> (u_short)</td></tr>
- <tr class="memdesc:ad42d30ecbabfbce466fbbf9153977fc8 inherit pub_methods_classethernet__packet"><td class="mdescLeft"> </td><td class="mdescRight">Set the Ethernet type. <a href="#ad42d30ecbabfbce466fbbf9153977fc8">More...</a><br /></td></tr>
- <tr class="separator:ad42d30ecbabfbce466fbbf9153977fc8 inherit pub_methods_classethernet__packet"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:affa9f0bd4139a1b435e00401da1085f1 inherit pub_methods_classethernet__packet"><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classethernet__packet.html#affa9f0bd4139a1b435e00401da1085f1">getEtherDHost</a> ()</td></tr>
- <tr class="memdesc:affa9f0bd4139a1b435e00401da1085f1 inherit pub_methods_classethernet__packet"><td class="mdescLeft"> </td><td class="mdescRight">Returns the destination HA in string format. <a href="#affa9f0bd4139a1b435e00401da1085f1">More...</a><br /></td></tr>
- <tr class="separator:affa9f0bd4139a1b435e00401da1085f1 inherit pub_methods_classethernet__packet"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aa86115cbbf7baab794766ced8b27edb3 inherit pub_methods_classethernet__packet"><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classethernet__packet.html#aa86115cbbf7baab794766ced8b27edb3">getEtherSHost</a> ()</td></tr>
- <tr class="memdesc:aa86115cbbf7baab794766ced8b27edb3 inherit pub_methods_classethernet__packet"><td class="mdescLeft"> </td><td class="mdescRight">Returns the source HA in string format. <a href="#aa86115cbbf7baab794766ced8b27edb3">More...</a><br /></td></tr>
- <tr class="separator:aa86115cbbf7baab794766ced8b27edb3 inherit pub_methods_classethernet__packet"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a29151c42a4d2bbbec4909d7bed7592a6 inherit pub_methods_classethernet__packet"><td class="memItemLeft" align="right" valign="top">u_short </td><td class="memItemRight" valign="bottom"><a class="el" href="classethernet__packet.html#a29151c42a4d2bbbec4909d7bed7592a6">getEtherType</a> ()</td></tr>
- <tr class="memdesc:a29151c42a4d2bbbec4909d7bed7592a6 inherit pub_methods_classethernet__packet"><td class="mdescLeft"> </td><td class="mdescRight">Returns the Ethernet type. <a href="#a29151c42a4d2bbbec4909d7bed7592a6">More...</a><br /></td></tr>
- <tr class="separator:a29151c42a4d2bbbec4909d7bed7592a6 inherit pub_methods_classethernet__packet"><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>
- Private Attributes</h2></td></tr>
- <tr class="memitem:a4225b27fe714e0a321e1dd04355e5370"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4225b27fe714e0a321e1dd04355e5370"></a>
- string </td><td class="memItemRight" valign="bottom"><b>ip_src</b></td></tr>
- <tr class="separator:a4225b27fe714e0a321e1dd04355e5370"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:af3a920730b654dc7d26e155d509234fc"><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#af3a920730b654dc7d26e155d509234fc">ip_dst</a></td></tr>
- <tr class="separator:af3a920730b654dc7d26e155d509234fc"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a6d562e562de60c518542cd250d9986b0"><td class="memItemLeft" align="right" valign="top">char </td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#a6d562e562de60c518542cd250d9986b0">ip_p</a></td></tr>
- <tr class="separator:a6d562e562de60c518542cd250d9986b0"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a51f1c0f6cc53460164467a7e80d849b5"><td class="memItemLeft" align="right" valign="top">unsigned short </td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#a51f1c0f6cc53460164467a7e80d849b5">d_port</a></td></tr>
- <tr class="separator:a51f1c0f6cc53460164467a7e80d849b5"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a12b33dcaa7ab59d15f3ce4b8ca6750fd"><td class="memItemLeft" align="right" valign="top">unsigned short </td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#a12b33dcaa7ab59d15f3ce4b8ca6750fd">s_port</a></td></tr>
- <tr class="separator:a12b33dcaa7ab59d15f3ce4b8ca6750fd"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a68c32f352a4f43fd910fb3bba3ddfae0"><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classip__packet.html#a68c32f352a4f43fd910fb3bba3ddfae0">payload</a></td></tr>
- <tr class="separator:a68c32f352a4f43fd910fb3bba3ddfae0"><td class="memSeparator" colspan="2"> </td></tr>
- </table>
- <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
- <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>
- </div><h2 class="groupheader">Member Function Documentation</h2>
- <a class="anchor" id="a5396956d60ddb6a1bb1bd2f6f2b4751b"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">string ip_packet::getIPDAddress </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>Returns the destination IP address. </p>
- <dl class="section return"><dt>Returns</dt><dd>the destination IP address </dd></dl>
-
- </div>
- </div>
- <a class="anchor" id="a1a31307b3e7912ba3a1817041725660e"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">unsigned short ip_packet::getIPDPort </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>Returns the destination port. </p>
- <dl class="section return"><dt>Returns</dt><dd>the destination port</dd></dl>
- <p>Devuelve el puerto destino </p><dl class="section return"><dt>Returns</dt><dd>el puerto destino </dd></dl>
-
- </div>
- </div>
- <a class="anchor" id="a78e1e0e7d107ac449fe224d95bcbd999"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">char ip_packet::getIPProto </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>Returns the IP protocol type. </p>
- <dl class="section return"><dt>Returns</dt><dd>the IP protocol </dd></dl>
-
- </div>
- </div>
- <a class="anchor" id="ac4baa351e90aa90ee8bedd1239d24183"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">string ip_packet::getIPSAddress </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>Returns the source IP address. </p>
- <dl class="section return"><dt>Returns</dt><dd>the source IP address </dd></dl>
-
- </div>
- </div>
- <a class="anchor" id="a9697bad155ec10c25151a6c1f5a434b0"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">unsigned short ip_packet::getIPSPort </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>Returns the source port. </p>
- <dl class="section return"><dt>Returns</dt><dd>the source port</dd></dl>
- <p>Devuelve el puerto fuente </p><dl class="section return"><dt>Returns</dt><dd>el puerto fuente </dd></dl>
-
- </div>
- </div>
- <a class="anchor" id="a8b774913ecf9d9cda07dd088818ef481"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">string ip_packet::getPayload </td>
- <td>(</td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>Returns the IP packet payload. </p>
- <dl class="section return"><dt>Returns</dt><dd>the IP packet payload </dd></dl>
-
- </div>
- </div>
- <a class="anchor" id="a6083cc5d06be5bb11c266efbdd961f61"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void ip_packet::setIPDAddress </td>
- <td>(</td>
- <td class="paramtype">string </td>
- <td class="paramname"><em>addr</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>Saves the destination IP address in std string format. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">addr</td><td>destination IP address </td></tr>
- </table>
- </dd>
- </dl>
-
- </div>
- </div>
- <a class="anchor" id="a96103b6cecb324c633e5bd74fee281e2"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void ip_packet::setIPDPort </td>
- <td>(</td>
- <td class="paramtype">unsigned short </td>
- <td class="paramname"><em>port</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>Saves the destinaation port. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">port</td><td>destination port </td></tr>
- </table>
- </dd>
- </dl>
-
- </div>
- </div>
- <a class="anchor" id="a661b3d3c30388290ce4f479c6a00b38c"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void ip_packet::setIPProto </td>
- <td>(</td>
- <td class="paramtype">char </td>
- <td class="paramname"><em>proto</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>Saves the IP protocol to (TCP|UDP) </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">proto</td><td>protocol number (6 | 17) </td></tr>
- </table>
- </dd>
- </dl>
-
- </div>
- </div>
- <a class="anchor" id="a5542509eb012fbf4f831dfec39f27307"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void ip_packet::setIPSAddress </td>
- <td>(</td>
- <td class="paramtype">string </td>
- <td class="paramname"><em>addr</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>Saves the source IP address in std string format. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">addr</td><td>source IP address </td></tr>
- </table>
- </dd>
- </dl>
-
- </div>
- </div>
- <a class="anchor" id="a33ac2122569abba5eea67bd117e3790e"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void ip_packet::setIPSPort </td>
- <td>(</td>
- <td class="paramtype">unsigned short </td>
- <td class="paramname"><em>port</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
-
- <p>Saves the source port. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">port</td><td>source port </td></tr>
- </table>
- </dd>
- </dl>
-
- </div>
- </div>
- <a class="anchor" id="ac46158915c7d7a4a652ede4246fad8df"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void ip_packet::setPayload </td>
- <td>(</td>
- <td class="paramtype">char * </td>
- <td class="paramname"><em>pl</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>Saves the payload string of bytes into a string. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">pl</td><td>the packet payload </td></tr>
- <tr><td class="paramname">len</td><td>length of the payload </td></tr>
- </table>
- </dd>
- </dl>
-
- </div>
- </div>
- <h2 class="groupheader">Member Data Documentation</h2>
- <a class="anchor" id="a51f1c0f6cc53460164467a7e80d849b5"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">unsigned short ip_packet::d_port</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>destination port / puerto destino </p>
-
- </div>
- </div>
- <a class="anchor" id="af3a920730b654dc7d26e155d509234fc"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">string ip_packet::ip_dst</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>source and dest address / direccion fuente y destino </p>
-
- </div>
- </div>
- <a class="anchor" id="a6d562e562de60c518542cd250d9986b0"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">char ip_packet::ip_p</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>type of transport protocol (TCP|UDP) | tipo de protocolo de transporte (TCP|UDP) </p>
-
- </div>
- </div>
- <a class="anchor" id="a68c32f352a4f43fd910fb3bba3ddfae0"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">string ip_packet::payload</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>Data payload (content of the packet) / carga del paquete </p>
-
- </div>
- </div>
- <a class="anchor" id="a12b33dcaa7ab59d15f3ce4b8ca6750fd"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">unsigned short ip_packet::s_port</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>source port / puerto fuente </p>
-
- </div>
- </div>
- <hr/>The documentation for this class was generated from the following files:<ul>
- <li><a class="el" href="ip__packet_8h_source.html">ip_packet.h</a></li>
- <li>ip_packet.cpp</li>
- </ul>
- </div><!-- contents -->
- <!-- start footer part -->
- <hr class="footer"/><address class="footer"><small>
- Generated on Wed Jun 24 2015 15:25:12 for My Project by  <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>
|