\hypertarget{classFilterTable}{
\section{FilterTable$<$ A $>$ Class Template Reference}
\label{classFilterTable}\index{FilterTable@{FilterTable}}
}


specialized \hyperlink{classBGPRouteTable}{BGPRouteTable} implementing a filter bank to modify or drop routes.  




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

Inheritance diagram for FilterTable$<$ A $>$:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classFilterTable}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classFilterTable_ae85140afc3375fb4b33593f748be03ea}{
{\bfseries FilterTable} (string tablename, Safi safi, \hyperlink{classBGPRouteTable}{BGPRouteTable}$<$ A $>$ $\ast$parent, \hyperlink{classNextHopResolver}{NextHopResolver}$<$ A $>$ \&next\_\-hop\_\-resolver)}
\label{classFilterTable_ae85140afc3375fb4b33593f748be03ea}

\item 
\hypertarget{classFilterTable_ab77a0c3049769edecc6b6ccd76683cab}{
void {\bfseries reconfigure\_\-filter} ()}
\label{classFilterTable_ab77a0c3049769edecc6b6ccd76683cab}

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

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

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

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

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

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

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

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

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

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

\item 
\hypertarget{classFilterTable_a321e647cb538ea29221dad30f328dda1}{
int {\bfseries add\_\-aggregation\_\-filter} (bool is\_\-ibgp)}
\label{classFilterTable_a321e647cb538ea29221dad30f328dda1}

\item 
\hypertarget{classFilterTable_a01e1d6b9ad5275bf1b33967a4932715c}{
int {\bfseries add\_\-simple\_\-AS\_\-filter} (const \hyperlink{classAsNum}{AsNum} \&asn)}
\label{classFilterTable_a01e1d6b9ad5275bf1b33967a4932715c}

\item 
\hypertarget{classFilterTable_a46f17827a270b27bdf1652ded362ff65}{
int {\bfseries add\_\-route\_\-reflector\_\-input\_\-filter} (\hyperlink{classIPv4}{IPv4} bgp\_\-id, \hyperlink{classIPv4}{IPv4} cluster\_\-id)}
\label{classFilterTable_a46f17827a270b27bdf1652ded362ff65}

\item 
\hypertarget{classFilterTable_a34829bcd3e7ebc4b3e2381b84ed8e6d1}{
int {\bfseries add\_\-AS\_\-prepend\_\-filter} (const \hyperlink{classAsNum}{AsNum} \&asn, bool is\_\-confederation\_\-peer)}
\label{classFilterTable_a34829bcd3e7ebc4b3e2381b84ed8e6d1}

\item 
\hypertarget{classFilterTable_abd25998d33a9aec55ebafceb20100186}{
int {\bfseries add\_\-nexthop\_\-rewrite\_\-filter} (const A \&nexthop, bool directly\_\-connected, const \hyperlink{classIPNet}{IPNet}$<$ A $>$ \&subnet)}
\label{classFilterTable_abd25998d33a9aec55ebafceb20100186}

\item 
\hypertarget{classFilterTable_a42cbaa4f85f33220dd41c7c1021b820d}{
int {\bfseries add\_\-nexthop\_\-peer\_\-check\_\-filter} (const A \&nexthop, const A \&peer\_\-address)}
\label{classFilterTable_a42cbaa4f85f33220dd41c7c1021b820d}

\item 
\hypertarget{classFilterTable_a7d966558a26ce67f537614f456198dad}{
int {\bfseries add\_\-ibgp\_\-loop\_\-filter} ()}
\label{classFilterTable_a7d966558a26ce67f537614f456198dad}

\item 
\hypertarget{classFilterTable_a6413c0df4c43ff98cc8fc128495092b7}{
int {\bfseries add\_\-route\_\-reflector\_\-ibgp\_\-loop\_\-filter} (bool client, \hyperlink{classIPv4}{IPv4} bgp\_\-id, \hyperlink{classIPv4}{IPv4} cluster\_\-id)}
\label{classFilterTable_a6413c0df4c43ff98cc8fc128495092b7}

\item 
\hypertarget{classFilterTable_a760a48b38da3e0ce16427b32f677b7ca}{
int {\bfseries add\_\-route\_\-reflector\_\-purge\_\-filter} ()}
\label{classFilterTable_a760a48b38da3e0ce16427b32f677b7ca}

\item 
\hypertarget{classFilterTable_a93647c0262c94f84c314fec98c2041d1}{
int {\bfseries add\_\-localpref\_\-insertion\_\-filter} (uint32\_\-t default\_\-local\_\-pref)}
\label{classFilterTable_a93647c0262c94f84c314fec98c2041d1}

\item 
\hypertarget{classFilterTable_ac813b1292c8fbcbfcba8ffec407c870b}{
int {\bfseries add\_\-localpref\_\-removal\_\-filter} ()}
\label{classFilterTable_ac813b1292c8fbcbfcba8ffec407c870b}

\item 
\hypertarget{classFilterTable_aaf129b53ebabcbbf1e49bd9718b562e5}{
int {\bfseries add\_\-med\_\-insertion\_\-filter} ()}
\label{classFilterTable_aaf129b53ebabcbbf1e49bd9718b562e5}

\item 
\hypertarget{classFilterTable_a3586516f71fa1fabd02b750c21f575e8}{
int {\bfseries add\_\-med\_\-removal\_\-filter} ()}
\label{classFilterTable_a3586516f71fa1fabd02b750c21f575e8}

\item 
\hypertarget{classFilterTable_a5b0df785b91b169f3201b00044531826}{
int {\bfseries add\_\-known\_\-community\_\-filter} (PeerType peer\_\-type)}
\label{classFilterTable_a5b0df785b91b169f3201b00044531826}

\item 
\hypertarget{classFilterTable_ae5af3057760b332104166712b48adf92}{
int {\bfseries add\_\-unknown\_\-filter} ()}
\label{classFilterTable_ae5af3057760b332104166712b48adf92}

\item 
\hypertarget{classFilterTable_a9933d543b7d385c6612c285d49be3cc4}{
int {\bfseries add\_\-originate\_\-route\_\-filter} (const \hyperlink{classAsNum}{AsNum} \&asn, PeerType peer\_\-type)}
\label{classFilterTable_a9933d543b7d385c6612c285d49be3cc4}

\item 
\hypertarget{classFilterTable_a8919c5c93db7c0a5344823cf954a3be3}{
void {\bfseries do\_\-versioning} ()}
\label{classFilterTable_a8919c5c93db7c0a5344823cf954a3be3}

\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classFilterTable_aafde171d8b1bee9ab4604d5c0874ea60}{
bool {\bfseries apply\_\-filters} (\hyperlink{classInternalMessage}{InternalMessage}$<$ A $>$ \&rtmsg, int ref\_\-change)}
\label{classFilterTable_aafde171d8b1bee9ab4604d5c0874ea60}

\item 
\hypertarget{classFilterTable_a090b64600527b7e19b95b661b061f72d}{
bool {\bfseries apply\_\-filters} (\hyperlink{classInternalMessage}{InternalMessage}$<$ A $>$ \&rtmsg) const }
\label{classFilterTable_a090b64600527b7e19b95b661b061f72d}

\item 
\hypertarget{classFilterTable_a4198d2bc40da424b3f1c9b0b916d92e7}{
void {\bfseries drop\_\-message} (const \hyperlink{classInternalMessage}{InternalMessage}$<$ A $>$ $\ast$rtmsg) const }
\label{classFilterTable_a4198d2bc40da424b3f1c9b0b916d92e7}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classFilterTable_ad8dd5736877d5513b330e63437cce0f0}{
map$<$ uint32\_\-t, \hyperlink{classFilterVersion}{FilterVersion}$<$ A $>$ $\ast$ $>$ {\bfseries \_\-filter\_\-versions}}
\label{classFilterTable_ad8dd5736877d5513b330e63437cce0f0}

\item 
\hypertarget{classFilterTable_a0a643e4744ff99c473d2fecf8804a9af}{
set$<$ uint32\_\-t $>$ {\bfseries \_\-deleted\_\-filters}}
\label{classFilterTable_a0a643e4744ff99c473d2fecf8804a9af}

\item 
\hypertarget{classFilterTable_abd7699898904a95d71a27589c7be0e2f}{
\hyperlink{classFilterVersion}{FilterVersion}$<$ A $>$ $\ast$ {\bfseries \_\-current\_\-filter}}
\label{classFilterTable_abd7699898904a95d71a27589c7be0e2f}

\item 
\hypertarget{classFilterTable_a72192e232616d5231611ee176a6f1b56}{
\hyperlink{classNextHopResolver}{NextHopResolver}$<$ A $>$ \& {\bfseries \_\-next\_\-hop\_\-resolver}}
\label{classFilterTable_a72192e232616d5231611ee176a6f1b56}

\item 
\hypertarget{classFilterTable_a0d520086e72361f0a07566ac7b08b9ea}{
bool {\bfseries \_\-do\_\-versioning}}
\label{classFilterTable_a0d520086e72361f0a07566ac7b08b9ea}

\end{DoxyCompactItemize}


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

specialized \hyperlink{classBGPRouteTable}{BGPRouteTable} implementing a filter bank to modify or drop routes. The XORP BGP is internally implemented as a set of pipelines consisting of a series of BGPRouteTables. Each pipeline receives routes from a BGP peer, stores them, and applies filters to them to modify \hyperlink{protocolthe-p}{the} routes. Then \hyperlink{protocolthe-p}{the} pipelines converge on a single decision process, which decides which route wins amongst possible alternative routes. After decision, \hyperlink{protocolthe-p}{the} winning routes fanout again along a set of pipelines, again being filtered, before being transmitted to peers.

\hyperlink{classFilterTable}{FilterTable} is a \hyperlink{classBGPRouteTable}{BGPRouteTable} that can hold banks of route filters. Normally \hyperlink{classFilterTable}{FilterTable} propagates add\_\-route, delete\_\-route and \hyperlink{protocolthe-p}{the} response to lookup\_\-route directly through from \hyperlink{protocolthe-p}{the} parent to \hyperlink{protocolthe-p}{the} child. A route filter can cause these to not be be propagated, or can modify \hyperlink{protocolthe-p}{the} attributes of \hyperlink{protocolthe-p}{the} route in \hyperlink{protocolthe-p}{the} message.

Typically there are two FilterTables for each peer, one in \hyperlink{protocolthe-p}{the} input branch from that peer, and one in \hyperlink{protocolthe-p}{the} output branch to that peer. A \hyperlink{classFilterTable}{FilterTable} does not store \hyperlink{protocolthe-p}{the} routes it modifies. Thus is is normally followed by a \hyperlink{classCacheTable}{CacheTable} which stores those routes for later use. 

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