2010-08-14 14:30:41 +02:00
\hypertarget { group_ _ sfPolicyConfig} {
\section { Sourcefire policy configuration module}
\label { group_ _ sfPolicyConfig} \index { Sourcefire policy configuration module@{ Sourcefire policy configuration module} }
}
\subsection * { Functions}
\begin { DoxyCompactItemize}
\item
tSfPolicyUserContextId \hyperlink { group_ _ sfPolicyConfig_ gac62cd5838bee4a9d3f40561eae920cdd} { sfPolicyConfigCreate} (void)
\item
void \hyperlink { group_ _ sfPolicyConfig_ ga189d09ed6d1203ebace6ea2c2aafc1b8} { sfPolicyConfigDelete} (tSfPolicyUserContextId pContext)
\item
2010-09-04 21:33:53 +02:00
int \hyperlink { group_ _ sfPolicyConfig_ ga8e14fd83397b9bbb14568070183db80b} { sfPolicyUserDataSet} (tSfPolicyUserContextId pContext, tSfPolicyId policyId, void $ \ast $ \hyperlink { group_ _ mysql_ ga6439d32dccbbc77c9b2aad04897bfa74} { config} )
2010-08-14 14:30:41 +02:00
\item
void $ \ast $ \hyperlink { group_ _ sfPolicyConfig_ gae8f2ae426b1f1a50eabfade6d22c2c85} { sfPolicyUserDataClear} (tSfPolicyUserContextId pContext, tSfPolicyId policyId)
\item
2010-09-04 21:33:53 +02:00
int \hyperlink { group_ _ sfPolicyConfig_ ga3f3ab9314d29d2ee2a8285289b388f17} { sfPolicyUserDataIterate} (tSfPolicyUserContextId pContext, int($ \ast $ callback)(tSfPolicyUserContextId pContext, tSfPolicyId policyId, void $ \ast $ \hyperlink { group_ _ mysql_ ga6439d32dccbbc77c9b2aad04897bfa74} { config} ))
2010-08-14 14:30:41 +02:00
\end { DoxyCompactItemize}
\subsection { Detailed Description}
Create a user policy configuration context. A context provides facility for creating policy specific data instances. User can create as many policy instances as memory resources will allow. User can create/delete context, set/clear/get user date for a specific policy, default policy or current policy. User can also iterate over all instances user data.
In current design, preprocessor use this module directly to manage policy specific data instances. A future enhancement can be to extract policy management code from each processor and put it in a new policy management module. Policy management module will set a single pointer to user data before calling appropriate callback function in a preprocessor. As an example, policy module will iterate over all policies and call CleanExit functions in every preprocessor for each policy. This will make policy management module will hide policies from preprocessors and make them policy agnostic.
\subsection { Function Documentation}
\hypertarget { group_ _ sfPolicyConfig_ gac62cd5838bee4a9d3f40561eae920cdd} {
\index { sfPolicyConfig@{ sfPolicyConfig} !sfPolicyConfigCreate@{ sfPolicyConfigCreate} }
\index { sfPolicyConfigCreate@{ sfPolicyConfigCreate} !sfPolicyConfig@{ sfPolicyConfig} }
\subsubsection [{sfPolicyConfigCreate}] { \setlength { \rightskip } { 0pt plus 5cm} tSfPolicyUserContextId sfPolicyConfigCreate (
\begin { DoxyParamCaption}
\item [{void}] { }
\end { DoxyParamCaption}
)} }
\label { group_ _ sfPolicyConfig_ gac62cd5838bee4a9d3f40561eae920cdd}
Create a user context. Allocates a new context and return it to user. All transactions within a context are independent from any other transactions in a different context.
\begin { DoxyReturn} { Returns}
tSfPolicyUserContextId
\end { DoxyReturn}
\hypertarget { group_ _ sfPolicyConfig_ ga189d09ed6d1203ebace6ea2c2aafc1b8} {
\index { sfPolicyConfig@{ sfPolicyConfig} !sfPolicyConfigDelete@{ sfPolicyConfigDelete} }
\index { sfPolicyConfigDelete@{ sfPolicyConfigDelete} !sfPolicyConfig@{ sfPolicyConfig} }
\subsubsection [{sfPolicyConfigDelete}] { \setlength { \rightskip } { 0pt plus 5cm} void sfPolicyConfigDelete (
\begin { DoxyParamCaption}
\item [{tSfPolicyUserContextId}] { pContext}
\end { DoxyParamCaption}
)} }
\label { group_ _ sfPolicyConfig_ ga189d09ed6d1203ebace6ea2c2aafc1b8}
Delete a user policy data context.
\begin { DoxyParams} { Parameters}
\item [{\em pContext}] \end { DoxyParams}
\hypertarget { group_ _ sfPolicyConfig_ gae8f2ae426b1f1a50eabfade6d22c2c85} {
\index { sfPolicyConfig@{ sfPolicyConfig} !sfPolicyUserDataClear@{ sfPolicyUserDataClear} }
\index { sfPolicyUserDataClear@{ sfPolicyUserDataClear} !sfPolicyConfig@{ sfPolicyConfig} }
\subsubsection [{sfPolicyUserDataClear}] { \setlength { \rightskip } { 0pt plus 5cm} void$ \ast $ sfPolicyUserDataClear (
\begin { DoxyParamCaption}
\item [{tSfPolicyUserContextId}] { pContext, }
\item [{tSfPolicyId}] { policyId}
\end { DoxyParamCaption}
)} }
\label { group_ _ sfPolicyConfig_ gae8f2ae426b1f1a50eabfade6d22c2c85}
user is responsible for freeing any memory. \hypertarget { group_ _ sfPolicyConfig_ ga3f3ab9314d29d2ee2a8285289b388f17} {
\index { sfPolicyConfig@{ sfPolicyConfig} !sfPolicyUserDataIterate@{ sfPolicyUserDataIterate} }
\index { sfPolicyUserDataIterate@{ sfPolicyUserDataIterate} !sfPolicyConfig@{ sfPolicyConfig} }
\subsubsection [{sfPolicyUserDataIterate}] { \setlength { \rightskip } { 0pt plus 5cm} int sfPolicyUserDataIterate (
\begin { DoxyParamCaption}
\item [{tSfPolicyUserContextId}] { pContext, }
2010-09-04 21:33:53 +02:00
\item [{int($\ast$)(tSfPolicyUserContextId pContext, tSfPolicyId policyId, void $\ast${\bf config})}] { callback}
2010-08-14 14:30:41 +02:00
\end { DoxyParamCaption}
)} }
\label { group_ _ sfPolicyConfig_ ga3f3ab9314d29d2ee2a8285289b388f17}
\hypertarget { group_ _ sfPolicyConfig_ ga8e14fd83397b9bbb14568070183db80b} {
\index { sfPolicyConfig@{ sfPolicyConfig} !sfPolicyUserDataSet@{ sfPolicyUserDataSet} }
\index { sfPolicyUserDataSet@{ sfPolicyUserDataSet} !sfPolicyConfig@{ sfPolicyConfig} }
\subsubsection [{sfPolicyUserDataSet}] { \setlength { \rightskip } { 0pt plus 5cm} int sfPolicyUserDataSet (
\begin { DoxyParamCaption}
\item [{tSfPolicyUserContextId}] { pContext, }
\item [{tSfPolicyId}] { policyId, }
\item [{void $\ast$}] { config}
\end { DoxyParamCaption}
)} }
\label { group_ _ sfPolicyConfig_ ga8e14fd83397b9bbb14568070183db80b}
Store a pointer to user data.
\begin { DoxyParams} { Parameters}
\item [{\em pContext}] \item [{\em policyId}] is 0 based. \item [{\em config}] -\/ pointer to user configuration. \end { DoxyParams}