\hypertarget{classTestRawLink}{
\section{TestRawLink Class Reference}
\label{classTestRawLink}\index{TestRawLink@{TestRawLink}}
}
Inheritance diagram for TestRawLink:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classTestRawLink}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classTestRawLink_aea78eb69e6c6cc099e3c4bc979701076}{
{\bfseries TestRawLink} (\hyperlink{classEventLoop}{EventLoop} \&e, const string \&fea\_\-target\_\-name, \hyperlink{classIPv4}{IPv4} finder\_\-host, uint16\_\-t finder\_\-port, const string \&ifname, const string \&vifname, const \hyperlink{classMac}{Mac} \&src, bool is\_\-sender)}
\label{classTestRawLink_aea78eb69e6c6cc099e3c4bc979701076}

\item 
\hypertarget{classTestRawLink_ae5a6c2df166f98d3f93f9efbe505976e}{
uint32\_\-t {\bfseries bytes\_\-received} () const }
\label{classTestRawLink_ae5a6c2df166f98d3f93f9efbe505976e}

\item 
\hypertarget{classTestRawLink_a42acfca7ec7c4ba68d3532ab54e357db}{
uint32\_\-t {\bfseries bytes\_\-sent} () const }
\label{classTestRawLink_a42acfca7ec7c4ba68d3532ab54e357db}

\item 
\hypertarget{classTestRawLink_a4742a2a33ddfc261d54945b52ff5e94a}{
uint32\_\-t {\bfseries packets\_\-received} () const }
\label{classTestRawLink_a4742a2a33ddfc261d54945b52ff5e94a}

\item 
\hypertarget{classTestRawLink_aa7367320fba80c4a7d81c598ee9de843}{
uint32\_\-t {\bfseries packets\_\-sent} () const }
\label{classTestRawLink_aa7367320fba80c4a7d81c598ee9de843}

\item 
\hypertarget{classTestRawLink_acbdb1fa4c29ec7281cf2e5661d19f17a}{
uint32\_\-t {\bfseries xrl\_\-errors} () const }
\label{classTestRawLink_acbdb1fa4c29ec7281cf2e5661d19f17a}

\item 
\hypertarget{classTestRawLink_adcb4afa86cbb70787697207ad58fe9e4}{
bool {\bfseries unregistered} () const }
\label{classTestRawLink_adcb4afa86cbb70787697207ad58fe9e4}

\item 
bool \hyperlink{classTestRawLink_a2fd709e94944df88dcf0a6100a875fe3}{register\_\-link} ()
\begin{DoxyCompactList}\small\item\em Bind to interface. \item\end{DoxyCompactList}\item 
bool \hyperlink{classTestRawLink_ae6c38630d03581e1ac51184b6793aff4}{unregister\_\-link} ()
\begin{DoxyCompactList}\small\item\em Request closure of link. \item\end{DoxyCompactList}\item 
void \hyperlink{classTestRawLink_ac33c6fb60869e0138209d94a9af6580c}{start\_\-sending} (const \hyperlink{classMac}{Mac} \&dest, uint32\_\-t bytes, uint32\_\-t ipg\_\-ms)
\begin{DoxyCompactList}\small\item\em Start sending packets. \item\end{DoxyCompactList}\item 
\hypertarget{classTestRawLink_a69705de92df0b0c1d270b6ef717121fb}{
void \hyperlink{classTestRawLink_a69705de92df0b0c1d270b6ef717121fb}{stop\_\-sending} ()}
\label{classTestRawLink_a69705de92df0b0c1d270b6ef717121fb}

\begin{DoxyCompactList}\small\item\em Stop sending packets. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classTestRawLink_a32acda1b9e92c7c25d0c298155d0f8da}{
bool {\bfseries send\_\-data} (\hyperlink{classMac}{Mac} dest, uint32\_\-t bytes)}
\label{classTestRawLink_a32acda1b9e92c7c25d0c298155d0f8da}

\item 
\hypertarget{classTestRawLink_a33dd86530d2531694501386376384010}{
void {\bfseries send\_\-data\_\-cb} (const \hyperlink{classXrlError}{XrlError} \&e)}
\label{classTestRawLink_a33dd86530d2531694501386376384010}

\item 
\hypertarget{classTestRawLink_a49d5d3a8ac55afe78d57bdb19ed5e199}{
void {\bfseries register\_\-cb} (const \hyperlink{classXrlError}{XrlError} \&e)}
\label{classTestRawLink_a49d5d3a8ac55afe78d57bdb19ed5e199}

\item 
\hypertarget{classTestRawLink_a725c136860fc45a902c00743c10bb4b8}{
void {\bfseries unregister\_\-cb} (const \hyperlink{classXrlError}{XrlError} \&e)}
\label{classTestRawLink_a725c136860fc45a902c00743c10bb4b8}

\item 
\hyperlink{structXrlCmdError}{XrlCmdError} \hyperlink{classTestRawLink_ac3f4936f85ac557565b3a3e867e1a53f}{common\_\-0\_\-1\_\-get\_\-target\_\-name} (string \&name)
\begin{DoxyCompactList}\small\item\em Pure-\/virtual function that needs to be implemented to: \item\end{DoxyCompactList}\item 
\hyperlink{structXrlCmdError}{XrlCmdError} \hyperlink{classTestRawLink_a02ffdf9d2a63cfe7fbaea2dad2244236}{common\_\-0\_\-1\_\-get\_\-version} (string \&version)
\begin{DoxyCompactList}\small\item\em Pure-\/virtual function that needs to be implemented to: \item\end{DoxyCompactList}\item 
\hyperlink{structXrlCmdError}{XrlCmdError} \hyperlink{classTestRawLink_ad35a89cb0b2b4375ad94ff3cc0cb124c}{common\_\-0\_\-1\_\-get\_\-status} (uint32\_\-t \&status, string \&reason)
\begin{DoxyCompactList}\small\item\em Pure-\/virtual function that needs to be implemented to: \item\end{DoxyCompactList}\item 
\hyperlink{structXrlCmdError}{XrlCmdError} \hyperlink{classTestRawLink_a2172d3fb8744bee1391ed06395c32505}{common\_\-0\_\-1\_\-shutdown} ()
\begin{DoxyCompactList}\small\item\em Pure-\/virtual function that needs to be implemented to: \item\end{DoxyCompactList}\item 
\hyperlink{structXrlCmdError}{XrlCmdError} \hyperlink{classTestRawLink_aa235261382ca5a8efedadea7b41eca53}{raw\_\-link\_\-client\_\-0\_\-1\_\-recv} (const string \&if\_\-name, const string \&vif\_\-name, const \hyperlink{classMac}{Mac} \&src\_\-address, const \hyperlink{classMac}{Mac} \&dst\_\-address, const uint32\_\-t \&ether\_\-type, const vector$<$ uint8\_\-t $>$ \&payload)
\begin{DoxyCompactList}\small\item\em Receive a raw link-\/level packet on an interface. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classTestRawLink_a9a8dc357fce7ee1a03d30327f496cd45}{
\hyperlink{classEventLoop}{EventLoop} \& {\bfseries \_\-e}}
\label{classTestRawLink_a9a8dc357fce7ee1a03d30327f496cd45}

\item 
\hypertarget{classTestRawLink_af0fd8a6fc377ce7b53e163e9888c41bf}{
\hyperlink{classXrlRouter}{XrlRouter} $\ast$ {\bfseries \_\-r}}
\label{classTestRawLink_af0fd8a6fc377ce7b53e163e9888c41bf}

\item 
\hypertarget{classTestRawLink_a465d386f1a74503d7403d1f2e2473c81}{
string {\bfseries \_\-fea\_\-target\_\-name}}
\label{classTestRawLink_a465d386f1a74503d7403d1f2e2473c81}

\item 
\hypertarget{classTestRawLink_a3622f1cc71a04821a11ae18a0e58eb7e}{
string {\bfseries \_\-ifname}}
\label{classTestRawLink_a3622f1cc71a04821a11ae18a0e58eb7e}

\item 
\hypertarget{classTestRawLink_af8a5b841049d31a406e9b6b80afbb73e}{
string {\bfseries \_\-vifname}}
\label{classTestRawLink_af8a5b841049d31a406e9b6b80afbb73e}

\item 
\hypertarget{classTestRawLink_a2caa18d4a3febe4650f61ebb492d8a5a}{
\hyperlink{classMac}{Mac} {\bfseries \_\-src}}
\label{classTestRawLink_a2caa18d4a3febe4650f61ebb492d8a5a}

\item 
\hypertarget{classTestRawLink_a75806c7dd2cf12942253d227e7c92ac1}{
bool {\bfseries \_\-is\_\-sender}}
\label{classTestRawLink_a75806c7dd2cf12942253d227e7c92ac1}

\item 
\hypertarget{classTestRawLink_ab7a6c531371cd83b69a11e598118f4dc}{
uint32\_\-t {\bfseries \_\-p\_\-snd}}
\label{classTestRawLink_ab7a6c531371cd83b69a11e598118f4dc}

\item 
\hypertarget{classTestRawLink_ab0179f7c4b55666314c74ed37217523e}{
uint32\_\-t {\bfseries \_\-p\_\-rcv}}
\label{classTestRawLink_ab0179f7c4b55666314c74ed37217523e}

\item 
\hypertarget{classTestRawLink_a8d33be002fc629cd2aa96e3f7fbf48a2}{
uint32\_\-t {\bfseries \_\-b\_\-snd}}
\label{classTestRawLink_a8d33be002fc629cd2aa96e3f7fbf48a2}

\item 
\hypertarget{classTestRawLink_aca678510f355eb779dcd6ddc2463c5e5}{
uint32\_\-t {\bfseries \_\-b\_\-rcv}}
\label{classTestRawLink_aca678510f355eb779dcd6ddc2463c5e5}

\item 
\hypertarget{classTestRawLink_ae3f8fa661025919724f59cc49f3eeb26}{
uint32\_\-t {\bfseries \_\-x\_\-err}}
\label{classTestRawLink_ae3f8fa661025919724f59cc49f3eeb26}

\item 
\hypertarget{classTestRawLink_a99ba89c16b512fee63b61283b48dbd17}{
bool {\bfseries \_\-unregistered}}
\label{classTestRawLink_a99ba89c16b512fee63b61283b48dbd17}

\item 
\hypertarget{classTestRawLink_a19c2bbd14af3b78d38841979df211fde}{
\hyperlink{classXorpTimer}{XorpTimer} {\bfseries \_\-t\_\-snd}}
\label{classTestRawLink_a19c2bbd14af3b78d38841979df211fde}

\end{DoxyCompactItemize}


\subsection{Member Function Documentation}
\hypertarget{classTestRawLink_ad35a89cb0b2b4375ad94ff3cc0cb124c}{
\index{TestRawLink@{TestRawLink}!common\_\-0\_\-1\_\-get\_\-status@{common\_\-0\_\-1\_\-get\_\-status}}
\index{common\_\-0\_\-1\_\-get\_\-status@{common\_\-0\_\-1\_\-get\_\-status}!TestRawLink@{TestRawLink}}
\subsubsection[{common\_\-0\_\-1\_\-get\_\-status}]{\setlength{\rightskip}{0pt plus 5cm}{\bf XrlCmdError} TestRawLink::common\_\-0\_\-1\_\-get\_\-status (
\begin{DoxyParamCaption}
\item[{uint32\_\-t \&}]{status, }
\item[{string \&}]{reason}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, protected, virtual\mbox{]}}}}
\label{classTestRawLink_ad35a89cb0b2b4375ad94ff3cc0cb124c}


Pure-\/virtual function that needs to be implemented to: 

Get status of \hyperlink{classXrl}{Xrl} Target 

Implements \hyperlink{structXrlTestFeaRawlinkTargetBase_acd3dd85310519ceb828af0fe807261e4}{XrlTestFeaRawlinkTargetBase}.

\hypertarget{classTestRawLink_ac3f4936f85ac557565b3a3e867e1a53f}{
\index{TestRawLink@{TestRawLink}!common\_\-0\_\-1\_\-get\_\-target\_\-name@{common\_\-0\_\-1\_\-get\_\-target\_\-name}}
\index{common\_\-0\_\-1\_\-get\_\-target\_\-name@{common\_\-0\_\-1\_\-get\_\-target\_\-name}!TestRawLink@{TestRawLink}}
\subsubsection[{common\_\-0\_\-1\_\-get\_\-target\_\-name}]{\setlength{\rightskip}{0pt plus 5cm}{\bf XrlCmdError} TestRawLink::common\_\-0\_\-1\_\-get\_\-target\_\-name (
\begin{DoxyParamCaption}
\item[{string \&}]{name}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, protected, virtual\mbox{]}}}}
\label{classTestRawLink_ac3f4936f85ac557565b3a3e867e1a53f}


Pure-\/virtual function that needs to be implemented to: 

Get name of \hyperlink{classXrl}{Xrl} Target 

Implements \hyperlink{structXrlTestFeaRawlinkTargetBase_aac1ee1b4a98e540a2cbfbf4cdbde935a}{XrlTestFeaRawlinkTargetBase}.

\hypertarget{classTestRawLink_a02ffdf9d2a63cfe7fbaea2dad2244236}{
\index{TestRawLink@{TestRawLink}!common\_\-0\_\-1\_\-get\_\-version@{common\_\-0\_\-1\_\-get\_\-version}}
\index{common\_\-0\_\-1\_\-get\_\-version@{common\_\-0\_\-1\_\-get\_\-version}!TestRawLink@{TestRawLink}}
\subsubsection[{common\_\-0\_\-1\_\-get\_\-version}]{\setlength{\rightskip}{0pt plus 5cm}{\bf XrlCmdError} TestRawLink::common\_\-0\_\-1\_\-get\_\-version (
\begin{DoxyParamCaption}
\item[{string \&}]{version}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, protected, virtual\mbox{]}}}}
\label{classTestRawLink_a02ffdf9d2a63cfe7fbaea2dad2244236}


Pure-\/virtual function that needs to be implemented to: 

Get version string from \hyperlink{classXrl}{Xrl} Target 

Implements \hyperlink{structXrlTestFeaRawlinkTargetBase_a7d7f8a7d28e492d9311a8e2b9aaf326f}{XrlTestFeaRawlinkTargetBase}.

\hypertarget{classTestRawLink_a2172d3fb8744bee1391ed06395c32505}{
\index{TestRawLink@{TestRawLink}!common\_\-0\_\-1\_\-shutdown@{common\_\-0\_\-1\_\-shutdown}}
\index{common\_\-0\_\-1\_\-shutdown@{common\_\-0\_\-1\_\-shutdown}!TestRawLink@{TestRawLink}}
\subsubsection[{common\_\-0\_\-1\_\-shutdown}]{\setlength{\rightskip}{0pt plus 5cm}{\bf XrlCmdError} TestRawLink::common\_\-0\_\-1\_\-shutdown (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, protected, virtual\mbox{]}}}}
\label{classTestRawLink_a2172d3fb8744bee1391ed06395c32505}


Pure-\/virtual function that needs to be implemented to: 

Request clean shutdown of \hyperlink{classXrl}{Xrl} Target 

Implements \hyperlink{structXrlTestFeaRawlinkTargetBase_a89dec1bfbcea15f7cab5dd2334bf9501}{XrlTestFeaRawlinkTargetBase}.

\hypertarget{classTestRawLink_aa235261382ca5a8efedadea7b41eca53}{
\index{TestRawLink@{TestRawLink}!raw\_\-link\_\-client\_\-0\_\-1\_\-recv@{raw\_\-link\_\-client\_\-0\_\-1\_\-recv}}
\index{raw\_\-link\_\-client\_\-0\_\-1\_\-recv@{raw\_\-link\_\-client\_\-0\_\-1\_\-recv}!TestRawLink@{TestRawLink}}
\subsubsection[{raw\_\-link\_\-client\_\-0\_\-1\_\-recv}]{\setlength{\rightskip}{0pt plus 5cm}{\bf XrlCmdError} TestRawLink::raw\_\-link\_\-client\_\-0\_\-1\_\-recv (
\begin{DoxyParamCaption}
\item[{const string \&}]{if\_\-name, }
\item[{const string \&}]{vif\_\-name, }
\item[{const {\bf Mac} \&}]{src\_\-address, }
\item[{const {\bf Mac} \&}]{dst\_\-address, }
\item[{const uint32\_\-t \&}]{ether\_\-type, }
\item[{const vector$<$ uint8\_\-t $>$ \&}]{payload}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, protected, virtual\mbox{]}}}}
\label{classTestRawLink_aa235261382ca5a8efedadea7b41eca53}


Receive a raw link-\/level packet on an interface. 


\begin{DoxyParams}{Parameters}
{\em if\_\-name} & \hyperlink{protocolthe-p}{the} interface name \hyperlink{protocolthe-p}{the} packet arrived on. \\
\hline
{\em vif\_\-name} & \hyperlink{protocolthe-p}{the} vif name \hyperlink{protocolthe-p}{the} packet arrived on. \\
\hline
{\em src\_\-address} & \hyperlink{protocolthe-p}{the} MAC source address. \\
\hline
{\em dst\_\-address} & \hyperlink{protocolthe-p}{the} MAC destination address. \\
\hline
{\em ether\_\-type} & \hyperlink{protocolthe-p}{the} EtherType protocol number or \hyperlink{protocolthe-p}{the} Destination SAP. It must be between 1536 and 65535 to specify \hyperlink{protocolthe-p}{the} EtherType, or between 1 and 255 to specify \hyperlink{protocolthe-p}{the} Destination SAP for IEEE 802.2 LLC frames. \\
\hline
{\em payload} & \hyperlink{protocolthe-p}{the} payload, everything after \hyperlink{protocolthe-p}{the} MAC header. \\
\hline
\end{DoxyParams}


Implements \hyperlink{structXrlTestFeaRawlinkTargetBase_ab5aea36ff6c1fcd7fdf5ae8e06deb774}{XrlTestFeaRawlinkTargetBase}.

\hypertarget{classTestRawLink_a2fd709e94944df88dcf0a6100a875fe3}{
\index{TestRawLink@{TestRawLink}!register\_\-link@{register\_\-link}}
\index{register\_\-link@{register\_\-link}!TestRawLink@{TestRawLink}}
\subsubsection[{register\_\-link}]{\setlength{\rightskip}{0pt plus 5cm}bool TestRawLink::register\_\-link (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classTestRawLink_a2fd709e94944df88dcf0a6100a875fe3}


Bind to interface. 

This is an asynchronous request. If \hyperlink{protocolthe-p}{the} request is successfully queued for dispatch then true is returned.

Subsequently, if \hyperlink{protocolthe-p}{the} request is successful \_\-sockid is set to a valid socket identifier, and if unsuccessful \hyperlink{protocolthe-p}{the} number of xrl errors is bumped by one. \hypertarget{classTestRawLink_ac33c6fb60869e0138209d94a9af6580c}{
\index{TestRawLink@{TestRawLink}!start\_\-sending@{start\_\-sending}}
\index{start\_\-sending@{start\_\-sending}!TestRawLink@{TestRawLink}}
\subsubsection[{start\_\-sending}]{\setlength{\rightskip}{0pt plus 5cm}void TestRawLink::start\_\-sending (
\begin{DoxyParamCaption}
\item[{const {\bf Mac} \&}]{dest, }
\item[{uint32\_\-t}]{bytes, }
\item[{uint32\_\-t}]{ipg\_\-ms}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classTestRawLink_ac33c6fb60869e0138209d94a9af6580c}


Start sending packets. 


\begin{DoxyParams}{Parameters}
{\em host} & address to send data to. \\
\hline
{\em port} & to send data to. \\
\hline
{\em bytes} & size of each packet. \\
\hline
{\em ipg\_\-ms} & interpacket gap in milliseconds. \\
\hline
\end{DoxyParams}
\hypertarget{classTestRawLink_ae6c38630d03581e1ac51184b6793aff4}{
\index{TestRawLink@{TestRawLink}!unregister\_\-link@{unregister\_\-link}}
\index{unregister\_\-link@{unregister\_\-link}!TestRawLink@{TestRawLink}}
\subsubsection[{unregister\_\-link}]{\setlength{\rightskip}{0pt plus 5cm}bool TestRawLink::unregister\_\-link (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classTestRawLink_ae6c38630d03581e1ac51184b6793aff4}


Request closure of link. 

This is an asychronous request. If \hyperlink{protocolthe-p}{the} request is successfully queued for dispatch then true is returned.

On success \_\-sockid is cleared. On failure \hyperlink{protocolthe-p}{the} number xrl errors is bumped by one. 

The documentation for this class was generated from the following file:\begin{DoxyCompactItemize}
\item 
/home/greearb/git/xorp.ct.github/xorp/fea/tests/test\_\-fea\_\-rawlink.cc\end{DoxyCompactItemize}
