]> git.ipfire.org Git - people/ms/suricata.git/blame - src/app-layer-template.h
app-layer: include decoder events in app-layer tx data
[people/ms/suricata.git] / src / app-layer-template.h
CommitLineData
a013cece 1/* Copyright (C) 2015-2018 Open Information Security Foundation
c1b92126
JI
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
e878dd22
JI
18/**
19 * \file
20 *
21 * \author FirstName LastName <yourname@domain>
22 */
23
c1b92126
JI
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
455eab37
VJ
31#include "rust.h"
32
c1b92126
JI
33void RegisterTemplateParsers(void);
34void TemplateParserRegisterTests(void);
35
a013cece
VJ
36typedef struct TemplateTransaction
37{
38 /** Internal transaction ID. */
39 uint64_t tx_id;
c1b92126 40
c1b92126
JI
41 uint8_t *request_buffer;
42 uint32_t request_buffer_len;
43
44 uint8_t *response_buffer;
45 uint32_t response_buffer_len;
46
47 uint8_t response_done; /*<< Flag to be set when the response is
48 * seen. */
49
455eab37
VJ
50 AppLayerTxData tx_data;
51
a013cece 52 TAILQ_ENTRY(TemplateTransaction) next;
c1b92126
JI
53
54} TemplateTransaction;
55
a013cece 56typedef struct TemplateState {
c1b92126 57
a013cece
VJ
58 /** List of Template transactions associated with this
59 * state. */
60 TAILQ_HEAD(, TemplateTransaction) tx_list;
c1b92126 61
a013cece 62 /** A count of the number of transactions created. The
c6a35d09 63 * transaction ID for each transaction is allocated
a013cece
VJ
64 * by incrementing this value. */
65 uint64_t transaction_max;
c1b92126
JI
66} TemplateState;
67
68#endif /* __APP_LAYER_TEMPLATE_H__ */