suricata
detect-engine-content-inspection.h
Go to the documentation of this file.
1 /* Copyright (C) 2007-2011 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 Anoop Saldanha <anoopsaldanha@gmail.com>
22  * \author Victor Julien <victor@inliniac.net>
23  */
24 
25 #ifndef __DETECT_ENGINE_CONTENT_INSPECTION_H__
26 #define __DETECT_ENGINE_CONTENT_INSPECTION_H__
27 
28 /** indication to content engine what type of data
29  * we're inspecting
30  */
31 enum {
35 };
36 
37 #define DETECT_CI_FLAGS_START BIT_U8(0) /**< unused, reserved for future use */
38 #define DETECT_CI_FLAGS_END BIT_U8(1) /**< indication that current buffer
39  * is the end of the data */
40 
41 /** buffer is a single, non-streaming, buffer. Data sent to the content
42  * inspection function contains both start and end of the data. */
43 #define DETECT_CI_FLAGS_SINGLE (DETECT_CI_FLAGS_START|DETECT_CI_FLAGS_END)
44 
46  const Signature *s, const SigMatchData *smd,
47  Flow *f,
48  uint8_t *buffer, uint32_t buffer_len,
49  uint32_t stream_start_offset, uint8_t flags,
50  uint8_t inspection_mode, void *data);
51 
53 
54 #endif /* __DETECT_ENGINE_CONTENT_INSPECTION_H__ */
uint16_t flags
Data needed for Match()
Definition: detect.h:331
void DetectEngineContentInspectionRegisterTests(void)
Signature container.
Definition: detect.h:495
main detection engine ctx
Definition: detect.h:723
int DetectEngineContentInspection(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, const Signature *s, const SigMatchData *smd, Flow *f, uint8_t *buffer, uint32_t buffer_len, uint32_t stream_start_offset, uint8_t flags, uint8_t inspection_mode, void *data)
Run the actual payload match functions.
Flow data structure.
Definition: flow.h:325