<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\hypertarget{classethernet__packet}{}\section{ethernet\+\_\+packet Class Reference}
\label{classethernet__packet}\index{ethernet\+\_\+packet@{ethernet\+\_\+packet}}


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)  




{\ttfamily \#include $&lt;$ethernet\+\_\+packet.\+h$&gt;$}

Inheritance diagram for ethernet\+\_\+packet\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classethernet__packet}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classethernet__packet_a4986a171f2710d2f7385adc9698be32c}{}\hyperlink{classethernet__packet_a4986a171f2710d2f7385adc9698be32c}{ethernet\+\_\+packet} ()\label{classethernet__packet_a4986a171f2710d2f7385adc9698be32c}

\begin{DoxyCompactList}\small\item\em Constructor, does nothing. \end{DoxyCompactList}\item 
void \hyperlink{classethernet__packet_acd600b879a9ea2b3753680c5e8a3ef88}{set\+Ether\+D\+Host} (u\+\_\+char\mbox{[}$\,$\mbox{]})
\begin{DoxyCompactList}\small\item\em Receives the array of 6 bytes of a destination host. \end{DoxyCompactList}\item 
void \hyperlink{classethernet__packet_aab9239c39e891929b316654b77ff9c38}{set\+Ether\+S\+Host} (u\+\_\+char\mbox{[}$\,$\mbox{]})
\begin{DoxyCompactList}\small\item\em Receives the array of 6 bytes of a source host. \end{DoxyCompactList}\item 
void \hyperlink{classethernet__packet_ad42d30ecbabfbce466fbbf9153977fc8}{set\+Ether\+Type} (u\+\_\+short)
\begin{DoxyCompactList}\small\item\em Set the Ethernet type. \end{DoxyCompactList}\item 
string \hyperlink{classethernet__packet_affa9f0bd4139a1b435e00401da1085f1}{get\+Ether\+D\+Host} ()
\begin{DoxyCompactList}\small\item\em Returns the destination H\+A in string format. \end{DoxyCompactList}\item 
string \hyperlink{classethernet__packet_aa86115cbbf7baab794766ced8b27edb3}{get\+Ether\+S\+Host} ()
\begin{DoxyCompactList}\small\item\em Returns the source H\+A in string format. \end{DoxyCompactList}\item 
u\+\_\+short \hyperlink{classethernet__packet_a29151c42a4d2bbbec4909d7bed7592a6}{get\+Ether\+Type} ()
\begin{DoxyCompactList}\small\item\em Returns the Ethernet type. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
string \hyperlink{classethernet__packet_aff594f99384a96d6ff8a8f844e351da2}{mac2string} (u\+\_\+char\mbox{[}$\,$\mbox{]})
\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}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hyperlink{structsniff__ethernet}{sniff\+\_\+ethernet} \hyperlink{classethernet__packet_a71a2378751dc74ccce67aec5c56c2db4}{ethernet}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
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) 

\subsection{Member Function Documentation}
\hypertarget{classethernet__packet_affa9f0bd4139a1b435e00401da1085f1}{}\index{ethernet\+\_\+packet@{ethernet\+\_\+packet}!get\+Ether\+D\+Host@{get\+Ether\+D\+Host}}
\index{get\+Ether\+D\+Host@{get\+Ether\+D\+Host}!ethernet\+\_\+packet@{ethernet\+\_\+packet}}
\subsubsection[{get\+Ether\+D\+Host}]{\setlength{\rightskip}{0pt plus 5cm}string ethernet\+\_\+packet\+::get\+Ether\+D\+Host (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{classethernet__packet_affa9f0bd4139a1b435e00401da1085f1}


Returns the destination H\+A in string format. 

\begin{DoxyReturn}{Returns}
the destination H\+A in string format 
\end{DoxyReturn}
\hypertarget{classethernet__packet_aa86115cbbf7baab794766ced8b27edb3}{}\index{ethernet\+\_\+packet@{ethernet\+\_\+packet}!get\+Ether\+S\+Host@{get\+Ether\+S\+Host}}
\index{get\+Ether\+S\+Host@{get\+Ether\+S\+Host}!ethernet\+\_\+packet@{ethernet\+\_\+packet}}
\subsubsection[{get\+Ether\+S\+Host}]{\setlength{\rightskip}{0pt plus 5cm}string ethernet\+\_\+packet\+::get\+Ether\+S\+Host (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{classethernet__packet_aa86115cbbf7baab794766ced8b27edb3}


Returns the source H\+A in string format. 

\begin{DoxyReturn}{Returns}
the source H\+A in string format 
\end{DoxyReturn}
\hypertarget{classethernet__packet_a29151c42a4d2bbbec4909d7bed7592a6}{}\index{ethernet\+\_\+packet@{ethernet\+\_\+packet}!get\+Ether\+Type@{get\+Ether\+Type}}
\index{get\+Ether\+Type@{get\+Ether\+Type}!ethernet\+\_\+packet@{ethernet\+\_\+packet}}
\subsubsection[{get\+Ether\+Type}]{\setlength{\rightskip}{0pt plus 5cm}u\+\_\+short ethernet\+\_\+packet\+::get\+Ether\+Type (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{classethernet__packet_a29151c42a4d2bbbec4909d7bed7592a6}


Returns the Ethernet type. 

\begin{DoxyReturn}{Returns}
the Ethernet type. 
\end{DoxyReturn}
\hypertarget{classethernet__packet_aff594f99384a96d6ff8a8f844e351da2}{}\index{ethernet\+\_\+packet@{ethernet\+\_\+packet}!mac2string@{mac2string}}
\index{mac2string@{mac2string}!ethernet\+\_\+packet@{ethernet\+\_\+packet}}
\subsubsection[{mac2string}]{\setlength{\rightskip}{0pt plus 5cm}string ethernet\+\_\+packet\+::mac2string (
\begin{DoxyParamCaption}
\item[{u\+\_\+char}]{srcmac\mbox{[}$\,$\mbox{]}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [private]}}\label{classethernet__packet_aff594f99384a96d6ff8a8f844e351da2}


Function to change the array of bytes representing a Hardware Address to its standard string representation. 


\begin{DoxyParams}{Parameters}
{\em srcmac} &amp; array with an Ethernet address \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Ethernet address in string format 
\end{DoxyReturn}
\hypertarget{classethernet__packet_acd600b879a9ea2b3753680c5e8a3ef88}{}\index{ethernet\+\_\+packet@{ethernet\+\_\+packet}!set\+Ether\+D\+Host@{set\+Ether\+D\+Host}}
\index{set\+Ether\+D\+Host@{set\+Ether\+D\+Host}!ethernet\+\_\+packet@{ethernet\+\_\+packet}}
\subsubsection[{set\+Ether\+D\+Host}]{\setlength{\rightskip}{0pt plus 5cm}void ethernet\+\_\+packet\+::set\+Ether\+D\+Host (
\begin{DoxyParamCaption}
\item[{u\+\_\+char}]{dhost\mbox{[}$\,$\mbox{]}}
\end{DoxyParamCaption}
)}\label{classethernet__packet_acd600b879a9ea2b3753680c5e8a3ef88}


Receives the array of 6 bytes of a destination host. 


\begin{DoxyParams}{Parameters}
{\em dhost} &amp; destination host Ethernet address \\
\hline
\end{DoxyParams}
\hypertarget{classethernet__packet_aab9239c39e891929b316654b77ff9c38}{}\index{ethernet\+\_\+packet@{ethernet\+\_\+packet}!set\+Ether\+S\+Host@{set\+Ether\+S\+Host}}
\index{set\+Ether\+S\+Host@{set\+Ether\+S\+Host}!ethernet\+\_\+packet@{ethernet\+\_\+packet}}
\subsubsection[{set\+Ether\+S\+Host}]{\setlength{\rightskip}{0pt plus 5cm}void ethernet\+\_\+packet\+::set\+Ether\+S\+Host (
\begin{DoxyParamCaption}
\item[{u\+\_\+char}]{shost\mbox{[}$\,$\mbox{]}}
\end{DoxyParamCaption}
)}\label{classethernet__packet_aab9239c39e891929b316654b77ff9c38}


Receives the array of 6 bytes of a source host. 


\begin{DoxyParams}{Parameters}
{\em shost} &amp; source host Ethernet address \\
\hline
\end{DoxyParams}
\hypertarget{classethernet__packet_ad42d30ecbabfbce466fbbf9153977fc8}{}\index{ethernet\+\_\+packet@{ethernet\+\_\+packet}!set\+Ether\+Type@{set\+Ether\+Type}}
\index{set\+Ether\+Type@{set\+Ether\+Type}!ethernet\+\_\+packet@{ethernet\+\_\+packet}}
\subsubsection[{set\+Ether\+Type}]{\setlength{\rightskip}{0pt plus 5cm}void ethernet\+\_\+packet\+::set\+Ether\+Type (
\begin{DoxyParamCaption}
\item[{u\+\_\+short}]{type}
\end{DoxyParamCaption}
)}\label{classethernet__packet_ad42d30ecbabfbce466fbbf9153977fc8}


Set the Ethernet type. 


\begin{DoxyParams}{Parameters}
{\em type} &amp; Ethernet type \\
\hline
\end{DoxyParams}


\subsection{Member Data Documentation}
\hypertarget{classethernet__packet_a71a2378751dc74ccce67aec5c56c2db4}{}\index{ethernet\+\_\+packet@{ethernet\+\_\+packet}!ethernet@{ethernet}}
\index{ethernet@{ethernet}!ethernet\+\_\+packet@{ethernet\+\_\+packet}}
\subsubsection[{ethernet}]{\setlength{\rightskip}{0pt plus 5cm}{\bf sniff\+\_\+ethernet} ethernet\+\_\+packet\+::ethernet\hspace{0.3cm}{\ttfamily [private]}}\label{classethernet__packet_a71a2378751dc74ccce67aec5c56c2db4}
Ethernet header / encabezado Ethernet 

The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
ethernet\+\_\+packet.\+h\item 
ethernet\+\_\+packet.\+cpp\end{DoxyCompactItemize}
</pre></body></html>