\hypertarget{classARPd}{
\section{ARPd Class Reference}
\label{classARPd}\index{ARPd@{ARPd}}
}


an ARP daemon.  




{\ttfamily \#include $<$arpd.hh$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classARPd_a8daf35c803b485538b22dfba4c81e808}{ARPd} (\hyperlink{classVrrpInterface}{VrrpInterface} \&vif)
\item 
\hypertarget{classARPd_a2a85a2c9aea4195ab6d679d1d10d784f}{
void \hyperlink{classARPd_a2a85a2c9aea4195ab6d679d1d10d784f}{clear} ()}
\label{classARPd_a2a85a2c9aea4195ab6d679d1d10d784f}

\begin{DoxyCompactList}\small\item\em Remove all configured IPs. \item\end{DoxyCompactList}\item 
void \hyperlink{classARPd_aa3ba6ac96ae1cc5d432045d279101738}{insert} (const \hyperlink{classIPv4}{IPv4} \&ip)
\begin{DoxyCompactList}\small\item\em Add an IP for which ARP replies should be sent. \item\end{DoxyCompactList}\item 
\hypertarget{classARPd_abc08d4277ce9972e89ecbb52fae25e2a}{
void \hyperlink{classARPd_abc08d4277ce9972e89ecbb52fae25e2a}{stop} ()}
\label{classARPd_abc08d4277ce9972e89ecbb52fae25e2a}

\begin{DoxyCompactList}\small\item\em Stop \hyperlink{protocolthe-p}{the} daemon. \item\end{DoxyCompactList}\item 
\hypertarget{classARPd_a2b47fb8cdf729cc6b4c31a29ef9ccd64}{
void \hyperlink{classARPd_a2b47fb8cdf729cc6b4c31a29ef9ccd64}{start} ()}
\label{classARPd_a2b47fb8cdf729cc6b4c31a29ef9ccd64}

\begin{DoxyCompactList}\small\item\em Start \hyperlink{protocolthe-p}{the} daemon. \item\end{DoxyCompactList}\item 
void \hyperlink{classARPd_aa2bbe49415eaeb2a0ad4b341a4c89a16}{ips\_\-updated} ()
\begin{DoxyCompactList}\small\item\em Using this method \hyperlink{protocolthe-p}{the} caller notifies \hyperlink{classARPd}{ARPd} that it has finished manipulating \hyperlink{protocolthe-p}{the} IP addresses. \item\end{DoxyCompactList}\item 
void \hyperlink{classARPd_a07201544e826b01ba7cf48a9e34028b9}{recv} (const \hyperlink{classMac}{Mac} \&src, const PAYLOAD \&payload)
\begin{DoxyCompactList}\small\item\em This method notifies \hyperlink{protocolthe-p}{the} reception of an ARP packet. \item\end{DoxyCompactList}\item 
void \hyperlink{classARPd_aaa5e62be722c65a7ec7592f1ebb046ed}{set\_\-mac} (const \hyperlink{classMac}{Mac} \&mac)
\begin{DoxyCompactList}\small\item\em Sets \hyperlink{protocolthe-p}{the} MAC address of \hyperlink{protocolthe-p}{the} ARP daemon, used when generating replies. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classARPd_a2e641d9c1566875537dfdd789792d45e}{
typedef set$<$ \hyperlink{classIPv4}{IPv4} $>$ {\bfseries IPS}}
\label{classARPd_a2e641d9c1566875537dfdd789792d45e}

\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{classARPd_ae537da9aa784ac6ad0f69ae0d2e946e8}{start\_\-receiving} ()
\begin{DoxyCompactList}\small\item\em Use this to notify \hyperlink{protocolthe-p}{the} interface that we no longer need to receive packets. \item\end{DoxyCompactList}\item 
\hypertarget{classARPd_a7371572781b201d2d375de3a2e967440}{
void \hyperlink{classARPd_a7371572781b201d2d375de3a2e967440}{stop\_\-receiving} ()}
\label{classARPd_a7371572781b201d2d375de3a2e967440}

\begin{DoxyCompactList}\small\item\em Notify \hyperlink{protocolthe-p}{the} interface that we desire to receive ARP packets. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classARPd_a94a8ee2133b99f807b918a0e5a8ed204}{
\hyperlink{classVrrpInterface}{VrrpInterface} \& {\bfseries \_\-vif}}
\label{classARPd_a94a8ee2133b99f807b918a0e5a8ed204}

\item 
\hypertarget{classARPd_a31c4842038e23a2d557972c2dd2c78ca}{
\hyperlink{classMac}{Mac} {\bfseries \_\-mac}}
\label{classARPd_a31c4842038e23a2d557972c2dd2c78ca}

\item 
\hypertarget{classARPd_add3d0e8fa1ce5f8a9f269413bc274a44}{
IPS {\bfseries \_\-ips}}
\label{classARPd_add3d0e8fa1ce5f8a9f269413bc274a44}

\item 
\hypertarget{classARPd_a4bfa117174b28563079f0e528f9b0fbf}{
bool {\bfseries \_\-running}}
\label{classARPd_a4bfa117174b28563079f0e528f9b0fbf}

\item 
\hypertarget{classARPd_acecf47b4a5a7f9c0a37eb569067fbf49}{
bool {\bfseries \_\-receiving}}
\label{classARPd_acecf47b4a5a7f9c0a37eb569067fbf49}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
an ARP daemon. This daemon can be configured to \char`\"{}own\char`\"{} several IPs for which it will send out ARP replies when receiving ARP requests. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classARPd_a8daf35c803b485538b22dfba4c81e808}{
\index{ARPd@{ARPd}!ARPd@{ARPd}}
\index{ARPd@{ARPd}!ARPd@{ARPd}}
\subsubsection[{ARPd}]{\setlength{\rightskip}{0pt plus 5cm}ARPd::ARPd (
\begin{DoxyParamCaption}
\item[{{\bf VrrpInterface} \&}]{vif}
\end{DoxyParamCaption}
)}}
\label{classARPd_a8daf35c803b485538b22dfba4c81e808}

\begin{DoxyParams}{Parameters}
{\em vif} & \hyperlink{protocolthe-p}{the} VRRP interface on which \hyperlink{protocolthe-p}{the} daemon runs. \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\hypertarget{classARPd_aa3ba6ac96ae1cc5d432045d279101738}{
\index{ARPd@{ARPd}!insert@{insert}}
\index{insert@{insert}!ARPd@{ARPd}}
\subsubsection[{insert}]{\setlength{\rightskip}{0pt plus 5cm}void ARPd::insert (
\begin{DoxyParamCaption}
\item[{const {\bf IPv4} \&}]{ip}
\end{DoxyParamCaption}
)}}
\label{classARPd_aa3ba6ac96ae1cc5d432045d279101738}


Add an IP for which ARP replies should be sent. 


\begin{DoxyParams}{Parameters}
{\em ip} & \hyperlink{protocolthe-p}{the} IP to add. \\
\hline
\end{DoxyParams}
\hypertarget{classARPd_aa2bbe49415eaeb2a0ad4b341a4c89a16}{
\index{ARPd@{ARPd}!ips\_\-updated@{ips\_\-updated}}
\index{ips\_\-updated@{ips\_\-updated}!ARPd@{ARPd}}
\subsubsection[{ips\_\-updated}]{\setlength{\rightskip}{0pt plus 5cm}void ARPd::ips\_\-updated (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{classARPd_aa2bbe49415eaeb2a0ad4b341a4c89a16}


Using this method \hyperlink{protocolthe-p}{the} caller notifies \hyperlink{classARPd}{ARPd} that it has finished manipulating \hyperlink{protocolthe-p}{the} IP addresses. 

This way one can clear and add IPs one by one without causing \hyperlink{classARPd}{ARPd} to stop (if IPs are cleared) and resume if IPs are added. \hypertarget{classARPd_a07201544e826b01ba7cf48a9e34028b9}{
\index{ARPd@{ARPd}!recv@{recv}}
\index{recv@{recv}!ARPd@{ARPd}}
\subsubsection[{recv}]{\setlength{\rightskip}{0pt plus 5cm}void ARPd::recv (
\begin{DoxyParamCaption}
\item[{const {\bf Mac} \&}]{src, }
\item[{const PAYLOAD \&}]{payload}
\end{DoxyParamCaption}
)}}
\label{classARPd_a07201544e826b01ba7cf48a9e34028b9}


This method notifies \hyperlink{protocolthe-p}{the} reception of an ARP packet. 


\begin{DoxyParams}{Parameters}
{\em mac} & \hyperlink{protocolthe-p}{the} source MAC address of \hyperlink{protocolthe-p}{the} packet. \\
\hline
{\em payload} & \hyperlink{protocolthe-p}{the} ARP header and data. \\
\hline
\end{DoxyParams}
\hypertarget{classARPd_aaa5e62be722c65a7ec7592f1ebb046ed}{
\index{ARPd@{ARPd}!set\_\-mac@{set\_\-mac}}
\index{set\_\-mac@{set\_\-mac}!ARPd@{ARPd}}
\subsubsection[{set\_\-mac}]{\setlength{\rightskip}{0pt plus 5cm}void ARPd::set\_\-mac (
\begin{DoxyParamCaption}
\item[{const {\bf Mac} \&}]{mac}
\end{DoxyParamCaption}
)}}
\label{classARPd_aaa5e62be722c65a7ec7592f1ebb046ed}


Sets \hyperlink{protocolthe-p}{the} MAC address of \hyperlink{protocolthe-p}{the} ARP daemon, used when generating replies. 


\begin{DoxyParams}{Parameters}
{\em mac} & \hyperlink{protocolthe-p}{the} MAC address. \\
\hline
\end{DoxyParams}
\hypertarget{classARPd_ae537da9aa784ac6ad0f69ae0d2e946e8}{
\index{ARPd@{ARPd}!start\_\-receiving@{start\_\-receiving}}
\index{start\_\-receiving@{start\_\-receiving}!ARPd@{ARPd}}
\subsubsection[{start\_\-receiving}]{\setlength{\rightskip}{0pt plus 5cm}void ARPd::start\_\-receiving (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classARPd_ae537da9aa784ac6ad0f69ae0d2e946e8}


Use this to notify \hyperlink{protocolthe-p}{the} interface that we no longer need to receive packets. 

This can be used for example when no IPs are configured or when \hyperlink{protocolthe-p}{the} \hyperlink{classARPd}{ARPd} has been stopped. 

The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
/home/greearb/git/xorp.ct.github/xorp/vrrp/arpd.hh\item 
/home/greearb/git/xorp.ct.github/xorp/vrrp/arpd.cc\end{DoxyCompactItemize}
