Нема описа

class_packet.tex 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. \hypertarget{class_packet}{}\section{Packet Class Reference}
  2. \label{class_packet}\index{Packet@{Packet}}
  3. A class to represent packets.
  4. {\ttfamily \#include $<$packet.\+h$>$}
  5. \subsection*{Public Member Functions}
  6. \begin{DoxyCompactItemize}
  7. \item
  8. \hyperlink{class_packet_aabcfb963c0d5bc0fa554668f92989622}{Packet} ()
  9. \begin{DoxyCompactList}\small\item\em Default constructor. The properties of the packet are set as follows\+: \end{DoxyCompactList}\item
  10. \hyperlink{class_packet_a46516634a765e6fea19a4df08406adc8}{Packet} (string, string, int, int, int, int)
  11. \begin{DoxyCompactList}\small\item\em Constructor which accepts specification for sa(src\+\_\+addr), da(dst\+\_\+addr), sp(src\+\_\+port), dp(dst\+\_\+port), oct(octects) and pkt(packets) \end{DoxyCompactList}\item
  12. string \hyperlink{class_packet_a3e9aed01edd0023e97276041894c5c1f}{get\+Src\+Addr} ()
  13. \begin{DoxyCompactList}\small\item\em Getter for the source addr. \end{DoxyCompactList}\item
  14. string \hyperlink{class_packet_a092161eb22c1ff6ffa2eb9961d3868b0}{get\+Dst\+Addr} ()
  15. \begin{DoxyCompactList}\small\item\em Getter for the destination addr. \end{DoxyCompactList}\item
  16. int \hyperlink{class_packet_acf4fbcd48861393cbc96c6aeb9e5846f}{get\+Src\+Port} ()
  17. \begin{DoxyCompactList}\small\item\em Getter for the source port. \end{DoxyCompactList}\item
  18. int \hyperlink{class_packet_a92347c94882b6e5b3209cc70ea0d77b5}{get\+Dst\+Port} ()
  19. \begin{DoxyCompactList}\small\item\em Getter for the destination port. \end{DoxyCompactList}\item
  20. \hypertarget{class_packet_acd8d06afbd5a289a8b92e02d0cf72cc1}{}int {\bfseries get\+Octects} ()\label{class_packet_acd8d06afbd5a289a8b92e02d0cf72cc1}
  21. \item
  22. int \hyperlink{class_packet_a6ee74fd953f6d57d56e48a596d897f05}{get\+Packets} ()
  23. \begin{DoxyCompactList}\small\item\em Getter for the packets. \end{DoxyCompactList}\item
  24. void \hyperlink{class_packet_a8c939968eb35f357884900bf8794a3d7}{set\+Src\+Addr} (string)
  25. \begin{DoxyCompactList}\small\item\em Setter for the src\+\_\+addr. \end{DoxyCompactList}\item
  26. void \hyperlink{class_packet_acaa3e1703fe14b9a39d4c4426453e65c}{set\+Dst\+Addr} (string)
  27. \begin{DoxyCompactList}\small\item\em Setter for the destination addr. \end{DoxyCompactList}\item
  28. void \hyperlink{class_packet_a9844970ffe7eb2ecf6e2407a39f04807}{set\+Src\+Port} (int)
  29. \begin{DoxyCompactList}\small\item\em Setter for the source port. \end{DoxyCompactList}\item
  30. void \hyperlink{class_packet_ab51c81cc6958913652b3fe5316ec6af3}{set\+Dst\+Port} (int)
  31. \begin{DoxyCompactList}\small\item\em Setter for the destination port. \end{DoxyCompactList}\item
  32. \hypertarget{class_packet_adc6e90455b92f776ec7583d5e62b50d7}{}void {\bfseries set\+Octects} (int)\label{class_packet_adc6e90455b92f776ec7583d5e62b50d7}
  33. \item
  34. void \hyperlink{class_packet_acfb4620179dba167031a8e8b1cad0c25}{set\+Packets} (int)
  35. \begin{DoxyCompactList}\small\item\em Setter for the packets value. \end{DoxyCompactList}\item
  36. \hypertarget{class_packet_a5b57162c18731c0186027f450670d14e}{}void \hyperlink{class_packet_a5b57162c18731c0186027f450670d14e}{enable} ()\label{class_packet_a5b57162c18731c0186027f450670d14e}
  37. \begin{DoxyCompactList}\small\item\em Sets that the packet is enabled to be displayed in G\+U\+I. \end{DoxyCompactList}\item
  38. \hypertarget{class_packet_a0c16d1f66f1fd8c99e9e760cf2ce07f2}{}void \hyperlink{class_packet_a0c16d1f66f1fd8c99e9e760cf2ce07f2}{disable} ()\label{class_packet_a0c16d1f66f1fd8c99e9e760cf2ce07f2}
  39. \begin{DoxyCompactList}\small\item\em Sets that the packet is disabled to be displayed in G\+U\+I. \end{DoxyCompactList}\item
  40. \hypertarget{class_packet_a3c92559f89a09cd5790e8ab5171b509f}{}bool {\bfseries is\+Enabled} ()\label{class_packet_a3c92559f89a09cd5790e8ab5171b509f}
  41. \end{DoxyCompactItemize}
  42. \subsection*{Private Attributes}
  43. \begin{DoxyCompactItemize}
  44. \item
  45. string \hyperlink{class_packet_ad22856878226959be10e1a024e3446cc}{src\+\_\+addr}
  46. \item
  47. string \hyperlink{class_packet_a4a1c8c11292c6116e393245fbfad00b7}{dst\+\_\+addr}
  48. \item
  49. int \hyperlink{class_packet_a191dd835177b18f84fd64596249008cc}{src\+\_\+port}
  50. \item
  51. int \hyperlink{class_packet_ae8a78379783d1a2795318ca9118e77e3}{dst\+\_\+port}
  52. \item
  53. int \hyperlink{class_packet_a3dfcef408535f5e7ecdb3ef6bc3e9654}{octects}
  54. \item
  55. int \hyperlink{class_packet_abe4ea1613634961b78de7c609b1f0c75}{packets}
  56. \item
  57. bool \hyperlink{class_packet_a72dbd5f3d8e2f802ebb4173c64495cda}{enabled}
  58. \end{DoxyCompactItemize}
  59. \subsection{Detailed Description}
  60. A class to represent packets.
  61. The class contains two constructurs and various functions for searching and filtering network flow packets.
  62. \subsection{Constructor \& Destructor Documentation}
  63. \hypertarget{class_packet_aabcfb963c0d5bc0fa554668f92989622}{}\index{Packet@{Packet}!Packet@{Packet}}
  64. \index{Packet@{Packet}!Packet@{Packet}}
  65. \subsubsection[{Packet}]{\setlength{\rightskip}{0pt plus 5cm}Packet\+::\+Packet (
  66. \begin{DoxyParamCaption}
  67. {}
  68. \end{DoxyParamCaption}
  69. )}\label{class_packet_aabcfb963c0d5bc0fa554668f92989622}
  70. Default constructor. The properties of the packet are set as follows\+:
  71. \begin{DoxyItemize}
  72. \item src\+\_\+addr\+: set to the empty string.
  73. \item dst\+\_\+addr\+: set to the empty string.
  74. \item src\+\_\+port\+: set to 0.
  75. \item dst\+\_\+port\+: set to 0.
  76. \item octects\+: set to 0.
  77. \item packets\+: set to 0.
  78. \item enabled\+: set to false.
  79. \end{DoxyItemize}\hypertarget{class_packet_a46516634a765e6fea19a4df08406adc8}{}\index{Packet@{Packet}!Packet@{Packet}}
  80. \index{Packet@{Packet}!Packet@{Packet}}
  81. \subsubsection[{Packet}]{\setlength{\rightskip}{0pt plus 5cm}Packet\+::\+Packet (
  82. \begin{DoxyParamCaption}
  83. \item[{string}]{sa, }
  84. \item[{string}]{da, }
  85. \item[{int}]{sp, }
  86. \item[{int}]{dp, }
  87. \item[{int}]{oct, }
  88. \item[{int}]{pkt}
  89. \end{DoxyParamCaption}
  90. )}\label{class_packet_a46516634a765e6fea19a4df08406adc8}
  91. Constructor which accepts specification for sa(src\+\_\+addr), da(dst\+\_\+addr), sp(src\+\_\+port), dp(dst\+\_\+port), oct(octects) and pkt(packets)
  92. \begin{DoxyParams}{Parameters}
  93. {\em sa} & source address \\
  94. \hline
  95. {\em da} & destination address \\
  96. \hline
  97. {\em sp} & source port \\
  98. \hline
  99. {\em dp} & destination port \\
  100. \hline
  101. {\em oct} & octects \\
  102. \hline
  103. {\em pkt} & packets \\
  104. \hline
  105. \end{DoxyParams}
  106. \subsection{Member Function Documentation}
  107. \hypertarget{class_packet_a092161eb22c1ff6ffa2eb9961d3868b0}{}\index{Packet@{Packet}!get\+Dst\+Addr@{get\+Dst\+Addr}}
  108. \index{get\+Dst\+Addr@{get\+Dst\+Addr}!Packet@{Packet}}
  109. \subsubsection[{get\+Dst\+Addr}]{\setlength{\rightskip}{0pt plus 5cm}string Packet\+::get\+Dst\+Addr (
  110. \begin{DoxyParamCaption}
  111. {}
  112. \end{DoxyParamCaption}
  113. )}\label{class_packet_a092161eb22c1ff6ffa2eb9961d3868b0}
  114. Getter for the destination addr.
  115. \begin{DoxyReturn}{Returns}
  116. dst address
  117. \end{DoxyReturn}
  118. \hypertarget{class_packet_a92347c94882b6e5b3209cc70ea0d77b5}{}\index{Packet@{Packet}!get\+Dst\+Port@{get\+Dst\+Port}}
  119. \index{get\+Dst\+Port@{get\+Dst\+Port}!Packet@{Packet}}
  120. \subsubsection[{get\+Dst\+Port}]{\setlength{\rightskip}{0pt plus 5cm}string Packet\+::get\+Dst\+Port (
  121. \begin{DoxyParamCaption}
  122. {}
  123. \end{DoxyParamCaption}
  124. )}\label{class_packet_a92347c94882b6e5b3209cc70ea0d77b5}
  125. Getter for the destination port.
  126. \begin{DoxyReturn}{Returns}
  127. dst port
  128. \end{DoxyReturn}
  129. \hypertarget{class_packet_a6ee74fd953f6d57d56e48a596d897f05}{}\index{Packet@{Packet}!get\+Packets@{get\+Packets}}
  130. \index{get\+Packets@{get\+Packets}!Packet@{Packet}}
  131. \subsubsection[{get\+Packets}]{\setlength{\rightskip}{0pt plus 5cm}string Packet\+::get\+Packets (
  132. \begin{DoxyParamCaption}
  133. {}
  134. \end{DoxyParamCaption}
  135. )}\label{class_packet_a6ee74fd953f6d57d56e48a596d897f05}
  136. Getter for the packets.
  137. \begin{DoxyReturn}{Returns}
  138. packets
  139. \end{DoxyReturn}
  140. \hypertarget{class_packet_a3e9aed01edd0023e97276041894c5c1f}{}\index{Packet@{Packet}!get\+Src\+Addr@{get\+Src\+Addr}}
  141. \index{get\+Src\+Addr@{get\+Src\+Addr}!Packet@{Packet}}
  142. \subsubsection[{get\+Src\+Addr}]{\setlength{\rightskip}{0pt plus 5cm}string Packet\+::get\+Src\+Addr (
  143. \begin{DoxyParamCaption}
  144. {}
  145. \end{DoxyParamCaption}
  146. )}\label{class_packet_a3e9aed01edd0023e97276041894c5c1f}
  147. Getter for the source addr.
  148. \begin{DoxyReturn}{Returns}
  149. src address
  150. \end{DoxyReturn}
  151. \hypertarget{class_packet_acf4fbcd48861393cbc96c6aeb9e5846f}{}\index{Packet@{Packet}!get\+Src\+Port@{get\+Src\+Port}}
  152. \index{get\+Src\+Port@{get\+Src\+Port}!Packet@{Packet}}
  153. \subsubsection[{get\+Src\+Port}]{\setlength{\rightskip}{0pt plus 5cm}string Packet\+::get\+Src\+Port (
  154. \begin{DoxyParamCaption}
  155. {}
  156. \end{DoxyParamCaption}
  157. )}\label{class_packet_acf4fbcd48861393cbc96c6aeb9e5846f}
  158. Getter for the source port.
  159. \begin{DoxyReturn}{Returns}
  160. src port
  161. \end{DoxyReturn}
  162. \hypertarget{class_packet_acaa3e1703fe14b9a39d4c4426453e65c}{}\index{Packet@{Packet}!set\+Dst\+Addr@{set\+Dst\+Addr}}
  163. \index{set\+Dst\+Addr@{set\+Dst\+Addr}!Packet@{Packet}}
  164. \subsubsection[{set\+Dst\+Addr}]{\setlength{\rightskip}{0pt plus 5cm}void Packet\+::set\+Dst\+Addr (
  165. \begin{DoxyParamCaption}
  166. \item[{string}]{addr}
  167. \end{DoxyParamCaption}
  168. )}\label{class_packet_acaa3e1703fe14b9a39d4c4426453e65c}
  169. Setter for the destination addr.
  170. \begin{DoxyParams}{Parameters}
  171. {\em addr} & destination address \\
  172. \hline
  173. \end{DoxyParams}
  174. \hypertarget{class_packet_ab51c81cc6958913652b3fe5316ec6af3}{}\index{Packet@{Packet}!set\+Dst\+Port@{set\+Dst\+Port}}
  175. \index{set\+Dst\+Port@{set\+Dst\+Port}!Packet@{Packet}}
  176. \subsubsection[{set\+Dst\+Port}]{\setlength{\rightskip}{0pt plus 5cm}void Packet\+::set\+Dst\+Port (
  177. \begin{DoxyParamCaption}
  178. \item[{int}]{port}
  179. \end{DoxyParamCaption}
  180. )}\label{class_packet_ab51c81cc6958913652b3fe5316ec6af3}
  181. Setter for the destination port.
  182. \begin{DoxyParams}{Parameters}
  183. {\em port} & destination port \\
  184. \hline
  185. \end{DoxyParams}
  186. \hypertarget{class_packet_acfb4620179dba167031a8e8b1cad0c25}{}\index{Packet@{Packet}!set\+Packets@{set\+Packets}}
  187. \index{set\+Packets@{set\+Packets}!Packet@{Packet}}
  188. \subsubsection[{set\+Packets}]{\setlength{\rightskip}{0pt plus 5cm}void Packet\+::set\+Packets (
  189. \begin{DoxyParamCaption}
  190. \item[{int}]{val}
  191. \end{DoxyParamCaption}
  192. )}\label{class_packet_acfb4620179dba167031a8e8b1cad0c25}
  193. Setter for the packets value.
  194. \begin{DoxyParams}{Parameters}
  195. {\em val} & packets \\
  196. \hline
  197. \end{DoxyParams}
  198. \hypertarget{class_packet_a8c939968eb35f357884900bf8794a3d7}{}\index{Packet@{Packet}!set\+Src\+Addr@{set\+Src\+Addr}}
  199. \index{set\+Src\+Addr@{set\+Src\+Addr}!Packet@{Packet}}
  200. \subsubsection[{set\+Src\+Addr}]{\setlength{\rightskip}{0pt plus 5cm}void Packet\+::set\+Src\+Addr (
  201. \begin{DoxyParamCaption}
  202. \item[{string}]{addr}
  203. \end{DoxyParamCaption}
  204. )}\label{class_packet_a8c939968eb35f357884900bf8794a3d7}
  205. Setter for the src\+\_\+addr.
  206. \begin{DoxyParams}{Parameters}
  207. {\em addr} & source address \\
  208. \hline
  209. \end{DoxyParams}
  210. \hypertarget{class_packet_a9844970ffe7eb2ecf6e2407a39f04807}{}\index{Packet@{Packet}!set\+Src\+Port@{set\+Src\+Port}}
  211. \index{set\+Src\+Port@{set\+Src\+Port}!Packet@{Packet}}
  212. \subsubsection[{set\+Src\+Port}]{\setlength{\rightskip}{0pt plus 5cm}void Packet\+::set\+Src\+Port (
  213. \begin{DoxyParamCaption}
  214. \item[{int}]{port}
  215. \end{DoxyParamCaption}
  216. )}\label{class_packet_a9844970ffe7eb2ecf6e2407a39f04807}
  217. Setter for the source port.
  218. \begin{DoxyParams}{Parameters}
  219. {\em port} & source port \\
  220. \hline
  221. \end{DoxyParams}
  222. \subsection{Member Data Documentation}
  223. \hypertarget{class_packet_a4a1c8c11292c6116e393245fbfad00b7}{}\index{Packet@{Packet}!dst\+\_\+addr@{dst\+\_\+addr}}
  224. \index{dst\+\_\+addr@{dst\+\_\+addr}!Packet@{Packet}}
  225. \subsubsection[{dst\+\_\+addr}]{\setlength{\rightskip}{0pt plus 5cm}string Packet\+::dst\+\_\+addr\hspace{0.3cm}{\ttfamily [private]}}\label{class_packet_a4a1c8c11292c6116e393245fbfad00b7}
  226. dst\+\_\+addr destination address (direccion destino) \hypertarget{class_packet_ae8a78379783d1a2795318ca9118e77e3}{}\index{Packet@{Packet}!dst\+\_\+port@{dst\+\_\+port}}
  227. \index{dst\+\_\+port@{dst\+\_\+port}!Packet@{Packet}}
  228. \subsubsection[{dst\+\_\+port}]{\setlength{\rightskip}{0pt plus 5cm}int Packet\+::dst\+\_\+port\hspace{0.3cm}{\ttfamily [private]}}\label{class_packet_ae8a78379783d1a2795318ca9118e77e3}
  229. dst\+\_\+port destination port (puerto destino) \hypertarget{class_packet_a72dbd5f3d8e2f802ebb4173c64495cda}{}\index{Packet@{Packet}!enabled@{enabled}}
  230. \index{enabled@{enabled}!Packet@{Packet}}
  231. \subsubsection[{enabled}]{\setlength{\rightskip}{0pt plus 5cm}bool Packet\+::enabled\hspace{0.3cm}{\ttfamily [private]}}\label{class_packet_a72dbd5f3d8e2f802ebb4173c64495cda}
  232. enabled in the G\+U\+I (disponible en el G\+U\+I) \hypertarget{class_packet_a3dfcef408535f5e7ecdb3ef6bc3e9654}{}\index{Packet@{Packet}!octects@{octects}}
  233. \index{octects@{octects}!Packet@{Packet}}
  234. \subsubsection[{octects}]{\setlength{\rightskip}{0pt plus 5cm}int Packet\+::octects\hspace{0.3cm}{\ttfamily [private]}}\label{class_packet_a3dfcef408535f5e7ecdb3ef6bc3e9654}
  235. octets/bytes value (octetos) \hypertarget{class_packet_abe4ea1613634961b78de7c609b1f0c75}{}\index{Packet@{Packet}!packets@{packets}}
  236. \index{packets@{packets}!Packet@{Packet}}
  237. \subsubsection[{packets}]{\setlength{\rightskip}{0pt plus 5cm}int Packet\+::packets\hspace{0.3cm}{\ttfamily [private]}}\label{class_packet_abe4ea1613634961b78de7c609b1f0c75}
  238. packets value (paquetes) \hypertarget{class_packet_ad22856878226959be10e1a024e3446cc}{}\index{Packet@{Packet}!src\+\_\+addr@{src\+\_\+addr}}
  239. \index{src\+\_\+addr@{src\+\_\+addr}!Packet@{Packet}}
  240. \subsubsection[{src\+\_\+addr}]{\setlength{\rightskip}{0pt plus 5cm}string Packet\+::src\+\_\+addr\hspace{0.3cm}{\ttfamily [private]}}\label{class_packet_ad22856878226959be10e1a024e3446cc}
  241. src\+\_\+addr source address (direccion fuente) \hypertarget{class_packet_a191dd835177b18f84fd64596249008cc}{}\index{Packet@{Packet}!src\+\_\+port@{src\+\_\+port}}
  242. \index{src\+\_\+port@{src\+\_\+port}!Packet@{Packet}}
  243. \subsubsection[{src\+\_\+port}]{\setlength{\rightskip}{0pt plus 5cm}int Packet\+::src\+\_\+port\hspace{0.3cm}{\ttfamily [private]}}\label{class_packet_a191dd835177b18f84fd64596249008cc}
  244. src\+\_\+port source port (puerto fuente)
  245. The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
  246. \item
  247. packet.\+h\item
  248. packet.\+cpp\end{DoxyCompactItemize}