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 void RegisterTemplateParsers(void);
33 
34 typedef struct TemplateTransaction
35 {
36  /** Internal transaction ID. */
37  uint64_t tx_id;
38 
39  /** Application layer events that occurred
40  * while parsing this transaction. */
42 
43  uint8_t *request_buffer;
45 
46  /** flags indicating which loggers that have logged */
48 
49  uint8_t *response_buffer;
51 
52  uint8_t response_done; /*<< Flag to be set when the response is
53  * seen. */
54 
56 
58 
60 
61 typedef struct TemplateState {
62 
63  /** List of Template transactions associated with this
64  * state. */
66 
67  /** A count of the number of transactions created. The
68  * transaction ID for each transaction is allocted
69  * by incrementing this value. */
70  uint64_t transaction_max;
72 
73 #endif /* __APP_LAYER_TEMPLATE_H__ */
void TemplateParserRegisterTests(void)
struct HtpBodyChunk_ * next
LoggerId
#define TAILQ_HEAD(name, type)
Definition: queue.h:321
Data structure to store app layer decoder events.
Data structures and function prototypes for keeping state for the detection engine.
struct TemplateState TemplateState
uint64_t transaction_max
void RegisterTemplateParsers(void)
TAILQ_ENTRY(TemplateTransaction) next
DetectEngineState * de_state
AppLayerDecoderEvents * decoder_events