|
|
|
@ -167,11 +167,9 @@ error:
|
|
|
|
|
*
|
|
|
|
|
* \retval Returns 0 on success, -1 on failure.
|
|
|
|
|
*/
|
|
|
|
|
void OutputRegisterPacketModule(LoggerId id, const char *name,
|
|
|
|
|
const char *conf_name, OutputInitFunc InitFunc,
|
|
|
|
|
PacketLogger PacketLogFunc, PacketLogCondition PacketConditionFunc,
|
|
|
|
|
ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit,
|
|
|
|
|
ThreadExitPrintStatsFunc ThreadExitPrintStats)
|
|
|
|
|
void OutputRegisterPacketModule(LoggerId id, const char *name, const char *conf_name,
|
|
|
|
|
OutputInitFunc InitFunc, PacketLogger PacketLogFunc, PacketLogCondition PacketConditionFunc,
|
|
|
|
|
ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit)
|
|
|
|
|
{
|
|
|
|
|
if (unlikely(PacketLogFunc == NULL || PacketConditionFunc == NULL)) {
|
|
|
|
|
goto error;
|
|
|
|
@ -190,7 +188,6 @@ void OutputRegisterPacketModule(LoggerId id, const char *name,
|
|
|
|
|
module->PacketConditionFunc = PacketConditionFunc;
|
|
|
|
|
module->ThreadInit = ThreadInit;
|
|
|
|
|
module->ThreadDeinit = ThreadDeinit;
|
|
|
|
|
module->ThreadExitPrintStats = ThreadExitPrintStats;
|
|
|
|
|
TAILQ_INSERT_TAIL(&output_modules, module, entries);
|
|
|
|
|
|
|
|
|
|
SCLogDebug("Packet logger \"%s\" registered.", name);
|
|
|
|
@ -207,11 +204,10 @@ error:
|
|
|
|
|
*
|
|
|
|
|
* \retval Returns 0 on success, -1 on failure.
|
|
|
|
|
*/
|
|
|
|
|
void OutputRegisterPacketSubModule(LoggerId id, const char *parent_name,
|
|
|
|
|
const char *name, const char *conf_name, OutputInitSubFunc InitFunc,
|
|
|
|
|
PacketLogger PacketLogFunc, PacketLogCondition PacketConditionFunc,
|
|
|
|
|
ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit,
|
|
|
|
|
ThreadExitPrintStatsFunc ThreadExitPrintStats)
|
|
|
|
|
void OutputRegisterPacketSubModule(LoggerId id, const char *parent_name, const char *name,
|
|
|
|
|
const char *conf_name, OutputInitSubFunc InitFunc, PacketLogger PacketLogFunc,
|
|
|
|
|
PacketLogCondition PacketConditionFunc, ThreadInitFunc ThreadInit,
|
|
|
|
|
ThreadDeinitFunc ThreadDeinit)
|
|
|
|
|
{
|
|
|
|
|
if (unlikely(PacketLogFunc == NULL || PacketConditionFunc == NULL)) {
|
|
|
|
|
goto error;
|
|
|
|
@ -231,7 +227,6 @@ void OutputRegisterPacketSubModule(LoggerId id, const char *parent_name,
|
|
|
|
|
module->PacketConditionFunc = PacketConditionFunc;
|
|
|
|
|
module->ThreadInit = ThreadInit;
|
|
|
|
|
module->ThreadDeinit = ThreadDeinit;
|
|
|
|
|
module->ThreadExitPrintStats = ThreadExitPrintStats;
|
|
|
|
|
TAILQ_INSERT_TAIL(&output_modules, module, entries);
|
|
|
|
|
|
|
|
|
|
SCLogDebug("Packet logger \"%s\" registered.", name);
|
|
|
|
|