suricata
detect-http-header-common.h
Go to the documentation of this file.
1
/* Copyright (C) 2007-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
/**
19
* \file
20
*
21
* \author Victor Julien <victor@inliniac.net>
22
*/
23
24
#ifndef SURICATA_DETECT_HTTP_HEADER_COMMON_H
25
#define SURICATA_DETECT_HTTP_HEADER_COMMON_H
26
27
typedef
struct
HttpHeaderBuffer_
{
28
uint8_t *
buffer
;
29
uint32_t
size
;
/**< buffer size */
30
uint32_t
len
;
/**< part of buffer in use */
31
}
HttpHeaderBuffer
;
32
33
typedef
struct
HttpHeaderThreadConfig_
{
34
uint16_t
size_step
;
35
}
HttpHeaderThreadDataConfig
;
36
37
typedef
struct
HttpHeaderThreadData_
{
38
HttpHeaderBuffer
buffer
;
/**< array of buffers */
39
uint16_t
size_step
;
/**< increase size of HttpHeaderBuffer::buffer with this */
40
}
HttpHeaderThreadData
;
41
42
void
*
HttpHeaderThreadDataInit
(
void
*data);
43
void
HttpHeaderThreadDataFree
(
void
*data);
44
45
HttpHeaderBuffer
*
HttpHeaderGetBufferSpace
(
DetectEngineThreadCtx
*det_ctx,
Flow
*f, uint8_t
flags
,
46
const
int
keyword_id,
HttpHeaderThreadData
**ret_hdr_td);
47
48
int
HttpHeaderExpandBuffer
(
HttpHeaderThreadData
*td,
49
HttpHeaderBuffer
*buf, uint32_t size);
50
51
#endif
/* SURICATA_DETECT_HTTP_HEADER_COMMON_H */
HttpHeaderThreadData_::buffer
HttpHeaderBuffer buffer
Definition:
detect-http-header-common.h:38
HttpHeaderThreadData_::size_step
uint16_t size_step
Definition:
detect-http-header-common.h:39
HttpHeaderBuffer_::len
uint32_t len
Definition:
detect-http-header-common.h:30
Flow_
Flow data structure.
Definition:
flow.h:356
HttpHeaderGetBufferSpace
HttpHeaderBuffer * HttpHeaderGetBufferSpace(DetectEngineThreadCtx *det_ctx, Flow *f, uint8_t flags, const int keyword_id, HttpHeaderThreadData **ret_hdr_td)
Definition:
detect-http-header-common.c:100
HttpHeaderThreadConfig_::size_step
uint16_t size_step
Definition:
detect-http-header-common.h:34
DetectEngineThreadCtx_
Definition:
detect.h:1093
HttpHeaderThreadData
struct HttpHeaderThreadData_ HttpHeaderThreadData
HttpHeaderThreadConfig_
Definition:
detect-http-header-common.h:33
HttpHeaderBuffer_::buffer
uint8_t * buffer
Definition:
detect-http-header-common.h:28
HttpHeaderThreadDataFree
void HttpHeaderThreadDataFree(void *data)
Definition:
detect-http-header-common.c:74
HttpHeaderThreadDataInit
void * HttpHeaderThreadDataInit(void *data)
Definition:
detect-http-header-common.c:57
flags
uint8_t flags
Definition:
decode-gre.h:0
HttpHeaderBuffer_::size
uint32_t size
Definition:
detect-http-header-common.h:29
HttpHeaderThreadDataConfig
struct HttpHeaderThreadConfig_ HttpHeaderThreadDataConfig
HttpHeaderBuffer
struct HttpHeaderBuffer_ HttpHeaderBuffer
HttpHeaderBuffer_
Definition:
detect-http-header-common.h:27
HttpHeaderThreadData_
Definition:
detect-http-header-common.h:37
HttpHeaderExpandBuffer
int HttpHeaderExpandBuffer(HttpHeaderThreadData *td, HttpHeaderBuffer *buf, uint32_t size)
Definition:
detect-http-header-common.c:81
src
detect-http-header-common.h
Generated on Thu Nov 21 2024 23:30:31 for suricata by
1.8.18