nfq: add worker runmode support.

remotes/origin/master-1.2.x
Eric Leblond 14 years ago committed by Victor Julien
parent aee2e3ddd6
commit 58b20359a7

@ -53,6 +53,10 @@ void RunModeIpsNFQRegister(void)
RunModeRegisterNewRunMode(RUNMODE_NFQ, "autofp", RunModeRegisterNewRunMode(RUNMODE_NFQ, "autofp",
"Multi threaded NFQ IPS mode with respect to flow", "Multi threaded NFQ IPS mode with respect to flow",
RunModeIpsNFQAutoFp); RunModeIpsNFQAutoFp);
RunModeRegisterNewRunMode(RUNMODE_NFQ, "worker",
"Multi queue NFQ IPS mode with one thread per queue",
RunModeIpsNFQWorker);
return; return;
} }
@ -113,3 +117,22 @@ int RunModeIpsNFQAutoFp(DetectEngineCtx *de_ctx)
#endif /* NFQ */ #endif /* NFQ */
return ret; return ret;
} }
int RunModeIpsNFQWorker(DetectEngineCtx *de_ctx)
{
SCEnter();
int ret = 0;
#ifdef NFQ
RunModeInitialize();
TimeModeSetLive();
ret = RunModeSetIPSWorker(de_ctx,
NFQGetThread,
"ReceiveNFQ",
"VerdictNFQ",
"DecodeNFQ");
#endif /* NFQ */
return ret;
}

@ -25,6 +25,7 @@
int RunModeIpsNFQAuto(DetectEngineCtx *); int RunModeIpsNFQAuto(DetectEngineCtx *);
int RunModeIpsNFQAutoFp(DetectEngineCtx *); int RunModeIpsNFQAutoFp(DetectEngineCtx *);
int RunModeIpsNFQWorker(DetectEngineCtx *);
void RunModeIpsNFQRegister(void); void RunModeIpsNFQRegister(void);
const char *RunModeIpsNFQGetDefaultMode(void); const char *RunModeIpsNFQGetDefaultMode(void);

Loading…
Cancel
Save