suricata
tm-queuehandlers.c
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  * Master Queue Handler
24  */
25 
26 #include "suricata-common.h"
27 #include "packet-queue.h"
28 #include "decode.h"
29 #include "threads.h"
30 #include "threadvars.h"
31 
32 #include "tm-queuehandlers.h"
33 #include "tmqh-simple.h"
34 #include "tmqh-nfq.h"
35 #include "tmqh-packetpool.h"
36 #include "tmqh-flow.h"
37 
38 void TmqhSetup (void)
39 {
40  memset(&tmqh_table, 0, sizeof(tmqh_table));
41 
46 }
47 
48 /** \brief Clean up registration time allocs */
49 void TmqhCleanup(void)
50 {
51 }
52 
53 Tmqh* TmqhGetQueueHandlerByName(const char *name)
54 {
55  int i;
56 
57  for (i = 0; i < TMQH_SIZE; i++) {
58  if (strcmp(name, tmqh_table[i].name) == 0)
59  return &tmqh_table[i];
60  }
61 
62  return NULL;
63 }
64 
Tmqh tmqh_table[TMQH_SIZE]
void TmqhCleanup(void)
Clean up registration time allocs.
void TmqhSetup(void)
void TmqhPacketpoolRegister(void)
TmqhPacketpoolRegister .
Tmqh * TmqhGetQueueHandlerByName(const char *name)
void TmqhSimpleRegister(void)
Definition: tmqh-simple.c:39
void TmqhNfqRegister(void)
Definition: tmqh-nfq.c:37
void TmqhFlowRegister(void)
Definition: tmqh-flow.c:49