\hypertarget{classPolicyTable}{
\section{PolicyTable$<$ A $>$ Class Template Reference}
\label{classPolicyTable}\index{PolicyTable@{PolicyTable}}
}


Generic Policy filter table suitable for export filters.  




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

Inheritance diagram for PolicyTable$<$ A $>$:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.871795cm]{classPolicyTable}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classPolicyTable_a054131ce1481f06d4765eb86a5e5b6c0}{PolicyTable} (const string \&tablename, const Safi \&safi, \hyperlink{classBGPRouteTable}{BGPRouteTable}$<$ A $>$ $\ast$parent, \hyperlink{classPolicyFilters}{PolicyFilters} \&pfs, const filter::Filter \&type)
\item 
\hypertarget{classPolicyTable_aa4bc7b3203de8e70849c779d855b4fd0}{
int {\bfseries add\_\-route} (\hyperlink{classInternalMessage}{InternalMessage}$<$ A $>$ \&rtmsg, \hyperlink{classBGPRouteTable}{BGPRouteTable}$<$ A $>$ $\ast$caller)}
\label{classPolicyTable_aa4bc7b3203de8e70849c779d855b4fd0}

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

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

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

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

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

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

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

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

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

\item 
bool \hyperlink{classPolicyTable_a2537596a720cf3cbf12065633db284de}{do\_\-filtering} (\hyperlink{classInternalMessage}{InternalMessage}$<$ A $>$ \&rtmsg, bool no\_\-modify) const 
\begin{DoxyCompactList}\small\item\em Performs policy filtering on a route. \item\end{DoxyCompactList}\item 
\hypertarget{classPolicyTable_a96264a0ae3bc32bd0dc0ae741fd91f6e}{
void {\bfseries enable\_\-filtering} (bool on)}
\label{classPolicyTable_a96264a0ae3bc32bd0dc0ae741fd91f6e}

\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classPolicyTable_a3690301eb6ea01fa5424c5df5695cd4a}{
virtual void {\bfseries init\_\-varrw} ()}
\label{classPolicyTable_a3690301eb6ea01fa5424c5df5695cd4a}

\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classPolicyTable_a68ed6028c975c27e0b99b487f1e6055f}{
const filter::Filter {\bfseries \_\-filter\_\-type}}
\label{classPolicyTable_a68ed6028c975c27e0b99b487f1e6055f}

\item 
\hypertarget{classPolicyTable_a3f177f834981c604112268e8e3490b40}{
\hyperlink{classBGPVarRW}{BGPVarRW}$<$ A $>$ $\ast$ {\bfseries \_\-varrw}}
\label{classPolicyTable_a3f177f834981c604112268e8e3490b40}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classPolicyTable_af4a0cfd011161859394673f69a48ce4a}{
\hyperlink{classPolicyFilters}{PolicyFilters} \& {\bfseries \_\-policy\_\-filters}}
\label{classPolicyTable_af4a0cfd011161859394673f69a48ce4a}

\item 
\hypertarget{classPolicyTable_a1fc8cba202d0a681708787c785fbe81a}{
bool {\bfseries \_\-enable\_\-filtering}}
\label{classPolicyTable_a1fc8cba202d0a681708787c785fbe81a}

\end{DoxyCompactItemize}


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

Generic Policy filter table suitable for export filters. All policy filter tables in BGP have very similar functionality. Some have more features than others, but most of \hyperlink{protocolthe-p}{the} code is shared.

The export filter is \hyperlink{protocolthe-p}{the} most \char`\"{}standard\char`\"{} table, so it is used as a base table for \hyperlink{protocolthe-p}{the} source match and import filter tables. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classPolicyTable_a054131ce1481f06d4765eb86a5e5b6c0}{
\index{PolicyTable@{PolicyTable}!PolicyTable@{PolicyTable}}
\index{PolicyTable@{PolicyTable}!PolicyTable@{PolicyTable}}
\subsubsection[{PolicyTable}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ {\bf PolicyTable}$<$ A $>$::{\bf PolicyTable} (
\begin{DoxyParamCaption}
\item[{const string \&}]{tablename, }
\item[{const Safi \&}]{safi, }
\item[{{\bf BGPRouteTable}$<$ A $>$ $\ast$}]{parent, }
\item[{{\bf PolicyFilters} \&}]{pfs, }
\item[{const filter::Filter \&}]{type}
\end{DoxyParamCaption}
)}}
\label{classPolicyTable_a054131ce1481f06d4765eb86a5e5b6c0}

\begin{DoxyParams}{Parameters}
{\em tablename} & name of \hyperlink{protocolthe-p}{the} table. \\
\hline
{\em safi} & \hyperlink{protocolthe-p}{the} safi. \\
\hline
{\em parent} & \hyperlink{protocolthe-p}{the} parent table. \\
\hline
{\em pfs} & a reference to \hyperlink{protocolthe-p}{the} global policy filters. \\
\hline
{\em type} & \hyperlink{protocolthe-p}{the} type of policy filter used in this table. \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\hypertarget{classPolicyTable_a2537596a720cf3cbf12065633db284de}{
\index{PolicyTable@{PolicyTable}!do\_\-filtering@{do\_\-filtering}}
\index{do\_\-filtering@{do\_\-filtering}!PolicyTable@{PolicyTable}}
\subsubsection[{do\_\-filtering}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class A$>$ bool {\bf PolicyTable}$<$ A $>$::do\_\-filtering (
\begin{DoxyParamCaption}
\item[{{\bf InternalMessage}$<$ A $>$ \&}]{rtmsg, }
\item[{bool}]{no\_\-modify}
\end{DoxyParamCaption}
) const}}
\label{classPolicyTable_a2537596a720cf3cbf12065633db284de}


Performs policy filtering on a route. 

If false is returned, then \hyperlink{protocolthe-p}{the} route is rejected, otherwise it was accepted and may have been modified.


\begin{DoxyParams}{Parameters}
{\em rtmsg} & \hyperlink{protocolthe-p}{the} route message to filter. \\
\hline
{\em no\_\-modify} & if true, \hyperlink{protocolthe-p}{the} filter will not modify \hyperlink{protocolthe-p}{the} route. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
whether \hyperlink{protocolthe-p}{the} route was accepted by \hyperlink{protocolthe-p}{the} filter. 
\end{DoxyReturn}


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