\hypertarget{classVrrpPacket}{
\section{VrrpPacket Class Reference}
\label{classVrrpPacket}\index{VrrpPacket@{VrrpPacket}}
}


A VRRP packet including \hyperlink{protocolthe-p}{the} IP header.  




{\ttfamily \#include $<$vrrp\_\-packet.hh$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{classVrrpPacket_a69be9e0eaae83458ae4308c6d27952e3}{set\_\-source} (const \hyperlink{classIPv4}{IPv4} \&ip)
\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} source IP address in \hyperlink{protocolthe-p}{the} IP header. \item\end{DoxyCompactList}\item 
void \hyperlink{classVrrpPacket_a4c316b063223ac2e2a4184d3d256af18}{set\_\-vrid} (uint8\_\-t vrid)
\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} virtual router ID in \hyperlink{protocolthe-p}{the} VRRP header. \item\end{DoxyCompactList}\item 
void \hyperlink{classVrrpPacket_a751e78fcb00ac91b3131f0f6546c4bbd}{set\_\-priority} (uint8\_\-t priority)
\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} priority in \hyperlink{protocolthe-p}{the} VRRP header. \item\end{DoxyCompactList}\item 
void \hyperlink{classVrrpPacket_adb85b4fb0b262b7270b13166f9f957f3}{set\_\-interval} (uint8\_\-t interval)
\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} advertisement interval in VRRP's header. \item\end{DoxyCompactList}\item 
\hypertarget{classVrrpPacket_a740bdc3089f26914b5743043fee51839}{
void \hyperlink{classVrrpPacket_a740bdc3089f26914b5743043fee51839}{clear\_\-ips} ()}
\label{classVrrpPacket_a740bdc3089f26914b5743043fee51839}

\begin{DoxyCompactList}\small\item\em Remove all IPs from \hyperlink{protocolthe-p}{the} VRRP advertisement. \item\end{DoxyCompactList}\item 
void \hyperlink{classVrrpPacket_afb5eb272af2de261bd3c2024229bd10e}{add\_\-ip} (const \hyperlink{classIPv4}{IPv4} \&ip)
\begin{DoxyCompactList}\small\item\em Add an IP to \hyperlink{protocolthe-p}{the} VRRP header. \item\end{DoxyCompactList}\item 
void \hyperlink{classVrrpPacket_a1bc183aacda7eae3586ad82ffc03ab08}{finalize} ()
\begin{DoxyCompactList}\small\item\em Must be called when all fields are set. \item\end{DoxyCompactList}\item 
const PAYLOAD \& \hyperlink{classVrrpPacket_ae48d93c3fad05e8c260e5368728a9b4c}{data} () const 
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} packet data. \item\end{DoxyCompactList}\item 
uint32\_\-t \hyperlink{classVrrpPacket_a0b4edb46dd07af8866ccd7fdd2ab78bf}{size} () const 
\begin{DoxyCompactList}\small\item\em Get \hyperlink{protocolthe-p}{the} packet size. \item\end{DoxyCompactList}\item 
void \hyperlink{classVrrpPacket_a03cf3faffc1085c6fef3f95828a63176}{set\_\-size} (uint32\_\-t size)
\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} packet size. \item\end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\void \hyperlink{classVrrpPacket_a328c4b001ae00cadf2be456c5293690d}{set\_\-ips} (const T \&ips)
\begin{DoxyCompactList}\small\item\em Set multiple IPs from a container into \hyperlink{protocolthe-p}{the} VRRP header. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classVrrpPacket_a5975bf7364a29ceed2c32358f608735d}{
static const \hyperlink{classIPv4}{IPv4} {\bfseries mcast\_\-group} = \hyperlink{classIPv4}{IPv4}(\char`\"{}224.0.0.18\char`\"{})}
\label{classVrrpPacket_a5975bf7364a29ceed2c32358f608735d}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classVrrpPacket_a051b1e9605ac4f278104b1841ce009f4}{
PAYLOAD {\bfseries \_\-data}}
\label{classVrrpPacket_a051b1e9605ac4f278104b1841ce009f4}

\item 
\hypertarget{classVrrpPacket_a544792f6aebb29aa9d1422bacd21de5e}{
\hyperlink{classIpHeader4Writer}{IpHeader4Writer} {\bfseries \_\-ip}}
\label{classVrrpPacket_a544792f6aebb29aa9d1422bacd21de5e}

\item 
\hypertarget{classVrrpPacket_a061e1ab8126e158e456af91ee3a7d544}{
\hyperlink{structVrrpHeader}{VrrpHeader} \& {\bfseries \_\-vrrp}}
\label{classVrrpPacket_a061e1ab8126e158e456af91ee3a7d544}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
A VRRP packet including \hyperlink{protocolthe-p}{the} IP header. 

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


Add an IP to \hyperlink{protocolthe-p}{the} VRRP header. 


\begin{DoxyParams}{Parameters}
{\em ip} & IP to add to \hyperlink{protocolthe-p}{the} virtual router in \hyperlink{protocolthe-p}{the} VRRP header. \\
\hline
\end{DoxyParams}
\hypertarget{classVrrpPacket_ae48d93c3fad05e8c260e5368728a9b4c}{
\index{VrrpPacket@{VrrpPacket}!data@{data}}
\index{data@{data}!VrrpPacket@{VrrpPacket}}
\subsubsection[{data}]{\setlength{\rightskip}{0pt plus 5cm}const PAYLOAD \& VrrpPacket::data (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}
\label{classVrrpPacket_ae48d93c3fad05e8c260e5368728a9b4c}


Get \hyperlink{protocolthe-p}{the} packet data. 

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} packet data (IP and VRRP). 
\end{DoxyReturn}
\hypertarget{classVrrpPacket_a1bc183aacda7eae3586ad82ffc03ab08}{
\index{VrrpPacket@{VrrpPacket}!finalize@{finalize}}
\index{finalize@{finalize}!VrrpPacket@{VrrpPacket}}
\subsubsection[{finalize}]{\setlength{\rightskip}{0pt plus 5cm}void VrrpPacket::finalize (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{classVrrpPacket_a1bc183aacda7eae3586ad82ffc03ab08}


Must be called when all fields are set. 

This method will finalize any remaining fields such as checksums. \hypertarget{classVrrpPacket_adb85b4fb0b262b7270b13166f9f957f3}{
\index{VrrpPacket@{VrrpPacket}!set\_\-interval@{set\_\-interval}}
\index{set\_\-interval@{set\_\-interval}!VrrpPacket@{VrrpPacket}}
\subsubsection[{set\_\-interval}]{\setlength{\rightskip}{0pt plus 5cm}void VrrpPacket::set\_\-interval (
\begin{DoxyParamCaption}
\item[{uint8\_\-t}]{interval}
\end{DoxyParamCaption}
)}}
\label{classVrrpPacket_adb85b4fb0b262b7270b13166f9f957f3}


Set \hyperlink{protocolthe-p}{the} advertisement interval in VRRP's header. 


\begin{DoxyParams}{Parameters}
{\em interval} & \hyperlink{protocolthe-p}{the} advertisement interval in VRRP's header. \\
\hline
\end{DoxyParams}
\hypertarget{classVrrpPacket_a328c4b001ae00cadf2be456c5293690d}{
\index{VrrpPacket@{VrrpPacket}!set\_\-ips@{set\_\-ips}}
\index{set\_\-ips@{set\_\-ips}!VrrpPacket@{VrrpPacket}}
\subsubsection[{set\_\-ips}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class T $>$ void VrrpPacket::set\_\-ips (
\begin{DoxyParamCaption}
\item[{const T \&}]{ips}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classVrrpPacket_a328c4b001ae00cadf2be456c5293690d}


Set multiple IPs from a container into \hyperlink{protocolthe-p}{the} VRRP header. 


\begin{DoxyParams}{Parameters}
{\em ips} & collection of IP addresses to add to \hyperlink{protocolthe-p}{the} VRRP header. \\
\hline
\end{DoxyParams}
\hypertarget{classVrrpPacket_a751e78fcb00ac91b3131f0f6546c4bbd}{
\index{VrrpPacket@{VrrpPacket}!set\_\-priority@{set\_\-priority}}
\index{set\_\-priority@{set\_\-priority}!VrrpPacket@{VrrpPacket}}
\subsubsection[{set\_\-priority}]{\setlength{\rightskip}{0pt plus 5cm}void VrrpPacket::set\_\-priority (
\begin{DoxyParamCaption}
\item[{uint8\_\-t}]{priority}
\end{DoxyParamCaption}
)}}
\label{classVrrpPacket_a751e78fcb00ac91b3131f0f6546c4bbd}


Set \hyperlink{protocolthe-p}{the} priority in \hyperlink{protocolthe-p}{the} VRRP header. 


\begin{DoxyParams}{Parameters}
{\em priority} & \hyperlink{protocolthe-p}{the} router priority in \hyperlink{protocolthe-p}{the} VRRP header. \\
\hline
\end{DoxyParams}
\hypertarget{classVrrpPacket_a03cf3faffc1085c6fef3f95828a63176}{
\index{VrrpPacket@{VrrpPacket}!set\_\-size@{set\_\-size}}
\index{set\_\-size@{set\_\-size}!VrrpPacket@{VrrpPacket}}
\subsubsection[{set\_\-size}]{\setlength{\rightskip}{0pt plus 5cm}void VrrpPacket::set\_\-size (
\begin{DoxyParamCaption}
\item[{uint32\_\-t}]{size}
\end{DoxyParamCaption}
)}}
\label{classVrrpPacket_a03cf3faffc1085c6fef3f95828a63176}


Set \hyperlink{protocolthe-p}{the} packet size. 


\begin{DoxyParams}{Parameters}
{\em packet} & size. \\
\hline
\end{DoxyParams}
\hypertarget{classVrrpPacket_a69be9e0eaae83458ae4308c6d27952e3}{
\index{VrrpPacket@{VrrpPacket}!set\_\-source@{set\_\-source}}
\index{set\_\-source@{set\_\-source}!VrrpPacket@{VrrpPacket}}
\subsubsection[{set\_\-source}]{\setlength{\rightskip}{0pt plus 5cm}void VrrpPacket::set\_\-source (
\begin{DoxyParamCaption}
\item[{const {\bf IPv4} \&}]{ip}
\end{DoxyParamCaption}
)}}
\label{classVrrpPacket_a69be9e0eaae83458ae4308c6d27952e3}


Set \hyperlink{protocolthe-p}{the} source IP address in \hyperlink{protocolthe-p}{the} IP header. 


\begin{DoxyParams}{Parameters}
{\em ip} & source IP address in IP header. \\
\hline
\end{DoxyParams}
\hypertarget{classVrrpPacket_a4c316b063223ac2e2a4184d3d256af18}{
\index{VrrpPacket@{VrrpPacket}!set\_\-vrid@{set\_\-vrid}}
\index{set\_\-vrid@{set\_\-vrid}!VrrpPacket@{VrrpPacket}}
\subsubsection[{set\_\-vrid}]{\setlength{\rightskip}{0pt plus 5cm}void VrrpPacket::set\_\-vrid (
\begin{DoxyParamCaption}
\item[{uint8\_\-t}]{vrid}
\end{DoxyParamCaption}
)}}
\label{classVrrpPacket_a4c316b063223ac2e2a4184d3d256af18}


Set \hyperlink{protocolthe-p}{the} virtual router ID in \hyperlink{protocolthe-p}{the} VRRP header. 


\begin{DoxyParams}{Parameters}
{\em vrid} & \hyperlink{protocolthe-p}{the} virtual router ID in \hyperlink{protocolthe-p}{the} VRRP header. \\
\hline
\end{DoxyParams}
\hypertarget{classVrrpPacket_a0b4edb46dd07af8866ccd7fdd2ab78bf}{
\index{VrrpPacket@{VrrpPacket}!size@{size}}
\index{size@{size}!VrrpPacket@{VrrpPacket}}
\subsubsection[{size}]{\setlength{\rightskip}{0pt plus 5cm}uint32\_\-t VrrpPacket::size (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}
\label{classVrrpPacket_a0b4edb46dd07af8866ccd7fdd2ab78bf}


Get \hyperlink{protocolthe-p}{the} packet size. 

\begin{DoxyReturn}{Returns}
packet size. 
\end{DoxyReturn}


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