\hypertarget{classRouteRange}{
\section{RouteRange$<$ A $>$ Class Template Reference}
\label{classRouteRange}\index{RouteRange@{RouteRange}}
}


Stores a \hyperlink{classRoute}{Route} and bounds on \hyperlink{protocolthe-p}{the} validity of \hyperlink{protocolthe-p}{the} route.  




{\ttfamily \#include $<$rt\_\-tab\_\-base.hh$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRouteRange_aabefd229b82dc904c149a1b9304596be}{
{\bfseries RouteRange} (const A \&req\_\-addr, const \hyperlink{classIPRouteEntry}{IPRouteEntry}$<$ A $>$ $\ast$route, const A \&top, const A \&bottom)}
\label{classRouteRange_aabefd229b82dc904c149a1b9304596be}

\item 
\hypertarget{classRouteRange_aecc9c09ce2c58ab31764457f2b743b8c}{
const A \& {\bfseries top} () const }
\label{classRouteRange_aecc9c09ce2c58ab31764457f2b743b8c}

\item 
\hypertarget{classRouteRange_a29cd2c074798d7f0bc3b0a99b249438a}{
const A \& {\bfseries bottom} () const }
\label{classRouteRange_a29cd2c074798d7f0bc3b0a99b249438a}

\item 
\hypertarget{classRouteRange_af4e4388953c2edaa8af4f2f6c76b879c}{
const \hyperlink{classIPRouteEntry}{IPRouteEntry}$<$ A $>$ $\ast$ {\bfseries route} () const }
\label{classRouteRange_af4e4388953c2edaa8af4f2f6c76b879c}

\item 
\hypertarget{classRouteRange_a8e15d85ba1b48879b65d7de0f8e2d331}{
const \hyperlink{classIPNet}{IPNet}$<$ A $>$ \& {\bfseries net} () const }
\label{classRouteRange_a8e15d85ba1b48879b65d7de0f8e2d331}

\item 
void \hyperlink{classRouteRange_a4cd798ad033b85e489bf6115f190874d}{merge} (const \hyperlink{classRouteRange}{RouteRange} $\ast$his\_\-rr)
\begin{DoxyCompactList}\small\item\em Merge this entry with another entry. \item\end{DoxyCompactList}\item 
\hypertarget{classRouteRange_a68225225f94e8e04b05579cac2c13c35}{
\hyperlink{classIPNet}{IPNet}$<$ A $>$ {\bfseries minimal\_\-subnet} () const }
\label{classRouteRange_a68225225f94e8e04b05579cac2c13c35}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classRouteRange_a4ee1d86206273c7b8f565ad18c397cbd}{
A {\bfseries \_\-req\_\-addr}}
\label{classRouteRange_a4ee1d86206273c7b8f565ad18c397cbd}

\item 
\hypertarget{classRouteRange_a9d2c5c97db9ed3a4bd6e8d0bdd909c73}{
const \hyperlink{classIPRouteEntry}{IPRouteEntry}$<$ A $>$ $\ast$ {\bfseries \_\-route}}
\label{classRouteRange_a9d2c5c97db9ed3a4bd6e8d0bdd909c73}

\item 
\hypertarget{classRouteRange_ac132ba851a6c4315146bd59a1c98d0ce}{
A {\bfseries \_\-top}}
\label{classRouteRange_ac132ba851a6c4315146bd59a1c98d0ce}

\item 
\hypertarget{classRouteRange_a570c415469bd91fd0ce050bcdedbd5fe}{
A {\bfseries \_\-bottom}}
\label{classRouteRange_a570c415469bd91fd0ce050bcdedbd5fe}

\end{DoxyCompactItemize}


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

Stores a \hyperlink{classRoute}{Route} and bounds on \hyperlink{protocolthe-p}{the} validity of \hyperlink{protocolthe-p}{the} route. The \hyperlink{classRouteRange}{RouteRange} class is used to hold an annotated routing entry. It is used when \hyperlink{protocolthe-p}{the} \hyperlink{classRegisterTable}{RegisterTable} is registering interest in routing information associated with a specific address. It holds an IP address, \hyperlink{protocolthe-p}{the} route that would be used to route that address, and \hyperlink{protocolthe-p}{the} top and bottom addresses of \hyperlink{protocolthe-p}{the} route range that includes that address for which this route applies without being overlayed by a more specific route. For example:

Suppose an \hyperlink{classOriginTable}{OriginTable} holds \hyperlink{protocolthe-p}{the} routes 1.0.0.0/16 and 1.0.1.0/24. The address we're interested in is 1.0.0.10. Then if we ask this \hyperlink{classOriginTable}{OriginTable} for \hyperlink{protocolthe-p}{the} \hyperlink{classRouteRange}{RouteRange} for 1.0.0.10, we get:

address: 1.0.0.10 route: \hyperlink{protocolthe-p}{the} route for 1.0.0.0/16 top: 1.0.0.255 bottom: 1.0.0.0

I.e., \hyperlink{protocolthe-p}{the} route for 1.0.0.10 is 1.0.0.0/16, and this answer is also valid for addresses in \hyperlink{protocolthe-p}{the} range 1.0.0.0 to 1.0.0.255 inclusive. 

\subsection{Member Function Documentation}
\hypertarget{classRouteRange_a4cd798ad033b85e489bf6115f190874d}{
\index{RouteRange@{RouteRange}!merge@{merge}}
\index{merge@{merge}!RouteRange@{RouteRange}}
\subsubsection[{merge}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ void {\bf RouteRange}$<$ A $>$::merge (
\begin{DoxyParamCaption}
\item[{const {\bf RouteRange}$<$ A $>$ $\ast$}]{his\_\-rr}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classRouteRange_a4cd798ad033b85e489bf6115f190874d}


Merge this entry with another entry. 

Replace route with \hyperlink{protocolthe-p}{the} entry from rr if it is better, (XXX why ?) shrink \hyperlink{protocolthe-p}{the} intervals if \hyperlink{protocolthe-p}{the} other one is smaller.


\begin{DoxyParams}{Parameters}
{\em his\_\-rr} & \hyperlink{protocolthe-p}{the} entry to merge with. \\
\hline
\end{DoxyParams}


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