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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. \hypertarget{classethernet__packet}{}\section{ethernet\+\_\+packet Class Reference}
  2. \label{classethernet__packet}\index{ethernet\+\_\+packet@{ethernet\+\_\+packet}}
  3. The \hyperlink{classethernet__packet}{ethernet\+\_\+packet} class contains function to change the ethernet information in bytes from the ethernet packet header to human readable data types (strings)
  4. {\ttfamily \#include $<$ethernet\+\_\+packet.\+h$>$}
  5. Inheritance diagram for ethernet\+\_\+packet\+:\begin{figure}[H]
  6. \begin{center}
  7. \leavevmode
  8. \includegraphics[height=2.000000cm]{classethernet__packet}
  9. \end{center}
  10. \end{figure}
  11. \subsection*{Public Member Functions}
  12. \begin{DoxyCompactItemize}
  13. \item
  14. \hypertarget{classethernet__packet_a4986a171f2710d2f7385adc9698be32c}{}\hyperlink{classethernet__packet_a4986a171f2710d2f7385adc9698be32c}{ethernet\+\_\+packet} ()\label{classethernet__packet_a4986a171f2710d2f7385adc9698be32c}
  15. \begin{DoxyCompactList}\small\item\em Constructor, does nothing. \end{DoxyCompactList}\item
  16. void \hyperlink{classethernet__packet_acd600b879a9ea2b3753680c5e8a3ef88}{set\+Ether\+D\+Host} (u\+\_\+char\mbox{[}$\,$\mbox{]})
  17. \begin{DoxyCompactList}\small\item\em Receives the array of 6 bytes of a destination host. \end{DoxyCompactList}\item
  18. void \hyperlink{classethernet__packet_aab9239c39e891929b316654b77ff9c38}{set\+Ether\+S\+Host} (u\+\_\+char\mbox{[}$\,$\mbox{]})
  19. \begin{DoxyCompactList}\small\item\em Receives the array of 6 bytes of a source host. \end{DoxyCompactList}\item
  20. void \hyperlink{classethernet__packet_ad42d30ecbabfbce466fbbf9153977fc8}{set\+Ether\+Type} (u\+\_\+short)
  21. \begin{DoxyCompactList}\small\item\em Set the Ethernet type. \end{DoxyCompactList}\item
  22. string \hyperlink{classethernet__packet_affa9f0bd4139a1b435e00401da1085f1}{get\+Ether\+D\+Host} ()
  23. \begin{DoxyCompactList}\small\item\em Returns the destination H\+A in string format. \end{DoxyCompactList}\item
  24. string \hyperlink{classethernet__packet_aa86115cbbf7baab794766ced8b27edb3}{get\+Ether\+S\+Host} ()
  25. \begin{DoxyCompactList}\small\item\em Returns the source H\+A in string format. \end{DoxyCompactList}\item
  26. u\+\_\+short \hyperlink{classethernet__packet_a29151c42a4d2bbbec4909d7bed7592a6}{get\+Ether\+Type} ()
  27. \begin{DoxyCompactList}\small\item\em Returns the Ethernet type. \end{DoxyCompactList}\end{DoxyCompactItemize}
  28. \subsection*{Private Member Functions}
  29. \begin{DoxyCompactItemize}
  30. \item
  31. string \hyperlink{classethernet__packet_aff594f99384a96d6ff8a8f844e351da2}{mac2string} (u\+\_\+char\mbox{[}$\,$\mbox{]})
  32. \begin{DoxyCompactList}\small\item\em Function to change the array of bytes representing a Hardware Address to its standard string representation. \end{DoxyCompactList}\end{DoxyCompactItemize}
  33. \subsection*{Private Attributes}
  34. \begin{DoxyCompactItemize}
  35. \item
  36. \hyperlink{structsniff__ethernet}{sniff\+\_\+ethernet} \hyperlink{classethernet__packet_a71a2378751dc74ccce67aec5c56c2db4}{ethernet}
  37. \end{DoxyCompactItemize}
  38. \subsection{Detailed Description}
  39. The \hyperlink{classethernet__packet}{ethernet\+\_\+packet} class contains function to change the ethernet information in bytes from the ethernet packet header to human readable data types (strings)
  40. \subsection{Member Function Documentation}
  41. \hypertarget{classethernet__packet_affa9f0bd4139a1b435e00401da1085f1}{}\index{ethernet\+\_\+packet@{ethernet\+\_\+packet}!get\+Ether\+D\+Host@{get\+Ether\+D\+Host}}
  42. \index{get\+Ether\+D\+Host@{get\+Ether\+D\+Host}!ethernet\+\_\+packet@{ethernet\+\_\+packet}}
  43. \subsubsection[{get\+Ether\+D\+Host}]{\setlength{\rightskip}{0pt plus 5cm}string ethernet\+\_\+packet\+::get\+Ether\+D\+Host (
  44. \begin{DoxyParamCaption}
  45. {}
  46. \end{DoxyParamCaption}
  47. )}\label{classethernet__packet_affa9f0bd4139a1b435e00401da1085f1}
  48. Returns the destination H\+A in string format.
  49. \begin{DoxyReturn}{Returns}
  50. the destination H\+A in string format
  51. \end{DoxyReturn}
  52. \hypertarget{classethernet__packet_aa86115cbbf7baab794766ced8b27edb3}{}\index{ethernet\+\_\+packet@{ethernet\+\_\+packet}!get\+Ether\+S\+Host@{get\+Ether\+S\+Host}}
  53. \index{get\+Ether\+S\+Host@{get\+Ether\+S\+Host}!ethernet\+\_\+packet@{ethernet\+\_\+packet}}
  54. \subsubsection[{get\+Ether\+S\+Host}]{\setlength{\rightskip}{0pt plus 5cm}string ethernet\+\_\+packet\+::get\+Ether\+S\+Host (
  55. \begin{DoxyParamCaption}
  56. {}
  57. \end{DoxyParamCaption}
  58. )}\label{classethernet__packet_aa86115cbbf7baab794766ced8b27edb3}
  59. Returns the source H\+A in string format.
  60. \begin{DoxyReturn}{Returns}
  61. the source H\+A in string format
  62. \end{DoxyReturn}
  63. \hypertarget{classethernet__packet_a29151c42a4d2bbbec4909d7bed7592a6}{}\index{ethernet\+\_\+packet@{ethernet\+\_\+packet}!get\+Ether\+Type@{get\+Ether\+Type}}
  64. \index{get\+Ether\+Type@{get\+Ether\+Type}!ethernet\+\_\+packet@{ethernet\+\_\+packet}}
  65. \subsubsection[{get\+Ether\+Type}]{\setlength{\rightskip}{0pt plus 5cm}u\+\_\+short ethernet\+\_\+packet\+::get\+Ether\+Type (
  66. \begin{DoxyParamCaption}
  67. {}
  68. \end{DoxyParamCaption}
  69. )}\label{classethernet__packet_a29151c42a4d2bbbec4909d7bed7592a6}
  70. Returns the Ethernet type.
  71. \begin{DoxyReturn}{Returns}
  72. the Ethernet type.
  73. \end{DoxyReturn}
  74. \hypertarget{classethernet__packet_aff594f99384a96d6ff8a8f844e351da2}{}\index{ethernet\+\_\+packet@{ethernet\+\_\+packet}!mac2string@{mac2string}}
  75. \index{mac2string@{mac2string}!ethernet\+\_\+packet@{ethernet\+\_\+packet}}
  76. \subsubsection[{mac2string}]{\setlength{\rightskip}{0pt plus 5cm}string ethernet\+\_\+packet\+::mac2string (
  77. \begin{DoxyParamCaption}
  78. \item[{u\+\_\+char}]{srcmac\mbox{[}$\,$\mbox{]}}
  79. \end{DoxyParamCaption}
  80. )\hspace{0.3cm}{\ttfamily [private]}}\label{classethernet__packet_aff594f99384a96d6ff8a8f844e351da2}
  81. Function to change the array of bytes representing a Hardware Address to its standard string representation.
  82. \begin{DoxyParams}{Parameters}
  83. {\em srcmac} & array with an Ethernet address \\
  84. \hline
  85. \end{DoxyParams}
  86. \begin{DoxyReturn}{Returns}
  87. Ethernet address in string format
  88. \end{DoxyReturn}
  89. \hypertarget{classethernet__packet_acd600b879a9ea2b3753680c5e8a3ef88}{}\index{ethernet\+\_\+packet@{ethernet\+\_\+packet}!set\+Ether\+D\+Host@{set\+Ether\+D\+Host}}
  90. \index{set\+Ether\+D\+Host@{set\+Ether\+D\+Host}!ethernet\+\_\+packet@{ethernet\+\_\+packet}}
  91. \subsubsection[{set\+Ether\+D\+Host}]{\setlength{\rightskip}{0pt plus 5cm}void ethernet\+\_\+packet\+::set\+Ether\+D\+Host (
  92. \begin{DoxyParamCaption}
  93. \item[{u\+\_\+char}]{dhost\mbox{[}$\,$\mbox{]}}
  94. \end{DoxyParamCaption}
  95. )}\label{classethernet__packet_acd600b879a9ea2b3753680c5e8a3ef88}
  96. Receives the array of 6 bytes of a destination host.
  97. \begin{DoxyParams}{Parameters}
  98. {\em dhost} & destination host Ethernet address \\
  99. \hline
  100. \end{DoxyParams}
  101. \hypertarget{classethernet__packet_aab9239c39e891929b316654b77ff9c38}{}\index{ethernet\+\_\+packet@{ethernet\+\_\+packet}!set\+Ether\+S\+Host@{set\+Ether\+S\+Host}}
  102. \index{set\+Ether\+S\+Host@{set\+Ether\+S\+Host}!ethernet\+\_\+packet@{ethernet\+\_\+packet}}
  103. \subsubsection[{set\+Ether\+S\+Host}]{\setlength{\rightskip}{0pt plus 5cm}void ethernet\+\_\+packet\+::set\+Ether\+S\+Host (
  104. \begin{DoxyParamCaption}
  105. \item[{u\+\_\+char}]{shost\mbox{[}$\,$\mbox{]}}
  106. \end{DoxyParamCaption}
  107. )}\label{classethernet__packet_aab9239c39e891929b316654b77ff9c38}
  108. Receives the array of 6 bytes of a source host.
  109. \begin{DoxyParams}{Parameters}
  110. {\em shost} & source host Ethernet address \\
  111. \hline
  112. \end{DoxyParams}
  113. \hypertarget{classethernet__packet_ad42d30ecbabfbce466fbbf9153977fc8}{}\index{ethernet\+\_\+packet@{ethernet\+\_\+packet}!set\+Ether\+Type@{set\+Ether\+Type}}
  114. \index{set\+Ether\+Type@{set\+Ether\+Type}!ethernet\+\_\+packet@{ethernet\+\_\+packet}}
  115. \subsubsection[{set\+Ether\+Type}]{\setlength{\rightskip}{0pt plus 5cm}void ethernet\+\_\+packet\+::set\+Ether\+Type (
  116. \begin{DoxyParamCaption}
  117. \item[{u\+\_\+short}]{type}
  118. \end{DoxyParamCaption}
  119. )}\label{classethernet__packet_ad42d30ecbabfbce466fbbf9153977fc8}
  120. Set the Ethernet type.
  121. \begin{DoxyParams}{Parameters}
  122. {\em type} & Ethernet type \\
  123. \hline
  124. \end{DoxyParams}
  125. \subsection{Member Data Documentation}
  126. \hypertarget{classethernet__packet_a71a2378751dc74ccce67aec5c56c2db4}{}\index{ethernet\+\_\+packet@{ethernet\+\_\+packet}!ethernet@{ethernet}}
  127. \index{ethernet@{ethernet}!ethernet\+\_\+packet@{ethernet\+\_\+packet}}
  128. \subsubsection[{ethernet}]{\setlength{\rightskip}{0pt plus 5cm}{\bf sniff\+\_\+ethernet} ethernet\+\_\+packet\+::ethernet\hspace{0.3cm}{\ttfamily [private]}}\label{classethernet__packet_a71a2378751dc74ccce67aec5c56c2db4}
  129. Ethernet header / encabezado Ethernet
  130. The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
  131. \item
  132. ethernet\+\_\+packet.\+h\item
  133. ethernet\+\_\+packet.\+cpp\end{DoxyCompactItemize}