-/* Copyright (C) 2018-2020 Open Information Security Foundation
+/* Copyright (C) 2018-2022 Open Information Security Foundation
*
* You can copy, redistribute or modify this Program under the terms of
* the GNU General Public License version 2 as published by the Free
use std;
use crate::core::{self, ALPROTO_UNKNOWN, AppProto, Flow, IPPROTO_TCP};
use std::mem::transmute;
+use std::collections::VecDeque;
use crate::applayer::{self, *};
use std::ffi::CString;
use nom;
pub struct TemplateState {
tx_id: u64,
- transactions: Vec<TemplateTransaction>,
+ transactions: VecDeque<TemplateTransaction>,
request_gap: bool,
#[allow(dead_code)]
response_gap: bool,
pub fn new() -> Self {
Self {
tx_id: 0,
- transactions: Vec::new(),
+ transactions: VecDeque::new(),
request_gap: false,
response_gap: false,
}
SCLogNotice!("Request: {}", request);
let mut tx = self.new_tx();
tx.request = Some(request);
- self.transactions.push(tx);
+ self.transactions.push_back(tx);
},
Err(nom::Err::Incomplete(_)) => {
// Not enough data. This parser doesn't give us a good indication