\hypertarget{classResponsePacketAssembler}{
\section{ResponsePacketAssembler$<$ A $>$ Class Template Reference}
\label{classResponsePacketAssembler}\index{ResponsePacketAssembler@{ResponsePacketAssembler}}
}


Class for RIP Response \hyperlink{classPacket}{Packet} Assemblers.  




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

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

\item 
\hypertarget{classResponsePacketAssembler_a283488bd54c9ad1bfe18c0a768c767b5}{
typedef \hyperlink{classIPNet}{IPNet}$<$ A $>$ {\bfseries Net}}
\label{classResponsePacketAssembler_a283488bd54c9ad1bfe18c0a768c767b5}

\item 
\hypertarget{classResponsePacketAssembler_a209d12ea8da587b5231b615adbe2245e}{
typedef \hyperlink{classPacketAssemblerSpecState}{PacketAssemblerSpecState}$<$ A $>$ {\bfseries SpState}}
\label{classResponsePacketAssembler_a209d12ea8da587b5231b615adbe2245e}

\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classResponsePacketAssembler_a90bd0581922b154f522345e254a77763}{ResponsePacketAssembler} (\hyperlink{classPort}{Port}$<$ A $>$ \&port)
\begin{DoxyCompactList}\small\item\em Constructor. \item\end{DoxyCompactList}\item 
\hyperlink{classResponsePacketAssembler_a0ef7518ea0f8065c335bab4502f1c1b7}{ResponsePacketAssembler} (\hyperlink{classPacketAssemblerSpecState}{SpState} \&sp)
\begin{DoxyCompactList}\small\item\em Constructor. \item\end{DoxyCompactList}\item 
\hypertarget{classResponsePacketAssembler_a58e4ecea21a36ad7563119c4100c02b8}{
\hyperlink{classResponsePacketAssembler_a58e4ecea21a36ad7563119c4100c02b8}{$\sim$ResponsePacketAssembler} ()}
\label{classResponsePacketAssembler_a58e4ecea21a36ad7563119c4100c02b8}

\begin{DoxyCompactList}\small\item\em Destructor. \item\end{DoxyCompactList}\item 
\hypertarget{classResponsePacketAssembler_ab51f8899056ac0022bc84dbcd030b11d}{
void \hyperlink{classResponsePacketAssembler_ab51f8899056ac0022bc84dbcd030b11d}{packet\_\-start} (\hyperlink{classRipPacket}{RipPacket}$<$ A $>$ $\ast$pkt)}
\label{classResponsePacketAssembler_ab51f8899056ac0022bc84dbcd030b11d}

\begin{DoxyCompactList}\small\item\em Start assembling RIP response packet. \item\end{DoxyCompactList}\item 
bool \hyperlink{classResponsePacketAssembler_a73d4781c8defe76522097ae585d1bc6b}{packet\_\-add\_\-route} (const \hyperlink{classIPNet}{Net} \&net, const Addr \&nexthop, uint16\_\-t cost, uint16\_\-t tag)
\begin{DoxyCompactList}\small\item\em Add a route to RIP response packet. \item\end{DoxyCompactList}\item 
bool \hyperlink{classResponsePacketAssembler_a4919ce156fbe425eaade94dc2194adc0}{packet\_\-full} () const 
\begin{DoxyCompactList}\small\item\em Ready-\/to-\/go accessor. \item\end{DoxyCompactList}\item 
bool \hyperlink{classResponsePacketAssembler_aa94a7a91d05761164246512c32c09a12}{packet\_\-finish} (list$<$ \hyperlink{classRipPacket}{RipPacket}$<$ A $>$ $\ast$ $>$ \&auth\_\-packets)
\begin{DoxyCompactList}\small\item\em Finish packet. \item\end{DoxyCompactList}\item 
\hypertarget{classResponsePacketAssembler_a98530721469f37b1c9dc6c5dca8e9a05}{
{\footnotesize template$<$$>$ }\\{\bfseries ResponsePacketAssembler} (\hyperlink{classPort}{Port}$<$ \hyperlink{classIPv4}{IPv4} $>$ \&port)}
\label{classResponsePacketAssembler_a98530721469f37b1c9dc6c5dca8e9a05}

\item 
\hypertarget{classResponsePacketAssembler_a5b5750b0160f1aabb140a5c77e4f1101}{
{\footnotesize template$<$$>$ }\\{\bfseries ResponsePacketAssembler} (\hyperlink{classPacketAssemblerSpecState}{SpState} \&sp)}
\label{classResponsePacketAssembler_a5b5750b0160f1aabb140a5c77e4f1101}

\item 
\hypertarget{classResponsePacketAssembler_a44b0ac45e99b566f93304500380f8d60}{
{\footnotesize template$<$$>$ }\\void {\bfseries packet\_\-start} (\hyperlink{classRipPacket}{RipPacket}$<$ \hyperlink{classIPv4}{IPv4} $>$ $\ast$pkt)}
\label{classResponsePacketAssembler_a44b0ac45e99b566f93304500380f8d60}

\item 
\hypertarget{classResponsePacketAssembler_a17ec39c86bde709d17c95e260e2c8db3}{
{\footnotesize template$<$$>$ }\\bool {\bfseries packet\_\-full} () const}
\label{classResponsePacketAssembler_a17ec39c86bde709d17c95e260e2c8db3}

\item 
\hypertarget{classResponsePacketAssembler_a2800756900cddb48c6c71d8cbe45c5c0}{
{\footnotesize template$<$$>$ }\\bool {\bfseries packet\_\-add\_\-route} (const \hyperlink{classIPNet}{Net} \&net, const Addr \&nexthop, uint16\_\-t cost, uint16\_\-t tag)}
\label{classResponsePacketAssembler_a2800756900cddb48c6c71d8cbe45c5c0}

\item 
\hypertarget{classResponsePacketAssembler_a48e8d5da5f5850fbc45a003a788b32b6}{
{\footnotesize template$<$$>$ }\\bool {\bfseries packet\_\-finish} (list$<$ \hyperlink{classRipPacket}{RipPacket}$<$ \hyperlink{classIPv4}{IPv4} $>$ $\ast$ $>$ \&auth\_\-packets)}
\label{classResponsePacketAssembler_a48e8d5da5f5850fbc45a003a788b32b6}

\item 
\hypertarget{classResponsePacketAssembler_aac5b333a02f1513f266a24bc3d64ae3d}{
{\footnotesize template$<$$>$ }\\{\bfseries ResponsePacketAssembler} (\hyperlink{classPort}{Port}$<$ \hyperlink{classIPv6}{IPv6} $>$ \&port)}
\label{classResponsePacketAssembler_aac5b333a02f1513f266a24bc3d64ae3d}

\item 
\hypertarget{classResponsePacketAssembler_aa8fb8b397643f6a56c9b9e7a121cfebd}{
{\footnotesize template$<$$>$ }\\{\bfseries ResponsePacketAssembler} (\hyperlink{classPacketAssemblerSpecState}{SpState} \&sp)}
\label{classResponsePacketAssembler_aa8fb8b397643f6a56c9b9e7a121cfebd}

\item 
\hypertarget{classResponsePacketAssembler_a047dbbc3a7c12e47605cd5d641189f0d}{
{\footnotesize template$<$$>$ }\\void {\bfseries packet\_\-start} (\hyperlink{classRipPacket}{RipPacket}$<$ \hyperlink{classIPv6}{IPv6} $>$ $\ast$pkt)}
\label{classResponsePacketAssembler_a047dbbc3a7c12e47605cd5d641189f0d}

\item 
\hypertarget{classResponsePacketAssembler_a76480ae0d1ce14bcca1b7869e6c081ed}{
{\footnotesize template$<$$>$ }\\bool {\bfseries packet\_\-full} () const}
\label{classResponsePacketAssembler_a76480ae0d1ce14bcca1b7869e6c081ed}

\item 
\hypertarget{classResponsePacketAssembler_ab3438855b41afb43942a16f5c7f585d7}{
{\footnotesize template$<$$>$ }\\bool {\bfseries packet\_\-add\_\-route} (const \hyperlink{classIPNet}{Net} \&net, const Addr \&nexthop, uint16\_\-t cost, uint16\_\-t tag)}
\label{classResponsePacketAssembler_ab3438855b41afb43942a16f5c7f585d7}

\item 
\hypertarget{classResponsePacketAssembler_aca7a5e42d41595391ae243d631451666}{
{\footnotesize template$<$$>$ }\\bool {\bfseries packet\_\-finish} (list$<$ \hyperlink{classRipPacket}{RipPacket}$<$ \hyperlink{classIPv6}{IPv6} $>$ $\ast$ $>$ \&auth\_\-packets)}
\label{classResponsePacketAssembler_aca7a5e42d41595391ae243d631451666}

\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classResponsePacketAssembler_a13d6ccc04bd8a6e7931d9455c5fd5628}{
\hyperlink{classRipPacket}{RipPacket}$<$ A $>$ $\ast$ {\bfseries \_\-pkt}}
\label{classResponsePacketAssembler_a13d6ccc04bd8a6e7931d9455c5fd5628}

\item 
\hypertarget{classResponsePacketAssembler_a59118b5d8a2354545a7add7784095904}{
uint32\_\-t {\bfseries \_\-pos}}
\label{classResponsePacketAssembler_a59118b5d8a2354545a7add7784095904}

\item 
\hypertarget{classResponsePacketAssembler_a0866123cd3ec99c644c6fd2564b87ce8}{
\hyperlink{classPacketAssemblerSpecState}{SpState} {\bfseries \_\-sp\_\-state}}
\label{classResponsePacketAssembler_a0866123cd3ec99c644c6fd2564b87ce8}

\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classResponsePacketAssembler_a31cc8bc4f550c5d0a2c50ce595550029}{
\hyperlink{classResponsePacketAssembler_a31cc8bc4f550c5d0a2c50ce595550029}{ResponsePacketAssembler} (const \hyperlink{classResponsePacketAssembler}{ResponsePacketAssembler} \&)}
\label{classResponsePacketAssembler_a31cc8bc4f550c5d0a2c50ce595550029}

\begin{DoxyCompactList}\small\item\em Copy Constructor (Disabled). \item\end{DoxyCompactList}\item 
\hypertarget{classResponsePacketAssembler_a760791e8af2124aebb37b8f370698d83}{
\hyperlink{classResponsePacketAssembler}{ResponsePacketAssembler} \& \hyperlink{classResponsePacketAssembler_a760791e8af2124aebb37b8f370698d83}{operator=} (const \hyperlink{classResponsePacketAssembler}{ResponsePacketAssembler} \&)}
\label{classResponsePacketAssembler_a760791e8af2124aebb37b8f370698d83}

\begin{DoxyCompactList}\small\item\em Assignment Operator (Disabled). \item\end{DoxyCompactList}\end{DoxyCompactItemize}


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

Class for RIP Response \hyperlink{classPacket}{Packet} Assemblers. Both RIPv2 and RIPng have some oddities in packing and this interface provides a consistent interface for that packing.

This class has specialized \hyperlink{classIPv4}{IPv4} and \hyperlink{classIPv6}{IPv6} implementations. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classResponsePacketAssembler_a90bd0581922b154f522345e254a77763}{
\index{ResponsePacketAssembler@{ResponsePacketAssembler}!ResponsePacketAssembler@{ResponsePacketAssembler}}
\index{ResponsePacketAssembler@{ResponsePacketAssembler}!ResponsePacketAssembler@{ResponsePacketAssembler}}
\subsubsection[{ResponsePacketAssembler}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ {\bf ResponsePacketAssembler}$<$ A $>$::{\bf ResponsePacketAssembler} (
\begin{DoxyParamCaption}
\item[{{\bf Port}$<$ A $>$ \&}]{port}
\end{DoxyParamCaption}
)}}
\label{classResponsePacketAssembler_a90bd0581922b154f522345e254a77763}


Constructor. 


\begin{DoxyParams}{Parameters}
{\em port} & \hyperlink{classPort}{Port} to take configuration information from. \\
\hline
\end{DoxyParams}
\hypertarget{classResponsePacketAssembler_a0ef7518ea0f8065c335bab4502f1c1b7}{
\index{ResponsePacketAssembler@{ResponsePacketAssembler}!ResponsePacketAssembler@{ResponsePacketAssembler}}
\index{ResponsePacketAssembler@{ResponsePacketAssembler}!ResponsePacketAssembler@{ResponsePacketAssembler}}
\subsubsection[{ResponsePacketAssembler}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ {\bf ResponsePacketAssembler}$<$ A $>$::{\bf ResponsePacketAssembler} (
\begin{DoxyParamCaption}
\item[{{\bf SpState} \&}]{sp}
\end{DoxyParamCaption}
)}}
\label{classResponsePacketAssembler_a0ef7518ea0f8065c335bab4502f1c1b7}


Constructor. 


\begin{DoxyParams}{Parameters}
{\em sp} & Specialized state. \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\hypertarget{classResponsePacketAssembler_a73d4781c8defe76522097ae585d1bc6b}{
\index{ResponsePacketAssembler@{ResponsePacketAssembler}!packet\_\-add\_\-route@{packet\_\-add\_\-route}}
\index{packet\_\-add\_\-route@{packet\_\-add\_\-route}!ResponsePacketAssembler@{ResponsePacketAssembler}}
\subsubsection[{packet\_\-add\_\-route}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ bool {\bf ResponsePacketAssembler}$<$ A $>$::packet\_\-add\_\-route (
\begin{DoxyParamCaption}
\item[{const {\bf Net} \&}]{net, }
\item[{const Addr \&}]{nexthop, }
\item[{uint16\_\-t}]{cost, }
\item[{uint16\_\-t}]{tag}
\end{DoxyParamCaption}
)}}
\label{classResponsePacketAssembler_a73d4781c8defe76522097ae585d1bc6b}


Add a route to RIP response packet. 

\begin{DoxyReturn}{Returns}
true if route was added, false if packet is full and would have indicated this if only \hyperlink{classResponsePacketAssembler_a4919ce156fbe425eaade94dc2194adc0}{packet\_\-full} was called. 
\end{DoxyReturn}
\hypertarget{classResponsePacketAssembler_aa94a7a91d05761164246512c32c09a12}{
\index{ResponsePacketAssembler@{ResponsePacketAssembler}!packet\_\-finish@{packet\_\-finish}}
\index{packet\_\-finish@{packet\_\-finish}!ResponsePacketAssembler@{ResponsePacketAssembler}}
\subsubsection[{packet\_\-finish}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ bool {\bf ResponsePacketAssembler}$<$ A $>$::packet\_\-finish (
\begin{DoxyParamCaption}
\item[{list$<$ {\bf RipPacket}$<$ A $>$ $\ast$ $>$ \&}]{auth\_\-packets}
\end{DoxyParamCaption}
)}}
\label{classResponsePacketAssembler_aa94a7a91d05761164246512c32c09a12}


Finish packet. 

Some packet types require final stage processing and this method gives that processing a chance to happen. Common usage is RIPv2 authentication.


\begin{DoxyParams}{Parameters}
{\em auth\_\-packets} & a return-\/by-\/reference list with \hyperlink{protocolthe-p}{the} authenticated RIP packets (one copy for each valid authentication key). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true on success, false if a failure is detected. 
\end{DoxyReturn}
\hypertarget{classResponsePacketAssembler_a4919ce156fbe425eaade94dc2194adc0}{
\index{ResponsePacketAssembler@{ResponsePacketAssembler}!packet\_\-full@{packet\_\-full}}
\index{packet\_\-full@{packet\_\-full}!ResponsePacketAssembler@{ResponsePacketAssembler}}
\subsubsection[{packet\_\-full}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename A $>$ bool {\bf ResponsePacketAssembler}$<$ A $>$::packet\_\-full (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}}
\label{classResponsePacketAssembler_a4919ce156fbe425eaade94dc2194adc0}


Ready-\/to-\/go accessor. 

\begin{DoxyReturn}{Returns}
true if packet has no more space for route entries. 
\end{DoxyReturn}


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