suricata
app-layer-parser.h
Go to the documentation of this file.
1/* Copyright (C) 2007-2025 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_APP_LAYER_PARSER_H
26#define SURICATA_APP_LAYER_PARSER_H
27
28#include "app-layer-protos.h"
29// Forward declarations for bindgen
30enum ConfigAction;
31typedef struct Flow_ Flow;
34typedef struct ThreadVars_ ThreadVars;
35typedef struct File_ File;
36typedef enum LoggerId LoggerId;
37// Forward declarations from rust
38typedef struct StreamSlice StreamSlice;
46
47/* Flags for AppLayerParserState. */
48// flag available BIT_U16(0)
49#define APP_LAYER_PARSER_NO_INSPECTION BIT_U16(1)
50#define APP_LAYER_PARSER_NO_REASSEMBLY BIT_U16(2)
51#define APP_LAYER_PARSER_NO_INSPECTION_PAYLOAD BIT_U16(3)
52#define APP_LAYER_PARSER_BYPASS_READY BIT_U16(4)
53#define APP_LAYER_PARSER_EOF_TS BIT_U16(5)
54#define APP_LAYER_PARSER_EOF_TC BIT_U16(6)
55/* 2x vacancy */
56#define APP_LAYER_PARSER_SFRAME_TS BIT_U16(9)
57#define APP_LAYER_PARSER_SFRAME_TC BIT_U16(10)
58
59/* Flags for AppLayerParserProtoCtx. */
60#define APP_LAYER_PARSER_OPT_ACCEPT_GAPS BIT_U32(0)
61
62#define APP_LAYER_PARSER_INT_STREAM_DEPTH_SET BIT_U32(0)
63
64/* for use with the detect_progress_ts|detect_progress_tc fields */
65
66/** should inspection be skipped in that direction */
67#define APP_LAYER_TX_SKIP_INSPECT_TS BIT_U8(0)
68#define APP_LAYER_TX_SKIP_INSPECT_TC BIT_U8(1)
69/** is tx fully inspected? */
70#define APP_LAYER_TX_INSPECTED_TS BIT_U8(2)
71#define APP_LAYER_TX_INSPECTED_TC BIT_U8(3)
72/** accept is applied to entire tx */
73#define APP_LAYER_TX_ACCEPT BIT_U8(4)
74
75/** parser has successfully processed in the input, and has consumed
76 * all of it. */
77#define APP_LAYER_OK (AppLayerResult) { 0, 0, 0 }
78
79/** parser has hit an unrecoverable error. Returning this to the API
80 * leads to no further calls to the parser. */
81#define APP_LAYER_ERROR (AppLayerResult) { -1, 0, 0 }
82
83/** parser needs more data. Through 'c' it will indicate how many
84 * of the input bytes it has consumed. Through 'n' it will indicate
85 * how many more bytes it needs before getting called again.
86 * \note consumed (c) should never be more than the input len
87 * needed (n) + consumed (c) should be more than the input len
88 */
89#define APP_LAYER_INCOMPLETE(c,n) (AppLayerResult) { 1, (c), (n) }
90
91int AppLayerParserProtoIsRegistered(uint8_t ipproto, AppProto alproto);
92
93/***** transaction handling *****/
94
95int AppLayerParserSetup(void);
97int AppLayerParserDeSetup(void);
98
100
101/**
102 * \brief Gets a new app layer protocol's parser thread context.
103 *
104 * \retval Non-NULL pointer on success.
105 * NULL pointer on failure.
106 */
108
109/**
110 * \brief Destroys the app layer parser thread context obtained
111 * using AppLayerParserThreadCtxAlloc().
112 *
113 * \param tctx Pointer to the thread context to be destroyed.
114 */
116
117/**
118 * \brief Given a protocol name, checks if the parser is enabled in
119 * the conf file.
120 *
121 * \param alproto_name Name of the app layer protocol.
122 *
123 * \retval 1 If enabled.
124 * \retval 0 If disabled.
125 */
126int SCAppLayerParserConfParserEnabled(const char *ipproto, const char *alproto_name);
127
129
130/** \brief Prototype for parsing functions */
131typedef AppLayerResult (*AppLayerParserFPtr)(Flow *f, void *protocol_state,
132 AppLayerParserState *pstate, StreamSlice stream_slice, void *local_storage);
133
135 union {
136 void *ptr;
137 uint64_t u64;
138 } un;
140
141/** \brief tx iterator prototype */
143 (const uint8_t ipproto, const AppProto alproto,
144 void *alstate, uint64_t min_tx_id, uint64_t max_tx_id,
146
147/***** Parser related registration *****/
148
149/**
150 * \param name progress name to get the id for
151 * \param direction STREAM_TOSERVER/STREAM_TOCLIENT
152 */
153typedef int (*AppLayerParserGetStateIdByNameFn)(const char *name, const uint8_t direction);
154/**
155 * \param id progress value id to get the name for
156 * \param direction STREAM_TOSERVER/STREAM_TOCLIENT
157 */
158typedef const char *(*AppLayerParserGetStateNameByIdFn)(const int id, const uint8_t direction);
159
160typedef int (*AppLayerParserGetFrameIdByNameFn)(const char *frame_name);
161typedef const char *(*AppLayerParserGetFrameNameByIdFn)(const uint8_t id);
162
163int AppLayerParserPreRegister(void (*Register)(void));
164/**
165 * \brief Register app layer parser for the protocol.
166 *
167 * \retval 0 On success.
168 * \retval -1 On failure.
169 */
170int AppLayerParserRegisterParser(uint8_t ipproto, AppProto alproto,
171 uint8_t direction,
172 AppLayerParserFPtr Parser);
174 uint8_t ipproto, AppProto alproto, uint8_t direction);
175void AppLayerParserRegisterOptionFlags(uint8_t ipproto, AppProto alproto,
176 uint32_t flags);
177void AppLayerParserRegisterStateFuncs(uint8_t ipproto, AppProto alproto,
178 void *(*StateAlloc)(void *, AppProto), void (*StateFree)(void *));
180 void *(*LocalStorageAlloc)(void), void (*LocalStorageFree)(void *));
181// void AppLayerParserRegisterGetEventsFunc(uint8_t ipproto, AppProto proto,
182// AppLayerDecoderEvents *(*StateGetEvents)(void *) __attribute__((nonnull)));
184 uint8_t ipproto, AppProto alproto, AppLayerGetFileState (*GetTxFiles)(void *, uint8_t));
185void SCAppLayerParserRegisterLogger(uint8_t ipproto, AppProto alproto);
186void AppLayerParserRegisterLoggerBits(uint8_t ipproto, AppProto alproto, LoggerId bits);
187void AppLayerParserRegisterGetStateProgressFunc(uint8_t ipproto, AppProto alproto,
188 int (*StateGetStateProgress)(void *alstate, uint8_t direction));
189void AppLayerParserRegisterTxFreeFunc(uint8_t ipproto, AppProto alproto,
190 void (*StateTransactionFree)(void *, uint64_t));
191void AppLayerParserRegisterGetTxCnt(uint8_t ipproto, AppProto alproto,
192 uint64_t (*StateGetTxCnt)(void *alstate));
193void AppLayerParserRegisterGetTx(uint8_t ipproto, AppProto alproto,
194 void *(StateGetTx)(void *alstate, uint64_t tx_id));
195void AppLayerParserRegisterGetTxIterator(uint8_t ipproto, AppProto alproto,
198 AppProto alproto, const int ts, const int tc);
199void AppLayerParserRegisterGetEventInfo(uint8_t ipproto, AppProto alproto,
200 int (*StateGetEventInfo)(
201 const char *event_name, uint8_t *event_id, AppLayerEventType *event_type));
202void AppLayerParserRegisterGetEventInfoById(uint8_t ipproto, AppProto alproto,
203 int (*StateGetEventInfoById)(
204 uint8_t event_id, const char **event_name, AppLayerEventType *event_type));
205void AppLayerParserRegisterGetFrameFuncs(uint8_t ipproto, AppProto alproto,
206 AppLayerParserGetFrameIdByNameFn GetFrameIdByName,
207 AppLayerParserGetFrameNameByIdFn GetFrameNameById);
208void AppLayerParserRegisterSetStreamDepthFlag(uint8_t ipproto, AppProto alproto,
209 void (*SetStreamDepthFlag)(void *tx, uint8_t flags));
210void AppLayerParserRegisterGetStateFuncs(uint8_t ipproto, AppProto alproto,
211 AppLayerParserGetStateIdByNameFn GetStateIdByName,
212 AppLayerParserGetStateNameByIdFn GetStateNameById);
213
214void AppLayerParserRegisterTxDataFunc(uint8_t ipproto, AppProto alproto,
215 AppLayerTxData *(*GetTxData)(void *tx));
216void AppLayerParserRegisterApplyTxConfigFunc(uint8_t ipproto, AppProto alproto,
217 bool (*ApplyTxConfig)(void *state, void *tx, int mode, AppLayerTxConfig));
219 uint8_t ipproto, AppProto alproto, AppLayerStateData *(*GetStateData)(void *state));
220
221/***** Get and transaction functions *****/
222
224 const AppProto alproto);
225
226void *AppLayerParserGetProtocolParserLocalStorage(uint8_t ipproto, AppProto alproto);
228 void *local_data);
229
230
232void AppLayerParserSetTransactionLogId(AppLayerParserState *pstate, uint64_t tx_id);
233
234uint64_t AppLayerParserGetTransactionInspectId(AppLayerParserState *pstate, uint8_t direction);
236 void *alstate, const uint8_t flags, bool tag_txs_as_inspected);
237
239AppLayerDecoderEvents *AppLayerParserGetEventsByTx(uint8_t ipproto, AppProto alproto, void *tx);
240AppLayerGetFileState AppLayerParserGetTxFiles(const Flow *f, void *tx, const uint8_t direction);
241int AppLayerParserGetStateProgress(uint8_t ipproto, AppProto alproto,
242 void *alstate, uint8_t direction);
243uint64_t AppLayerParserGetTxCnt(const Flow *, void *alstate);
244void *AppLayerParserGetTx(uint8_t ipproto, AppProto alproto, void *alstate, uint64_t tx_id);
245int AppLayerParserGetStateProgressCompletionStatus(AppProto alproto, uint8_t direction);
246int AppLayerParserGetEventInfo(uint8_t ipproto, AppProto alproto, const char *event_name,
247 uint8_t *event_id, AppLayerEventType *event_type);
248int AppLayerParserGetEventInfoById(uint8_t ipproto, AppProto alproto, uint8_t event_id,
249 const char **event_name, AppLayerEventType *event_type);
250
251uint64_t AppLayerParserGetTransactionActive(const Flow *f, AppLayerParserState *pstate, uint8_t direction);
252
253uint8_t AppLayerParserGetFirstDataDir(uint8_t ipproto, AppProto alproto);
254
255bool AppLayerParserSupportsFiles(uint8_t ipproto, AppProto alproto);
256
257AppLayerTxData *AppLayerParserGetTxData(uint8_t ipproto, AppProto alproto, void *tx);
258uint8_t AppLayerParserGetTxDetectProgress(AppLayerTxData *txd, const uint8_t dir);
259AppLayerStateData *AppLayerParserGetStateData(uint8_t ipproto, AppProto alproto, void *state);
260void AppLayerParserApplyTxConfig(uint8_t ipproto, AppProto alproto,
261 void *state, void *tx, enum ConfigAction mode, AppLayerTxConfig);
262
263/** \brief check if tx (possibly) has files in this tx for the direction */
264#define AppLayerParserHasFilesInDir(txd, direction) \
265 ((txd)->files_opened && ((txd)->file_tx & (direction)) != 0)
266
267/***** General *****/
268
270 uint8_t flags, const uint8_t *input, uint32_t input_len);
273int AppLayerParserProtocolHasLogger(uint8_t ipproto, AppProto alproto);
275void AppLayerParserTriggerRawStreamInspection(Flow *f, int direction);
276void SCAppLayerParserSetStreamDepth(uint8_t ipproto, AppProto alproto, uint32_t stream_depth);
277uint32_t AppLayerParserGetStreamDepth(const Flow *f);
278void AppLayerParserSetStreamDepthFlag(uint8_t ipproto, AppProto alproto, void *state, uint64_t tx_id, uint8_t flags);
280int AppLayerParserGetFrameIdByName(uint8_t ipproto, AppProto alproto, const char *name);
281const char *AppLayerParserGetFrameNameById(uint8_t ipproto, AppProto alproto, const uint8_t id);
282/**
283 * \param name progress name to get the id for
284 * \param direction STREAM_TOSERVER/STREAM_TOCLIENT
285 */
287 uint8_t ipproto, AppProto alproto, const char *name, uint8_t direction);
288/**
289 * \param id progress value id to get the name for
290 * \param direction STREAM_TOSERVER/STREAM_TOCLIENT
291 */
293 uint8_t ipproto, AppProto alproto, const int id, uint8_t direction);
294
295/***** Cleanup *****/
296
298 uint8_t protomap, AppProto alproto, void *alstate, AppLayerParserState *pstate);
299void AppLayerParserStateCleanup(const Flow *f, void *alstate, AppLayerParserState *pstate);
300
302
303void SCAppLayerParserStateSetFlag(AppLayerParserState *pstate, uint16_t flag);
304uint16_t SCAppLayerParserStateIssetFlag(AppLayerParserState *pstate, uint16_t flag);
305
308
309void AppLayerParserTransactionsCleanup(Flow *f, const uint8_t pkt_dir);
310
311/***** Unittests *****/
312
313#ifdef UNITTESTS
314void AppLayerParserRegisterProtocolUnittests(uint8_t ipproto, AppProto alproto,
315 void (*RegisterUnittests)(void));
317void UTHAppLayerParserStateGetIds(void *ptr, uint64_t *i1, uint64_t *i2, uint64_t *log, uint64_t *min);
318#endif
319
321void FileApplyTxFlags(const AppLayerTxData *txd, const uint8_t direction, File *file);
322
323#endif /* SURICATA_APP_LAYER_PARSER_H */
int AppLayerParserGetEventInfo(uint8_t ipproto, AppProto alproto, const char *event_name, uint8_t *event_id, AppLayerEventType *event_type)
int AppLayerParserProtocolHasLogger(uint8_t ipproto, AppProto alproto)
int(* AppLayerParserGetStateIdByNameFn)(const char *name, const uint8_t direction)
void FileApplyTxFlags(const AppLayerTxData *txd, const uint8_t direction, File *file)
Definition util-file.c:278
struct AppLayerGetFileState AppLayerGetFileState
uint64_t AppLayerParserGetTransactionActive(const Flow *f, AppLayerParserState *pstate, uint8_t direction)
int AppLayerParserGetFrameIdByName(uint8_t ipproto, AppProto alproto, const char *name)
int AppLayerParserIsEnabled(AppProto alproto)
simple way to globally test if a alproto is registered and fully enabled in the configuration.
AppLayerTxData * AppLayerParserGetTxData(uint8_t ipproto, AppProto alproto, void *tx)
struct AppLayerGetTxIterTuple AppLayerGetTxIterTuple
void AppLayerParserRegisterGetTxCnt(uint8_t ipproto, AppProto alproto, uint64_t(*StateGetTxCnt)(void *alstate))
void AppLayerParserRegisterTxFreeFunc(uint8_t ipproto, AppProto alproto, void(*StateTransactionFree)(void *, uint64_t))
uint16_t SCAppLayerParserStateIssetFlag(AppLayerParserState *pstate, uint16_t flag)
AppLayerGetFileState AppLayerParserGetTxFiles(const Flow *f, void *tx, const uint8_t direction)
int AppLayerParserGetStateProgressCompletionStatus(AppProto alproto, uint8_t direction)
void AppLayerParserRegisterProtocolUnittests(uint8_t ipproto, AppProto alproto, void(*RegisterUnittests)(void))
void AppLayerParserStateFree(AppLayerParserState *pstate)
void AppLayerParserRegisterTxDataFunc(uint8_t ipproto, AppProto alproto, AppLayerTxData *(*GetTxData)(void *tx))
uint8_t AppLayerParserGetTxDetectProgress(AppLayerTxData *txd, const uint8_t dir)
AppLayerStateData * AppLayerParserGetStateData(uint8_t ipproto, AppProto alproto, void *state)
void AppLayerParserTriggerRawStreamInspection(Flow *f, int direction)
void AppLayerParserSetStreamDepthFlag(uint8_t ipproto, AppProto alproto, void *state, uint64_t tx_id, uint8_t flags)
void AppLayerParserRegisterOptionFlags(uint8_t ipproto, AppProto alproto, uint32_t flags)
void AppLayerParserTransactionsCleanup(Flow *f, const uint8_t pkt_dir)
remove obsolete (inspected and logged) transactions
int AppLayerParserGetStateProgress(uint8_t ipproto, AppProto alproto, void *alstate, uint8_t direction)
get the progress value for a tx/protocol
AppLayerParserThreadCtx * AppLayerParserThreadCtxAlloc(void)
Gets a new app layer protocol's parser thread context.
const char * AppLayerParserGetFrameNameById(uint8_t ipproto, AppProto alproto, const uint8_t id)
uint32_t AppLayerParserGetStreamDepth(const Flow *f)
void AppLayerParserDestroyProtocolParserLocalStorage(uint8_t ipproto, AppProto alproto, void *local_data)
enum LoggerId LoggerId
const char *(* AppLayerParserGetStateNameByIdFn)(const int id, const uint8_t direction)
void AppLayerParserRegisterStateProgressCompletionStatus(AppProto alproto, const int ts, const int tc)
AppLayerResult(* AppLayerParserFPtr)(Flow *f, void *protocol_state, AppLayerParserState *pstate, StreamSlice stream_slice, void *local_storage)
Prototype for parsing functions.
void AppLayerParserThreadCtxFree(AppLayerParserThreadCtx *tctx)
Destroys the app layer parser thread context obtained using AppLayerParserThreadCtxAlloc().
void AppLayerParserRegisterSetStreamDepthFlag(uint8_t ipproto, AppProto alproto, void(*SetStreamDepthFlag)(void *tx, uint8_t flags))
bool AppLayerParserSupportsFiles(uint8_t ipproto, AppProto alproto)
AppLayerGetTxIteratorFunc AppLayerGetTxIterator(const uint8_t ipproto, const AppProto alproto)
void SCAppLayerParserStateSetFlag(AppLayerParserState *pstate, uint16_t flag)
uint64_t AppLayerParserGetTransactionInspectId(AppLayerParserState *pstate, uint8_t direction)
void AppLayerParserRegisterApplyTxConfigFunc(uint8_t ipproto, AppProto alproto, bool(*ApplyTxConfig)(void *state, void *tx, int mode, AppLayerTxConfig))
struct AppLayerTxData AppLayerTxData
const char *(* AppLayerParserGetFrameNameByIdFn)(const uint8_t id)
int AppLayerParserPreRegister(void(*Register)(void))
void AppLayerParserRegisterLoggerBits(uint8_t ipproto, AppProto alproto, LoggerId bits)
void AppLayerParserRegisterGetTxFilesFunc(uint8_t ipproto, AppProto alproto, AppLayerGetFileState(*GetTxFiles)(void *, uint8_t))
void AppLayerParserSetTransactionLogId(AppLayerParserState *pstate, uint64_t tx_id)
bool AppLayerParserHasDecoderEvents(AppLayerParserState *pstate)
int AppLayerParserGetStateIdByName(uint8_t ipproto, AppProto alproto, const char *name, uint8_t direction)
void AppLayerFramesFreeContainer(Flow *f)
int(* AppLayerParserGetFrameIdByNameFn)(const char *frame_name)
int AppLayerParserProtoIsRegistered(uint8_t ipproto, AppProto alproto)
uint8_t AppLayerParserGetFirstDataDir(uint8_t ipproto, AppProto alproto)
void AppLayerParserRegisterStateDataFunc(uint8_t ipproto, AppProto alproto, AppLayerStateData *(*GetStateData)(void *state))
void * AppLayerParserGetTx(uint8_t ipproto, AppProto alproto, void *alstate, uint64_t tx_id)
void AppLayerParserPostStreamSetup(void)
void AppLayerParserRegisterGetStateProgressFunc(uint8_t ipproto, AppProto alproto, int(*StateGetStateProgress)(void *alstate, uint8_t direction))
void AppLayerParserRegisterGetTxIterator(uint8_t ipproto, AppProto alproto, AppLayerGetTxIteratorFunc Func)
void AppLayerParserRegisterGetFrameFuncs(uint8_t ipproto, AppProto alproto, AppLayerParserGetFrameIdByNameFn GetFrameIdByName, AppLayerParserGetFrameNameByIdFn GetFrameNameById)
int AppLayerParserRegisterParser(uint8_t ipproto, AppProto alproto, uint8_t direction, AppLayerParserFPtr Parser)
Register app layer parser for the protocol.
void AppLayerParserStateCleanup(const Flow *f, void *alstate, AppLayerParserState *pstate)
AppLayerDecoderEvents * AppLayerParserGetDecoderEvents(AppLayerParserState *pstate)
int AppLayerParserDeSetup(void)
void UTHAppLayerParserStateGetIds(void *ptr, uint64_t *i1, uint64_t *i2, uint64_t *log, uint64_t *min)
void AppLayerParserRegisterGetTx(uint8_t ipproto, AppProto alproto, void *(StateGetTx)(void *alstate, uint64_t tx_id))
void * AppLayerParserGetProtocolParserLocalStorage(uint8_t ipproto, AppProto alproto)
AppLayerParserState * AppLayerParserStateAlloc(void)
int AppLayerParserGetEventInfoById(uint8_t ipproto, AppProto alproto, uint8_t event_id, const char **event_name, AppLayerEventType *event_type)
uint64_t AppLayerParserGetTxCnt(const Flow *, void *alstate)
void AppLayerParserSetEOF(AppLayerParserState *pstate)
void SCAppLayerParserRegisterLogger(uint8_t ipproto, AppProto alproto)
void AppLayerParserRegisterGetEventInfo(uint8_t ipproto, AppProto alproto, int(*StateGetEventInfo)(const char *event_name, uint8_t *event_id, AppLayerEventType *event_type))
AppLayerGetTxIterTuple(* AppLayerGetTxIteratorFunc)(const uint8_t ipproto, const AppProto alproto, void *alstate, uint64_t min_tx_id, uint64_t max_tx_id, AppLayerGetTxIterState *state)
tx iterator prototype
void AppLayerParserRegisterLocalStorageFunc(uint8_t ipproto, AppProto proto, void *(*LocalStorageAlloc)(void), void(*LocalStorageFree)(void *))
void AppLayerParserApplyTxConfig(uint8_t ipproto, AppProto alproto, void *state, void *tx, enum ConfigAction mode, AppLayerTxConfig)
void SCAppLayerParserRegisterParserAcceptableDataDirection(uint8_t ipproto, AppProto alproto, uint8_t direction)
int SCAppLayerParserConfParserEnabled(const char *ipproto, const char *alproto_name)
Given a protocol name, checks if the parser is enabled in the conf file.
struct AppLayerTxConfig AppLayerTxConfig
void AppLayerParserSetTransactionInspectId(const Flow *f, AppLayerParserState *pstate, void *alstate, const uint8_t flags, bool tag_txs_as_inspected)
void AppLayerParserRegisterUnittests(void)
void SCAppLayerParserSetStreamDepth(uint8_t ipproto, AppProto alproto, uint32_t stream_depth)
int AppLayerParserParse(ThreadVars *tv, AppLayerParserThreadCtx *tctx, Flow *f, AppProto alproto, uint8_t flags, const uint8_t *input, uint32_t input_len)
void AppLayerParserStateProtoCleanup(uint8_t protomap, AppProto alproto, void *alstate, AppLayerParserState *pstate)
void AppLayerParserRegisterProtocolParsers(void)
void AppLayerParserRegisterStateFuncs(uint8_t ipproto, AppProto alproto, void *(*StateAlloc)(void *, AppProto), void(*StateFree)(void *))
struct AppLayerResult AppLayerResult
void AppLayerParserRegisterGetEventInfoById(uint8_t ipproto, AppProto alproto, int(*StateGetEventInfoById)(uint8_t event_id, const char **event_name, AppLayerEventType *event_type))
const char * AppLayerParserGetStateNameById(uint8_t ipproto, AppProto alproto, const int id, uint8_t direction)
void AppLayerParserRegisterGetStateFuncs(uint8_t ipproto, AppProto alproto, AppLayerParserGetStateIdByNameFn GetStateIdByName, AppLayerParserGetStateNameByIdFn GetStateNameById)
int AppLayerParserSetup(void)
AppLayerDecoderEvents * AppLayerParserGetEventsByTx(uint8_t ipproto, AppProto alproto, void *tx)
struct StreamSlice StreamSlice
LoggerId AppLayerParserProtocolGetLoggerBits(uint8_t ipproto, AppProto alproto)
enum ExceptionPolicy AppLayerErrorGetExceptionPolicy(void)
struct AppLayerStateData AppLayerStateData
enum AppLayerEventType AppLayerEventType
uint64_t AppLayerParserGetTransactionLogId(AppLayerParserState *pstate)
uint16_t AppProto
uint8_t flags
Definition decode-gre.h:0
uint8_t proto
uint32_t id
ThreadVars * tv
uint64_t ts
Data structure to store app layer decoder events.
union AppLayerGetTxIterState::@7 un
Flow data structure.
Definition flow.h:356
Per thread variable structure.
Definition threadvars.h:58
const char * name
ConfigAction
Definition util-config.h:27