\hypertarget{classDeletionTable}{
\section{DeletionTable$<$ A $>$ Class Template Reference}
\label{classDeletionTable}\index{DeletionTable@{DeletionTable}}
}


\hyperlink{classDeletionTable}{DeletionTable} is a temporary \hyperlink{classBGPRouteTable}{BGPRouteTable} used to delete routes when a peer goes down.  




{\ttfamily \#include $<$route\_\-table\_\-deletion.hh$>$}

Inheritance diagram for DeletionTable$<$ A $>$:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classDeletionTable}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classDeletionTable_a6070d1de82dd54faa88f5a45b0093bfe}{
{\bfseries DeletionTable} (string tablename, Safi safi, \hyperlink{classBgpTrie}{BgpTrie}$<$ A $>$ $\ast$route\_\-table, const \hyperlink{classPeerHandler}{PeerHandler} $\ast$peer, uint32\_\-t genid, \hyperlink{classBGPRouteTable}{BGPRouteTable}$<$ A $>$ $\ast$parent)}
\label{classDeletionTable_a6070d1de82dd54faa88f5a45b0093bfe}

\item 
\hypertarget{classDeletionTable_a645de9fbca6edb72d7f64d561f415d73}{
int {\bfseries add\_\-route} (\hyperlink{classInternalMessage}{InternalMessage}$<$ A $>$ \&rtmsg, \hyperlink{classBGPRouteTable}{BGPRouteTable}$<$ A $>$ $\ast$caller)}
\label{classDeletionTable_a645de9fbca6edb72d7f64d561f415d73}

\item 
\hypertarget{classDeletionTable_a6b789b3ff82e94c9799f6be6085ee89f}{
int {\bfseries replace\_\-route} (\hyperlink{classInternalMessage}{InternalMessage}$<$ A $>$ \&old\_\-rtmsg, \hyperlink{classInternalMessage}{InternalMessage}$<$ A $>$ \&new\_\-rtmsg, \hyperlink{classBGPRouteTable}{BGPRouteTable}$<$ A $>$ $\ast$caller)}
\label{classDeletionTable_a6b789b3ff82e94c9799f6be6085ee89f}

\item 
\hypertarget{classDeletionTable_a61f0e314d4de2a62d0f59ee64e510254}{
int {\bfseries delete\_\-route} (\hyperlink{classInternalMessage}{InternalMessage}$<$ A $>$ \&rtmsg, \hyperlink{classBGPRouteTable}{BGPRouteTable}$<$ A $>$ $\ast$caller)}
\label{classDeletionTable_a61f0e314d4de2a62d0f59ee64e510254}

\item 
\hypertarget{classDeletionTable_aafc19137016a788f588efa45fa0f39c3}{
int {\bfseries route\_\-dump} (\hyperlink{classInternalMessage}{InternalMessage}$<$ A $>$ \&rtmsg, \hyperlink{classBGPRouteTable}{BGPRouteTable}$<$ A $>$ $\ast$caller, const \hyperlink{classPeerHandler}{PeerHandler} $\ast$dump\_\-peer)}
\label{classDeletionTable_aafc19137016a788f588efa45fa0f39c3}

\item 
\hypertarget{classDeletionTable_a95b8e158b86e9be552afe664a79a3095}{
int {\bfseries push} (\hyperlink{classBGPRouteTable}{BGPRouteTable}$<$ A $>$ $\ast$caller)}
\label{classDeletionTable_a95b8e158b86e9be552afe664a79a3095}

\item 
\hypertarget{classDeletionTable_a2c93d705e84f69567fb79b70a929fc0f}{
const \hyperlink{classSubnetRoute}{SubnetRoute}$<$ A $>$ $\ast$ {\bfseries lookup\_\-route} (const \hyperlink{classIPNet}{IPNet}$<$ A $>$ \&net, uint32\_\-t \&genid, FPAListRef \&pa\_\-list) const }
\label{classDeletionTable_a2c93d705e84f69567fb79b70a929fc0f}

\item 
\hypertarget{classDeletionTable_af122ab979eca20089bd97aab5b733290}{
void {\bfseries route\_\-used} (const \hyperlink{classSubnetRoute}{SubnetRoute}$<$ A $>$ $\ast$route, bool in\_\-use)}
\label{classDeletionTable_af122ab979eca20089bd97aab5b733290}

\item 
\hypertarget{classDeletionTable_a497025d4316bc287a47fd02a96f94cdd}{
RouteTableType {\bfseries type} () const }
\label{classDeletionTable_a497025d4316bc287a47fd02a96f94cdd}

\item 
\hypertarget{classDeletionTable_a8be6eaec91ed48bf0725fb137f11e1a4}{
string {\bfseries str} () const }
\label{classDeletionTable_a8be6eaec91ed48bf0725fb137f11e1a4}

\item 
\hypertarget{classDeletionTable_ac5002645467f3707373b501580c8167b}{
void {\bfseries output\_\-state} (bool, \hyperlink{classBGPRouteTable}{BGPRouteTable}$<$ A $>$ $\ast$)}
\label{classDeletionTable_ac5002645467f3707373b501580c8167b}

\item 
\hypertarget{classDeletionTable_afb28b24db3340612c05d2d66a6542498}{
bool {\bfseries get\_\-next\_\-message} (\hyperlink{classBGPRouteTable}{BGPRouteTable}$<$ A $>$ $\ast$)}
\label{classDeletionTable_afb28b24db3340612c05d2d66a6542498}

\item 
\hypertarget{classDeletionTable_aa9af11f5cd99f6450b5f3240b4225924}{
void {\bfseries initiate\_\-background\_\-deletion} ()}
\label{classDeletionTable_aa9af11f5cd99f6450b5f3240b4225924}

\item 
uint32\_\-t \hyperlink{classDeletionTable_adfd4645ef007733030a768195c798176}{genid} () const 
\item 
\hypertarget{classDeletionTable_ad666fd609afc7824ba742e8cfb6d6c50}{
string {\bfseries dump\_\-state} () const }
\label{classDeletionTable_ad666fd609afc7824ba742e8cfb6d6c50}

\item 
\hyperlink{classDeletionTable_a3fab5bb369e660b5ac93e05dfb4d6389}{DeletionTable} (const string \&tablename, \hyperlink{classRouteTable}{RouteTable}$<$ A $>$ $\ast$parent, \hyperlink{classTrie}{Trie}$<$ A, const \hyperlink{classIPRouteEntry}{IPRouteEntry}$<$ A $>$ $\ast$ $>$ $\ast$ip\_\-route\_\-trie, \hyperlink{classEventLoop}{EventLoop} \&eventloop)
\begin{DoxyCompactList}\small\item\em \hyperlink{classDeletionTable}{DeletionTable} constructor. \item\end{DoxyCompactList}\item 
\hypertarget{classDeletionTable_a54f606ee97e1018ff843cca2d07397f4}{
\hyperlink{classDeletionTable_a54f606ee97e1018ff843cca2d07397f4}{$\sim$DeletionTable} ()}
\label{classDeletionTable_a54f606ee97e1018ff843cca2d07397f4}

\begin{DoxyCompactList}\small\item\em \hyperlink{classDeletionTable}{DeletionTable} destructor. \item\end{DoxyCompactList}\item 
int \hyperlink{classDeletionTable_a627f1f606f06caa5593447c22e911e28}{add\_\-route} (const \hyperlink{classIPRouteEntry}{IPRouteEntry}$<$ A $>$ \&route, \hyperlink{classRouteTable}{RouteTable}$<$ A $>$ $\ast$caller)
\begin{DoxyCompactList}\small\item\em Add a route. \item\end{DoxyCompactList}\item 
int \hyperlink{classDeletionTable_a57a287b89baa40f68fd448c6fd20f1ce}{delete\_\-route} (const \hyperlink{classIPRouteEntry}{IPRouteEntry}$<$ A $>$ $\ast$route, \hyperlink{classRouteTable}{RouteTable}$<$ A $>$ $\ast$caller)
\begin{DoxyCompactList}\small\item\em Delete a route. \item\end{DoxyCompactList}\item 
void \hyperlink{classDeletionTable_a1a49b8537f5fc25c1c8326b97d148ef8}{delete\_\-all\_\-routes} ()
\begin{DoxyCompactList}\small\item\em Delete all \hyperlink{protocolthe-p}{the} routes that are in this \hyperlink{classDeletionTable}{DeletionTable}. \item\end{DoxyCompactList}\item 
const \hyperlink{classIPRouteEntry}{IPRouteEntry}$<$ A $>$ $\ast$ \hyperlink{classDeletionTable_aff8f796bd865ed94cd04bcba7a1b2175}{lookup\_\-route} (const \hyperlink{classIPNet}{IPNet}$<$ A $>$ \&net) const 
\begin{DoxyCompactList}\small\item\em Lookup a specific subnet to see if it is in this \hyperlink{classDeletionTable}{DeletionTable} or \hyperlink{protocolthe-p}{the} upstream tables. \item\end{DoxyCompactList}\item 
const \hyperlink{classIPRouteEntry}{IPRouteEntry}$<$ A $>$ $\ast$ \hyperlink{classDeletionTable_abbd7fed90bc5b3921368d64c7c89f771}{lookup\_\-route} (const A \&addr) const 
\begin{DoxyCompactList}\small\item\em Lookup an IP address to get \hyperlink{protocolthe-p}{the} most specific (longest prefix length) route in \hyperlink{protocolthe-p}{the} \hyperlink{classDeletionTable}{DeletionTable} or \hyperlink{protocolthe-p}{the} upstream tables that matches this address. \item\end{DoxyCompactList}\item 
\hyperlink{classRouteRange}{RouteRange}$<$ A $>$ $\ast$ \hyperlink{classDeletionTable_ac77cbba69d9cc8690520e38c6440a3c0}{lookup\_\-route\_\-range} (const A \&addr) const 
\begin{DoxyCompactList}\small\item\em Lookup an IP addressto get \hyperlink{protocolthe-p}{the} most specific (longest prefix length) route in \hyperlink{protocolthe-p}{the} union of \hyperlink{protocolthe-p}{the} \hyperlink{classDeletionTable}{DeletionTable} and \hyperlink{protocolthe-p}{the} upstream tables that matches this address, along with \hyperlink{protocolthe-p}{the} \hyperlink{classRouteRange}{RouteRange} information for this address and route. \item\end{DoxyCompactList}\item 
\hypertarget{classDeletionTable_a17b043380317f492bae5d4c6baaa36ce}{
void \hyperlink{classDeletionTable_a17b043380317f492bae5d4c6baaa36ce}{background\_\-deletion\_\-pass} ()}
\label{classDeletionTable_a17b043380317f492bae5d4c6baaa36ce}

\begin{DoxyCompactList}\small\item\em Delete a route, and reschedule background\_\-deletion\_\-pass again on a zero-\/second timer until all \hyperlink{protocolthe-p}{the} routes have been deleted. \item\end{DoxyCompactList}\item 
\hypertarget{classDeletionTable_aa165bb58228a6e44bd9b1a665ff1aaf8}{
void \hyperlink{classDeletionTable_aa165bb58228a6e44bd9b1a665ff1aaf8}{unplumb\_\-self} ()}
\label{classDeletionTable_aa165bb58228a6e44bd9b1a665ff1aaf8}

\begin{DoxyCompactList}\small\item\em Remove ourself from \hyperlink{protocolthe-p}{the} plumbing and delete ourself. \item\end{DoxyCompactList}\item 
TableType \hyperlink{classDeletionTable_ad603fc21086f27605d2807a644c6ffcc}{type} () const 
\item 
\hypertarget{classDeletionTable_a2b1addaed4967846c90154cd1558d931}{
void \hyperlink{classDeletionTable_a2b1addaed4967846c90154cd1558d931}{replumb} (\hyperlink{classRouteTable}{RouteTable}$<$ A $>$ $\ast$old\_\-parent, \hyperlink{classRouteTable}{RouteTable}$<$ A $>$ $\ast$new\_\-parent)}
\label{classDeletionTable_a2b1addaed4967846c90154cd1558d931}

\begin{DoxyCompactList}\small\item\em Change \hyperlink{protocolthe-p}{the} parent of this route table. \item\end{DoxyCompactList}\item 
\hypertarget{classDeletionTable_a8be6eaec91ed48bf0725fb137f11e1a4}{
string \hyperlink{classDeletionTable_a8be6eaec91ed48bf0725fb137f11e1a4}{str} () const }
\label{classDeletionTable_a8be6eaec91ed48bf0725fb137f11e1a4}

\begin{DoxyCompactList}\small\item\em Render \hyperlink{protocolthe-p}{the} \hyperlink{classDeletionTable}{DeletionTable} as a string for debugging purposes. \item\end{DoxyCompactList}\item 
\hypertarget{classDeletionTable_a08b6bf690f0a885c9b584b30b85b220b}{
\hyperlink{classRouteTable}{RouteTable}$<$ A $>$ $\ast$ {\bfseries parent} ()}
\label{classDeletionTable_a08b6bf690f0a885c9b584b30b85b220b}

\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classDeletionTable_aa165bb58228a6e44bd9b1a665ff1aaf8}{
void {\bfseries unplumb\_\-self} ()}
\label{classDeletionTable_aa165bb58228a6e44bd9b1a665ff1aaf8}

\item 
\hypertarget{classDeletionTable_a2dded03a964420fa513288f94156a32c}{
bool {\bfseries delete\_\-next\_\-chain} ()}
\label{classDeletionTable_a2dded03a964420fa513288f94156a32c}

\item 
\hypertarget{classDeletionTable_a96469ba16c84f5354101c3518e42f4ef}{
\hyperlink{classEventLoop}{EventLoop} \& {\bfseries eventloop} () const }
\label{classDeletionTable_a96469ba16c84f5354101c3518e42f4ef}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classDeletionTable_ad034d79a202d7064e6a9e2dfd12cc6af}{
const \hyperlink{classPeerHandler}{PeerHandler} $\ast$ {\bfseries \_\-peer}}
\label{classDeletionTable_ad034d79a202d7064e6a9e2dfd12cc6af}

\item 
\hypertarget{classDeletionTable_a457b829920c08a546409a1f7d462cdd2}{
uint32\_\-t {\bfseries \_\-genid}}
\label{classDeletionTable_a457b829920c08a546409a1f7d462cdd2}

\item 
\hypertarget{classDeletionTable_aad078426af51fa5cdcb425d0ce7fd993}{
\hyperlink{classBgpTrie}{BgpTrie}$<$ A $>$ $\ast$ {\bfseries \_\-route\_\-table}}
\label{classDeletionTable_aad078426af51fa5cdcb425d0ce7fd993}

\item 
\hypertarget{classDeletionTable_a8619f7a3382022e41e30fd3b2cd464cc}{
\hyperlink{classBgpTrie}{BgpTrie}$<$ A $>$::PathmapType::const\_\-iterator {\bfseries \_\-del\_\-sweep}}
\label{classDeletionTable_a8619f7a3382022e41e30fd3b2cd464cc}

\item 
\hypertarget{classDeletionTable_ab636adc750591deb12b2c16886a7ff0e}{
int {\bfseries \_\-deleted}}
\label{classDeletionTable_ab636adc750591deb12b2c16886a7ff0e}

\item 
\hypertarget{classDeletionTable_a9e829dbe2eaf1fc8e9353a83ef826267}{
int {\bfseries \_\-chains}}
\label{classDeletionTable_a9e829dbe2eaf1fc8e9353a83ef826267}

\item 
\hypertarget{classDeletionTable_a7c747f10a37411d3095b2eca328d6dc3}{
\hyperlink{classXorpTask}{XorpTask} {\bfseries \_\-deletion\_\-task}}
\label{classDeletionTable_a7c747f10a37411d3095b2eca328d6dc3}

\item 
\hypertarget{classDeletionTable_ae340a681c87435f74ad98fdc8cca387f}{
\hyperlink{classRouteTable}{RouteTable}$<$ A $>$ $\ast$ {\bfseries \_\-parent}}
\label{classDeletionTable_ae340a681c87435f74ad98fdc8cca387f}

\item 
\hypertarget{classDeletionTable_a414b9549893de81f25af028874a6eea2}{
\hyperlink{classEventLoop}{EventLoop} \& {\bfseries \_\-eventloop}}
\label{classDeletionTable_a414b9549893de81f25af028874a6eea2}

\item 
\hypertarget{classDeletionTable_a6ac1f2ceeaabc67d1b6e456502737ea5}{
\hyperlink{classTrie}{Trie}$<$ A, const \hyperlink{classIPRouteEntry}{IPRouteEntry}$<$ A $>$ $\ast$ $>$ $\ast$ {\bfseries \_\-ip\_\-route\_\-table}}
\label{classDeletionTable_a6ac1f2ceeaabc67d1b6e456502737ea5}

\item 
\hypertarget{classDeletionTable_ab1ed6663d7b5d329fb354263a20c0774}{
\hyperlink{classXorpTimer}{XorpTimer} {\bfseries \_\-background\_\-deletion\_\-timer}}
\label{classDeletionTable_ab1ed6663d7b5d329fb354263a20c0774}

\end{DoxyCompactItemize}


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

\hyperlink{classDeletionTable}{DeletionTable} is a temporary \hyperlink{classBGPRouteTable}{BGPRouteTable} used to delete routes when a peer goes down. \hyperlink{classRouteTable}{RouteTable} that performs background deletion of routes when a routing protocol goes down leaving routes in \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB}.

When a peer goes down, all \hyperlink{protocolthe-p}{the} routes stored in a RibIn need to be deleted. However, this can take some time, so it cannot occur in one atomic operation, so it must be done route-\/by-\/route as a background task. This is complicated by \hyperlink{protocolthe-p}{the} fact that \hyperlink{protocolthe-p}{the} peering may come back up while this background deletion is occuring, and new routes may appear. To handle \hyperlink{protocolthe-p}{the} background deletion while keeping \hyperlink{protocolthe-p}{the} RibIn simple, we simply create a new \hyperlink{classDeletionTable}{DeletionTable} route table, plumb it in directly after \hyperlink{protocolthe-p}{the} RibIn, and pass \hyperlink{protocolthe-p}{the} RibIn's entire route trie to \hyperlink{protocolthe-p}{the} \hyperlink{classDeletionTable}{DeletionTable}. RibIn can now forget these routes ever existed, and \hyperlink{classDeletionTable}{DeletionTable} can get on with \hyperlink{protocolthe-p}{the} background deletion task, unplumbing and deleting itself when no routes remain.

Care must be taken to ensure that \hyperlink{protocolthe-p}{the} downstream routing tables see consistent information. For example, if there is a route for subnet X in \hyperlink{protocolthe-p}{the} \hyperlink{classDeletionTable}{DeletionTable} that has not yet been deleted, and an add\_\-route for X comes downstream from rthe RibIn, then this would need to be propagated downstream as a replace\_\-route.

Note that if a peering flaps multiple times, multiple DeletionTables may be plumbed in, one after another, behind a \hyperlink{classRibInTable}{RibInTable}.

Its template class, A, must be either \hyperlink{protocolthe-p}{the} \hyperlink{classIPv4}{IPv4} class of \hyperlink{protocolthe-p}{the} \hyperlink{classIPv6}{IPv6} class. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classDeletionTable_a3fab5bb369e660b5ac93e05dfb4d6389}{
\index{DeletionTable@{DeletionTable}!DeletionTable@{DeletionTable}}
\index{DeletionTable@{DeletionTable}!DeletionTable@{DeletionTable}}
\subsubsection[{DeletionTable}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A $>$ {\bf DeletionTable}$<$ A $>$::{\bf DeletionTable} (
\begin{DoxyParamCaption}
\item[{const string \&}]{tablename, }
\item[{{\bf RouteTable}$<$ A $>$ $\ast$}]{parent, }
\item[{{\bf Trie}$<$ A, const {\bf IPRouteEntry}$<$ A $>$ $\ast$ $>$ $\ast$}]{ip\_\-route\_\-trie, }
\item[{{\bf EventLoop} \&}]{eventloop}
\end{DoxyParamCaption}
)}}
\label{classDeletionTable_a3fab5bb369e660b5ac93e05dfb4d6389}


\hyperlink{classDeletionTable}{DeletionTable} constructor. 


\begin{DoxyParams}{Parameters}
{\em tablename} & used for debugging. \\
\hline
{\em parent} & Upstream routing table (usually an origin table). \\
\hline
{\em ip\_\-route\_\-trie} & \hyperlink{protocolthe-p}{the} entire route trie from \hyperlink{protocolthe-p}{the} \hyperlink{classOriginTable}{OriginTable} that contains routes we're going to delete (as a background task). \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\hypertarget{classDeletionTable_a627f1f606f06caa5593447c22e911e28}{
\index{DeletionTable@{DeletionTable}!add\_\-route@{add\_\-route}}
\index{add\_\-route@{add\_\-route}!DeletionTable@{DeletionTable}}
\subsubsection[{add\_\-route}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A $>$ int {\bf DeletionTable}$<$ A $>$::add\_\-route (
\begin{DoxyParamCaption}
\item[{const {\bf IPRouteEntry}$<$ A $>$ \&}]{route, }
\item[{{\bf RouteTable}$<$ A $>$ $\ast$}]{caller}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classDeletionTable_a627f1f606f06caa5593447c22e911e28}


Add a route. 

If \hyperlink{protocolthe-p}{the} route was stored in \hyperlink{protocolthe-p}{the} \hyperlink{classDeletionTable}{DeletionTable}, we'll remove it and propagate \hyperlink{protocolthe-p}{the} delete and add downstream.


\begin{DoxyParams}{Parameters}
{\em route} & \hyperlink{protocolthe-p}{the} route entry to be added. \\
\hline
{\em caller} & \hyperlink{protocolthe-p}{the} caller route table. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}


Implements \hyperlink{classRouteTable}{RouteTable$<$ A $>$}.

\hypertarget{classDeletionTable_a1a49b8537f5fc25c1c8326b97d148ef8}{
\index{DeletionTable@{DeletionTable}!delete\_\-all\_\-routes@{delete\_\-all\_\-routes}}
\index{delete\_\-all\_\-routes@{delete\_\-all\_\-routes}!DeletionTable@{DeletionTable}}
\subsubsection[{delete\_\-all\_\-routes}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A $>$ void {\bf DeletionTable}$<$ A $>$::delete\_\-all\_\-routes (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{classDeletionTable_a1a49b8537f5fc25c1c8326b97d148ef8}


Delete all \hyperlink{protocolthe-p}{the} routes that are in this \hyperlink{classDeletionTable}{DeletionTable}. 

The deletion is not propagated downstream, so this is only useful when shutting down \hyperlink{protocolthe-p}{the} \hyperlink{classRIB}{RIB}. \hypertarget{classDeletionTable_a57a287b89baa40f68fd448c6fd20f1ce}{
\index{DeletionTable@{DeletionTable}!delete\_\-route@{delete\_\-route}}
\index{delete\_\-route@{delete\_\-route}!DeletionTable@{DeletionTable}}
\subsubsection[{delete\_\-route}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A $>$ int {\bf DeletionTable}$<$ A $>$::delete\_\-route (
\begin{DoxyParamCaption}
\item[{const {\bf IPRouteEntry}$<$ A $>$ $\ast$}]{route, }
\item[{{\bf RouteTable}$<$ A $>$ $\ast$}]{caller}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classDeletionTable_a57a287b89baa40f68fd448c6fd20f1ce}


Delete a route. 

This route MUST NOT be in \hyperlink{protocolthe-p}{the} \hyperlink{classDeletionTable}{DeletionTable} trie.


\begin{DoxyParams}{Parameters}
{\em route} & \hyperlink{protocolthe-p}{the} route entry to be deleted. \\
\hline
{\em caller} & \hyperlink{protocolthe-p}{the} caller route table. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
XORP\_\-OK on success, otherwise XORP\_\-ERROR. 
\end{DoxyReturn}


Implements \hyperlink{classRouteTable}{RouteTable$<$ A $>$}.

\hypertarget{classDeletionTable_adfd4645ef007733030a768195c798176}{
\index{DeletionTable@{DeletionTable}!genid@{genid}}
\index{genid@{genid}!DeletionTable@{DeletionTable}}
\subsubsection[{genid}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A $>$ uint32\_\-t {\bf DeletionTable}$<$ A $>$::genid (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classDeletionTable_adfd4645ef007733030a768195c798176}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} generation id. 
\end{DoxyReturn}
\hypertarget{classDeletionTable_aff8f796bd865ed94cd04bcba7a1b2175}{
\index{DeletionTable@{DeletionTable}!lookup\_\-route@{lookup\_\-route}}
\index{lookup\_\-route@{lookup\_\-route}!DeletionTable@{DeletionTable}}
\subsubsection[{lookup\_\-route}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A $>$ const {\bf IPRouteEntry}$<$ A $>$ $\ast$ {\bf DeletionTable}$<$ A $>$::lookup\_\-route (
\begin{DoxyParamCaption}
\item[{const {\bf IPNet}$<$ A $>$ \&}]{net}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classDeletionTable_aff8f796bd865ed94cd04bcba7a1b2175}


Lookup a specific subnet to see if it is in this \hyperlink{classDeletionTable}{DeletionTable} or \hyperlink{protocolthe-p}{the} upstream tables. 


\begin{DoxyParams}{Parameters}
{\em net} & \hyperlink{protocolthe-p}{the} subnet to look up. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a pointer to \hyperlink{protocolthe-p}{the} route entry if it exists, NULL otherwise. 
\end{DoxyReturn}


Implements \hyperlink{classRouteTable}{RouteTable$<$ A $>$}.

\hypertarget{classDeletionTable_abbd7fed90bc5b3921368d64c7c89f771}{
\index{DeletionTable@{DeletionTable}!lookup\_\-route@{lookup\_\-route}}
\index{lookup\_\-route@{lookup\_\-route}!DeletionTable@{DeletionTable}}
\subsubsection[{lookup\_\-route}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A $>$ const {\bf IPRouteEntry}$<$ A $>$ $\ast$ {\bf DeletionTable}$<$ A $>$::lookup\_\-route (
\begin{DoxyParamCaption}
\item[{const A \&}]{addr}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classDeletionTable_abbd7fed90bc5b3921368d64c7c89f771}


Lookup an IP address to get \hyperlink{protocolthe-p}{the} most specific (longest prefix length) route in \hyperlink{protocolthe-p}{the} \hyperlink{classDeletionTable}{DeletionTable} or \hyperlink{protocolthe-p}{the} upstream tables that matches this address. 


\begin{DoxyParams}{Parameters}
{\em addr} & \hyperlink{protocolthe-p}{the} IP address to look up. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a pointer to \hyperlink{protocolthe-p}{the} most specific route entry if any entry matches, NULL otherwise. 
\end{DoxyReturn}


Implements \hyperlink{classRouteTable}{RouteTable$<$ A $>$}.

\hypertarget{classDeletionTable_ac77cbba69d9cc8690520e38c6440a3c0}{
\index{DeletionTable@{DeletionTable}!lookup\_\-route\_\-range@{lookup\_\-route\_\-range}}
\index{lookup\_\-route\_\-range@{lookup\_\-route\_\-range}!DeletionTable@{DeletionTable}}
\subsubsection[{lookup\_\-route\_\-range}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A $>$ {\bf RouteRange}$<$ A $>$ $\ast$ {\bf DeletionTable}$<$ A $>$::lookup\_\-route\_\-range (
\begin{DoxyParamCaption}
\item[{const A \&}]{addr}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classDeletionTable_ac77cbba69d9cc8690520e38c6440a3c0}


Lookup an IP addressto get \hyperlink{protocolthe-p}{the} most specific (longest prefix length) route in \hyperlink{protocolthe-p}{the} union of \hyperlink{protocolthe-p}{the} \hyperlink{classDeletionTable}{DeletionTable} and \hyperlink{protocolthe-p}{the} upstream tables that matches this address, along with \hyperlink{protocolthe-p}{the} \hyperlink{classRouteRange}{RouteRange} information for this address and route. 

\begin{DoxySeeAlso}{See also}
\hyperlink{classRouteRange}{RouteRange} 
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
{\em addr} & \hyperlink{protocolthe-p}{the} IP address to look up. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a pointer to a \hyperlink{classRouteRange}{RouteRange} class instance containing \hyperlink{protocolthe-p}{the} relevant answer. It is up to \hyperlink{protocolthe-p}{the} recipient of this pointer to free \hyperlink{protocolthe-p}{the} associated memory. 
\end{DoxyReturn}


Implements \hyperlink{classRouteTable}{RouteTable$<$ A $>$}.

\hypertarget{classDeletionTable_ad603fc21086f27605d2807a644c6ffcc}{
\index{DeletionTable@{DeletionTable}!type@{type}}
\index{type@{type}!DeletionTable@{DeletionTable}}
\subsubsection[{type}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A $>$ TableType {\bf DeletionTable}$<$ A $>$::type (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}
\label{classDeletionTable_ad603fc21086f27605d2807a644c6ffcc}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} table type (TableType). 
\end{DoxyReturn}


Implements \hyperlink{classBGPRouteTable}{BGPRouteTable$<$ A $>$}.



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