Няма описание

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  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: ethernet_packet Class Reference</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. <!-- Generated by Doxygen 1.8.9.1 -->
  35. <script type="text/javascript">
  36. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  37. </script>
  38. <div id="navrow1" class="tabs">
  39. <ul class="tablist">
  40. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  41. <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
  42. <li><a href="files.html"><span>Files</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="Search" 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>Class&#160;List</span></a></li>
  64. <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
  65. <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
  66. <li><a href="functions.html"><span>Class&#160;Members</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">Public Member Functions</a> &#124;
  85. <a href="#pri-methods">Private Member Functions</a> &#124;
  86. <a href="#pri-attribs">Private Attributes</a> &#124;
  87. <a href="classethernet__packet-members.html">List of all members</a> </div>
  88. <div class="headertitle">
  89. <div class="title">ethernet_packet Class Reference</div> </div>
  90. </div><!--header-->
  91. <div class="contents">
  92. <p>The <a class="el" href="classethernet__packet.html" title="The ethernet_packet class contains function to change the ethernet information in bytes from the ethe...">ethernet_packet</a> class contains function to change the ethernet information in bytes from the ethernet packet header to human readable data types (strings)
  93. <a href="classethernet__packet.html#details">More...</a></p>
  94. <p><code>#include &lt;<a class="el" href="ethernet__packet_8h_source.html">ethernet_packet.h</a>&gt;</code></p>
  95. <div class="dynheader">
  96. Inheritance diagram for ethernet_packet:</div>
  97. <div class="dyncontent">
  98. <div class="center">
  99. <img src="classethernet__packet.png" usemap="#ethernet_packet_map" alt=""/>
  100. <map id="ethernet_packet_map" name="ethernet_packet_map">
  101. <area href="classip__packet.html" title="The ip_packet class contains the information extracted from a packet received using pcap for packets ..." alt="ip_packet" shape="rect" coords="0,56,102,80"/>
  102. </map>
  103. </div></div>
  104. <table class="memberdecls">
  105. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  106. Public Member Functions</h2></td></tr>
  107. <tr class="memitem:a4986a171f2710d2f7385adc9698be32c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4986a171f2710d2f7385adc9698be32c"></a>
  108. &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classethernet__packet.html#a4986a171f2710d2f7385adc9698be32c">ethernet_packet</a> ()</td></tr>
  109. <tr class="memdesc:a4986a171f2710d2f7385adc9698be32c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor, does nothing. <br /></td></tr>
  110. <tr class="separator:a4986a171f2710d2f7385adc9698be32c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  111. <tr class="memitem:acd600b879a9ea2b3753680c5e8a3ef88"><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>
  112. <tr class="memdesc:acd600b879a9ea2b3753680c5e8a3ef88"><td class="mdescLeft">&#160;</td><td class="mdescRight">Receives the array of 6 bytes of a destination host. <a href="#acd600b879a9ea2b3753680c5e8a3ef88">More...</a><br /></td></tr>
  113. <tr class="separator:acd600b879a9ea2b3753680c5e8a3ef88"><td class="memSeparator" colspan="2">&#160;</td></tr>
  114. <tr class="memitem:aab9239c39e891929b316654b77ff9c38"><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>
  115. <tr class="memdesc:aab9239c39e891929b316654b77ff9c38"><td class="mdescLeft">&#160;</td><td class="mdescRight">Receives the array of 6 bytes of a source host. <a href="#aab9239c39e891929b316654b77ff9c38">More...</a><br /></td></tr>
  116. <tr class="separator:aab9239c39e891929b316654b77ff9c38"><td class="memSeparator" colspan="2">&#160;</td></tr>
  117. <tr class="memitem:ad42d30ecbabfbce466fbbf9153977fc8"><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>
  118. <tr class="memdesc:ad42d30ecbabfbce466fbbf9153977fc8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the Ethernet type. <a href="#ad42d30ecbabfbce466fbbf9153977fc8">More...</a><br /></td></tr>
  119. <tr class="separator:ad42d30ecbabfbce466fbbf9153977fc8"><td class="memSeparator" colspan="2">&#160;</td></tr>
  120. <tr class="memitem:affa9f0bd4139a1b435e00401da1085f1"><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>
  121. <tr class="memdesc:affa9f0bd4139a1b435e00401da1085f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the destination HA in string format. <a href="#affa9f0bd4139a1b435e00401da1085f1">More...</a><br /></td></tr>
  122. <tr class="separator:affa9f0bd4139a1b435e00401da1085f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  123. <tr class="memitem:aa86115cbbf7baab794766ced8b27edb3"><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>
  124. <tr class="memdesc:aa86115cbbf7baab794766ced8b27edb3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the source HA in string format. <a href="#aa86115cbbf7baab794766ced8b27edb3">More...</a><br /></td></tr>
  125. <tr class="separator:aa86115cbbf7baab794766ced8b27edb3"><td class="memSeparator" colspan="2">&#160;</td></tr>
  126. <tr class="memitem:a29151c42a4d2bbbec4909d7bed7592a6"><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>
  127. <tr class="memdesc:a29151c42a4d2bbbec4909d7bed7592a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the Ethernet type. <a href="#a29151c42a4d2bbbec4909d7bed7592a6">More...</a><br /></td></tr>
  128. <tr class="separator:a29151c42a4d2bbbec4909d7bed7592a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
  129. </table><table class="memberdecls">
  130. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
  131. Private Member Functions</h2></td></tr>
  132. <tr class="memitem:aff594f99384a96d6ff8a8f844e351da2"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classethernet__packet.html#aff594f99384a96d6ff8a8f844e351da2">mac2string</a> (u_char[])</td></tr>
  133. <tr class="memdesc:aff594f99384a96d6ff8a8f844e351da2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to change the array of bytes representing a Hardware Address to its standard string representation. <a href="#aff594f99384a96d6ff8a8f844e351da2">More...</a><br /></td></tr>
  134. <tr class="separator:aff594f99384a96d6ff8a8f844e351da2"><td class="memSeparator" colspan="2">&#160;</td></tr>
  135. </table><table class="memberdecls">
  136. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
  137. Private Attributes</h2></td></tr>
  138. <tr class="memitem:a71a2378751dc74ccce67aec5c56c2db4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structsniff__ethernet.html">sniff_ethernet</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classethernet__packet.html#a71a2378751dc74ccce67aec5c56c2db4">ethernet</a></td></tr>
  139. <tr class="separator:a71a2378751dc74ccce67aec5c56c2db4"><td class="memSeparator" colspan="2">&#160;</td></tr>
  140. </table>
  141. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  142. <div class="textblock"><p>The <a class="el" href="classethernet__packet.html" title="The ethernet_packet class contains function to change the ethernet information in bytes from the ethe...">ethernet_packet</a> class contains function to change the ethernet information in bytes from the ethernet packet header to human readable data types (strings) </p>
  143. </div><h2 class="groupheader">Member Function Documentation</h2>
  144. <a class="anchor" id="affa9f0bd4139a1b435e00401da1085f1"></a>
  145. <div class="memitem">
  146. <div class="memproto">
  147. <table class="memname">
  148. <tr>
  149. <td class="memname">string ethernet_packet::getEtherDHost </td>
  150. <td>(</td>
  151. <td class="paramname"></td><td>)</td>
  152. <td></td>
  153. </tr>
  154. </table>
  155. </div><div class="memdoc">
  156. <p>Returns the destination HA in string format. </p>
  157. <dl class="section return"><dt>Returns</dt><dd>the destination HA in string format </dd></dl>
  158. </div>
  159. </div>
  160. <a class="anchor" id="aa86115cbbf7baab794766ced8b27edb3"></a>
  161. <div class="memitem">
  162. <div class="memproto">
  163. <table class="memname">
  164. <tr>
  165. <td class="memname">string ethernet_packet::getEtherSHost </td>
  166. <td>(</td>
  167. <td class="paramname"></td><td>)</td>
  168. <td></td>
  169. </tr>
  170. </table>
  171. </div><div class="memdoc">
  172. <p>Returns the source HA in string format. </p>
  173. <dl class="section return"><dt>Returns</dt><dd>the source HA in string format </dd></dl>
  174. </div>
  175. </div>
  176. <a class="anchor" id="a29151c42a4d2bbbec4909d7bed7592a6"></a>
  177. <div class="memitem">
  178. <div class="memproto">
  179. <table class="memname">
  180. <tr>
  181. <td class="memname">u_short ethernet_packet::getEtherType </td>
  182. <td>(</td>
  183. <td class="paramname"></td><td>)</td>
  184. <td></td>
  185. </tr>
  186. </table>
  187. </div><div class="memdoc">
  188. <p>Returns the Ethernet type. </p>
  189. <dl class="section return"><dt>Returns</dt><dd>the Ethernet type. </dd></dl>
  190. </div>
  191. </div>
  192. <a class="anchor" id="aff594f99384a96d6ff8a8f844e351da2"></a>
  193. <div class="memitem">
  194. <div class="memproto">
  195. <table class="mlabels">
  196. <tr>
  197. <td class="mlabels-left">
  198. <table class="memname">
  199. <tr>
  200. <td class="memname">string ethernet_packet::mac2string </td>
  201. <td>(</td>
  202. <td class="paramtype">u_char&#160;</td>
  203. <td class="paramname"><em>srcmac</em>[]</td><td>)</td>
  204. <td></td>
  205. </tr>
  206. </table>
  207. </td>
  208. <td class="mlabels-right">
  209. <span class="mlabels"><span class="mlabel">private</span></span> </td>
  210. </tr>
  211. </table>
  212. </div><div class="memdoc">
  213. <p>Function to change the array of bytes representing a Hardware Address to its standard string representation. </p>
  214. <dl class="params"><dt>Parameters</dt><dd>
  215. <table class="params">
  216. <tr><td class="paramname">srcmac</td><td>array with an Ethernet address </td></tr>
  217. </table>
  218. </dd>
  219. </dl>
  220. <dl class="section return"><dt>Returns</dt><dd>Ethernet address in string format </dd></dl>
  221. </div>
  222. </div>
  223. <a class="anchor" id="acd600b879a9ea2b3753680c5e8a3ef88"></a>
  224. <div class="memitem">
  225. <div class="memproto">
  226. <table class="memname">
  227. <tr>
  228. <td class="memname">void ethernet_packet::setEtherDHost </td>
  229. <td>(</td>
  230. <td class="paramtype">u_char&#160;</td>
  231. <td class="paramname"><em>dhost</em>[]</td><td>)</td>
  232. <td></td>
  233. </tr>
  234. </table>
  235. </div><div class="memdoc">
  236. <p>Receives the array of 6 bytes of a destination host. </p>
  237. <dl class="params"><dt>Parameters</dt><dd>
  238. <table class="params">
  239. <tr><td class="paramname">dhost</td><td>destination host Ethernet address </td></tr>
  240. </table>
  241. </dd>
  242. </dl>
  243. </div>
  244. </div>
  245. <a class="anchor" id="aab9239c39e891929b316654b77ff9c38"></a>
  246. <div class="memitem">
  247. <div class="memproto">
  248. <table class="memname">
  249. <tr>
  250. <td class="memname">void ethernet_packet::setEtherSHost </td>
  251. <td>(</td>
  252. <td class="paramtype">u_char&#160;</td>
  253. <td class="paramname"><em>shost</em>[]</td><td>)</td>
  254. <td></td>
  255. </tr>
  256. </table>
  257. </div><div class="memdoc">
  258. <p>Receives the array of 6 bytes of a source host. </p>
  259. <dl class="params"><dt>Parameters</dt><dd>
  260. <table class="params">
  261. <tr><td class="paramname">shost</td><td>source host Ethernet address </td></tr>
  262. </table>
  263. </dd>
  264. </dl>
  265. </div>
  266. </div>
  267. <a class="anchor" id="ad42d30ecbabfbce466fbbf9153977fc8"></a>
  268. <div class="memitem">
  269. <div class="memproto">
  270. <table class="memname">
  271. <tr>
  272. <td class="memname">void ethernet_packet::setEtherType </td>
  273. <td>(</td>
  274. <td class="paramtype">u_short&#160;</td>
  275. <td class="paramname"><em>type</em></td><td>)</td>
  276. <td></td>
  277. </tr>
  278. </table>
  279. </div><div class="memdoc">
  280. <p>Set the Ethernet type. </p>
  281. <dl class="params"><dt>Parameters</dt><dd>
  282. <table class="params">
  283. <tr><td class="paramname">type</td><td>Ethernet type </td></tr>
  284. </table>
  285. </dd>
  286. </dl>
  287. </div>
  288. </div>
  289. <h2 class="groupheader">Member Data Documentation</h2>
  290. <a class="anchor" id="a71a2378751dc74ccce67aec5c56c2db4"></a>
  291. <div class="memitem">
  292. <div class="memproto">
  293. <table class="mlabels">
  294. <tr>
  295. <td class="mlabels-left">
  296. <table class="memname">
  297. <tr>
  298. <td class="memname"><a class="el" href="structsniff__ethernet.html">sniff_ethernet</a> ethernet_packet::ethernet</td>
  299. </tr>
  300. </table>
  301. </td>
  302. <td class="mlabels-right">
  303. <span class="mlabels"><span class="mlabel">private</span></span> </td>
  304. </tr>
  305. </table>
  306. </div><div class="memdoc">
  307. <p>Ethernet header / encabezado Ethernet </p>
  308. </div>
  309. </div>
  310. <hr/>The documentation for this class was generated from the following files:<ul>
  311. <li><a class="el" href="ethernet__packet_8h_source.html">ethernet_packet.h</a></li>
  312. <li>ethernet_packet.cpp</li>
  313. </ul>
  314. </div><!-- contents -->
  315. <!-- start footer part -->
  316. <hr class="footer"/><address class="footer"><small>
  317. Generated on Wed Jun 24 2015 15:25:12 for My Project by &#160;<a href="http://www.doxygen.org/index.html">
  318. <img class="footer" src="doxygen.png" alt="doxygen"/>
  319. </a> 1.8.9.1
  320. </small></address>
  321. </body>
  322. </html>