suricata
tm-queuehandlers.h
Go to the documentation of this file.
1 /* Copyright (C) 2007-2010 Open Information Security Foundation
2  *
3  * You can copy, redistribute or modify this Program under the terms of
4  * the GNU General Public License version 2 as published by the Free
5  * Software Foundation.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * version 2 along with this program; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15  * 02110-1301, USA.
16  */
17 
18 /**
19  * \file
20  *
21  * \author Victor Julien <victor@inliniac.net>
22  */
23 
24 #ifndef SURICATA_TM_QUEUEHANDLERS_H
25 #define SURICATA_TM_QUEUEHANDLERS_H
26 
27 enum {
32 
34 };
35 
36 typedef struct Tmqh_ {
37  const char *name;
38  Packet *(*InHandler)(ThreadVars *);
40  void (*OutHandler)(ThreadVars *, Packet *);
41  void *(*OutHandlerCtxSetup)(const char *);
42  void (*OutHandlerCtxFree)(void *);
43  void (*RegisterTests)(void);
44 } Tmqh;
45 
46 extern Tmqh tmqh_table[TMQH_SIZE];
47 
48 void TmqhSetup (void);
49 void TmqhCleanup(void);
50 int TmqhNameToID(const char *name);
51 Tmqh *TmqhGetQueueHandlerByName(const char *name);
52 Tmqh *TmqhGetQueueHandlerByID(const int id);
53 
54 #endif /* SURICATA_TM_QUEUEHANDLERS_H */
TMQH_FLOW
@ TMQH_FLOW
Definition: tm-queuehandlers.h:31
TMQH_NOT_SET
@ TMQH_NOT_SET
Definition: tm-queuehandlers.h:28
Tmqh_::OutHandler
void(* OutHandler)(ThreadVars *, Packet *)
Definition: tm-queuehandlers.h:40
TMQH_SIZE
@ TMQH_SIZE
Definition: tm-queuehandlers.h:33
Tmqh_::InShutdownHandler
void(* InShutdownHandler)(ThreadVars *)
Definition: tm-queuehandlers.h:39
Tmqh
struct Tmqh_ Tmqh
TmqhNameToID
int TmqhNameToID(const char *name)
Definition: tm-queuehandlers.c:53
TmqhCleanup
void TmqhCleanup(void)
Clean up registration time allocs.
Definition: tm-queuehandlers.c:49
ThreadVars_
Per thread variable structure.
Definition: threadvars.h:57
Tmqh_::RegisterTests
void(* RegisterTests)(void)
Definition: tm-queuehandlers.h:43
Tmqh_::OutHandlerCtxFree
void(* OutHandlerCtxFree)(void *)
Definition: tm-queuehandlers.h:42
Packet_
Definition: decode.h:475
Tmqh_::name
const char * name
Definition: tm-queuehandlers.h:37
TmqhSetup
void TmqhSetup(void)
Definition: tm-queuehandlers.c:39
TmqhGetQueueHandlerByID
Tmqh * TmqhGetQueueHandlerByID(const int id)
Definition: tm-queuehandlers.c:77
TMQH_PACKETPOOL
@ TMQH_PACKETPOOL
Definition: tm-queuehandlers.h:30
TMQH_SIMPLE
@ TMQH_SIMPLE
Definition: tm-queuehandlers.h:29
TmqhGetQueueHandlerByName
Tmqh * TmqhGetQueueHandlerByName(const char *name)
Definition: tm-queuehandlers.c:65
tmqh_table
Tmqh tmqh_table[TMQH_SIZE]
Definition: tm-queuehandlers.c:37
Tmqh_
Definition: tm-queuehandlers.h:36