Coverage Report

Created: 2026-09-28 07:39

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/suricata8/src/tm-threads.h
Line
Count
Source
1
/* Copyright (C) 2007-2024 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
 * \author Anoop Saldanha <anoopsaldanha@gmail.com>
23
 */
24
25
#ifndef SURICATA_TM_THREADS_H
26
#define SURICATA_TM_THREADS_H
27
28
#include "tmqh-packetpool.h"
29
#include "tm-threads-common.h"
30
#include "tm-modules.h"
31
#include "flow.h" // for the FlowQueue
32
33
#ifdef OS_WIN32
34
static inline void SleepUsec(uint64_t usec)
35
{
36
    uint64_t msec = 1;
37
    if (usec > 1000) {
38
        msec = usec / 1000;
39
    }
40
    Sleep(msec);
41
}
42
#define SleepMsec(msec) Sleep((msec))
43
#else
44
0
#define SleepUsec(usec) usleep((usec))
45
0
#define SleepMsec(msec) usleep((msec) * 1000)
46
#endif
47
48
#define TM_QUEUE_NAME_MAX 16
49
#define TM_THREAD_NAME_MAX 16
50
51
typedef TmEcode (*TmSlotFunc)(ThreadVars *, Packet *, void *);
52
53
typedef struct TmSlot_ {
54
    /* function pointers */
55
    union {
56
        TmSlotFunc SlotFunc;
57
        TmEcode (*PktAcqLoop)(ThreadVars *, void *, void *);
58
        TmEcode (*Management)(ThreadVars *, void *);
59
    };
60
    /** linked list of slots, used when a pipeline has multiple slots
61
     *  in a single thread. */
62
    struct TmSlot_ *slot_next;
63
64
    SC_ATOMIC_DECLARE(void *, slot_data);
65
66
    /** copy of the TmModule::flags */
67
    uint8_t tm_flags;
68
69
    /* store the thread module id */
70
    int tm_id;
71
72
    TmEcode (*SlotThreadInit)(ThreadVars *, const void *, void **);
73
    void (*SlotThreadExitPrintStats)(ThreadVars *, void *);
74
    TmEcode (*SlotThreadDeinit)(ThreadVars *, void *);
75
76
    /* data storage */
77
    const void *slot_initdata;
78
79
} TmSlot;
80
81
extern ThreadVars *tv_root[TVT_MAX];
82
83
extern SCMutex tv_root_lock;
84
85
void TmSlotSetFuncAppend(ThreadVars *, TmModule *, const void *);
86
87
ThreadVars *TmThreadCreate(const char *, const char *, const char *, const char *, const char *, const char *,
88
                           void *(fn_p)(void *), int);
89
ThreadVars *TmThreadCreatePacketHandler(const char *, const char *, const char *, const char *, const char *,
90
                                        const char *);
91
ThreadVars *TmThreadCreateMgmtThread(const char *name, void *(fn_p)(void *), int);
92
ThreadVars *TmThreadCreateMgmtThreadByName(const char *name, const char *module,
93
                                     int mucond);
94
ThreadVars *TmThreadCreateCmdThreadByName(const char *name, const char *module,
95
                                     int mucond);
96
TmEcode TmThreadSpawn(ThreadVars *);
97
TmEcode TmThreadLibSpawn(ThreadVars *);
98
int TmThreadTimeoutLoop(ThreadVars *tv, TmSlot *s);
99
void TmThreadKillThreadsFamily(int family);
100
void TmThreadKillThreads(void);
101
void TmThreadClearThreadsFamily(int family);
102
void TmThreadAppend(ThreadVars *, int);
103
void TmThreadSetGroupName(ThreadVars *tv, const char *name);
104
105
TmEcode TmThreadSetCPUAffinity(ThreadVars *, uint16_t);
106
TmEcode TmThreadSetThreadPriority(ThreadVars *, int);
107
TmEcode TmThreadSetCPU(ThreadVars *, uint8_t);
108
TmEcode TmThreadSetupOptions(ThreadVars *);
109
void TmThreadSetPrio(ThreadVars *);
110
int TmThreadGetNbThreads(uint8_t type);
111
112
void TmThreadInitMC(ThreadVars *);
113
void TmThreadContinue(ThreadVars *);
114
void TmThreadContinueThreads(void);
115
void TmThreadCheckThreadState(void);
116
TmEcode TmThreadWaitOnThreadInit(void);
117
118
int TmThreadsCheckFlag(ThreadVars *, uint32_t);
119
void TmThreadsSetFlag(ThreadVars *, uint32_t);
120
void TmThreadsUnsetFlag(ThreadVars *, uint32_t);
121
void TmThreadWaitForFlag(ThreadVars *, uint32_t);
122
123
TmEcode TmThreadsSlotVarRun (ThreadVars *tv, Packet *p, TmSlot *slot);
124
125
void TmThreadDisablePacketThreads(
126
        const uint16_t set, const uint16_t check, const uint8_t module_flags);
127
void TmThreadDisableReceiveThreads(void);
128
129
uint32_t TmThreadCountThreadsByTmmFlags(uint8_t flags);
130
131
TmEcode TmThreadWaitOnThreadRunning(void);
132
133
TmEcode TmThreadsProcessDecodePseudoPackets(
134
        ThreadVars *tv, PacketQueueNoLock *decode_pq, TmSlot *slot);
135
136
static inline void TmThreadsCleanDecodePQ(PacketQueueNoLock *pq)
137
0
{
138
0
    while (1) {
139
0
        Packet *p = PacketDequeueNoLock(pq);
140
0
        if (unlikely(p == NULL))
141
0
            break;
142
0
        TmqhOutputPacketpool(NULL, p);
143
0
    }
144
0
}
Unexecuted instantiation: counters.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: decode.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: detect-engine-register.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: detect-engine.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: flow-worker.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-filedata.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-flow.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-json-stats.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-json.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-stats.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: runmodes.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: source-pcap-file-helper.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: source-pcap-file.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: stream-tcp-reassemble.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: stream-tcp.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: suricata.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: tm-threads.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: tmqh-packetpool.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: unix-manager.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: util-debug.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: util-logopenfile.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: util-lua-tls.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: util-lua.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: util-plugin.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: util-time.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: alert-debuglog.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: alert-fastlog.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: alert-syslog.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: app-layer-detect-proto.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: detect-config.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: detect-engine-loader.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: flow-bypass.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: flow-hash.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: flow-manager.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: flow-timeout.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: log-flush.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: log-httplog.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: log-pcap.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: log-stats.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: log-tcp-data.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: log-tlslog.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: log-tlsstore.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-eve-null.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-eve-stream.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-eve-syslog.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-file.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-filestore.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-json-alert.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-json-anomaly.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-json-arp.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-json-common.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-json-dcerpc.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-json-dhcp.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-json-dnp3.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-json-dns.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-json-drop.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-json-email-common.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-json-file.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-json-flow.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-json-frame.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-json-ftp.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-json-http.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-json-ike.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-json-mdns.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-json-metadata.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-json-mqtt.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-json-netflow.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-json-nfs.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-json-pgsql.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-json-smb.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-json-smtp.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-json-tls.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-lua.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-packet.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-streaming.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-tx.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: respond-reject.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: runmode-af-packet.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: runmode-af-xdp.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: runmode-erf-dag.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: runmode-erf-file.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: runmode-ipfw.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: runmode-lib.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: runmode-nflog.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: runmode-nfq.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: runmode-pcap-file.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: runmode-pcap.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: runmode-unix-socket.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: runmode-windivert.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: source-af-packet.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: source-af-xdp.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: source-dpdk.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: source-erf-dag.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: source-erf-file.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: source-ipfw.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: source-lib.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: source-netmap.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: source-nflog.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: source-nfq.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: source-pcap-file-directory-helper.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: source-pcap.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: source-windivert.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: util-lua-common.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: util-runmodes.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: output-json-dnp3-objects.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: respond-reject-libnet11.c:TmThreadsCleanDecodePQ
Unexecuted instantiation: fuzz_decodepcapfile.c:TmThreadsCleanDecodePQ
145
146
static inline void TmThreadsSlotProcessPktFail(ThreadVars *tv, Packet *p)
147
0
{
148
0
    if (p != NULL) {
149
0
        TmqhOutputPacketpool(tv, p);
150
0
    }
151
0
    TmThreadsCleanDecodePQ(&tv->decode_pq);
152
0
    if (tv->stream_pq_local) {
153
0
        SCMutexLock(&tv->stream_pq_local->mutex_q);
154
0
        TmqhReleasePacketsToPacketPool(tv->stream_pq_local);
155
0
        SCMutexUnlock(&tv->stream_pq_local->mutex_q);
156
0
    }
157
0
    TmThreadsSetFlag(tv, THV_FAILED);
158
0
}
Unexecuted instantiation: counters.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: decode.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: detect-engine-register.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: detect-engine.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: flow-worker.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-filedata.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-flow.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-json-stats.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-json.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-stats.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: runmodes.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: source-pcap-file-helper.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: source-pcap-file.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: stream-tcp-reassemble.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: stream-tcp.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: suricata.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: tm-threads.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: tmqh-packetpool.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: unix-manager.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: util-debug.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: util-logopenfile.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: util-lua-tls.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: util-lua.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: util-plugin.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: util-time.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: alert-debuglog.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: alert-fastlog.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: alert-syslog.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: app-layer-detect-proto.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: detect-config.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: detect-engine-loader.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: flow-bypass.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: flow-hash.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: flow-manager.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: flow-timeout.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: log-flush.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: log-httplog.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: log-pcap.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: log-stats.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: log-tcp-data.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: log-tlslog.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: log-tlsstore.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-eve-null.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-eve-stream.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-eve-syslog.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-file.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-filestore.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-json-alert.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-json-anomaly.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-json-arp.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-json-common.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-json-dcerpc.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-json-dhcp.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-json-dnp3.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-json-dns.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-json-drop.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-json-email-common.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-json-file.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-json-flow.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-json-frame.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-json-ftp.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-json-http.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-json-ike.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-json-mdns.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-json-metadata.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-json-mqtt.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-json-netflow.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-json-nfs.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-json-pgsql.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-json-smb.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-json-smtp.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-json-tls.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-lua.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-packet.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-streaming.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-tx.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: respond-reject.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: runmode-af-packet.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: runmode-af-xdp.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: runmode-erf-dag.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: runmode-erf-file.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: runmode-ipfw.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: runmode-lib.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: runmode-nflog.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: runmode-nfq.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: runmode-pcap-file.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: runmode-pcap.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: runmode-unix-socket.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: runmode-windivert.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: source-af-packet.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: source-af-xdp.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: source-dpdk.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: source-erf-dag.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: source-erf-file.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: source-ipfw.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: source-lib.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: source-netmap.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: source-nflog.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: source-nfq.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: source-pcap-file-directory-helper.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: source-pcap.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: source-windivert.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: util-lua-common.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: util-runmodes.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: output-json-dnp3-objects.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: respond-reject-libnet11.c:TmThreadsSlotProcessPktFail
Unexecuted instantiation: fuzz_decodepcapfile.c:TmThreadsSlotProcessPktFail
159
160
/**
161
 *  \brief Handle timeout from the capture layer. Checks
162
 *         stream_pq which may have been filled by the flow
163
 *         manager.
164
 *  \param s pipeline to run on these packets.
165
 */
166
static inline bool TmThreadsHandleInjectedPackets(ThreadVars *tv)
167
1.26M
{
168
1.26M
    PacketQueue *pq = tv->stream_pq_local;
169
1.26M
    if (pq && pq->len > 0) {
170
0
        while (1) {
171
0
            SCMutexLock(&pq->mutex_q);
172
0
            Packet *extra_p = PacketDequeue(pq);
173
0
            SCMutexUnlock(&pq->mutex_q);
174
0
            if (extra_p == NULL)
175
0
                break;
176
0
#ifdef DEBUG_VALIDATION
177
0
            BUG_ON(extra_p->flow != NULL);
178
0
#endif
179
0
            TmEcode r = TmThreadsSlotVarRun(tv, extra_p, tv->tm_flowworker);
180
0
            if (r == TM_ECODE_FAILED) {
181
0
                TmThreadsSlotProcessPktFail(tv, extra_p);
182
0
                break;
183
0
            }
184
0
            tv->tmqh_out(tv, extra_p);
185
0
        }
186
0
        return true;
187
1.26M
    } else {
188
1.26M
        return false;
189
1.26M
    }
190
1.26M
}
Unexecuted instantiation: counters.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: decode.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: detect-engine-register.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: detect-engine.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: flow-worker.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-filedata.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-flow.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-json-stats.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-json.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-stats.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: runmodes.c:TmThreadsHandleInjectedPackets
source-pcap-file-helper.c:TmThreadsHandleInjectedPackets
Line
Count
Source
167
1.26M
{
168
1.26M
    PacketQueue *pq = tv->stream_pq_local;
169
1.26M
    if (pq && pq->len > 0) {
170
0
        while (1) {
171
0
            SCMutexLock(&pq->mutex_q);
172
0
            Packet *extra_p = PacketDequeue(pq);
173
0
            SCMutexUnlock(&pq->mutex_q);
174
0
            if (extra_p == NULL)
175
0
                break;
176
0
#ifdef DEBUG_VALIDATION
177
0
            BUG_ON(extra_p->flow != NULL);
178
0
#endif
179
0
            TmEcode r = TmThreadsSlotVarRun(tv, extra_p, tv->tm_flowworker);
180
0
            if (r == TM_ECODE_FAILED) {
181
0
                TmThreadsSlotProcessPktFail(tv, extra_p);
182
0
                break;
183
0
            }
184
0
            tv->tmqh_out(tv, extra_p);
185
0
        }
186
0
        return true;
187
1.26M
    } else {
188
        return false;
189
1.26M
    }
190
1.26M
}
Unexecuted instantiation: source-pcap-file.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: stream-tcp-reassemble.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: stream-tcp.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: suricata.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: tm-threads.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: tmqh-packetpool.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: unix-manager.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: util-debug.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: util-logopenfile.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: util-lua-tls.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: util-lua.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: util-plugin.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: util-time.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: alert-debuglog.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: alert-fastlog.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: alert-syslog.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: app-layer-detect-proto.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: detect-config.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: detect-engine-loader.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: flow-bypass.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: flow-hash.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: flow-manager.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: flow-timeout.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: log-flush.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: log-httplog.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: log-pcap.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: log-stats.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: log-tcp-data.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: log-tlslog.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: log-tlsstore.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-eve-null.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-eve-stream.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-eve-syslog.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-file.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-filestore.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-json-alert.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-json-anomaly.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-json-arp.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-json-common.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-json-dcerpc.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-json-dhcp.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-json-dnp3.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-json-dns.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-json-drop.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-json-email-common.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-json-file.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-json-flow.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-json-frame.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-json-ftp.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-json-http.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-json-ike.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-json-mdns.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-json-metadata.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-json-mqtt.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-json-netflow.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-json-nfs.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-json-pgsql.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-json-smb.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-json-smtp.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-json-tls.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-lua.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-packet.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-streaming.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-tx.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: respond-reject.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: runmode-af-packet.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: runmode-af-xdp.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: runmode-erf-dag.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: runmode-erf-file.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: runmode-ipfw.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: runmode-lib.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: runmode-nflog.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: runmode-nfq.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: runmode-pcap-file.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: runmode-pcap.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: runmode-unix-socket.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: runmode-windivert.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: source-af-packet.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: source-af-xdp.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: source-dpdk.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: source-erf-dag.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: source-erf-file.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: source-ipfw.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: source-lib.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: source-netmap.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: source-nflog.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: source-nfq.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: source-pcap-file-directory-helper.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: source-pcap.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: source-windivert.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: util-lua-common.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: util-runmodes.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: output-json-dnp3-objects.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: respond-reject-libnet11.c:TmThreadsHandleInjectedPackets
Unexecuted instantiation: fuzz_decodepcapfile.c:TmThreadsHandleInjectedPackets
191
192
/**
193
 *  \brief Process the rest of the functions (if any) and queue.
194
 */
195
static inline TmEcode TmThreadsSlotProcessPkt(ThreadVars *tv, TmSlot *s, Packet *p)
196
1.37M
{
197
1.37M
    if (s == NULL) {
198
103k
        tv->tmqh_out(tv, p);
199
103k
        return TM_ECODE_OK;
200
103k
    }
201
202
1.26M
    TmEcode r = TmThreadsSlotVarRun(tv, p, s);
203
1.26M
    if (unlikely(r == TM_ECODE_FAILED)) {
204
0
        TmThreadsSlotProcessPktFail(tv, p);
205
0
        return TM_ECODE_FAILED;
206
0
    }
207
208
1.26M
    tv->tmqh_out(tv, p);
209
210
1.26M
    TmThreadsHandleInjectedPackets(tv);
211
212
1.26M
    return TM_ECODE_OK;
213
1.26M
}
Unexecuted instantiation: counters.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: decode.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: detect-engine-register.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: detect-engine.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: flow-worker.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-filedata.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-flow.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-json-stats.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-json.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-stats.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: runmodes.c:TmThreadsSlotProcessPkt
source-pcap-file-helper.c:TmThreadsSlotProcessPkt
Line
Count
Source
196
1.26M
{
197
1.26M
    if (s == NULL) {
198
0
        tv->tmqh_out(tv, p);
199
0
        return TM_ECODE_OK;
200
0
    }
201
202
1.26M
    TmEcode r = TmThreadsSlotVarRun(tv, p, s);
203
1.26M
    if (unlikely(r == TM_ECODE_FAILED)) {
204
0
        TmThreadsSlotProcessPktFail(tv, p);
205
0
        return TM_ECODE_FAILED;
206
0
    }
207
208
1.26M
    tv->tmqh_out(tv, p);
209
210
1.26M
    TmThreadsHandleInjectedPackets(tv);
211
212
1.26M
    return TM_ECODE_OK;
213
1.26M
}
Unexecuted instantiation: source-pcap-file.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: stream-tcp-reassemble.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: stream-tcp.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: suricata.c:TmThreadsSlotProcessPkt
tm-threads.c:TmThreadsSlotProcessPkt
Line
Count
Source
196
103k
{
197
103k
    if (s == NULL) {
198
103k
        tv->tmqh_out(tv, p);
199
103k
        return TM_ECODE_OK;
200
103k
    }
201
202
0
    TmEcode r = TmThreadsSlotVarRun(tv, p, s);
203
0
    if (unlikely(r == TM_ECODE_FAILED)) {
204
0
        TmThreadsSlotProcessPktFail(tv, p);
205
0
        return TM_ECODE_FAILED;
206
0
    }
207
208
0
    tv->tmqh_out(tv, p);
209
210
0
    TmThreadsHandleInjectedPackets(tv);
211
212
0
    return TM_ECODE_OK;
213
0
}
Unexecuted instantiation: tmqh-packetpool.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: unix-manager.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: util-debug.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: util-logopenfile.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: util-lua-tls.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: util-lua.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: util-plugin.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: util-time.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: alert-debuglog.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: alert-fastlog.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: alert-syslog.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: app-layer-detect-proto.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: detect-config.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: detect-engine-loader.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: flow-bypass.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: flow-hash.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: flow-manager.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: flow-timeout.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: log-flush.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: log-httplog.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: log-pcap.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: log-stats.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: log-tcp-data.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: log-tlslog.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: log-tlsstore.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-eve-null.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-eve-stream.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-eve-syslog.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-file.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-filestore.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-json-alert.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-json-anomaly.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-json-arp.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-json-common.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-json-dcerpc.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-json-dhcp.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-json-dnp3.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-json-dns.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-json-drop.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-json-email-common.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-json-file.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-json-flow.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-json-frame.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-json-ftp.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-json-http.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-json-ike.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-json-mdns.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-json-metadata.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-json-mqtt.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-json-netflow.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-json-nfs.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-json-pgsql.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-json-smb.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-json-smtp.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-json-tls.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-lua.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-packet.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-streaming.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-tx.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: respond-reject.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: runmode-af-packet.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: runmode-af-xdp.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: runmode-erf-dag.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: runmode-erf-file.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: runmode-ipfw.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: runmode-lib.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: runmode-nflog.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: runmode-nfq.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: runmode-pcap-file.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: runmode-pcap.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: runmode-unix-socket.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: runmode-windivert.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: source-af-packet.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: source-af-xdp.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: source-dpdk.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: source-erf-dag.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: source-erf-file.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: source-ipfw.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: source-lib.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: source-netmap.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: source-nflog.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: source-nfq.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: source-pcap-file-directory-helper.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: source-pcap.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: source-windivert.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: util-lua-common.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: util-runmodes.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: output-json-dnp3-objects.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: respond-reject-libnet11.c:TmThreadsSlotProcessPkt
Unexecuted instantiation: fuzz_decodepcapfile.c:TmThreadsSlotProcessPkt
214
215
/** \brief inject packet if THV_CAPTURE_INJECT_PKT is set
216
 *  Allow caller to supply their own packet
217
 *
218
 *  Meant for detect reload process that interrupts an sleeping capture thread
219
 *  to force a packet through the engine to complete a reload */
220
static inline void TmThreadsCaptureInjectPacket(ThreadVars *tv, Packet *p)
221
0
{
222
0
    TmThreadsUnsetFlag(tv, THV_CAPTURE_INJECT_PKT);
223
0
    if (p == NULL)
224
0
        p = PacketGetFromQueueOrAlloc();
225
0
    if (p != NULL) {
226
0
        p->flags |= PKT_PSEUDO_STREAM_END;
227
0
        PKT_SET_SRC(p, PKT_SRC_CAPTURE_TIMEOUT);
228
0
        if (TmThreadsSlotProcessPkt(tv, tv->tm_flowworker, p) != TM_ECODE_OK) {
229
0
            TmqhOutputPacketpool(tv, p);
230
0
        }
231
0
    }
232
0
}
Unexecuted instantiation: counters.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: decode.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: detect-engine-register.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: detect-engine.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: flow-worker.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-filedata.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-flow.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-json-stats.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-json.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-stats.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: runmodes.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: source-pcap-file-helper.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: source-pcap-file.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: stream-tcp-reassemble.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: stream-tcp.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: suricata.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: tm-threads.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: tmqh-packetpool.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: unix-manager.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: util-debug.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: util-logopenfile.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: util-lua-tls.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: util-lua.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: util-plugin.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: util-time.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: alert-debuglog.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: alert-fastlog.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: alert-syslog.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: app-layer-detect-proto.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: detect-config.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: detect-engine-loader.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: flow-bypass.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: flow-hash.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: flow-manager.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: flow-timeout.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: log-flush.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: log-httplog.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: log-pcap.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: log-stats.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: log-tcp-data.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: log-tlslog.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: log-tlsstore.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-eve-null.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-eve-stream.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-eve-syslog.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-file.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-filestore.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-json-alert.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-json-anomaly.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-json-arp.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-json-common.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-json-dcerpc.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-json-dhcp.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-json-dnp3.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-json-dns.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-json-drop.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-json-email-common.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-json-file.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-json-flow.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-json-frame.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-json-ftp.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-json-http.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-json-ike.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-json-mdns.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-json-metadata.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-json-mqtt.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-json-netflow.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-json-nfs.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-json-pgsql.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-json-smb.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-json-smtp.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-json-tls.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-lua.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-packet.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-streaming.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-tx.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: respond-reject.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: runmode-af-packet.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: runmode-af-xdp.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: runmode-erf-dag.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: runmode-erf-file.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: runmode-ipfw.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: runmode-lib.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: runmode-nflog.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: runmode-nfq.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: runmode-pcap-file.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: runmode-pcap.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: runmode-unix-socket.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: runmode-windivert.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: source-af-packet.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: source-af-xdp.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: source-dpdk.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: source-erf-dag.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: source-erf-file.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: source-ipfw.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: source-lib.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: source-netmap.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: source-nflog.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: source-nfq.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: source-pcap-file-directory-helper.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: source-pcap.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: source-windivert.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: util-lua-common.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: util-runmodes.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: output-json-dnp3-objects.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: respond-reject-libnet11.c:TmThreadsCaptureInjectPacket
Unexecuted instantiation: fuzz_decodepcapfile.c:TmThreadsCaptureInjectPacket
233
234
/** \brief handle capture timeout
235
 *  When a capture method times out we check for house keeping
236
 *  tasks in the capture thread.
237
 *
238
 *  \param p packet. Capture method may have taken a packet from
239
 *           the pool prior to the timing out call. We will then
240
 *           use that packet. Otherwise we can get our own.
241
 */
242
static inline void TmThreadsCaptureHandleTimeout(ThreadVars *tv, Packet *p)
243
0
{
244
0
    if (TmThreadsCheckFlag(tv, THV_CAPTURE_INJECT_PKT)) {
245
0
        TmThreadsCaptureInjectPacket(tv, p); /* consumes 'p' */
246
0
        return;
247
248
0
    } else {
249
0
        if (!TmThreadsHandleInjectedPackets(tv)) {
250
            /* see if we have to do some house keeping */
251
0
            if (tv->flow_queue && SC_ATOMIC_GET(tv->flow_queue->non_empty)) {
252
0
                TmThreadsCaptureInjectPacket(tv, p); /* consumes 'p' */
253
0
                return;
254
0
            }
255
0
        }
256
0
    }
257
258
    /* packet could have been passed to us that we won't use
259
     * return it to the pool. */
260
0
    if (p != NULL)
261
0
        tv->tmqh_out(tv, p);
262
0
}
Unexecuted instantiation: counters.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: decode.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: detect-engine-register.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: detect-engine.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: flow-worker.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-filedata.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-flow.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-json-stats.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-json.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-stats.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: runmodes.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: source-pcap-file-helper.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: source-pcap-file.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: stream-tcp-reassemble.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: stream-tcp.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: suricata.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: tm-threads.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: tmqh-packetpool.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: unix-manager.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: util-debug.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: util-logopenfile.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: util-lua-tls.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: util-lua.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: util-plugin.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: util-time.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: alert-debuglog.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: alert-fastlog.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: alert-syslog.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: app-layer-detect-proto.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: detect-config.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: detect-engine-loader.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: flow-bypass.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: flow-hash.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: flow-manager.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: flow-timeout.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: log-flush.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: log-httplog.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: log-pcap.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: log-stats.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: log-tcp-data.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: log-tlslog.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: log-tlsstore.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-eve-null.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-eve-stream.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-eve-syslog.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-file.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-filestore.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-json-alert.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-json-anomaly.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-json-arp.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-json-common.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-json-dcerpc.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-json-dhcp.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-json-dnp3.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-json-dns.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-json-drop.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-json-email-common.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-json-file.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-json-flow.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-json-frame.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-json-ftp.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-json-http.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-json-ike.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-json-mdns.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-json-metadata.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-json-mqtt.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-json-netflow.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-json-nfs.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-json-pgsql.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-json-smb.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-json-smtp.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-json-tls.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-lua.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-packet.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-streaming.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-tx.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: respond-reject.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: runmode-af-packet.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: runmode-af-xdp.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: runmode-erf-dag.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: runmode-erf-file.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: runmode-ipfw.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: runmode-lib.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: runmode-nflog.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: runmode-nfq.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: runmode-pcap-file.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: runmode-pcap.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: runmode-unix-socket.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: runmode-windivert.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: source-af-packet.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: source-af-xdp.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: source-dpdk.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: source-erf-dag.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: source-erf-file.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: source-ipfw.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: source-lib.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: source-netmap.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: source-nflog.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: source-nfq.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: source-pcap-file-directory-helper.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: source-pcap.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: source-windivert.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: util-lua-common.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: util-runmodes.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: output-json-dnp3-objects.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: respond-reject-libnet11.c:TmThreadsCaptureHandleTimeout
Unexecuted instantiation: fuzz_decodepcapfile.c:TmThreadsCaptureHandleTimeout
263
264
static inline void TmThreadsCaptureBreakLoop(ThreadVars *tv)
265
0
{
266
0
    if ((tv->tmm_flags & TM_FLAG_RECEIVE_TM) == 0) {
267
0
        return;
268
0
    }
269
    /* find the correct slot */
270
0
    TmSlot *s = tv->tm_slots;
271
0
    TmModule *tm = TmModuleGetById(s->tm_id);
272
0
    if (tm->flags & TM_FLAG_RECEIVE_TM) {
273
        /* if the method supports it, BreakLoop. Otherwise we rely on
274
         * the capture method's recv timeout */
275
0
        if (tm->PktAcqLoop && tm->PktAcqBreakLoop) {
276
0
            tm->PktAcqBreakLoop(tv, SC_ATOMIC_GET(s->slot_data));
277
0
        }
278
0
        TmThreadsSetFlag(tv, THV_CAPTURE_INJECT_PKT);
279
0
    }
280
0
}
Unexecuted instantiation: counters.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: decode.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: detect-engine-register.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: detect-engine.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: flow-worker.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-filedata.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-flow.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-json-stats.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-json.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-stats.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: runmodes.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: source-pcap-file-helper.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: source-pcap-file.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: stream-tcp-reassemble.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: stream-tcp.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: suricata.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: tm-threads.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: tmqh-packetpool.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: unix-manager.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: util-debug.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: util-logopenfile.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: util-lua-tls.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: util-lua.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: util-plugin.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: util-time.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: alert-debuglog.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: alert-fastlog.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: alert-syslog.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: app-layer-detect-proto.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: detect-config.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: detect-engine-loader.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: flow-bypass.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: flow-hash.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: flow-manager.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: flow-timeout.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: log-flush.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: log-httplog.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: log-pcap.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: log-stats.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: log-tcp-data.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: log-tlslog.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: log-tlsstore.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-eve-null.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-eve-stream.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-eve-syslog.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-file.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-filestore.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-json-alert.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-json-anomaly.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-json-arp.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-json-common.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-json-dcerpc.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-json-dhcp.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-json-dnp3.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-json-dns.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-json-drop.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-json-email-common.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-json-file.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-json-flow.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-json-frame.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-json-ftp.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-json-http.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-json-ike.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-json-mdns.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-json-metadata.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-json-mqtt.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-json-netflow.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-json-nfs.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-json-pgsql.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-json-smb.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-json-smtp.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-json-tls.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-lua.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-packet.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-streaming.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-tx.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: respond-reject.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: runmode-af-packet.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: runmode-af-xdp.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: runmode-erf-dag.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: runmode-erf-file.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: runmode-ipfw.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: runmode-lib.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: runmode-nflog.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: runmode-nfq.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: runmode-pcap-file.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: runmode-pcap.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: runmode-unix-socket.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: runmode-windivert.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: source-af-packet.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: source-af-xdp.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: source-dpdk.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: source-erf-dag.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: source-erf-file.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: source-ipfw.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: source-lib.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: source-netmap.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: source-nflog.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: source-nfq.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: source-pcap-file-directory-helper.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: source-pcap.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: source-windivert.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: util-lua-common.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: util-runmodes.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: output-json-dnp3-objects.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: respond-reject-libnet11.c:TmThreadsCaptureBreakLoop
Unexecuted instantiation: fuzz_decodepcapfile.c:TmThreadsCaptureBreakLoop
281
282
void TmThreadsSealThreads(void);
283
void TmThreadsUnsealThreads(void);
284
void TmThreadsListThreads(void);
285
int TmThreadsRegisterThread(ThreadVars *tv, const int type);
286
void TmThreadsUnregisterThread(const int id);
287
void TmThreadsInjectFlowById(Flow *f, const int id);
288
289
void TmThreadsInitThreadsTimestamp(const SCTime_t ts);
290
void TmThreadsSetThreadTimestamp(const int id, const SCTime_t ts);
291
void TmThreadsGetMinimalTimestamp(struct timeval *ts);
292
SCTime_t TmThreadsGetThreadTime(const int idx);
293
uint16_t TmThreadsGetWorkerThreadMax(void);
294
bool TmThreadsTimeSubsysIsReady(void);
295
bool SCTmThreadsSlotPacketLoopFinish(ThreadVars *tv);
296
297
/** \brief Wait for a thread to become unpaused.
298
 *
299
 * Check if a thread should wait to be unpaused and wait if so, or
300
 * until the thread kill flag is set.
301
 *
302
 * \returns true if the thread was unpaused, false if killed.
303
 */
304
bool TmThreadsWaitForUnpause(ThreadVars *tv);
305
306
#endif /* SURICATA_TM_THREADS_H */