suricata
rust-context.h
Go to the documentation of this file.
1/* Copyright (C) 2017 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#ifndef SURICATA_RUST_CONTEXT_H
19#define SURICATA_RUST_CONTEXT_H
20
21#include "flow.h"
22#include "detect.h"
23#include "detect-engine-state.h" //DetectEngineState
24
25#include "app-layer-ike.h" //IKEState, IKETransaction
26#include "app-layer-tftp.h" //TFTPState, TFTPTransaction
27
28#include "util-debug.h"
29#include "util-file.h"
30#include "util-var.h"
31
32// hack for include orders cf SCSha256
34
35struct AppLayerParser;
36
37typedef struct SuricataContext_ {
38 SCError (*SCLogMessage)(const SCLogLevel, const char *, const unsigned int, const char *,
39 const char *, const char *message);
42 uint8_t);
45
48 const uint16_t, HttpRangeContainerBlock *, const uint8_t *, uint32_t);
49
51 uint32_t track_id, const uint8_t *name, uint16_t name_len,
52 const uint8_t *data, uint32_t data_len, uint16_t flags);
53 int (*FileCloseFileById)(FileContainer *, const StreamingBufferConfig *, uint32_t track_id,
54 const uint8_t *data, uint32_t data_len, uint16_t flags);
55 int (*FileAppendDataById)(FileContainer *, const StreamingBufferConfig *, uint32_t track_id,
56 const uint8_t *data, uint32_t data_len);
57 int (*FileAppendGAPById)(FileContainer *, const StreamingBufferConfig *, uint32_t track_id,
58 const uint8_t *data, uint32_t data_len);
60
63
65
71
72const SuricataContext *SCGetContext(void);
73
74#endif /* !SURICATA_RUST_CONTEXT_H */
uint8_t flags
Definition decode-gre.h:0
Data structures and function prototypes for keeping state for the detection engine.
struct SuricataFileContext_ SuricataFileContext
const SuricataContext suricata_context
const SuricataContext * SCGetContext(void)
struct SuricataContext_ SuricataContext
Data structure to store app layer decoder events.
Flow data structure.
Definition flow.h:356
int(* FileAppendGAPById)(FileContainer *, const StreamingBufferConfig *, uint32_t track_id, const uint8_t *data, uint32_t data_len)
void(* AppLayerDecoderEventsFreeEvents)(AppLayerDecoderEvents **)
int(* FileOpenFileWithId)(FileContainer *, const StreamingBufferConfig *, uint32_t track_id, const uint8_t *name, uint16_t name_len, const uint8_t *data, uint32_t data_len, uint16_t flags)
void(* GenericVarFree)(GenericVar *)
void(* AppLayerParserTriggerRawStreamInspection)(Flow *, int direction)
int(* FileAppendDataById)(FileContainer *, const StreamingBufferConfig *, uint32_t track_id, const uint8_t *data, uint32_t data_len)
void(* AppLayerDecoderEventsSetEventRaw)(AppLayerDecoderEvents **, uint8_t)
void(* DetectEngineStateFree)(DetectEngineState *)
void(* HttpRangeFreeBlock)(HttpRangeContainerBlock *)
SCError(* SCLogMessage)(const SCLogLevel, const char *, const unsigned int, const char *, const char *, const char *message)
bool(* HTPFileCloseHandleRange)(const StreamingBufferConfig *sbcfg, FileContainer *, const uint16_t, HttpRangeContainerBlock *, const uint8_t *, uint32_t)
void(* FileContainerRecycle)(FileContainer *ffc, const StreamingBufferConfig *)
int(* FileCloseFileById)(FileContainer *, const StreamingBufferConfig *, uint32_t track_id, const uint8_t *data, uint32_t data_len, uint16_t flags)
const StreamingBufferConfig * sbcfg
const char * name
SCLogLevel
The various log levels NOTE: when adding new level, don't forget to update SCLogMapLogLevelToSyslogLe...
Definition util-debug.h:32
SCError
Definition util-error.h:26