suricata
tm-threads.h
Go to the documentation of this file.
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 #define SleepUsec(usec) usleep((usec))
45 #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 {
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 **);
75 
76  /* data storage */
77  const void *slot_initdata;
78 
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);
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 
107 TmEcode TmThreadSetCPU(ThreadVars *, uint8_t);
110 int TmThreadGetNbThreads(uint8_t type);
111 
112 void TmThreadInitMC(ThreadVars *);
114 void TmThreadContinueThreads(void);
115 void TmThreadCheckThreadState(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 
124 
127 
128 uint32_t TmThreadCountThreadsByTmmFlags(uint8_t flags);
129 
131 
133  ThreadVars *tv, PacketQueueNoLock *decode_pq, TmSlot *slot);
134 
135 static inline void TmThreadsCleanDecodePQ(PacketQueueNoLock *pq)
136 {
137  while (1) {
138  Packet *p = PacketDequeueNoLock(pq);
139  if (unlikely(p == NULL))
140  break;
141  TmqhOutputPacketpool(NULL, p);
142  }
143 }
144 
145 static inline void TmThreadsSlotProcessPktFail(ThreadVars *tv, Packet *p)
146 {
147  if (p != NULL) {
149  }
150  TmThreadsCleanDecodePQ(&tv->decode_pq);
151  if (tv->stream_pq_local) {
155  }
157 }
158 
159 /**
160  * \brief Handle timeout from the capture layer. Checks
161  * stream_pq which may have been filled by the flow
162  * manager.
163  * \param s pipeline to run on these packets.
164  */
165 static inline bool TmThreadsHandleInjectedPackets(ThreadVars *tv)
166 {
168  if (pq && pq->len > 0) {
169  while (1) {
170  SCMutexLock(&pq->mutex_q);
171  Packet *extra_p = PacketDequeue(pq);
172  SCMutexUnlock(&pq->mutex_q);
173  if (extra_p == NULL)
174  break;
175 #ifdef DEBUG_VALIDATION
176  BUG_ON(extra_p->flow != NULL);
177 #endif
179  if (r == TM_ECODE_FAILED) {
180  TmThreadsSlotProcessPktFail(tv, extra_p);
181  break;
182  }
183  tv->tmqh_out(tv, extra_p);
184  }
185  return true;
186  } else {
187  return false;
188  }
189 }
190 
191 /**
192  * \brief Process the rest of the functions (if any) and queue.
193  */
194 static inline TmEcode TmThreadsSlotProcessPkt(ThreadVars *tv, TmSlot *s, Packet *p)
195 {
196  if (s == NULL) {
197  tv->tmqh_out(tv, p);
198  return TM_ECODE_OK;
199  }
200 
201  TmEcode r = TmThreadsSlotVarRun(tv, p, s);
202  if (unlikely(r == TM_ECODE_FAILED)) {
203  TmThreadsSlotProcessPktFail(tv, p);
204  return TM_ECODE_FAILED;
205  }
206 
207  tv->tmqh_out(tv, p);
208 
209  TmThreadsHandleInjectedPackets(tv);
210 
211  return TM_ECODE_OK;
212 }
213 
214 /** \brief inject packet if THV_CAPTURE_INJECT_PKT is set
215  * Allow caller to supply their own packet
216  *
217  * Meant for detect reload process that interrupts an sleeping capture thread
218  * to force a packet through the engine to complete a reload */
219 static inline void TmThreadsCaptureInjectPacket(ThreadVars *tv, Packet *p)
220 {
222  if (p == NULL)
224  if (p != NULL) {
227  if (TmThreadsSlotProcessPkt(tv, tv->tm_flowworker, p) != TM_ECODE_OK) {
229  }
230  }
231 }
232 
233 /** \brief handle capture timeout
234  * When a capture method times out we check for house keeping
235  * tasks in the capture thread.
236  *
237  * \param p packet. Capture method may have taken a packet from
238  * the pool prior to the timing out call. We will then
239  * use that packet. Otherwise we can get our own.
240  */
241 static inline void TmThreadsCaptureHandleTimeout(ThreadVars *tv, Packet *p)
242 {
244  TmThreadsCaptureInjectPacket(tv, p); /* consumes 'p' */
245  return;
246 
247  } else {
248  if (!TmThreadsHandleInjectedPackets(tv)) {
249  /* see if we have to do some house keeping */
250  if (tv->flow_queue && SC_ATOMIC_GET(tv->flow_queue->non_empty)) {
251  TmThreadsCaptureInjectPacket(tv, p); /* consumes 'p' */
252  return;
253  }
254  }
255  }
256 
257  /* packet could have been passed to us that we won't use
258  * return it to the pool. */
259  if (p != NULL)
260  tv->tmqh_out(tv, p);
261 }
262 
263 static inline void TmThreadsCaptureBreakLoop(ThreadVars *tv)
264 {
265  if ((tv->tmm_flags & TM_FLAG_RECEIVE_TM) == 0) {
266  return;
267  }
268  /* find the correct slot */
269  TmSlot *s = tv->tm_slots;
270  TmModule *tm = TmModuleGetById(s->tm_id);
271  if (tm->flags & TM_FLAG_RECEIVE_TM) {
272  /* if the method supports it, BreakLoop. Otherwise we rely on
273  * the capture method's recv timeout */
274  if (tm->PktAcqLoop && tm->PktAcqBreakLoop) {
275  tm->PktAcqBreakLoop(tv, SC_ATOMIC_GET(s->slot_data));
276  }
278  }
279 }
280 
281 void TmThreadsSealThreads(void);
282 void TmThreadsUnsealThreads(void);
283 void TmThreadsListThreads(void);
284 int TmThreadsRegisterThread(ThreadVars *tv, const int type);
285 void TmThreadsUnregisterThread(const int id);
286 void TmThreadsInjectFlowById(Flow *f, const int id);
287 
289 void TmThreadsSetThreadTimestamp(const int id, const SCTime_t ts);
290 void TmThreadsGetMinimalTimestamp(struct timeval *ts);
291 SCTime_t TmThreadsGetThreadTime(const int idx);
292 uint16_t TmThreadsGetWorkerThreadMax(void);
293 bool TmThreadsTimeSubsysIsReady(void);
295 
296 /** \brief Wait for a thread to become unpaused.
297  *
298  * Check if a thread should wait to be unpaused and wait if so, or
299  * until the thread kill flag is set.
300  *
301  * \returns true if the thread was unpaused, false if killed.
302  */
304 
305 #endif /* SURICATA_TM_THREADS_H */
tv_root
ThreadVars * tv_root[TVT_MAX]
Definition: tm-threads.c:82
TmSlot_::tm_id
int tm_id
Definition: tm-threads.h:70
ThreadVars_::flow_queue
struct FlowQueue_ * flow_queue
Definition: threadvars.h:135
ts
uint64_t ts
Definition: source-erf-file.c:55
TmThreadsInitThreadsTimestamp
void TmThreadsInitThreadsTimestamp(const SCTime_t ts)
Definition: tm-threads.c:2314
TmThreadSetPrio
void TmThreadSetPrio(ThreadVars *)
Adjusting nice value for threads.
Definition: tm-threads.c:806
TmThreadContinue
void TmThreadContinue(ThreadVars *)
Unpauses a thread.
Definition: tm-threads.c:1826
TmThreadsGetThreadTime
SCTime_t TmThreadsGetThreadTime(const int idx)
Definition: tm-threads.c:2333
TmThreadSetCPU
TmEcode TmThreadSetCPU(ThreadVars *, uint8_t)
Definition: tm-threads.c:852
TmThreadsWaitForUnpause
bool TmThreadsWaitForUnpause(ThreadVars *tv)
Wait for a thread to become unpaused.
Definition: tm-threads.c:363
TmThreadTimeoutLoop
int TmThreadTimeoutLoop(ThreadVars *tv, TmSlot *s)
Definition: tm-threads.c:166
TmThreadsListThreads
void TmThreadsListThreads(void)
Definition: tm-threads.c:2161
unlikely
#define unlikely(expr)
Definition: util-optimize.h:35
TmThreadsUnsealThreads
void TmThreadsUnsealThreads(void)
Definition: tm-threads.c:2153
PacketQueue_
simple fifo queue for packets with mutex and cond Calling the mutex or triggering the cond is respons...
Definition: packet-queue.h:49
TmSlot_::SlotFunc
TmSlotFunc SlotFunc
Definition: tm-threads.h:56
PKT_SRC_CAPTURE_TIMEOUT
@ PKT_SRC_CAPTURE_TIMEOUT
Definition: decode.h:62
Packet_::flags
uint32_t flags
Definition: decode.h:527
Flow_
Flow data structure.
Definition: flow.h:356
TmThreadsSlotVarRun
TmEcode TmThreadsSlotVarRun(ThreadVars *tv, Packet *p, TmSlot *slot)
Separate run function so we can call it recursively.
Definition: tm-threads.c:133
TmThreadsInjectFlowById
void TmThreadsInjectFlowById(Flow *f, const int id)
inject a flow into a threads flow queue
Definition: tm-threads.c:2400
tm-threads-common.h
SCMutexLock
#define SCMutexLock(mut)
Definition: threads-debug.h:117
TmThreadKillThreadsFamily
void TmThreadKillThreadsFamily(int family)
Definition: tm-threads.c:1570
ThreadVars_::stream_pq_local
struct PacketQueue_ * stream_pq_local
Definition: threadvars.h:117
TmThreadClearThreadsFamily
void TmThreadClearThreadsFamily(int family)
Definition: tm-threads.c:1671
tm-modules.h
TmThreadSpawn
TmEcode TmThreadSpawn(ThreadVars *)
Spawns a thread associated with the ThreadVars instance tv.
Definition: tm-threads.c:1696
SleepUsec
#define SleepUsec(usec)
Definition: tm-threads.h:44
TmqhOutputPacketpool
void TmqhOutputPacketpool(ThreadVars *t, Packet *p)
Definition: tmqh-packetpool.c:314
TM_ECODE_FAILED
@ TM_ECODE_FAILED
Definition: tm-threads-common.h:82
TmThreadsProcessDecodePseudoPackets
TmEcode TmThreadsProcessDecodePseudoPackets(ThreadVars *tv, PacketQueueNoLock *decode_pq, TmSlot *slot)
Definition: tm-threads.c:114
PacketQueueNoLock_
simple fifo queue for packets
Definition: packet-queue.h:34
tmqh-packetpool.h
TmqhReleasePacketsToPacketPool
void TmqhReleasePacketsToPacketPool(PacketQueue *pq)
Release all the packets in the queue back to the packetpool. Mainly used by threads that have failed,...
Definition: tmqh-packetpool.c:427
TmThreadsGetWorkerThreadMax
uint16_t TmThreadsGetWorkerThreadMax(void)
Definition: tm-threads.c:2382
TmModule_::PktAcqLoop
TmEcode(* PktAcqLoop)(ThreadVars *, void *, void *)
Definition: tm-modules.h:54
TM_ECODE_OK
@ TM_ECODE_OK
Definition: tm-threads-common.h:81
TmThreadsUnregisterThread
void TmThreadsUnregisterThread(const int id)
Definition: tm-threads.c:2235
PacketQueue_::mutex_q
SCMutex mutex_q
Definition: packet-queue.h:56
PKT_SET_SRC
#define PKT_SET_SRC(p, src_val)
Definition: decode.h:1301
TmThreadDisablePacketThreads
void TmThreadDisablePacketThreads(void)
Disable all packet threads.
Definition: tm-threads.c:1520
ThreadVars_::tmm_flags
uint8_t tmm_flags
Definition: threadvars.h:79
TmThreadsGetMinimalTimestamp
void TmThreadsGetMinimalTimestamp(struct timeval *ts)
Definition: tm-threads.c:2341
TmThreadsSetThreadTimestamp
void TmThreadsSetThreadTimestamp(const int id, const SCTime_t ts)
Definition: tm-threads.c:2269
TmSlot_::PktAcqLoop
TmEcode(* PktAcqLoop)(ThreadVars *, void *, void *)
Definition: tm-threads.h:57
TmModule_::PktAcqBreakLoop
TmEcode(* PktAcqBreakLoop)(ThreadVars *, void *)
Definition: tm-modules.h:57
ThreadVars_::tm_slots
struct TmSlot_ * tm_slots
Definition: threadvars.h:96
PacketDequeueNoLock
Packet * PacketDequeueNoLock(PacketQueueNoLock *qnl)
Definition: packet-queue.c:208
TmSlot_::Management
TmEcode(* Management)(ThreadVars *, void *)
Definition: tm-threads.h:58
SCMutexUnlock
#define SCMutexUnlock(mut)
Definition: threads-debug.h:119
PKT_PSEUDO_STREAM_END
#define PKT_PSEUDO_STREAM_END
Definition: decode.h:1244
TmThreadsSealThreads
void TmThreadsSealThreads(void)
Definition: tm-threads.c:2145
ThreadVars_
Per thread variable structure.
Definition: threadvars.h:58
TmThreadDisableReceiveThreads
void TmThreadDisableReceiveThreads(void)
Disable all threads having the specified TMs.
Definition: tm-threads.c:1391
TmSlotSetFuncAppend
void TmSlotSetFuncAppend(ThreadVars *, TmModule *, const void *)
Appends a new entry to the slots.
Definition: tm-threads.c:679
BUG_ON
#define BUG_ON(x)
Definition: suricata-common.h:309
TmThreadCreateCmdThreadByName
ThreadVars * TmThreadCreateCmdThreadByName(const char *name, const char *module, int mucond)
Creates and returns the TV instance for a Command thread (CMD). This function supports only custom sl...
Definition: tm-threads.c:1164
TmThreadSetGroupName
void TmThreadSetGroupName(ThreadVars *tv, const char *name)
Definition: tm-threads.c:1653
Packet_
Definition: decode.h:484
TmThreadsSetFlag
void TmThreadsSetFlag(ThreadVars *, uint32_t)
Set a thread flag.
Definition: tm-threads.c:101
type
uint16_t type
Definition: decode-vlan.c:106
TmThreadWaitOnThreadInit
TmEcode TmThreadWaitOnThreadInit(void)
Used to check if all threads have finished their initialization. On finding an un-initialized thread,...
Definition: tm-threads.c:2001
TVT_MAX
@ TVT_MAX
Definition: tm-threads-common.h:91
THV_CAPTURE_INJECT_PKT
#define THV_CAPTURE_INJECT_PKT
Definition: threadvars.h:53
TmThreadCreate
ThreadVars * TmThreadCreate(const char *, const char *, const char *, const char *, const char *, const char *, void *(fn_p)(void *), int)
TmModuleGetById
TmModule * TmModuleGetById(int id)
Returns a TM Module by its id.
Definition: tm-modules.c:69
TmSlot_
Definition: tm-threads.h:53
SCTime_t
Definition: util-time.h:40
TmEcode
TmEcode
Definition: tm-threads-common.h:80
TmThreadGetNbThreads
int TmThreadGetNbThreads(uint8_t type)
Definition: tm-threads.c:868
name
const char * name
Definition: tm-threads.c:2135
TM_FLAG_RECEIVE_TM
#define TM_FLAG_RECEIVE_TM
Definition: tm-modules.h:32
TmThreadsRegisterThread
int TmThreadsRegisterThread(ThreadVars *tv, const int type)
Definition: tm-threads.c:2185
TmModule_
Definition: tm-modules.h:43
TmThreadCreateMgmtThread
ThreadVars * TmThreadCreateMgmtThread(const char *name, void *(fn_p)(void *), int)
Creates and returns the TV instance for a Management thread(MGMT). This function supports only custom...
Definition: tm-threads.c:1103
TmThreadCreateMgmtThreadByName
ThreadVars * TmThreadCreateMgmtThreadByName(const char *name, const char *module, int mucond)
Creates and returns the TV instance for a Management thread(MGMT). This function supports only custom...
Definition: tm-threads.c:1131
TmSlot
struct TmSlot_ TmSlot
tv_root_lock
SCMutex tv_root_lock
Definition: tm-threads.c:85
Packet_::flow
struct Flow_ * flow
Definition: decode.h:529
TmThreadKillThreads
void TmThreadKillThreads(void)
Definition: tm-threads.c:1599
flags
uint8_t flags
Definition: decode-gre.h:0
TmThreadAppend
void TmThreadAppend(ThreadVars *, int)
Appends this TV to tv_root based on its type.
Definition: tm-threads.c:1190
ThreadVars_::tmqh_out
void(* tmqh_out)(struct ThreadVars_ *, struct Packet_ *)
Definition: threadvars.h:106
THV_FAILED
#define THV_FAILED
Definition: threadvars.h:41
ThreadVars_::tm_flowworker
struct TmSlot_ * tm_flowworker
Definition: threadvars.h:101
TmThreadInitMC
void TmThreadInitMC(ThreadVars *)
Initializes the mutex and condition variables for this TV.
Definition: tm-threads.c:1773
PacketQueue_::len
uint32_t len
Definition: packet-queue.h:52
TmSlot_::SlotThreadInit
TmEcode(* SlotThreadInit)(ThreadVars *, const void *, void **)
Definition: tm-threads.h:72
TmThreadWaitForFlag
void TmThreadWaitForFlag(ThreadVars *, uint32_t)
Waits till the specified flag(s) is(are) set. We don't bother if the kill flag has been set or not on...
Definition: tm-threads.c:1814
TmSlot_::slot_initdata
const void * slot_initdata
Definition: tm-threads.h:77
tv
ThreadVars * tv
Definition: fuzz_decodepcapfile.c:32
PacketDequeue
Packet * PacketDequeue(PacketQueue *q)
Definition: packet-queue.c:216
TmThreadSetCPUAffinity
TmEcode TmThreadSetCPUAffinity(ThreadVars *, uint16_t)
Set the thread options (cpu affinity).
Definition: tm-threads.c:843
TmSlot_::tm_flags
uint8_t tm_flags
Definition: tm-threads.h:67
TmThreadLibSpawn
TmEcode TmThreadLibSpawn(ThreadVars *)
Spawns a "fake" lib thread associated with the ThreadVars instance tv.
Definition: tm-threads.c:1749
TmSlot_::SlotThreadDeinit
TmEcode(* SlotThreadDeinit)(ThreadVars *, void *)
Definition: tm-threads.h:74
SCTmThreadsSlotPktAcqLoopFinish
bool SCTmThreadsSlotPktAcqLoopFinish(ThreadVars *tv)
Definition: tm-threads.c:273
TmSlot_::SlotThreadExitPrintStats
void(* SlotThreadExitPrintStats)(ThreadVars *, void *)
Definition: tm-threads.h:73
TmSlot_::SC_ATOMIC_DECLARE
SC_ATOMIC_DECLARE(void *, slot_data)
ThreadVars_::decode_pq
PacketQueueNoLock decode_pq
Definition: threadvars.h:112
TmThreadCheckThreadState
void TmThreadCheckThreadState(void)
Used to check the thread for certain conditions of failure.
Definition: tm-threads.c:1978
TmSlot_::slot_next
struct TmSlot_ * slot_next
Definition: tm-threads.h:62
TmThreadsCheckFlag
int TmThreadsCheckFlag(ThreadVars *, uint32_t)
Check if a thread flag is set.
Definition: tm-threads.c:93
SC_ATOMIC_GET
#define SC_ATOMIC_GET(name)
Get the value from the atomic variable.
Definition: util-atomic.h:375
TmThreadsUnsetFlag
void TmThreadsUnsetFlag(ThreadVars *, uint32_t)
Unset a thread flag.
Definition: tm-threads.c:109
TmThreadSetThreadPriority
TmEcode TmThreadSetThreadPriority(ThreadVars *, int)
Set the thread options (thread priority).
Definition: tm-threads.c:795
TmThreadWaitOnThreadRunning
TmEcode TmThreadWaitOnThreadRunning(void)
Waits for all threads to be in a running state.
Definition: tm-threads.c:1893
flow.h
TmSlotFunc
TmEcode(* TmSlotFunc)(ThreadVars *, Packet *, void *)
Definition: tm-threads.h:51
TmThreadContinueThreads
void TmThreadContinueThreads(void)
Unpauses all threads present in tv_root.
Definition: tm-threads.c:1962
SCMutex
#define SCMutex
Definition: threads-debug.h:114
PacketGetFromQueueOrAlloc
Packet * PacketGetFromQueueOrAlloc(void)
Get a packet. We try to get a packet from the packetpool first, but if that is empty we alloc a packe...
Definition: decode.c:267
TmModule_::flags
uint8_t flags
Definition: tm-modules.h:76
TmThreadSetupOptions
TmEcode TmThreadSetupOptions(ThreadVars *)
Set the thread options (cpu affinitythread). Priority should be already set by pthread_create.
Definition: tm-threads.c:884
TmThreadsTimeSubsysIsReady
bool TmThreadsTimeSubsysIsReady(void)
Definition: tm-threads.c:2290
TmThreadCountThreadsByTmmFlags
uint32_t TmThreadCountThreadsByTmmFlags(uint8_t flags)
returns a count of all the threads that match the flag
Definition: tm-threads.c:2064
TmThreadCreatePacketHandler
ThreadVars * TmThreadCreatePacketHandler(const char *, const char *, const char *, const char *, const char *, const char *)
Creates and returns a TV instance for a Packet Processing Thread. This function doesn't support custo...
Definition: tm-threads.c:1074