suricata
app-layer-template.h
Go to the documentation of this file.
1 /* Copyright (C) 2015-2018 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 FirstName LastName <yourname@domain>
22  */
23 
24 #ifndef __APP_LAYER_TEMPLATE_H__
25 #define __APP_LAYER_TEMPLATE_H__
26 
27 #include "detect-engine-state.h"
28 
29 #include "queue.h"
30 
31 #include "rust.h"
32 
33 void RegisterTemplateParsers(void);
35 
36 typedef struct TemplateTransaction
37 {
38  /** Internal transaction ID. */
39  uint64_t tx_id;
40 
41  /** Application layer events that occurred
42  * while parsing this transaction. */
44 
45  uint8_t *request_buffer;
47 
48  uint8_t *response_buffer;
50 
51  uint8_t response_done; /*<< Flag to be set when the response is
52  * seen. */
53 
55 
56  AppLayerTxData tx_data;
57 
59 
61 
62 typedef struct TemplateState {
63 
64  /** List of Template transactions associated with this
65  * state. */
67 
68  /** A count of the number of transactions created. The
69  * transaction ID for each transaction is allocted
70  * by incrementing this value. */
71  uint64_t transaction_max;
73 
74 #endif /* __APP_LAYER_TEMPLATE_H__ */
TemplateTransaction::response_done
uint8_t response_done
Definition: app-layer-template.h:51
DetectEngineState_
Definition: detect-engine-state.h:92
TemplateState::transaction_max
uint64_t transaction_max
Definition: app-layer-template.h:71
TemplateTransaction
struct TemplateTransaction TemplateTransaction
next
struct HtpBodyChunk_ * next
Definition: app-layer-htp.h:0
rust.h
TemplateTransaction::de_state
DetectEngineState * de_state
Definition: app-layer-template.h:54
AppLayerDecoderEvents_
Data structure to store app layer decoder events.
Definition: app-layer-events.h:34
RegisterTemplateParsers
void RegisterTemplateParsers(void)
Definition: app-layer-template.c:479
TemplateParserRegisterTests
void TemplateParserRegisterTests(void)
Definition: app-layer-template.c:592
TemplateTransaction::decoder_events
AppLayerDecoderEvents * decoder_events
Definition: app-layer-template.h:43
TemplateTransaction::response_buffer_len
uint32_t response_buffer_len
Definition: app-layer-template.h:49
TemplateState
struct TemplateState TemplateState
TemplateTransaction::TAILQ_ENTRY
TAILQ_ENTRY(TemplateTransaction) next
TemplateTransaction::request_buffer
uint8_t * request_buffer
Definition: app-layer-template.h:45
detect-engine-state.h
Data structures and function prototypes for keeping state for the detection engine.
queue.h
TemplateTransaction
Definition: app-layer-template.h:37
TemplateTransaction::response_buffer
uint8_t * response_buffer
Definition: app-layer-template.h:48
TemplateTransaction::request_buffer_len
uint32_t request_buffer_len
Definition: app-layer-template.h:46
TemplateTransaction::tx_data
AppLayerTxData tx_data
Definition: app-layer-template.h:56
TemplateTransaction::tx_id
uint64_t tx_id
Definition: app-layer-template.h:39
TemplateState
Definition: app-layer-template.h:62
TemplateState::TAILQ_HEAD
TAILQ_HEAD(, TemplateTransaction) tx_list