]>
Commit | Line | Data |
---|---|---|
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 |
33 | void RegisterTemplateParsers(void); |
34 | void TemplateParserRegisterTests(void); | |
35 | ||
a013cece VJ |
36 | typedef struct TemplateTransaction |
37 | { | |
38 | /** Internal transaction ID. */ | |
39 | uint64_t tx_id; | |
c1b92126 | 40 | |
a013cece VJ |
41 | /** Application layer events that occurred |
42 | * while parsing this transaction. */ | |
43 | AppLayerDecoderEvents *decoder_events; | |
c1b92126 JI |
44 | |
45 | uint8_t *request_buffer; | |
46 | uint32_t request_buffer_len; | |
47 | ||
48 | uint8_t *response_buffer; | |
49 | uint32_t response_buffer_len; | |
50 | ||
51 | uint8_t response_done; /*<< Flag to be set when the response is | |
52 | * seen. */ | |
53 | ||
455eab37 VJ |
54 | AppLayerTxData tx_data; |
55 | ||
a013cece | 56 | TAILQ_ENTRY(TemplateTransaction) next; |
c1b92126 JI |
57 | |
58 | } TemplateTransaction; | |
59 | ||
a013cece | 60 | typedef struct TemplateState { |
c1b92126 | 61 | |
a013cece VJ |
62 | /** List of Template transactions associated with this |
63 | * state. */ | |
64 | TAILQ_HEAD(, TemplateTransaction) tx_list; | |
c1b92126 | 65 | |
a013cece | 66 | /** A count of the number of transactions created. The |
c6a35d09 | 67 | * transaction ID for each transaction is allocated |
a013cece VJ |
68 | * by incrementing this value. */ |
69 | uint64_t transaction_max; | |
c1b92126 JI |
70 | } TemplateState; |
71 | ||
72 | #endif /* __APP_LAYER_TEMPLATE_H__ */ |