\hypertarget{classRipPacket}{
\section{RipPacket$<$ A $>$ Class Template Reference}
\label{classRipPacket}\index{RipPacket@{RipPacket}}
}


RIP \hyperlink{classPacket}{Packet} class.  




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

\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRipPacket_a6a8e3753f84ae4959e766d55150a4224}{
typedef A {\bfseries Addr}}
\label{classRipPacket_a6a8e3753f84ae4959e766d55150a4224}

\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
const Addr \& \hyperlink{classRipPacket_a67c93be2db0db35146c08964f5b0a83e}{address} () const 
\item 
uint16\_\-t \hyperlink{classRipPacket_aa079e99e5343ae9adbad2c157b448208}{port} () const 
\item 
uint32\_\-t \hyperlink{classRipPacket_abc4978e0376bd152131cdee25ba202c8}{max\_\-entries} () const 
\item 
void \hyperlink{classRipPacket_a0f3678ffe93d5be7a2193d9768ca8da7}{set\_\-max\_\-entries} (uint32\_\-t max\_\-entries)
\begin{DoxyCompactList}\small\item\em Set \hyperlink{protocolthe-p}{the} maximum number of route entries a packet may have. \item\end{DoxyCompactList}\item 
\hypertarget{classRipPacket_a4da2643548b3b02d1ad29a959624cae8}{
{\bfseries RipPacket} (const Addr \&addr, uint16\_\-t port, uint32\_\-t max\_\-entries=RIPv2\_\-ROUTES\_\-PER\_\-PACKET)}
\label{classRipPacket_a4da2643548b3b02d1ad29a959624cae8}

\item 
const uint8\_\-t $\ast$ \hyperlink{classRipPacket_a2ee66def714681b1a301b58c5839766a}{header\_\-ptr} () const 
\item 
uint8\_\-t $\ast$ \hyperlink{classRipPacket_a39f0be8b54709187cdf6652e97431a5f}{header\_\-ptr} ()
\item 
const uint8\_\-t $\ast$ \hyperlink{classRipPacket_a547d75044e1306bb98e6598472931699}{route\_\-entry\_\-ptr} (uint32\_\-t entry\_\-no) const 
\begin{DoxyCompactList}\small\item\em \hyperlink{classRoute}{Route} entry accessor. \item\end{DoxyCompactList}\item 
uint8\_\-t $\ast$ \hyperlink{classRipPacket_a771baf6dd679fd762e3650f07d73b6fb}{route\_\-entry\_\-ptr} (uint32\_\-t entry\_\-no)
\begin{DoxyCompactList}\small\item\em \hyperlink{classRoute}{Route} entry accessor. \item\end{DoxyCompactList}\item 
\hypertarget{classRipPacket_a4e48719b218445da901e59a05f871951}{
void {\bfseries append\_\-data} (const uint8\_\-t $\ast$data, uint32\_\-t data\_\-bytes)}
\label{classRipPacket_a4e48719b218445da901e59a05f871951}

\item 
\hypertarget{classRipPacket_a2d4a8d7e23da328014b2fa970f5c031a}{
void {\bfseries append\_\-data} (const vector$<$ uint8\_\-t $>$ \&data)}
\label{classRipPacket_a2d4a8d7e23da328014b2fa970f5c031a}

\item 
\hypertarget{classRipPacket_a26715e0cc9a47830746bf0c6e3d1c5d9}{
vector$<$ uint8\_\-t $>$ \& {\bfseries data} ()}
\label{classRipPacket_a26715e0cc9a47830746bf0c6e3d1c5d9}

\item 
\hypertarget{classRipPacket_a38580ef672ac55f575a5fdffb5bccfd4}{
const vector$<$ uint8\_\-t $>$ \& {\bfseries data} () const }
\label{classRipPacket_a38580ef672ac55f575a5fdffb5bccfd4}

\item 
\hypertarget{classRipPacket_a4aef1f8f973be606fbf127b4e1bbca98}{
uint32\_\-t {\bfseries data\_\-bytes} () const }
\label{classRipPacket_a4aef1f8f973be606fbf127b4e1bbca98}

\item 
\hypertarget{classRipPacket_a640056f7405a9900c7b9474f2ee5915c}{
const uint8\_\-t $\ast$ {\bfseries data\_\-ptr} () const }
\label{classRipPacket_a640056f7405a9900c7b9474f2ee5915c}

\item 
\hypertarget{classRipPacket_a96eccbc76e01cb0ee95b40c67ea765ac}{
uint8\_\-t $\ast$ {\bfseries data\_\-ptr} ()}
\label{classRipPacket_a96eccbc76e01cb0ee95b40c67ea765ac}

\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRipPacket_a11c26c1b4d67fd30a58ea78ff3a99d94}{
const uint8\_\-t $\ast$ {\bfseries base\_\-ptr} () const }
\label{classRipPacket_a11c26c1b4d67fd30a58ea78ff3a99d94}

\item 
\hypertarget{classRipPacket_a5b2dc1b81ed1cd4c51201903053ad4c5}{
uint8\_\-t $\ast$ {\bfseries base\_\-ptr} ()}
\label{classRipPacket_a5b2dc1b81ed1cd4c51201903053ad4c5}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRipPacket_adfc829a8323d918ba0ba0219264170f2}{
Addr {\bfseries \_\-addr}}
\label{classRipPacket_adfc829a8323d918ba0ba0219264170f2}

\item 
\hypertarget{classRipPacket_a98a67df3bacaa42ac4d7ee88375e449d}{
uint16\_\-t {\bfseries \_\-port}}
\label{classRipPacket_a98a67df3bacaa42ac4d7ee88375e449d}

\item 
\hypertarget{classRipPacket_ab6219db8e99f59c0bbc51d78bf5f1040}{
vector$<$ uint8\_\-t $>$ {\bfseries \_\-data}}
\label{classRipPacket_ab6219db8e99f59c0bbc51d78bf5f1040}

\item 
\hypertarget{classRipPacket_a58857ab4e29c4458f8b7da95154de950}{
uint32\_\-t {\bfseries \_\-max\_\-entries}}
\label{classRipPacket_a58857ab4e29c4458f8b7da95154de950}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$typename A$>$ class RipPacket$<$ A $>$}

RIP \hyperlink{classPacket}{Packet} class. A container for RIP packet, provides easy to use accessors and modifiers. 

\subsection{Member Function Documentation}
\hypertarget{classRipPacket_a67c93be2db0db35146c08964f5b0a83e}{
\index{RipPacket@{RipPacket}!address@{address}}
\index{address@{address}!RipPacket@{RipPacket}}
\subsubsection[{address}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ const Addr\& {\bf RipPacket}$<$ A $>$::address (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classRipPacket_a67c93be2db0db35146c08964f5b0a83e}
\begin{DoxyReturn}{Returns}
destination address of packet. 
\end{DoxyReturn}
\hypertarget{classRipPacket_a39f0be8b54709187cdf6652e97431a5f}{
\index{RipPacket@{RipPacket}!header\_\-ptr@{header\_\-ptr}}
\index{header\_\-ptr@{header\_\-ptr}!RipPacket@{RipPacket}}
\subsubsection[{header\_\-ptr}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ uint8\_\-t $\ast$ {\bf RipPacket}$<$ A $>$::header\_\-ptr (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{classRipPacket_a39f0be8b54709187cdf6652e97431a5f}
\begin{DoxyReturn}{Returns}
pointer to \hyperlink{protocolthe-p}{the} beginning of \hyperlink{protocolthe-p}{the} RIP packet header. 
\end{DoxyReturn}
\hypertarget{classRipPacket_a2ee66def714681b1a301b58c5839766a}{
\index{RipPacket@{RipPacket}!header\_\-ptr@{header\_\-ptr}}
\index{header\_\-ptr@{header\_\-ptr}!RipPacket@{RipPacket}}
\subsubsection[{header\_\-ptr}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ const uint8\_\-t $\ast$ {\bf RipPacket}$<$ A $>$::header\_\-ptr (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}
\label{classRipPacket_a2ee66def714681b1a301b58c5839766a}
\begin{DoxyReturn}{Returns}
const pointer to \hyperlink{protocolthe-p}{the} beginning of \hyperlink{protocolthe-p}{the} RIP packet header. 
\end{DoxyReturn}
\hypertarget{classRipPacket_abc4978e0376bd152131cdee25ba202c8}{
\index{RipPacket@{RipPacket}!max\_\-entries@{max\_\-entries}}
\index{max\_\-entries@{max\_\-entries}!RipPacket@{RipPacket}}
\subsubsection[{max\_\-entries}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ uint32\_\-t {\bf RipPacket}$<$ A $>$::max\_\-entries (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classRipPacket_abc4978e0376bd152131cdee25ba202c8}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} maximum number of route entries packet may have. 
\end{DoxyReturn}
\hypertarget{classRipPacket_aa079e99e5343ae9adbad2c157b448208}{
\index{RipPacket@{RipPacket}!port@{port}}
\index{port@{port}!RipPacket@{RipPacket}}
\subsubsection[{port}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A$>$ uint16\_\-t {\bf RipPacket}$<$ A $>$::port (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classRipPacket_aa079e99e5343ae9adbad2c157b448208}
\begin{DoxyReturn}{Returns}
destination port of packet. 
\end{DoxyReturn}
\hypertarget{classRipPacket_a547d75044e1306bb98e6598472931699}{
\index{RipPacket@{RipPacket}!route\_\-entry\_\-ptr@{route\_\-entry\_\-ptr}}
\index{route\_\-entry\_\-ptr@{route\_\-entry\_\-ptr}!RipPacket@{RipPacket}}
\subsubsection[{route\_\-entry\_\-ptr}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ const uint8\_\-t $\ast$ {\bf RipPacket}$<$ A $>$::route\_\-entry\_\-ptr (
\begin{DoxyParamCaption}
\item[{uint32\_\-t}]{entry\_\-no}
\end{DoxyParamCaption}
) const}}
\label{classRipPacket_a547d75044e1306bb98e6598472931699}


\hyperlink{classRoute}{Route} entry accessor. 


\begin{DoxyParams}{Parameters}
{\em entry\_\-no} & index of route entry to retrive. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
const pointer to route entry, or 0 if entry\_\-no is greater than \hyperlink{protocolthe-p}{the} maximum route entries associated with packet. 
\end{DoxyReturn}
\hypertarget{classRipPacket_a771baf6dd679fd762e3650f07d73b6fb}{
\index{RipPacket@{RipPacket}!route\_\-entry\_\-ptr@{route\_\-entry\_\-ptr}}
\index{route\_\-entry\_\-ptr@{route\_\-entry\_\-ptr}!RipPacket@{RipPacket}}
\subsubsection[{route\_\-entry\_\-ptr}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ uint8\_\-t $\ast$ {\bf RipPacket}$<$ A $>$::route\_\-entry\_\-ptr (
\begin{DoxyParamCaption}
\item[{uint32\_\-t}]{entry\_\-no}
\end{DoxyParamCaption}
)}}
\label{classRipPacket_a771baf6dd679fd762e3650f07d73b6fb}


\hyperlink{classRoute}{Route} entry accessor. 


\begin{DoxyParams}{Parameters}
{\em entry\_\-no} & index of route entry to retrive. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to route entry, or 0 if entry\_\-no is greater than \hyperlink{protocolthe-p}{the} maximum route entries associated with packet. 
\end{DoxyReturn}
\hypertarget{classRipPacket_a0f3678ffe93d5be7a2193d9768ca8da7}{
\index{RipPacket@{RipPacket}!set\_\-max\_\-entries@{set\_\-max\_\-entries}}
\index{set\_\-max\_\-entries@{set\_\-max\_\-entries}!RipPacket@{RipPacket}}
\subsubsection[{set\_\-max\_\-entries}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ void {\bf RipPacket}$<$ A $>$::set\_\-max\_\-entries (
\begin{DoxyParamCaption}
\item[{uint32\_\-t}]{max\_\-entries}
\end{DoxyParamCaption}
)}}
\label{classRipPacket_a0f3678ffe93d5be7a2193d9768ca8da7}


Set \hyperlink{protocolthe-p}{the} maximum number of route entries a packet may have. 

This method should be called before using append\_\-data methods as it resizes \hyperlink{protocolthe-p}{the} internal storage and will cause appended data to be lost. 

The documentation for this class was generated from the following file:\begin{DoxyCompactItemize}
\item 
/home/greearb/git/xorp.ct.github/xorp/rip/packets.hh\end{DoxyCompactItemize}
