\hypertarget{classPolicyFilters}{
\section{PolicyFilters Class Reference}
\label{classPolicyFilters}\index{PolicyFilters@{PolicyFilters}}
}


A container for all policy filters a protocol should support.  




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

Inheritance diagram for PolicyFilters:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3.000000cm]{classPolicyFilters}
\end{center}
\end{figure}
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{classPolicyFilters_1_1PolicyFiltersErr}{PolicyFiltersErr}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classPolicyFilters_ad5661e46399d0e5e53d80e9fa7b9d912}{
{\bfseries PolicyFilters} (\hyperlink{classFilterBase}{FilterBase} $\ast$im, \hyperlink{classFilterBase}{FilterBase} $\ast$sm, \hyperlink{classFilterBase}{FilterBase} $\ast$ex)}
\label{classPolicyFilters_ad5661e46399d0e5e53d80e9fa7b9d912}

\item 
bool \hyperlink{classPolicyFilters_a478f0a7b40ce889839b8c6fb73f5a85c}{run\_\-filter} (const uint32\_\-t \&type, \hyperlink{classVarRW}{VarRW} \&varrw)
\begin{DoxyCompactList}\small\item\em Run a filter and decide whether route should be accepted. \item\end{DoxyCompactList}\item 
void \hyperlink{classPolicyFilters_a1562d530c7704a0313c2264b5971c133}{configure} (const uint32\_\-t \&type, const string \&conf)
\begin{DoxyCompactList}\small\item\em Configure a filter. \item\end{DoxyCompactList}\item 
void \hyperlink{classPolicyFilters_a1e49c3f111f339eb3dc08ef46b241058}{reset} (const uint32\_\-t \&type)
\begin{DoxyCompactList}\small\item\em Reset a filter. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classFilterBase}{FilterBase} \& \hyperlink{classPolicyFilters_a7d229416b56c33e7ed99673a795865b6}{whichFilter} (const uint32\_\-t \&ftype)
\begin{DoxyCompactList}\small\item\em Decide which filter to run based on its type. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classPolicyFilters_a60afd98c47fd9a7f33a2141dcea4adbb}{
\hyperlink{classFilterBase}{FilterBase} $\ast$ {\bfseries \_\-import\_\-filter}}
\label{classPolicyFilters_a60afd98c47fd9a7f33a2141dcea4adbb}

\item 
\hypertarget{classPolicyFilters_a8cdb768b57927f08aaedbcc04dbf9987}{
\hyperlink{classFilterBase}{FilterBase} $\ast$ {\bfseries \_\-export\_\-sm\_\-filter}}
\label{classPolicyFilters_a8cdb768b57927f08aaedbcc04dbf9987}

\item 
\hypertarget{classPolicyFilters_a92a7e1c5d80d76424df9a18395abf32d}{
\hyperlink{classFilterBase}{FilterBase} $\ast$ {\bfseries \_\-export\_\-filter}}
\label{classPolicyFilters_a92a7e1c5d80d76424df9a18395abf32d}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
A container for all policy filters a protocol should support. Filters which are not used should just not be configured / executed. In \hyperlink{protocolthe-p}{the} future an option to disable a filter should be added. Although, not running a filter is harmless for now \mbox{[}if configured however, state consumes memory\mbox{]}. 

\subsection{Member Function Documentation}
\hypertarget{classPolicyFilters_a1562d530c7704a0313c2264b5971c133}{
\index{PolicyFilters@{PolicyFilters}!configure@{configure}}
\index{configure@{configure}!PolicyFilters@{PolicyFilters}}
\subsubsection[{configure}]{\setlength{\rightskip}{0pt plus 5cm}void PolicyFilters::configure (
\begin{DoxyParamCaption}
\item[{const uint32\_\-t \&}]{type, }
\item[{const string \&}]{conf}
\end{DoxyParamCaption}
)}}
\label{classPolicyFilters_a1562d530c7704a0313c2264b5971c133}


Configure a filter. 

Throws an exception on error.


\begin{DoxyParams}{Parameters}
{\em type} & \hyperlink{protocolthe-p}{the} filter to configure. \\
\hline
{\em conf} & \hyperlink{protocolthe-p}{the} configuration of \hyperlink{protocolthe-p}{the} filter. \\
\hline
\end{DoxyParams}
\hypertarget{classPolicyFilters_a1e49c3f111f339eb3dc08ef46b241058}{
\index{PolicyFilters@{PolicyFilters}!reset@{reset}}
\index{reset@{reset}!PolicyFilters@{PolicyFilters}}
\subsubsection[{reset}]{\setlength{\rightskip}{0pt plus 5cm}void PolicyFilters::reset (
\begin{DoxyParamCaption}
\item[{const uint32\_\-t \&}]{type}
\end{DoxyParamCaption}
)}}
\label{classPolicyFilters_a1e49c3f111f339eb3dc08ef46b241058}


Reset a filter. 


\begin{DoxyParams}{Parameters}
{\em type} & \hyperlink{protocolthe-p}{the} filter to reset. \\
\hline
\end{DoxyParams}
\hypertarget{classPolicyFilters_a478f0a7b40ce889839b8c6fb73f5a85c}{
\index{PolicyFilters@{PolicyFilters}!run\_\-filter@{run\_\-filter}}
\index{run\_\-filter@{run\_\-filter}!PolicyFilters@{PolicyFilters}}
\subsubsection[{run\_\-filter}]{\setlength{\rightskip}{0pt plus 5cm}bool PolicyFilters::run\_\-filter (
\begin{DoxyParamCaption}
\item[{const uint32\_\-t \&}]{type, }
\item[{{\bf VarRW} \&}]{varrw}
\end{DoxyParamCaption}
)}}
\label{classPolicyFilters_a478f0a7b40ce889839b8c6fb73f5a85c}


Run a filter and decide whether route should be accepted. 

May throw an exception on run-\/time errors.

\begin{DoxyReturn}{Returns}
true if route is accepted, false otherwise. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em type} & which filter should be executed. \\
\hline
{\em varrw} & \hyperlink{protocolthe-p}{the} \hyperlink{classVarRW}{VarRW} associated with \hyperlink{protocolthe-p}{the} route to be filtered. \\
\hline
\end{DoxyParams}
\hypertarget{classPolicyFilters_a7d229416b56c33e7ed99673a795865b6}{
\index{PolicyFilters@{PolicyFilters}!whichFilter@{whichFilter}}
\index{whichFilter@{whichFilter}!PolicyFilters@{PolicyFilters}}
\subsubsection[{whichFilter}]{\setlength{\rightskip}{0pt plus 5cm}{\bf FilterBase} \& PolicyFilters::whichFilter (
\begin{DoxyParamCaption}
\item[{const uint32\_\-t \&}]{ftype}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classPolicyFilters_a7d229416b56c33e7ed99673a795865b6}


Decide which filter to run based on its type. 

Throws exception if ftype is invalid.

\begin{DoxyReturn}{Returns}
filter to execute. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em ftype} & integral filter identifier. \\
\hline
\end{DoxyParams}


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