@ -1,4 +1,4 @@
/* Copyright (C) 2007-202 2 Open Information Security Foundation
/* Copyright (C) 2007-202 4 Open Information Security Foundation
*
* You can copy , redistribute or modify this Program under the terms of
* the GNU General Public License version 2 as published by the Free
@ -30,16 +30,37 @@
# include "tm-modules.h"
# include "flow.h"
/** flow logger function pointer type */
/**
* \ brief Flow logger function pointer type .
*/
typedef int ( * FlowLogger ) ( ThreadVars * , void * thread_data , Flow * f ) ;
int OutputRegisterFlowLogger ( const char * name , FlowLogger LogFunc , void * initdata ,
/**
* \ brief Register a flow logger .
*
* \ param name An informational name for this logger . Used only for
* debugging .
* \ param LogFunc A function that will be called to log each flow .
* \ param initdata A pointer to initialization data that will be
* passed the ThreadInit .
* \ param ThreadInit Thread initialization callback .
* \ param ThreadDeinit Thread de - initialization callback .
*
* \ retval 0 on success , - 1 on failure .
*/
int SCOutputRegisterFlowLogger ( const char * name , FlowLogger LogFunc , void * initdata ,
ThreadInitFunc ThreadInit , ThreadDeinitFunc ThreadDeinit ) ;
/** Internal function: private API. */
void OutputFlowShutdown ( void ) ;
/** Internal function: private API. */
TmEcode OutputFlowLog ( ThreadVars * tv , void * thread_data , Flow * f ) ;
/** Internal function: private API. */
TmEcode OutputFlowLogThreadInit ( ThreadVars * tv , void * * data ) ;
/** Internal function: private API. */
TmEcode OutputFlowLogThreadDeinit ( ThreadVars * tv , void * thread_data ) ;
# endif /* SURICATA_OUTPUT_FLOW_H */