\hypertarget{classConfiguration}{
\section{Configuration Class Reference}
\label{classConfiguration}\index{Configuration@{Configuration}}
}


Class that contains all configuration and generated code state.  




{\ttfamily \#include $<$configuration.hh$>$}

Inheritance diagram for Configuration:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classConfiguration}
\end{center}
\end{figure}
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{classConfiguration_1_1ConfError}{ConfError}
\begin{DoxyCompactList}\small\item\em Exception thrown on configuration error. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classConfiguration_adb215339270b45ccd61b442728a81a17}{
typedef map$<$ string, \hyperlink{classCode}{Code} $\ast$ $>$ {\bfseries CodeMap}}
\label{classConfiguration_adb215339270b45ccd61b442728a81a17}

\item 
\hypertarget{classConfiguration_ab65efa25195246fcb5994150aedde0d8}{
typedef map$<$ string, TagSet $\ast$ $>$ {\bfseries TagMap}}
\label{classConfiguration_ab65efa25195246fcb5994150aedde0d8}

\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classConfiguration_aea77d6dd2f409cc676d233594d92df68}{Configuration} (\hyperlink{classProcessWatchBase}{ProcessWatchBase} \&pw)
\item 
void \hyperlink{classConfiguration_ab93df0780e06ae1aa5ccc2327056a647}{delete\_\-term} (const string \&policy, const string \&term)
\begin{DoxyCompactList}\small\item\em Throws an exception on failure. \item\end{DoxyCompactList}\item 
void \hyperlink{classConfiguration_a3b71e9d7746f9d4e92843b7ecea9e2e6}{update\_\-term\_\-block} (const string \&policy, const string \&term, const uint32\_\-t \&block, const \hyperlink{classConfigNodeId}{ConfigNodeId} \&order, const string \&statement)
\begin{DoxyCompactList}\small\item\em Update \hyperlink{protocolthe-p}{the} source/dest/action block of a term. \item\end{DoxyCompactList}\item 
void \hyperlink{classConfiguration_acf83d91bc6dfd6ebb93f8ef80a4f483f}{create\_\-term} (const string \&policy, const \hyperlink{classConfigNodeId}{ConfigNodeId} \&order, const string \&term)
\begin{DoxyCompactList}\small\item\em Append a term to a policy. \item\end{DoxyCompactList}\item 
void \hyperlink{classConfiguration_a4a28817f1cf24b4ff7e19573afac3918}{create\_\-policy} (const string \&policy)
\begin{DoxyCompactList}\small\item\em Throws an exception on failure. \item\end{DoxyCompactList}\item 
void \hyperlink{classConfiguration_a2100ca152affc4b41ca3ef17ba465e89}{delete\_\-policy} (const string \&policy)
\begin{DoxyCompactList}\small\item\em Throws an exception on failure. \item\end{DoxyCompactList}\item 
void \hyperlink{classConfiguration_a8eabc37394163ffb3ceb978d8a0895e8}{create\_\-set} (const string \&set)
\begin{DoxyCompactList}\small\item\em Throws an exception on failure. \item\end{DoxyCompactList}\item 
void \hyperlink{classConfiguration_a676364fd279b15ba990c9c68dd30c9dc}{update\_\-set} (const string \&type, const string \&set, const string \&elements)
\begin{DoxyCompactList}\small\item\em Throws an exception on failure. \item\end{DoxyCompactList}\item 
void \hyperlink{classConfiguration_ad5336da73439a12251e63f48eaa7edf5}{delete\_\-set} (const string \&set)
\begin{DoxyCompactList}\small\item\em Throws an exception on failure. \item\end{DoxyCompactList}\item 
void \hyperlink{classConfiguration_a43faeaa14325395d73913c88e03e680f}{add\_\-to\_\-set} (const string \&type, const string \&name, const string \&element)
\begin{DoxyCompactList}\small\item\em Add an element to a set. \item\end{DoxyCompactList}\item 
void \hyperlink{classConfiguration_abf5ca558234f330110d74758f71e7d2d}{delete\_\-from\_\-set} (const string \&type, const string \&name, const string \&element)
\begin{DoxyCompactList}\small\item\em Delete an element from a set. \item\end{DoxyCompactList}\item 
void \hyperlink{classConfiguration_a3c3e9e030cf92dd70103c899d4560b46}{update\_\-imports} (const string \&protocol, const POLICIES \&imports, const string \&mod)
\begin{DoxyCompactList}\small\item\em Throws an exception on failure. \item\end{DoxyCompactList}\item 
void \hyperlink{classConfiguration_adc8c6916393da51b4900c0d33e9c9739}{update\_\-exports} (const string \&protocol, const POLICIES \&exports, const string \&mod)
\begin{DoxyCompactList}\small\item\em Throws an exception on failure. \item\end{DoxyCompactList}\item 
string \hyperlink{classConfiguration_a20b26a3342d2f5a8e22258d9ebe37c3f}{str} ()
\item 
void \hyperlink{classConfiguration_aece15d2297f27aa8402400b36b119bbc}{commit} (uint32\_\-t msec)
\begin{DoxyCompactList}\small\item\em Commit all configuration changes. \item\end{DoxyCompactList}\item 
void \hyperlink{classConfiguration_a1ca0dd2a9d823c8ad660d241aadbc7e6}{add\_\-varmap} (const string \&protocol, const string \&name, const string \&type, const string \&access, const VarRW::Id \&id)
\begin{DoxyCompactList}\small\item\em Add a variable to \hyperlink{protocolthe-p}{the} \hyperlink{classVarMap}{VarMap}, needed for semantic checking. \item\end{DoxyCompactList}\item 
void \hyperlink{classConfiguration_a2c6e4abbfdefe53c87052904c18a612a}{set\_\-filter\_\-manager} (\hyperlink{classFilterManagerBase}{FilterManagerBase} \&)
\begin{DoxyCompactList}\small\item\em This method should be called once at initialization to set \hyperlink{protocolthe-p}{the} \hyperlink{classFilterManager}{FilterManager}. \item\end{DoxyCompactList}\item 
CodeMap \& \hyperlink{classConfiguration_a3394465cc36db8bf9c32dc0e3472c1b8}{import\_\-filters} ()
\begin{DoxyCompactList}\small\item\em A CodeMap is a map relating protocols to code. \item\end{DoxyCompactList}\item 
CodeMap \& \hyperlink{classConfiguration_a4cbc9eec87a9302129255b8e24c937da}{sourcematch\_\-filters} ()
\item 
CodeMap \& \hyperlink{classConfiguration_afacf603358d34d71a6243a8cb3344c90}{export\_\-filters} ()
\item 
\hyperlink{classSetMap}{SetMap} \& \hyperlink{classConfiguration_a9a219c915cd5b831d7005b0f0234e53c}{sets} ()
\item 
TagMap \& \hyperlink{classConfiguration_a13946d2d3b5da8475c6c04fca405352a}{tagmap} ()
\item 
string \hyperlink{classConfiguration_ace345f0761ab7042dd7a339d597d2476}{dump\_\-state} (uint32\_\-t id)
\begin{DoxyCompactList}\small\item\em Dump internal state. \item\end{DoxyCompactList}\item 
\hypertarget{classConfiguration_af555a624c80b8568b7c6525ecdc13b4a}{
void {\bfseries clear\_\-imports} (const string \&protocol)}
\label{classConfiguration_af555a624c80b8568b7c6525ecdc13b4a}

\item 
\hypertarget{classConfiguration_ae3ddf9040ce975f0f3df8fcc5ef6c9e0}{
void {\bfseries clear\_\-exports} (const string \&protocol)}
\label{classConfiguration_ae3ddf9040ce975f0f3df8fcc5ef6c9e0}

\item 
\hypertarget{classConfiguration_a7f1b541aa578d485aa082c0119f9c319}{
bool {\bfseries test\_\-policy} (const string \&policy, const RATTR \&attrs, RATTR \&mods)}
\label{classConfiguration_a7f1b541aa578d485aa082c0119f9c319}

\item 
\hypertarget{classConfiguration_a40558d5390a4e9d1ca2b90265d2f931a}{
void {\bfseries show} (const string \&type, const string \&name, RESOURCES \&res)}
\label{classConfiguration_a40558d5390a4e9d1ca2b90265d2f931a}

\item 
\hypertarget{classConfiguration_a7a25918ad1d0eedfe3e25c0a7cbc3103}{
void {\bfseries show\_\-sets} (const string \&type, const string \&name, RESOURCES \&res)}
\label{classConfiguration_a7a25918ad1d0eedfe3e25c0a7cbc3103}

\item 
\hypertarget{classConfiguration_a8cad96d4323b3f3bd1e79f67105f4fc5}{
void {\bfseries show\_\-policies} (const string \&name, RESOURCES \&res)}
\label{classConfiguration_a8cad96d4323b3f3bd1e79f67105f4fc5}

\end{DoxyCompactItemize}
\subsection*{Private Types}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classConfiguration_aaccf89682daf031222f1b460d0630039}{
typedef set$<$ string $>$ {\bfseries PolicySet}}
\label{classConfiguration_aaccf89682daf031222f1b460d0630039}

\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classTerm}{Term} \& \hyperlink{classConfiguration_a99118246db4885a62d8b36e9e900a750}{find\_\-term} (const string \&policy, const string \&term)
\begin{DoxyCompactList}\small\item\em Throws an exception if no term is found. \item\end{DoxyCompactList}\item 
void \hyperlink{classConfiguration_a4021f6bb22275fd589448579e44fbe7e}{update\_\-dependencies} (\hyperlink{classPolicyStatement}{PolicyStatement} \&policy)
\begin{DoxyCompactList}\small\item\em Scans policy and checks which sets it uses. \item\end{DoxyCompactList}\item 
void \hyperlink{classConfiguration_ac847bd0ea9d27fec21d557e3b99cc419}{compile\_\-policy} (const string \&name)
\begin{DoxyCompactList}\small\item\em Generate code for a policy. \item\end{DoxyCompactList}\item 
void \hyperlink{classConfiguration_a2b34cb1801e06f0397be8f4fbd155308}{compile\_\-policies} ()
\begin{DoxyCompactList}\small\item\em Compile all modified and non previously compiled policies. \item\end{DoxyCompactList}\item 
void \hyperlink{classConfiguration_a5b2ccd703b557ce4d6e97f8fb5afe8c0}{link\_\-sourcematch\_\-code} (const \hyperlink{classCode_1_1Target}{Code::Target} \&target)
\begin{DoxyCompactList}\small\item\em \hyperlink{classLinks}{Links} all source match filter code for a specific target. \item\end{DoxyCompactList}\item 
void \hyperlink{classConfiguration_ada066d12f8cd5d17e6c6b88abd5f5330}{update\_\-tagmap} (const string \&protocol)
\begin{DoxyCompactList}\small\item\em Update \hyperlink{protocolthe-p}{the} policytags used by a protocol. \item\end{DoxyCompactList}\item 
\hypertarget{classConfiguration_a9219bd1f8cb1b992d70a077fddb76e18}{
void \hyperlink{classConfiguration_a9219bd1f8cb1b992d70a077fddb76e18}{link\_\-code} ()}
\label{classConfiguration_a9219bd1f8cb1b992d70a077fddb76e18}

\begin{DoxyCompactList}\small\item\em Link code for updated targets. \item\end{DoxyCompactList}\item 
\hypertarget{classConfiguration_a2fb7ce30d81b6c63cbd3bcaa6b9d58dc}{
void {\bfseries update\_\-ie} (const string \&protocol, const POLICIES \&policies, \hyperlink{classIEMap}{IEMap} \&iemap, PolicyList::PolicyType pt, const string \&mod)}
\label{classConfiguration_a2fb7ce30d81b6c63cbd3bcaa6b9d58dc}

\item 
\hypertarget{classConfiguration_ab53982d03b2a9ca1f3957cafa4174c32}{
void {\bfseries link\_\-code} (const \hyperlink{classCode_1_1Target}{Code::Target} \&target, \hyperlink{classIEMap}{IEMap} \&iemap, CodeMap \&codemap)}
\label{classConfiguration_ab53982d03b2a9ca1f3957cafa4174c32}

\item 
\hypertarget{classConfiguration_aa29bd1f8f2d21d7c0eb84e52233089d8}{
string {\bfseries codemap\_\-str} (CodeMap \&cm)}
\label{classConfiguration_aa29bd1f8f2d21d7c0eb84e52233089d8}

\item 
\hypertarget{classConfiguration_ac4bf124ecfa4075a6982860b0978be79}{
void {\bfseries policy\_\-modified} (const string \&policy)}
\label{classConfiguration_ac4bf124ecfa4075a6982860b0978be79}

\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classConfiguration_a9b36150e9a7f19e1a13db292388942f0}{
\hyperlink{classPolicyMap}{PolicyMap} {\bfseries \_\-policies}}
\label{classConfiguration_a9b36150e9a7f19e1a13db292388942f0}

\item 
\hypertarget{classConfiguration_a2d61009b524a51e74fa7a387e536e8d1}{
\hyperlink{classIEMap}{IEMap} {\bfseries \_\-imports}}
\label{classConfiguration_a2d61009b524a51e74fa7a387e536e8d1}

\item 
\hypertarget{classConfiguration_a47082936428df88dbe66820fe01ac5e3}{
\hyperlink{classIEMap}{IEMap} {\bfseries \_\-exports}}
\label{classConfiguration_a47082936428df88dbe66820fe01ac5e3}

\item 
\hypertarget{classConfiguration_a64d307489c75fdc8b9b7dafeddf5fe17}{
\hyperlink{classSetMap}{SetMap} {\bfseries \_\-sets}}
\label{classConfiguration_a64d307489c75fdc8b9b7dafeddf5fe17}

\item 
\hypertarget{classConfiguration_a457e292c1a5ef51cd6c1cbe89b83d4a2}{
PolicySet {\bfseries \_\-modified\_\-policies}}
\label{classConfiguration_a457e292c1a5ef51cd6c1cbe89b83d4a2}

\item 
\hypertarget{classConfiguration_a94e6a522ce78246a2f7cd9ba0ca2b64f}{
TARGETSET {\bfseries \_\-modified\_\-targets}}
\label{classConfiguration_a94e6a522ce78246a2f7cd9ba0ca2b64f}

\item 
\hypertarget{classConfiguration_a80524e79e54b2e083c2366d37dbd585c}{
\hyperlink{classElementFactory}{ElementFactory} {\bfseries \_\-ef}}
\label{classConfiguration_a80524e79e54b2e083c2366d37dbd585c}

\item 
\hypertarget{classConfiguration_a690ab83ac5b8fd4799b4f260d3f3f999}{
CodeMap {\bfseries \_\-import\_\-filters}}
\label{classConfiguration_a690ab83ac5b8fd4799b4f260d3f3f999}

\item 
\hypertarget{classConfiguration_a871309708eb0367ae2680632fa3eb993}{
CodeMap {\bfseries \_\-sourcematch\_\-filters}}
\label{classConfiguration_a871309708eb0367ae2680632fa3eb993}

\item 
\hypertarget{classConfiguration_a27c8a89c446d26ca91c140271eb5cf38}{
CodeMap {\bfseries \_\-export\_\-filters}}
\label{classConfiguration_a27c8a89c446d26ca91c140271eb5cf38}

\item 
\hypertarget{classConfiguration_a41a9c9a08db5fa7c35046983037d4c05}{
tag\_\-t {\bfseries \_\-currtag}}
\label{classConfiguration_a41a9c9a08db5fa7c35046983037d4c05}

\item 
\hypertarget{classConfiguration_a4c34e9290a1e8b6772e3c2c8bab45fcb}{
map$<$ string, set$<$ uint32\_\-t $>$ $>$ {\bfseries \_\-protocol\_\-tags}}
\label{classConfiguration_a4c34e9290a1e8b6772e3c2c8bab45fcb}

\item 
\hypertarget{classConfiguration_abd381ff7ef7c4079e1af8aaa818faab5}{
TagMap {\bfseries \_\-tagmap}}
\label{classConfiguration_abd381ff7ef7c4079e1af8aaa818faab5}

\item 
\hypertarget{classConfiguration_a004464698ec91767efd6870135763d34}{
\hyperlink{classVarMap}{VarMap} {\bfseries \_\-varmap}}
\label{classConfiguration_a004464698ec91767efd6870135763d34}

\item 
\hypertarget{classConfiguration_aca363bcbe4cd2b22e1840efe031d12b8}{
\hyperlink{classFilterManagerBase}{FilterManagerBase} $\ast$ {\bfseries \_\-filter\_\-manager}}
\label{classConfiguration_aca363bcbe4cd2b22e1840efe031d12b8}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Class that contains all configuration and generated code state. This class contains all user policy configuration. It updates \hyperlink{protocolthe-p}{the} relevant configuration portions based on user changes. Also, it does some sanity checking by (dis)allowing \hyperlink{protocolthe-p}{the} user to do certain actions \mbox{[}such as delete sets which are referenced in policies\mbox{]}. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classConfiguration_aea77d6dd2f409cc676d233594d92df68}{
\index{Configuration@{Configuration}!Configuration@{Configuration}}
\index{Configuration@{Configuration}!Configuration@{Configuration}}
\subsubsection[{Configuration}]{\setlength{\rightskip}{0pt plus 5cm}Configuration::Configuration (
\begin{DoxyParamCaption}
\item[{{\bf ProcessWatchBase} \&}]{pw}
\end{DoxyParamCaption}
)}}
\label{classConfiguration_aea77d6dd2f409cc676d233594d92df68}

\begin{DoxyParams}{Parameters}
{\em a} & process watcher used to initialize \hyperlink{protocolthe-p}{the} \hyperlink{classVarMap}{VarMap}. \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\hypertarget{classConfiguration_a43faeaa14325395d73913c88e03e680f}{
\index{Configuration@{Configuration}!add\_\-to\_\-set@{add\_\-to\_\-set}}
\index{add\_\-to\_\-set@{add\_\-to\_\-set}!Configuration@{Configuration}}
\subsubsection[{add\_\-to\_\-set}]{\setlength{\rightskip}{0pt plus 5cm}void Configuration::add\_\-to\_\-set (
\begin{DoxyParamCaption}
\item[{const string \&}]{type, }
\item[{const string \&}]{name, }
\item[{const string \&}]{element}
\end{DoxyParamCaption}
)}}
\label{classConfiguration_a43faeaa14325395d73913c88e03e680f}


Add an element to a set. 

Throws an exception on failure. Checks if set exists.


\begin{DoxyParams}{Parameters}
{\em type} & \hyperlink{protocolthe-p}{the} type of \hyperlink{protocolthe-p}{the} set. \\
\hline
{\em name} & name of \hyperlink{protocolthe-p}{the} set. \\
\hline
{\em element} & \hyperlink{protocolthe-p}{the} element to add. \\
\hline
\end{DoxyParams}
\hypertarget{classConfiguration_a1ca0dd2a9d823c8ad660d241aadbc7e6}{
\index{Configuration@{Configuration}!add\_\-varmap@{add\_\-varmap}}
\index{add\_\-varmap@{add\_\-varmap}!Configuration@{Configuration}}
\subsubsection[{add\_\-varmap}]{\setlength{\rightskip}{0pt plus 5cm}void Configuration::add\_\-varmap (
\begin{DoxyParamCaption}
\item[{const string \&}]{protocol, }
\item[{const string \&}]{name, }
\item[{const string \&}]{type, }
\item[{const string \&}]{access, }
\item[{const VarRW::Id \&}]{id}
\end{DoxyParamCaption}
)}}
\label{classConfiguration_a1ca0dd2a9d823c8ad660d241aadbc7e6}


Add a variable to \hyperlink{protocolthe-p}{the} \hyperlink{classVarMap}{VarMap}, needed for semantic checking. 


\begin{DoxyParams}{Parameters}
{\em protocol} & \hyperlink{protocolthe-p}{the} protocol this variable is available to. \\
\hline
{\em variable} & name of \hyperlink{protocolthe-p}{the} variable. \\
\hline
{\em type} & \hyperlink{protocolthe-p}{the} type of \hyperlink{protocolthe-p}{the} variable. \\
\hline
{\em access} & \hyperlink{protocolthe-p}{the} permissions on \hyperlink{protocolthe-p}{the} variable (r/rw). \\
\hline
{\em id} & \hyperlink{protocolthe-p}{the} id used for \hyperlink{classVarRW}{VarRW} interaction. \\
\hline
\end{DoxyParams}
\hypertarget{classConfiguration_aece15d2297f27aa8402400b36b119bbc}{
\index{Configuration@{Configuration}!commit@{commit}}
\index{commit@{commit}!Configuration@{Configuration}}
\subsubsection[{commit}]{\setlength{\rightskip}{0pt plus 5cm}void Configuration::commit (
\begin{DoxyParamCaption}
\item[{uint32\_\-t}]{msec}
\end{DoxyParamCaption}
)}}
\label{classConfiguration_aece15d2297f27aa8402400b36b119bbc}


Commit all configuration changes. 

This will compile all needed policies and link them. It will then commit changes to \hyperlink{protocolthe-p}{the} actual policy filters. Commits are optionally delayed in order to aggregate configuration changes. For example, at boot-\/up many small changes are done in small time intervals. It would be more efficient to configure \hyperlink{protocolthe-p}{the} filters only after all changes have been made. Thus delaying a commit will help.

The delay will only be imposed on sending \hyperlink{protocolthe-p}{the} configuration to \hyperlink{protocolthe-p}{the} filters -\/-\/ all semantic checks and compile is done immediately.


\begin{DoxyParams}{Parameters}
{\em msec} & milliseconds after which code should be sent to filters. \\
\hline
\end{DoxyParams}
\hypertarget{classConfiguration_a2b34cb1801e06f0397be8f4fbd155308}{
\index{Configuration@{Configuration}!compile\_\-policies@{compile\_\-policies}}
\index{compile\_\-policies@{compile\_\-policies}!Configuration@{Configuration}}
\subsubsection[{compile\_\-policies}]{\setlength{\rightskip}{0pt plus 5cm}void Configuration::compile\_\-policies (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classConfiguration_a2b34cb1801e06f0397be8f4fbd155308}


Compile all modified and non previously compiled policies. 

Throws an exception on failure. \hypertarget{classConfiguration_ac847bd0ea9d27fec21d557e3b99cc419}{
\index{Configuration@{Configuration}!compile\_\-policy@{compile\_\-policy}}
\index{compile\_\-policy@{compile\_\-policy}!Configuration@{Configuration}}
\subsubsection[{compile\_\-policy}]{\setlength{\rightskip}{0pt plus 5cm}void Configuration::compile\_\-policy (
\begin{DoxyParamCaption}
\item[{const string \&}]{name}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classConfiguration_ac847bd0ea9d27fec21d557e3b99cc419}


Generate code for a policy. 

Throws an exception on failure.


\begin{DoxyParams}{Parameters}
{\em name} & name of policy to be compiled. \\
\hline
\end{DoxyParams}
\hypertarget{classConfiguration_a4a28817f1cf24b4ff7e19573afac3918}{
\index{Configuration@{Configuration}!create\_\-policy@{create\_\-policy}}
\index{create\_\-policy@{create\_\-policy}!Configuration@{Configuration}}
\subsubsection[{create\_\-policy}]{\setlength{\rightskip}{0pt plus 5cm}void Configuration::create\_\-policy (
\begin{DoxyParamCaption}
\item[{const string \&}]{policy}
\end{DoxyParamCaption}
)}}
\label{classConfiguration_a4a28817f1cf24b4ff7e19573afac3918}


Throws an exception on failure. 

Checks if policy already exists.


\begin{DoxyParams}{Parameters}
{\em policy} & policy which should be created. \\
\hline
\end{DoxyParams}
\hypertarget{classConfiguration_a8eabc37394163ffb3ceb978d8a0895e8}{
\index{Configuration@{Configuration}!create\_\-set@{create\_\-set}}
\index{create\_\-set@{create\_\-set}!Configuration@{Configuration}}
\subsubsection[{create\_\-set}]{\setlength{\rightskip}{0pt plus 5cm}void Configuration::create\_\-set (
\begin{DoxyParamCaption}
\item[{const string \&}]{set}
\end{DoxyParamCaption}
)}}
\label{classConfiguration_a8eabc37394163ffb3ceb978d8a0895e8}


Throws an exception on failure. 

Checks if set already exists.


\begin{DoxyParams}{Parameters}
{\em set} & name of \hyperlink{protocolthe-p}{the} set to be created. \\
\hline
\end{DoxyParams}
\hypertarget{classConfiguration_acf83d91bc6dfd6ebb93f8ef80a4f483f}{
\index{Configuration@{Configuration}!create\_\-term@{create\_\-term}}
\index{create\_\-term@{create\_\-term}!Configuration@{Configuration}}
\subsubsection[{create\_\-term}]{\setlength{\rightskip}{0pt plus 5cm}void Configuration::create\_\-term (
\begin{DoxyParamCaption}
\item[{const string \&}]{policy, }
\item[{const {\bf ConfigNodeId} \&}]{order, }
\item[{const string \&}]{term}
\end{DoxyParamCaption}
)}}
\label{classConfiguration_acf83d91bc6dfd6ebb93f8ef80a4f483f}


Append a term to a policy. 

Throws an exception on failure. Checks if term already exists.


\begin{DoxyParams}{Parameters}
{\em policy} & policy in which term should be created. \\
\hline
{\em order} & node ID with position of term. \\
\hline
{\em term} & term name which should be created. \\
\hline
\end{DoxyParams}
\hypertarget{classConfiguration_abf5ca558234f330110d74758f71e7d2d}{
\index{Configuration@{Configuration}!delete\_\-from\_\-set@{delete\_\-from\_\-set}}
\index{delete\_\-from\_\-set@{delete\_\-from\_\-set}!Configuration@{Configuration}}
\subsubsection[{delete\_\-from\_\-set}]{\setlength{\rightskip}{0pt plus 5cm}void Configuration::delete\_\-from\_\-set (
\begin{DoxyParamCaption}
\item[{const string \&}]{type, }
\item[{const string \&}]{name, }
\item[{const string \&}]{element}
\end{DoxyParamCaption}
)}}
\label{classConfiguration_abf5ca558234f330110d74758f71e7d2d}


Delete an element from a set. 

Throws an exception on failure. Checks if set exists.


\begin{DoxyParams}{Parameters}
{\em type} & \hyperlink{protocolthe-p}{the} type of \hyperlink{protocolthe-p}{the} set. \\
\hline
{\em name} & name of \hyperlink{protocolthe-p}{the} set. \\
\hline
{\em element} & \hyperlink{protocolthe-p}{the} element to delete. \\
\hline
\end{DoxyParams}
\hypertarget{classConfiguration_a2100ca152affc4b41ca3ef17ba465e89}{
\index{Configuration@{Configuration}!delete\_\-policy@{delete\_\-policy}}
\index{delete\_\-policy@{delete\_\-policy}!Configuration@{Configuration}}
\subsubsection[{delete\_\-policy}]{\setlength{\rightskip}{0pt plus 5cm}void Configuration::delete\_\-policy (
\begin{DoxyParamCaption}
\item[{const string \&}]{policy}
\end{DoxyParamCaption}
)}}
\label{classConfiguration_a2100ca152affc4b41ca3ef17ba465e89}


Throws an exception on failure. 

Checks if policy is in use \mbox{[}instantiated by an export/import directive.\mbox{]}


\begin{DoxyParams}{Parameters}
{\em policy} & policy which should be deleted. \\
\hline
\end{DoxyParams}
\hypertarget{classConfiguration_ad5336da73439a12251e63f48eaa7edf5}{
\index{Configuration@{Configuration}!delete\_\-set@{delete\_\-set}}
\index{delete\_\-set@{delete\_\-set}!Configuration@{Configuration}}
\subsubsection[{delete\_\-set}]{\setlength{\rightskip}{0pt plus 5cm}void Configuration::delete\_\-set (
\begin{DoxyParamCaption}
\item[{const string \&}]{set}
\end{DoxyParamCaption}
)}}
\label{classConfiguration_ad5336da73439a12251e63f48eaa7edf5}


Throws an exception on failure. 

Checks if set is in use.


\begin{DoxyParams}{Parameters}
{\em set} & name of set to delete. \\
\hline
\end{DoxyParams}
\hypertarget{classConfiguration_ab93df0780e06ae1aa5ccc2327056a647}{
\index{Configuration@{Configuration}!delete\_\-term@{delete\_\-term}}
\index{delete\_\-term@{delete\_\-term}!Configuration@{Configuration}}
\subsubsection[{delete\_\-term}]{\setlength{\rightskip}{0pt plus 5cm}void Configuration::delete\_\-term (
\begin{DoxyParamCaption}
\item[{const string \&}]{policy, }
\item[{const string \&}]{term}
\end{DoxyParamCaption}
)}}
\label{classConfiguration_ab93df0780e06ae1aa5ccc2327056a647}


Throws an exception on failure. 

Checks for non-\/existant policy/term conditions.


\begin{DoxyParams}{Parameters}
{\em policy} & policy in which term should be deleted. \\
\hline
{\em term} & term to delete. \\
\hline
\end{DoxyParams}
\hypertarget{classConfiguration_ace345f0761ab7042dd7a339d597d2476}{
\index{Configuration@{Configuration}!dump\_\-state@{dump\_\-state}}
\index{dump\_\-state@{dump\_\-state}!Configuration@{Configuration}}
\subsubsection[{dump\_\-state}]{\setlength{\rightskip}{0pt plus 5cm}string Configuration::dump\_\-state (
\begin{DoxyParamCaption}
\item[{uint32\_\-t}]{id}
\end{DoxyParamCaption}
)}}
\label{classConfiguration_ace345f0761ab7042dd7a339d597d2476}


Dump internal state. 

Debugging only.


\begin{DoxyParams}{Parameters}
{\em id} & specifies which aspect of state to dump. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
human readable state information. 
\end{DoxyReturn}
\hypertarget{classConfiguration_afacf603358d34d71a6243a8cb3344c90}{
\index{Configuration@{Configuration}!export\_\-filters@{export\_\-filters}}
\index{export\_\-filters@{export\_\-filters}!Configuration@{Configuration}}
\subsubsection[{export\_\-filters}]{\setlength{\rightskip}{0pt plus 5cm}CodeMap\& Configuration::export\_\-filters (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classConfiguration_afacf603358d34d71a6243a8cb3344c90}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} CodeMap for export filters. 
\end{DoxyReturn}
\hypertarget{classConfiguration_a99118246db4885a62d8b36e9e900a750}{
\index{Configuration@{Configuration}!find\_\-term@{find\_\-term}}
\index{find\_\-term@{find\_\-term}!Configuration@{Configuration}}
\subsubsection[{find\_\-term}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Term} \& Configuration::find\_\-term (
\begin{DoxyParamCaption}
\item[{const string \&}]{policy, }
\item[{const string \&}]{term}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classConfiguration_a99118246db4885a62d8b36e9e900a750}


Throws an exception if no term is found. 

\begin{DoxyReturn}{Returns}
term being searched for. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em policy} & policy name term should be found in. \\
\hline
{\em term} & term being searched for. \\
\hline
\end{DoxyParams}
\hypertarget{classConfiguration_a3394465cc36db8bf9c32dc0e3472c1b8}{
\index{Configuration@{Configuration}!import\_\-filters@{import\_\-filters}}
\index{import\_\-filters@{import\_\-filters}!Configuration@{Configuration}}
\subsubsection[{import\_\-filters}]{\setlength{\rightskip}{0pt plus 5cm}CodeMap\& Configuration::import\_\-filters (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classConfiguration_a3394465cc36db8bf9c32dc0e3472c1b8}


A CodeMap is a map relating protocols to code. 

All \hyperlink{protocolthe-p}{the} code for a protocol will be found in its entry. The code however will normally be for a specific filter.

\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} CodeMap for import filters. 
\end{DoxyReturn}
\hypertarget{classConfiguration_a5b2ccd703b557ce4d6e97f8fb5afe8c0}{
\index{Configuration@{Configuration}!link\_\-sourcematch\_\-code@{link\_\-sourcematch\_\-code}}
\index{link\_\-sourcematch\_\-code@{link\_\-sourcematch\_\-code}!Configuration@{Configuration}}
\subsubsection[{link\_\-sourcematch\_\-code}]{\setlength{\rightskip}{0pt plus 5cm}void Configuration::link\_\-sourcematch\_\-code (
\begin{DoxyParamCaption}
\item[{const {\bf Code::Target} \&}]{target}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classConfiguration_a5b2ccd703b557ce4d6e97f8fb5afe8c0}


\hyperlink{classLinks}{Links} all source match filter code for a specific target. 

\hyperlink{classCode}{Code} is internally kept fragmented \mbox{[}so deleting one policy will not involve recompiling \hyperlink{protocolthe-p}{the} whole policy list for a target, for example\mbox{]}.


\begin{DoxyParams}{Parameters}
{\em target} & target for which code should be linked. \\
\hline
\end{DoxyParams}
\hypertarget{classConfiguration_a2c6e4abbfdefe53c87052904c18a612a}{
\index{Configuration@{Configuration}!set\_\-filter\_\-manager@{set\_\-filter\_\-manager}}
\index{set\_\-filter\_\-manager@{set\_\-filter\_\-manager}!Configuration@{Configuration}}
\subsubsection[{set\_\-filter\_\-manager}]{\setlength{\rightskip}{0pt plus 5cm}void Configuration::set\_\-filter\_\-manager (
\begin{DoxyParamCaption}
\item[{{\bf FilterManagerBase} \&}]{fm}
\end{DoxyParamCaption}
)}}
\label{classConfiguration_a2c6e4abbfdefe53c87052904c18a612a}


This method should be called once at initialization to set \hyperlink{protocolthe-p}{the} \hyperlink{classFilterManager}{FilterManager}. 

It should not be deleted by \hyperlink{protocolthe-p}{the} \hyperlink{classConfiguration}{Configuration} class -\/-\/ it does not own it. \hypertarget{classConfiguration_a9a219c915cd5b831d7005b0f0234e53c}{
\index{Configuration@{Configuration}!sets@{sets}}
\index{sets@{sets}!Configuration@{Configuration}}
\subsubsection[{sets}]{\setlength{\rightskip}{0pt plus 5cm}{\bf SetMap}\& Configuration::sets (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classConfiguration_a9a219c915cd5b831d7005b0f0234e53c}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} \hyperlink{classSetMap}{SetMap} relating set-\/name to \hyperlink{protocolthe-p}{the} actual set. 
\end{DoxyReturn}
\hypertarget{classConfiguration_a4cbc9eec87a9302129255b8e24c937da}{
\index{Configuration@{Configuration}!sourcematch\_\-filters@{sourcematch\_\-filters}}
\index{sourcematch\_\-filters@{sourcematch\_\-filters}!Configuration@{Configuration}}
\subsubsection[{sourcematch\_\-filters}]{\setlength{\rightskip}{0pt plus 5cm}CodeMap\& Configuration::sourcematch\_\-filters (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classConfiguration_a4cbc9eec87a9302129255b8e24c937da}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} CodeMap for source match filters. 
\end{DoxyReturn}
\hypertarget{classConfiguration_a20b26a3342d2f5a8e22258d9ebe37c3f}{
\index{Configuration@{Configuration}!str@{str}}
\index{str@{str}!Configuration@{Configuration}}
\subsubsection[{str}]{\setlength{\rightskip}{0pt plus 5cm}string Configuration::str (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{classConfiguration_a20b26a3342d2f5a8e22258d9ebe37c3f}
\begin{DoxyReturn}{Returns}
string representation of configuration 
\end{DoxyReturn}
\hypertarget{classConfiguration_a13946d2d3b5da8475c6c04fca405352a}{
\index{Configuration@{Configuration}!tagmap@{tagmap}}
\index{tagmap@{tagmap}!Configuration@{Configuration}}
\subsubsection[{tagmap}]{\setlength{\rightskip}{0pt plus 5cm}TagMap\& Configuration::tagmap (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classConfiguration_a13946d2d3b5da8475c6c04fca405352a}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} policy tag map relating policytags to destination protocols. 
\end{DoxyReturn}
\hypertarget{classConfiguration_a4021f6bb22275fd589448579e44fbe7e}{
\index{Configuration@{Configuration}!update\_\-dependencies@{update\_\-dependencies}}
\index{update\_\-dependencies@{update\_\-dependencies}!Configuration@{Configuration}}
\subsubsection[{update\_\-dependencies}]{\setlength{\rightskip}{0pt plus 5cm}void Configuration::update\_\-dependencies (
\begin{DoxyParamCaption}
\item[{{\bf PolicyStatement} \&}]{policy}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classConfiguration_a4021f6bb22275fd589448579e44fbe7e}


Scans policy and checks which sets it uses. 

It also binds \hyperlink{protocolthe-p}{the} policy to those sets, so sets may not be deleted.


\begin{DoxyParams}{Parameters}
{\em policy} & policy which should have set dependencies updated. \\
\hline
\end{DoxyParams}
\hypertarget{classConfiguration_adc8c6916393da51b4900c0d33e9c9739}{
\index{Configuration@{Configuration}!update\_\-exports@{update\_\-exports}}
\index{update\_\-exports@{update\_\-exports}!Configuration@{Configuration}}
\subsubsection[{update\_\-exports}]{\setlength{\rightskip}{0pt plus 5cm}void Configuration::update\_\-exports (
\begin{DoxyParamCaption}
\item[{const string \&}]{protocol, }
\item[{const POLICIES \&}]{exports, }
\item[{const string \&}]{mod}
\end{DoxyParamCaption}
)}}
\label{classConfiguration_adc8c6916393da51b4900c0d33e9c9739}


Throws an exception on failure. 

Checks if policies exist.


\begin{DoxyParams}{Parameters}
{\em protocol} & name of protocol which should have exports updated. \\
\hline
{\em exports} & list of policy-\/names. \\
\hline
\end{DoxyParams}
\hypertarget{classConfiguration_a3c3e9e030cf92dd70103c899d4560b46}{
\index{Configuration@{Configuration}!update\_\-imports@{update\_\-imports}}
\index{update\_\-imports@{update\_\-imports}!Configuration@{Configuration}}
\subsubsection[{update\_\-imports}]{\setlength{\rightskip}{0pt plus 5cm}void Configuration::update\_\-imports (
\begin{DoxyParamCaption}
\item[{const string \&}]{protocol, }
\item[{const POLICIES \&}]{imports, }
\item[{const string \&}]{mod}
\end{DoxyParamCaption}
)}}
\label{classConfiguration_a3c3e9e030cf92dd70103c899d4560b46}


Throws an exception on failure. 

Checks if policies exist.


\begin{DoxyParams}{Parameters}
{\em protocol} & name of protocol which should have imports updated. \\
\hline
{\em imports} & list of policy-\/names. \\
\hline
\end{DoxyParams}
\hypertarget{classConfiguration_a676364fd279b15ba990c9c68dd30c9dc}{
\index{Configuration@{Configuration}!update\_\-set@{update\_\-set}}
\index{update\_\-set@{update\_\-set}!Configuration@{Configuration}}
\subsubsection[{update\_\-set}]{\setlength{\rightskip}{0pt plus 5cm}void Configuration::update\_\-set (
\begin{DoxyParamCaption}
\item[{const string \&}]{type, }
\item[{const string \&}]{set, }
\item[{const string \&}]{elements}
\end{DoxyParamCaption}
)}}
\label{classConfiguration_a676364fd279b15ba990c9c68dd30c9dc}


Throws an exception on failure. 

Checks if set exists.


\begin{DoxyParams}{Parameters}
{\em type} & \hyperlink{protocolthe-p}{the} type of \hyperlink{protocolthe-p}{the} set. \\
\hline
{\em set} & name of \hyperlink{protocolthe-p}{the} set to be updated. \\
\hline
{\em elements} & comma separated elements to be replaced in set. \\
\hline
\end{DoxyParams}
\hypertarget{classConfiguration_ada066d12f8cd5d17e6c6b88abd5f5330}{
\index{Configuration@{Configuration}!update\_\-tagmap@{update\_\-tagmap}}
\index{update\_\-tagmap@{update\_\-tagmap}!Configuration@{Configuration}}
\subsubsection[{update\_\-tagmap}]{\setlength{\rightskip}{0pt plus 5cm}void Configuration::update\_\-tagmap (
\begin{DoxyParamCaption}
\item[{const string \&}]{protocol}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classConfiguration_ada066d12f8cd5d17e6c6b88abd5f5330}


Update \hyperlink{protocolthe-p}{the} policytags used by a protocol. 


\begin{DoxyParams}{Parameters}
{\em protocol} & protocol for which to update policytags. \\
\hline
\end{DoxyParams}
\hypertarget{classConfiguration_a3b71e9d7746f9d4e92843b7ecea9e2e6}{
\index{Configuration@{Configuration}!update\_\-term\_\-block@{update\_\-term\_\-block}}
\index{update\_\-term\_\-block@{update\_\-term\_\-block}!Configuration@{Configuration}}
\subsubsection[{update\_\-term\_\-block}]{\setlength{\rightskip}{0pt plus 5cm}void Configuration::update\_\-term\_\-block (
\begin{DoxyParamCaption}
\item[{const string \&}]{policy, }
\item[{const string \&}]{term, }
\item[{const uint32\_\-t \&}]{block, }
\item[{const {\bf ConfigNodeId} \&}]{order, }
\item[{const string \&}]{statement}
\end{DoxyParamCaption}
)}}
\label{classConfiguration_a3b71e9d7746f9d4e92843b7ecea9e2e6}


Update \hyperlink{protocolthe-p}{the} source/dest/action block of a term. 

Throws an exception on failure. Checks for non-\/existent policy/term conditions. Also tries to parse \hyperlink{protocolthe-p}{the} configuration. No compilation / semantic check is performed now.


\begin{DoxyParams}{Parameters}
{\em policy} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} policy. \\
\hline
{\em term} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} term. \\
\hline
{\em block} & \hyperlink{protocolthe-p}{the} block to update (0:source, 1:dest, 2:action). \\
\hline
{\em order} & node ID with position of term. \\
\hline
{\em statement} & \hyperlink{protocolthe-p}{the} statement to insert. \\
\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/configuration.hh\item 
/home/greearb/git/xorp.ct.github/xorp/policy/configuration.cc\end{DoxyCompactItemize}
