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 
28 
29 #include "rust.h"
30 
31 void RegisterTemplateParsers(void);
33 
34 typedef struct TemplateTransaction
35 {
36  /** Internal transaction ID. */
37  uint64_t tx_id;
38 
39  uint8_t *request_buffer;
41 
42  uint8_t *response_buffer;
44 
45  uint8_t response_done; /*<< Flag to be set when the response is
46  * seen. */
47 
48  AppLayerTxData tx_data;
49 
51 
53 
54 typedef struct TemplateState {
55 
56  /** List of Template transactions associated with this
57  * state. */
59 
60  /** A count of the number of transactions created. The
61  * transaction ID for each transaction is allocated
62  * by incrementing this value. */
63  uint64_t transaction_max;
65 
66 #endif /* __APP_LAYER_TEMPLATE_H__ */
TemplateTransaction::response_done
uint8_t response_done
Definition: app-layer-template.h:45
TemplateState::transaction_max
uint64_t transaction_max
Definition: app-layer-template.h:63
TemplateTransaction
struct TemplateTransaction TemplateTransaction
next
struct HtpBodyChunk_ * next
Definition: app-layer-htp.h:0
rust.h
RegisterTemplateParsers
void RegisterTemplateParsers(void)
Definition: app-layer-template.c:449
TemplateParserRegisterTests
void TemplateParserRegisterTests(void)
Definition: app-layer-template.c:550
TemplateTransaction::response_buffer_len
uint32_t response_buffer_len
Definition: app-layer-template.h:43
TemplateState
struct TemplateState TemplateState
TemplateTransaction::TAILQ_ENTRY
TAILQ_ENTRY(TemplateTransaction) next
TemplateTransaction::request_buffer
uint8_t * request_buffer
Definition: app-layer-template.h:39
TemplateTransaction
Definition: app-layer-template.h:35
TemplateTransaction::response_buffer
uint8_t * response_buffer
Definition: app-layer-template.h:42
TemplateTransaction::request_buffer_len
uint32_t request_buffer_len
Definition: app-layer-template.h:40
TemplateTransaction::tx_data
AppLayerTxData tx_data
Definition: app-layer-template.h:48
TemplateTransaction::tx_id
uint64_t tx_id
Definition: app-layer-template.h:37
TemplateState
Definition: app-layer-template.h:54
TemplateState::TAILQ_HEAD
TAILQ_HEAD(, TemplateTransaction) tx_list