• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

OISF / suricata / 23374838686

21 Mar 2026 07:29AM UTC coverage: 59.341% (-20.0%) from 79.315%
23374838686

Pull #15075

github

web-flow
Merge 90b4e834f into 6587e363a
Pull Request #15075: Stack 8001 v16.4

38 of 70 new or added lines in 10 files covered. (54.29%)

34165 existing lines in 563 files now uncovered.

119621 of 201584 relevant lines covered (59.34%)

650666.92 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

70.97
/src/tm-queuehandlers.c
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-packetpool.h"
35
#include "tmqh-flow.h"
36

37
Tmqh tmqh_table[TMQH_SIZE];
38

39
void TmqhSetup (void)
40
{
2✔
41
    memset(&tmqh_table, 0, sizeof(tmqh_table));
2✔
42

43
    TmqhSimpleRegister();
2✔
44
    TmqhPacketpoolRegister();
2✔
45
    TmqhFlowRegister();
2✔
46
}
2✔
47

48
/** \brief Clean up registration time allocs */
49
void TmqhCleanup(void)
UNCOV
50
{
×
UNCOV
51
}
×
52

53
int TmqhNameToID(const char *name)
54
{
2✔
55
    for (int i = 0; i < TMQH_SIZE; i++) {
6✔
56
        if (tmqh_table[i].name != NULL) {
6✔
57
            if (strcmp(name, tmqh_table[i].name) == 0)
4✔
58
                return i;
2✔
59
        }
4✔
60
    }
6✔
61

62
    return -1;
×
63
}
2✔
64

65
Tmqh *TmqhGetQueueHandlerByName(const char *name)
66
{
2✔
67
    for (int i = 0; i < TMQH_SIZE; i++) {
6✔
68
        if (tmqh_table[i].name != NULL) {
6✔
69
            if (strcmp(name, tmqh_table[i].name) == 0)
4✔
70
                return &tmqh_table[i];
2✔
71
        }
4✔
72
    }
6✔
73

74
    return NULL;
×
75
}
2✔
76

77
Tmqh *TmqhGetQueueHandlerByID(const int id)
UNCOV
78
{
×
UNCOV
79
    if (id <= 0 || id >= TMQH_SIZE)
×
80
        return NULL;
×
81

UNCOV
82
    return &tmqh_table[id];
×
UNCOV
83
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc