/src/suricata7/src/app-layer-parser.h
Line | Count | Source |
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 __APP_LAYER_PARSER_H__ |
26 | | #define __APP_LAYER_PARSER_H__ |
27 | | |
28 | | #include "app-layer-events.h" |
29 | | #include "util-file.h" |
30 | | #include "rust.h" |
31 | | #include "util-config.h" |
32 | | |
33 | | /* Flags for AppLayerParserState. */ |
34 | | // flag available BIT_U16(0) |
35 | 24.0M | #define APP_LAYER_PARSER_NO_INSPECTION BIT_U16(1) |
36 | 35 | #define APP_LAYER_PARSER_NO_REASSEMBLY BIT_U16(2) |
37 | 18.6M | #define APP_LAYER_PARSER_NO_INSPECTION_PAYLOAD BIT_U16(3) |
38 | 35 | #define APP_LAYER_PARSER_BYPASS_READY BIT_U16(4) |
39 | 13.4M | #define APP_LAYER_PARSER_EOF_TS BIT_U16(5) |
40 | 10.9M | #define APP_LAYER_PARSER_EOF_TC BIT_U16(6) |
41 | 4.71M | #define APP_LAYER_PARSER_TRUNC_TS BIT_U16(7) |
42 | 4.28M | #define APP_LAYER_PARSER_TRUNC_TC BIT_U16(8) |
43 | 9.89M | #define APP_LAYER_PARSER_SFRAME_TS BIT_U16(9) |
44 | 9.18M | #define APP_LAYER_PARSER_SFRAME_TC BIT_U16(10) |
45 | | |
46 | | /* Flags for AppLayerParserProtoCtx. */ |
47 | 41.8k | #define APP_LAYER_PARSER_OPT_ACCEPT_GAPS BIT_U32(0) |
48 | | |
49 | 8.54k | #define APP_LAYER_PARSER_INT_STREAM_DEPTH_SET BIT_U32(0) |
50 | | |
51 | | /* applies to DetectFlags uint64_t field */ |
52 | | |
53 | | /** reserved for future use */ |
54 | 945k | #define APP_LAYER_TX_RESERVED1_FLAG BIT_U64(48) |
55 | 945k | #define APP_LAYER_TX_RESERVED2_FLAG BIT_U64(49) |
56 | 945k | #define APP_LAYER_TX_RESERVED3_FLAG BIT_U64(50) |
57 | 945k | #define APP_LAYER_TX_RESERVED4_FLAG BIT_U64(51) |
58 | 945k | #define APP_LAYER_TX_RESERVED5_FLAG BIT_U64(52) |
59 | 945k | #define APP_LAYER_TX_RESERVED6_FLAG BIT_U64(53) |
60 | 945k | #define APP_LAYER_TX_RESERVED7_FLAG BIT_U64(54) |
61 | 945k | #define APP_LAYER_TX_RESERVED8_FLAG BIT_U64(55) |
62 | 945k | #define APP_LAYER_TX_RESERVED9_FLAG BIT_U64(56) |
63 | 945k | #define APP_LAYER_TX_RESERVED10_FLAG BIT_U64(57) |
64 | 945k | #define APP_LAYER_TX_RESERVED11_FLAG BIT_U64(58) |
65 | 945k | #define APP_LAYER_TX_RESERVED12_FLAG BIT_U64(59) |
66 | 945k | #define APP_LAYER_TX_RESERVED13_FLAG BIT_U64(60) |
67 | 945k | #define APP_LAYER_TX_RESERVED14_FLAG BIT_U64(61) |
68 | | |
69 | | #define APP_LAYER_TX_RESERVED_FLAGS \ |
70 | 945k | (APP_LAYER_TX_RESERVED1_FLAG | APP_LAYER_TX_RESERVED2_FLAG | APP_LAYER_TX_RESERVED3_FLAG | \ |
71 | 945k | APP_LAYER_TX_RESERVED4_FLAG | APP_LAYER_TX_RESERVED5_FLAG | \ |
72 | 945k | APP_LAYER_TX_RESERVED6_FLAG | APP_LAYER_TX_RESERVED7_FLAG | \ |
73 | 945k | APP_LAYER_TX_RESERVED8_FLAG | APP_LAYER_TX_RESERVED9_FLAG | \ |
74 | 945k | APP_LAYER_TX_RESERVED10_FLAG | APP_LAYER_TX_RESERVED11_FLAG | \ |
75 | 945k | APP_LAYER_TX_RESERVED12_FLAG | APP_LAYER_TX_RESERVED13_FLAG | \ |
76 | 945k | APP_LAYER_TX_RESERVED14_FLAG) |
77 | | |
78 | | /** should inspection be skipped in that direction */ |
79 | 5.16M | #define APP_LAYER_TX_SKIP_INSPECT_FLAG BIT_U64(62) |
80 | | /** is tx fully inspected? */ |
81 | 4.71M | #define APP_LAYER_TX_INSPECTED_FLAG BIT_U64(63) |
82 | | /** other 63 bits are for tracking which prefilter engine is already |
83 | | * completely inspected */ |
84 | 945k | #define APP_LAYER_TX_PREFILTER_MASK ~(APP_LAYER_TX_INSPECTED_FLAG | APP_LAYER_TX_RESERVED_FLAGS) |
85 | | |
86 | | /** parser has successfully processed in the input, and has consumed |
87 | | * all of it. */ |
88 | 426k | #define APP_LAYER_OK (AppLayerResult) { 0, 0, 0 } |
89 | | |
90 | | /** parser has hit an unrecoverable error. Returning this to the API |
91 | | * leads to no further calls to the parser. */ |
92 | 340k | #define APP_LAYER_ERROR (AppLayerResult) { -1, 0, 0 } |
93 | | |
94 | | /** parser needs more data. Through 'c' it will indicate how many |
95 | | * of the input bytes it has consumed. Through 'n' it will indicate |
96 | | * how many more bytes it needs before getting called again. |
97 | | * \note consumed (c) should never be more than the input len |
98 | | * needed (n) + consumed (c) should be more than the input len |
99 | | */ |
100 | | #define APP_LAYER_INCOMPLETE(c,n) (AppLayerResult) { 1, (c), (n) } |
101 | | |
102 | | int AppLayerParserProtoIsRegistered(uint8_t ipproto, AppProto alproto); |
103 | | |
104 | | /***** transaction handling *****/ |
105 | | |
106 | | int AppLayerParserSetup(void); |
107 | | void AppLayerParserPostStreamSetup(void); |
108 | | int AppLayerParserDeSetup(void); |
109 | | |
110 | | typedef struct AppLayerParserThreadCtx_ AppLayerParserThreadCtx; |
111 | | |
112 | | /** |
113 | | * \brief Gets a new app layer protocol's parser thread context. |
114 | | * |
115 | | * \retval Non-NULL pointer on success. |
116 | | * NULL pointer on failure. |
117 | | */ |
118 | | AppLayerParserThreadCtx *AppLayerParserThreadCtxAlloc(void); |
119 | | |
120 | | /** |
121 | | * \brief Destroys the app layer parser thread context obtained |
122 | | * using AppLayerParserThreadCtxAlloc(). |
123 | | * |
124 | | * \param tctx Pointer to the thread context to be destroyed. |
125 | | */ |
126 | | void AppLayerParserThreadCtxFree(AppLayerParserThreadCtx *tctx); |
127 | | |
128 | | /** |
129 | | * \brief Given a protocol name, checks if the parser is enabled in |
130 | | * the conf file. |
131 | | * |
132 | | * \param alproto_name Name of the app layer protocol. |
133 | | * |
134 | | * \retval 1 If enabled. |
135 | | * \retval 0 If disabled. |
136 | | */ |
137 | | int AppLayerParserConfParserEnabled(const char *ipproto, |
138 | | const char *alproto_name); |
139 | | |
140 | | enum ExceptionPolicy AppLayerErrorGetExceptionPolicy(void); |
141 | | |
142 | | /** \brief Prototype for parsing functions */ |
143 | | typedef AppLayerResult (*AppLayerParserFPtr)(Flow *f, void *protocol_state, |
144 | | AppLayerParserState *pstate, StreamSlice stream_slice, void *local_storage); |
145 | | |
146 | | typedef struct AppLayerGetTxIterState { |
147 | | union { |
148 | | void *ptr; |
149 | | uint64_t u64; |
150 | | } un; |
151 | | } AppLayerGetTxIterState; |
152 | | |
153 | | /** \brief tx iterator prototype */ |
154 | | typedef AppLayerGetTxIterTuple (*AppLayerGetTxIteratorFunc) |
155 | | (const uint8_t ipproto, const AppProto alproto, |
156 | | void *alstate, uint64_t min_tx_id, uint64_t max_tx_id, |
157 | | AppLayerGetTxIterState *state); |
158 | | |
159 | | /***** Parser related registration *****/ |
160 | | |
161 | | typedef int (*AppLayerParserGetFrameIdByNameFn)(const char *frame_name); |
162 | | typedef const char *(*AppLayerParserGetFrameNameByIdFn)(const uint8_t id); |
163 | | |
164 | | /** |
165 | | * \brief Register app layer parser for the protocol. |
166 | | * |
167 | | * \retval 0 On success. |
168 | | * \retval -1 On failure. |
169 | | */ |
170 | | int AppLayerParserRegisterParser(uint8_t ipproto, AppProto alproto, |
171 | | uint8_t direction, |
172 | | AppLayerParserFPtr Parser); |
173 | | void AppLayerParserRegisterParserAcceptableDataDirection(uint8_t ipproto, |
174 | | AppProto alproto, |
175 | | uint8_t direction); |
176 | | void AppLayerParserRegisterOptionFlags(uint8_t ipproto, AppProto alproto, |
177 | | uint32_t flags); |
178 | | void AppLayerParserRegisterStateFuncs(uint8_t ipproto, AppProto alproto, |
179 | | void *(*StateAlloc)(void *, AppProto), void (*StateFree)(void *)); |
180 | | void AppLayerParserRegisterLocalStorageFunc(uint8_t ipproto, AppProto proto, |
181 | | void *(*LocalStorageAlloc)(void), void (*LocalStorageFree)(void *)); |
182 | | // void AppLayerParserRegisterGetEventsFunc(uint8_t ipproto, AppProto proto, |
183 | | // AppLayerDecoderEvents *(*StateGetEvents)(void *) __attribute__((nonnull))); |
184 | | void AppLayerParserRegisterGetTxFilesFunc(uint8_t ipproto, AppProto alproto, |
185 | | AppLayerGetFileState (*GetTxFiles)(void *, void *, uint8_t)); |
186 | | void AppLayerParserRegisterLogger(uint8_t ipproto, AppProto alproto); |
187 | | void AppLayerParserRegisterLoggerBits(uint8_t ipproto, AppProto alproto, LoggerId bits); |
188 | | void AppLayerParserRegisterTruncateFunc(uint8_t ipproto, AppProto alproto, |
189 | | void (*Truncate)(void *, uint8_t)); |
190 | | void AppLayerParserRegisterGetStateProgressFunc(uint8_t ipproto, AppProto alproto, |
191 | | int (*StateGetStateProgress)(void *alstate, uint8_t direction)); |
192 | | void AppLayerParserRegisterTxFreeFunc(uint8_t ipproto, AppProto alproto, |
193 | | void (*StateTransactionFree)(void *, uint64_t)); |
194 | | void AppLayerParserRegisterGetTxCnt(uint8_t ipproto, AppProto alproto, |
195 | | uint64_t (*StateGetTxCnt)(void *alstate)); |
196 | | void AppLayerParserRegisterGetTx(uint8_t ipproto, AppProto alproto, |
197 | | void *(StateGetTx)(void *alstate, uint64_t tx_id)); |
198 | | void AppLayerParserRegisterGetTxIterator(uint8_t ipproto, AppProto alproto, |
199 | | AppLayerGetTxIteratorFunc Func); |
200 | | void AppLayerParserRegisterStateProgressCompletionStatus( |
201 | | AppProto alproto, const int ts, const int tc); |
202 | | void AppLayerParserRegisterGetEventInfo(uint8_t ipproto, AppProto alproto, |
203 | | int (*StateGetEventInfo)(const char *event_name, int *event_id, |
204 | | AppLayerEventType *event_type)); |
205 | | void AppLayerParserRegisterGetEventInfoById(uint8_t ipproto, AppProto alproto, |
206 | | int (*StateGetEventInfoById)(int event_id, const char **event_name, |
207 | | AppLayerEventType *event_type)); |
208 | | void AppLayerParserRegisterGetFrameFuncs(uint8_t ipproto, AppProto alproto, |
209 | | AppLayerParserGetFrameIdByNameFn GetFrameIdByName, |
210 | | AppLayerParserGetFrameNameByIdFn GetFrameNameById); |
211 | | void AppLayerParserRegisterSetStreamDepthFlag(uint8_t ipproto, AppProto alproto, |
212 | | void (*SetStreamDepthFlag)(void *tx, uint8_t flags)); |
213 | | |
214 | | void AppLayerParserRegisterTxDataFunc(uint8_t ipproto, AppProto alproto, |
215 | | AppLayerTxData *(*GetTxData)(void *tx)); |
216 | | void AppLayerParserRegisterApplyTxConfigFunc(uint8_t ipproto, AppProto alproto, |
217 | | bool (*ApplyTxConfig)(void *state, void *tx, int mode, AppLayerTxConfig)); |
218 | | void AppLayerParserRegisterStateDataFunc( |
219 | | uint8_t ipproto, AppProto alproto, AppLayerStateData *(*GetStateData)(void *state)); |
220 | | |
221 | | /***** Get and transaction functions *****/ |
222 | | |
223 | | uint32_t AppLayerParserGetOptionFlags(uint8_t protomap, AppProto alproto); |
224 | | AppLayerGetTxIteratorFunc AppLayerGetTxIterator(const uint8_t ipproto, |
225 | | const AppProto alproto); |
226 | | |
227 | | void *AppLayerParserGetProtocolParserLocalStorage(uint8_t ipproto, AppProto alproto); |
228 | | void AppLayerParserDestroyProtocolParserLocalStorage(uint8_t ipproto, AppProto alproto, |
229 | | void *local_data); |
230 | | |
231 | | |
232 | | uint64_t AppLayerParserGetTransactionLogId(AppLayerParserState *pstate); |
233 | | uint64_t AppLayerParserGetMinId(AppLayerParserState *pstate); |
234 | | void AppLayerParserSetTransactionLogId(AppLayerParserState *pstate, uint64_t tx_id); |
235 | | |
236 | | uint64_t AppLayerParserGetTransactionInspectId(AppLayerParserState *pstate, uint8_t direction); |
237 | | void AppLayerParserSetTransactionInspectId(const Flow *f, AppLayerParserState *pstate, |
238 | | void *alstate, const uint8_t flags, bool tag_txs_as_inspected); |
239 | | |
240 | | AppLayerDecoderEvents *AppLayerParserGetDecoderEvents(AppLayerParserState *pstate); |
241 | | void AppLayerParserSetDecoderEvents(AppLayerParserState *pstate, AppLayerDecoderEvents *devents); |
242 | | AppLayerDecoderEvents *AppLayerParserGetEventsByTx(uint8_t ipproto, AppProto alproto, void *tx); |
243 | | AppLayerGetFileState AppLayerParserGetTxFiles( |
244 | | const Flow *f, void *state, void *tx, const uint8_t direction); |
245 | | int AppLayerParserGetStateProgress(uint8_t ipproto, AppProto alproto, |
246 | | void *alstate, uint8_t direction); |
247 | | uint64_t AppLayerParserGetTxCnt(const Flow *, void *alstate); |
248 | | void *AppLayerParserGetTx(uint8_t ipproto, AppProto alproto, void *alstate, uint64_t tx_id); |
249 | | int AppLayerParserGetStateProgressCompletionStatus(AppProto alproto, uint8_t direction); |
250 | | int AppLayerParserGetEventInfo(uint8_t ipproto, AppProto alproto, const char *event_name, |
251 | | int *event_id, AppLayerEventType *event_type); |
252 | | int AppLayerParserGetEventInfoById(uint8_t ipproto, AppProto alproto, int event_id, |
253 | | const char **event_name, AppLayerEventType *event_type); |
254 | | |
255 | | uint64_t AppLayerParserGetTransactionActive(const Flow *f, AppLayerParserState *pstate, uint8_t direction); |
256 | | |
257 | | uint8_t AppLayerParserGetFirstDataDir(uint8_t ipproto, AppProto alproto); |
258 | | |
259 | | int AppLayerParserSupportsFiles(uint8_t ipproto, AppProto alproto); |
260 | | |
261 | | AppLayerTxData *AppLayerParserGetTxData(uint8_t ipproto, AppProto alproto, void *tx); |
262 | | uint64_t AppLayerParserGetTxDetectFlags(AppLayerTxData *txd, const uint8_t dir); |
263 | | AppLayerStateData *AppLayerParserGetStateData(uint8_t ipproto, AppProto alproto, void *state); |
264 | | void AppLayerParserApplyTxConfig(uint8_t ipproto, AppProto alproto, |
265 | | void *state, void *tx, enum ConfigAction mode, AppLayerTxConfig); |
266 | | |
267 | | static inline bool AppLayerParserIsFileTx(const AppLayerTxData *txd) |
268 | 23.4M | { |
269 | 23.4M | if (txd->file_tx != 0) { |
270 | 19.5M | return true; |
271 | 19.5M | } |
272 | 3.85M | return false; |
273 | 23.4M | } Unexecuted instantiation: fuzz_applayerparserparse.c:AppLayerParserIsFileTx Unexecuted instantiation: app-layer-parser.c:AppLayerParserIsFileTx Unexecuted instantiation: app-layer-rdp.c:AppLayerParserIsFileTx Unexecuted instantiation: app-layer-rfb.c:AppLayerParserIsFileTx Unexecuted instantiation: app-layer-smb.c:AppLayerParserIsFileTx Unexecuted instantiation: app-layer-smtp.c:AppLayerParserIsFileTx Unexecuted instantiation: app-layer-snmp.c:AppLayerParserIsFileTx Unexecuted instantiation: app-layer-ssh.c:AppLayerParserIsFileTx Unexecuted instantiation: app-layer-ssl.c:AppLayerParserIsFileTx Unexecuted instantiation: app-layer-tftp.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-engine-state.c:AppLayerParserIsFileTx Unexecuted instantiation: flow.c:AppLayerParserIsFileTx Unexecuted instantiation: flow-hash.c:AppLayerParserIsFileTx Unexecuted instantiation: flow-manager.c:AppLayerParserIsFileTx Unexecuted instantiation: flow-timeout.c:AppLayerParserIsFileTx Unexecuted instantiation: output-file.c:AppLayerParserIsFileTx Unexecuted instantiation: output-filedata.c:AppLayerParserIsFileTx Unexecuted instantiation: runmodes.c:AppLayerParserIsFileTx Unexecuted instantiation: stream-tcp.c:AppLayerParserIsFileTx Unexecuted instantiation: stream-tcp-reassemble.c:AppLayerParserIsFileTx Unexecuted instantiation: suricata.c:AppLayerParserIsFileTx Unexecuted instantiation: util-exception-policy.c:AppLayerParserIsFileTx Unexecuted instantiation: util-file.c:AppLayerParserIsFileTx Unexecuted instantiation: util-running-modes.c:AppLayerParserIsFileTx Unexecuted instantiation: app-layer.c:AppLayerParserIsFileTx Unexecuted instantiation: app-layer-detect-proto.c:AppLayerParserIsFileTx Unexecuted instantiation: app-layer-dnp3.c:AppLayerParserIsFileTx Unexecuted instantiation: app-layer-enip.c:AppLayerParserIsFileTx Unexecuted instantiation: app-layer-events.c:AppLayerParserIsFileTx Unexecuted instantiation: app-layer-ftp.c:AppLayerParserIsFileTx Unexecuted instantiation: app-layer-frames.c:AppLayerParserIsFileTx Unexecuted instantiation: app-layer-htp.c:AppLayerParserIsFileTx Unexecuted instantiation: app-layer-http2.c:AppLayerParserIsFileTx Unexecuted instantiation: app-layer-ike.c:AppLayerParserIsFileTx Unexecuted instantiation: app-layer-krb5.c:AppLayerParserIsFileTx Unexecuted instantiation: app-layer-modbus.c:AppLayerParserIsFileTx Unexecuted instantiation: app-layer-quic.c:AppLayerParserIsFileTx Unexecuted instantiation: app-layer-mqtt.c:AppLayerParserIsFileTx Unexecuted instantiation: app-layer-nfs-tcp.c:AppLayerParserIsFileTx Unexecuted instantiation: app-layer-nfs-udp.c:AppLayerParserIsFileTx Unexecuted instantiation: app-layer-ntp.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-engine.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-engine-frame.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-engine-prefilter.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-engine-proto.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-file-data.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-filemagic.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-filename.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-filestore.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-flowbits.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-frame.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-ftpbounce.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-hostbits.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-http-client-body.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-http-cookie.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-http-header.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-http-header-common.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-http-header-names.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-http-host.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-http-method.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-http-protocol.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-http-raw-header.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-http-request-line.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-http-response-line.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-http-server-body.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-http-start.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-http-stat-code.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-http-stat-msg.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-http-ua.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-ike-exch-type.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-ike-spi.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-ike-vendor.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-ike-chosen-sa.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-ike-key-exchange-payload-length.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-ike-nonce-payload-length.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-ike-nonce-payload.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-ike-key-exchange-payload.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-iprep.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-lua.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-mqtt-subscribe-topic.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-mqtt-unsubscribe-topic.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-nfs-procedure.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-nfs-version.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-parse.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-pcre.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-rfb-name.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-rfb-sectype.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-sip-method.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-sip-protocol.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-sip-request-line.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-sip-response-line.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-sip-stat-code.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-sip-stat-msg.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-sip-uri.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-snmp-community.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-snmp-pdu_type.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-snmp-version.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-ssh-hassh.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-ssh-hassh-server.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-ssh-hassh-server-string.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-ssh-hassh-string.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-ssh-proto.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-ssh-proto-version.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-ssh-software.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-ssh-software-version.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-ssl-state.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-ssl-version.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-tag.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-template-rust-buffer.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-tls-version.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-uricontent.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-xbits.c:AppLayerParserIsFileTx Unexecuted instantiation: flow-worker.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-alert.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-anomaly.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-bittorrent-dht.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-dcerpc.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-dhcp.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-dnp3.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-dns.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-email-common.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-file.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-frame.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-ftp.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-http2.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-http.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-ike.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-krb5.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-metadata.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-modbus.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-quic.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-mqtt.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-nfs.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-pgsql.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-rdp.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-rfb.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-sip.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-smb.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-smtp.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-snmp.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-ssh.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-template.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-tftp.c:AppLayerParserIsFileTx Unexecuted instantiation: output-json-tls.c:AppLayerParserIsFileTx Unexecuted instantiation: output-streaming.c:AppLayerParserIsFileTx output-tx.c:AppLayerParserIsFileTx Line | Count | Source | 268 | 23.4M | { | 269 | 23.4M | if (txd->file_tx != 0) { | 270 | 19.5M | return true; | 271 | 19.5M | } | 272 | 3.85M | return false; | 273 | 23.4M | } |
Unexecuted instantiation: rust-context.c:AppLayerParserIsFileTx Unexecuted instantiation: app-layer-htp-xff.c:AppLayerParserIsFileTx Unexecuted instantiation: app-layer-register.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-app-layer-event.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-app-layer-protocol.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-bypass.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-bytemath.c:AppLayerParserIsFileTx Unexecuted instantiation: detect.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-config.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-dce-stub-data.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-dns-query.c:AppLayerParserIsFileTx Unexecuted instantiation: detect-engine-file.c:AppLayerParserIsFileTx Unexecuted instantiation: log-httplog.c:AppLayerParserIsFileTx Unexecuted instantiation: log-tlslog.c:AppLayerParserIsFileTx Unexecuted instantiation: log-tlsstore.c:AppLayerParserIsFileTx Unexecuted instantiation: fuzz_applayerprotodetectgetproto.c:AppLayerParserIsFileTx |
274 | | |
275 | | static inline bool AppLayerParserIsFileTxInDir(const AppLayerTxData *txd, const uint8_t direction) |
276 | 86.2M | { |
277 | 86.2M | if ((txd->file_tx & direction) != 0) { |
278 | 53.3M | return true; |
279 | 53.3M | } |
280 | 32.8M | return false; |
281 | 86.2M | } Unexecuted instantiation: fuzz_applayerparserparse.c:AppLayerParserIsFileTxInDir app-layer-parser.c:AppLayerParserIsFileTxInDir Line | Count | Source | 276 | 85.3M | { | 277 | 85.3M | if ((txd->file_tx & direction) != 0) { | 278 | 52.6M | return true; | 279 | 52.6M | } | 280 | 32.7M | return false; | 281 | 85.3M | } |
Unexecuted instantiation: app-layer-rdp.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: app-layer-rfb.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: app-layer-smb.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: app-layer-smtp.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: app-layer-snmp.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: app-layer-ssh.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: app-layer-ssl.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: app-layer-tftp.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-engine-state.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: flow.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: flow-hash.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: flow-manager.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: flow-timeout.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-file.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-filedata.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: runmodes.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: stream-tcp.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: stream-tcp-reassemble.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: suricata.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: util-exception-policy.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: util-file.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: util-running-modes.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: app-layer.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: app-layer-detect-proto.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: app-layer-dnp3.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: app-layer-enip.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: app-layer-events.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: app-layer-ftp.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: app-layer-frames.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: app-layer-htp.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: app-layer-http2.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: app-layer-ike.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: app-layer-krb5.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: app-layer-modbus.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: app-layer-quic.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: app-layer-mqtt.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: app-layer-nfs-tcp.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: app-layer-nfs-udp.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: app-layer-ntp.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-engine.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-engine-frame.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-engine-prefilter.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-engine-proto.c:AppLayerParserIsFileTxInDir detect-file-data.c:AppLayerParserIsFileTxInDir Line | Count | Source | 276 | 5.90k | { | 277 | 5.90k | if ((txd->file_tx & direction) != 0) { | 278 | 5.12k | return true; | 279 | 5.12k | } | 280 | 783 | return false; | 281 | 5.90k | } |
Unexecuted instantiation: detect-filemagic.c:AppLayerParserIsFileTxInDir detect-filename.c:AppLayerParserIsFileTxInDir Line | Count | Source | 276 | 18.1k | { | 277 | 18.1k | if ((txd->file_tx & direction) != 0) { | 278 | 17.0k | return true; | 279 | 17.0k | } | 280 | 1.10k | return false; | 281 | 18.1k | } |
Unexecuted instantiation: detect-filestore.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-flowbits.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-frame.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-ftpbounce.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-hostbits.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-http-client-body.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-http-cookie.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-http-header.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-http-header-common.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-http-header-names.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-http-host.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-http-method.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-http-protocol.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-http-raw-header.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-http-request-line.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-http-response-line.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-http-server-body.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-http-start.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-http-stat-code.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-http-stat-msg.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-http-ua.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-ike-exch-type.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-ike-spi.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-ike-vendor.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-ike-chosen-sa.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-ike-key-exchange-payload-length.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-ike-nonce-payload-length.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-ike-nonce-payload.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-ike-key-exchange-payload.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-iprep.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-lua.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-mqtt-subscribe-topic.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-mqtt-unsubscribe-topic.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-nfs-procedure.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-nfs-version.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-parse.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-pcre.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-rfb-name.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-rfb-sectype.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-sip-method.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-sip-protocol.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-sip-request-line.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-sip-response-line.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-sip-stat-code.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-sip-stat-msg.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-sip-uri.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-snmp-community.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-snmp-pdu_type.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-snmp-version.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-ssh-hassh.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-ssh-hassh-server.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-ssh-hassh-server-string.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-ssh-hassh-string.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-ssh-proto.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-ssh-proto-version.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-ssh-software.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-ssh-software-version.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-ssl-state.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-ssl-version.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-tag.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-template-rust-buffer.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-tls-version.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-uricontent.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-xbits.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: flow-worker.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-alert.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-anomaly.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-bittorrent-dht.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-dcerpc.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-dhcp.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-dnp3.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-dns.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-email-common.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-file.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-frame.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-ftp.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-http2.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-http.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-ike.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-krb5.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-metadata.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-modbus.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-quic.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-mqtt.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-nfs.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-pgsql.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-rdp.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-rfb.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-sip.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-smb.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-smtp.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-snmp.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-ssh.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-template.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-tftp.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-json-tls.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: output-streaming.c:AppLayerParserIsFileTxInDir output-tx.c:AppLayerParserIsFileTxInDir Line | Count | Source | 276 | 918k | { | 277 | 918k | if ((txd->file_tx & direction) != 0) { | 278 | 743k | return true; | 279 | 743k | } | 280 | 174k | return false; | 281 | 918k | } |
Unexecuted instantiation: rust-context.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: app-layer-htp-xff.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: app-layer-register.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-app-layer-event.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-app-layer-protocol.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-bypass.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-bytemath.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-config.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-dce-stub-data.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-dns-query.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: detect-engine-file.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: log-httplog.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: log-tlslog.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: log-tlsstore.c:AppLayerParserIsFileTxInDir Unexecuted instantiation: fuzz_applayerprotodetectgetproto.c:AppLayerParserIsFileTxInDir |
282 | | |
283 | | /** \brief check if tx (possibly) has files in this tx for the direction */ |
284 | | static inline bool AppLayerParserHasFilesInDir(const AppLayerTxData *txd, const uint8_t direction) |
285 | 1.05G | { |
286 | 1.05G | return (txd->files_opened && AppLayerParserIsFileTxInDir(txd, direction)); |
287 | 1.05G | } Unexecuted instantiation: fuzz_applayerparserparse.c:AppLayerParserHasFilesInDir app-layer-parser.c:AppLayerParserHasFilesInDir Line | Count | Source | 285 | 1.05G | { | 286 | 1.05G | return (txd->files_opened && AppLayerParserIsFileTxInDir(txd, direction)); | 287 | 1.05G | } |
Unexecuted instantiation: app-layer-rdp.c:AppLayerParserHasFilesInDir Unexecuted instantiation: app-layer-rfb.c:AppLayerParserHasFilesInDir Unexecuted instantiation: app-layer-smb.c:AppLayerParserHasFilesInDir Unexecuted instantiation: app-layer-smtp.c:AppLayerParserHasFilesInDir Unexecuted instantiation: app-layer-snmp.c:AppLayerParserHasFilesInDir Unexecuted instantiation: app-layer-ssh.c:AppLayerParserHasFilesInDir Unexecuted instantiation: app-layer-ssl.c:AppLayerParserHasFilesInDir Unexecuted instantiation: app-layer-tftp.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-engine-state.c:AppLayerParserHasFilesInDir Unexecuted instantiation: flow.c:AppLayerParserHasFilesInDir Unexecuted instantiation: flow-hash.c:AppLayerParserHasFilesInDir Unexecuted instantiation: flow-manager.c:AppLayerParserHasFilesInDir Unexecuted instantiation: flow-timeout.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-file.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-filedata.c:AppLayerParserHasFilesInDir Unexecuted instantiation: runmodes.c:AppLayerParserHasFilesInDir Unexecuted instantiation: stream-tcp.c:AppLayerParserHasFilesInDir Unexecuted instantiation: stream-tcp-reassemble.c:AppLayerParserHasFilesInDir Unexecuted instantiation: suricata.c:AppLayerParserHasFilesInDir Unexecuted instantiation: util-exception-policy.c:AppLayerParserHasFilesInDir Unexecuted instantiation: util-file.c:AppLayerParserHasFilesInDir Unexecuted instantiation: util-running-modes.c:AppLayerParserHasFilesInDir Unexecuted instantiation: app-layer.c:AppLayerParserHasFilesInDir Unexecuted instantiation: app-layer-detect-proto.c:AppLayerParserHasFilesInDir Unexecuted instantiation: app-layer-dnp3.c:AppLayerParserHasFilesInDir Unexecuted instantiation: app-layer-enip.c:AppLayerParserHasFilesInDir Unexecuted instantiation: app-layer-events.c:AppLayerParserHasFilesInDir Unexecuted instantiation: app-layer-ftp.c:AppLayerParserHasFilesInDir Unexecuted instantiation: app-layer-frames.c:AppLayerParserHasFilesInDir Unexecuted instantiation: app-layer-htp.c:AppLayerParserHasFilesInDir Unexecuted instantiation: app-layer-http2.c:AppLayerParserHasFilesInDir Unexecuted instantiation: app-layer-ike.c:AppLayerParserHasFilesInDir Unexecuted instantiation: app-layer-krb5.c:AppLayerParserHasFilesInDir Unexecuted instantiation: app-layer-modbus.c:AppLayerParserHasFilesInDir Unexecuted instantiation: app-layer-quic.c:AppLayerParserHasFilesInDir Unexecuted instantiation: app-layer-mqtt.c:AppLayerParserHasFilesInDir Unexecuted instantiation: app-layer-nfs-tcp.c:AppLayerParserHasFilesInDir Unexecuted instantiation: app-layer-nfs-udp.c:AppLayerParserHasFilesInDir Unexecuted instantiation: app-layer-ntp.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-engine.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-engine-frame.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-engine-prefilter.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-engine-proto.c:AppLayerParserHasFilesInDir detect-file-data.c:AppLayerParserHasFilesInDir Line | Count | Source | 285 | 18.3k | { | 286 | 18.3k | return (txd->files_opened && AppLayerParserIsFileTxInDir(txd, direction)); | 287 | 18.3k | } |
Unexecuted instantiation: detect-filemagic.c:AppLayerParserHasFilesInDir detect-filename.c:AppLayerParserHasFilesInDir Line | Count | Source | 285 | 31.1k | { | 286 | 31.1k | return (txd->files_opened && AppLayerParserIsFileTxInDir(txd, direction)); | 287 | 31.1k | } |
Unexecuted instantiation: detect-filestore.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-flowbits.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-frame.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-ftpbounce.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-hostbits.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-http-client-body.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-http-cookie.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-http-header.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-http-header-common.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-http-header-names.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-http-host.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-http-method.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-http-protocol.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-http-raw-header.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-http-request-line.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-http-response-line.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-http-server-body.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-http-start.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-http-stat-code.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-http-stat-msg.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-http-ua.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-ike-exch-type.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-ike-spi.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-ike-vendor.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-ike-chosen-sa.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-ike-key-exchange-payload-length.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-ike-nonce-payload-length.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-ike-nonce-payload.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-ike-key-exchange-payload.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-iprep.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-lua.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-mqtt-subscribe-topic.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-mqtt-unsubscribe-topic.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-nfs-procedure.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-nfs-version.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-parse.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-pcre.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-rfb-name.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-rfb-sectype.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-sip-method.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-sip-protocol.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-sip-request-line.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-sip-response-line.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-sip-stat-code.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-sip-stat-msg.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-sip-uri.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-snmp-community.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-snmp-pdu_type.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-snmp-version.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-ssh-hassh.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-ssh-hassh-server.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-ssh-hassh-server-string.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-ssh-hassh-string.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-ssh-proto.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-ssh-proto-version.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-ssh-software.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-ssh-software-version.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-ssl-state.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-ssl-version.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-tag.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-template-rust-buffer.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-tls-version.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-uricontent.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-xbits.c:AppLayerParserHasFilesInDir Unexecuted instantiation: flow-worker.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-alert.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-anomaly.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-bittorrent-dht.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-dcerpc.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-dhcp.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-dnp3.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-dns.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-email-common.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-file.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-frame.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-ftp.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-http2.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-http.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-ike.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-krb5.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-metadata.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-modbus.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-quic.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-mqtt.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-nfs.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-pgsql.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-rdp.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-rfb.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-sip.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-smb.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-smtp.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-snmp.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-ssh.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-template.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-tftp.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-json-tls.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-streaming.c:AppLayerParserHasFilesInDir Unexecuted instantiation: output-tx.c:AppLayerParserHasFilesInDir Unexecuted instantiation: rust-context.c:AppLayerParserHasFilesInDir Unexecuted instantiation: app-layer-htp-xff.c:AppLayerParserHasFilesInDir Unexecuted instantiation: app-layer-register.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-app-layer-event.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-app-layer-protocol.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-bypass.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-bytemath.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-config.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-dce-stub-data.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-dns-query.c:AppLayerParserHasFilesInDir Unexecuted instantiation: detect-engine-file.c:AppLayerParserHasFilesInDir Unexecuted instantiation: log-httplog.c:AppLayerParserHasFilesInDir Unexecuted instantiation: log-tlslog.c:AppLayerParserHasFilesInDir Unexecuted instantiation: log-tlsstore.c:AppLayerParserHasFilesInDir Unexecuted instantiation: fuzz_applayerprotodetectgetproto.c:AppLayerParserHasFilesInDir |
288 | | |
289 | | /***** General *****/ |
290 | | |
291 | | int AppLayerParserParse(ThreadVars *tv, AppLayerParserThreadCtx *tctx, Flow *f, AppProto alproto, |
292 | | uint8_t flags, const uint8_t *input, uint32_t input_len); |
293 | | void AppLayerParserSetEOF(AppLayerParserState *pstate); |
294 | | bool AppLayerParserHasDecoderEvents(AppLayerParserState *pstate); |
295 | | int AppLayerParserProtocolHasLogger(uint8_t ipproto, AppProto alproto); |
296 | | LoggerId AppLayerParserProtocolGetLoggerBits(uint8_t ipproto, AppProto alproto); |
297 | | void AppLayerParserTriggerRawStreamReassembly(Flow *f, int direction); |
298 | | void AppLayerParserSetStreamDepth(uint8_t ipproto, AppProto alproto, uint32_t stream_depth); |
299 | | uint32_t AppLayerParserGetStreamDepth(const Flow *f); |
300 | | void AppLayerParserSetStreamDepthFlag(uint8_t ipproto, AppProto alproto, void *state, uint64_t tx_id, uint8_t flags); |
301 | | int AppLayerParserIsEnabled(AppProto alproto); |
302 | | int AppLayerParserGetFrameIdByName(uint8_t ipproto, AppProto alproto, const char *name); |
303 | | const char *AppLayerParserGetFrameNameById(uint8_t ipproto, AppProto alproto, const uint8_t id); |
304 | | |
305 | | /***** Cleanup *****/ |
306 | | |
307 | | void AppLayerParserStateProtoCleanup( |
308 | | uint8_t protomap, AppProto alproto, void *alstate, AppLayerParserState *pstate); |
309 | | void AppLayerParserStateCleanup(const Flow *f, void *alstate, AppLayerParserState *pstate); |
310 | | |
311 | | void AppLayerParserRegisterProtocolParsers(void); |
312 | | |
313 | | void AppLayerParserStateSetFlag(AppLayerParserState *pstate, uint16_t flag); |
314 | | uint16_t AppLayerParserStateIssetFlag(AppLayerParserState *pstate, uint16_t flag); |
315 | | |
316 | | AppLayerParserState *AppLayerParserStateAlloc(void); |
317 | | void AppLayerParserStateFree(AppLayerParserState *pstate); |
318 | | |
319 | | void AppLayerParserTransactionsCleanup(Flow *f, const uint8_t pkt_dir); |
320 | | |
321 | | #ifdef DEBUG |
322 | | void AppLayerParserStatePrintDetails(AppLayerParserState *pstate); |
323 | | #endif |
324 | | |
325 | | |
326 | | /***** Unittests *****/ |
327 | | |
328 | | #ifdef UNITTESTS |
329 | | void AppLayerParserRegisterProtocolUnittests(uint8_t ipproto, AppProto alproto, |
330 | | void (*RegisterUnittests)(void)); |
331 | | void AppLayerParserRegisterUnittests(void); |
332 | | void AppLayerParserBackupParserTable(void); |
333 | | void AppLayerParserRestoreParserTable(void); |
334 | | void UTHAppLayerParserStateGetIds(void *ptr, uint64_t *i1, uint64_t *i2, uint64_t *log, uint64_t *min); |
335 | | #endif |
336 | | |
337 | | void AppLayerFramesFreeContainer(Flow *f); |
338 | | void FileApplyTxFlags(const AppLayerTxData *txd, const uint8_t direction, File *file); |
339 | | |
340 | | #endif /* __APP_LAYER_PARSER_H__ */ |