}
}
-pub fn parse_payload<'a>(
- payload_type: u8, data: &'a [u8], data_length: u16, domain_of_interpretation: &mut Option<u32>,
+pub fn parse_payload(
+ payload_type: u8, data: &[u8], data_length: u16, domain_of_interpretation: &mut Option<u32>,
key_exchange: &mut Vec<u8>, nonce: &mut Vec<u8>, transforms: &mut Vec<Vec<SaAttribute>>,
vendor_ids: &mut Vec<String>, payload_types: &mut HashSet<u8>,
) -> Result<(), ()> {
}
}
-fn parse_proposal_payload<'a>(
- data: &'a [u8], data_length: u16, domain_of_interpretation: &mut Option<u32>,
+fn parse_proposal_payload(
+ data: &[u8], data_length: u16, domain_of_interpretation: &mut Option<u32>,
key_exchange: &mut Vec<u8>, nonce: &mut Vec<u8>, transforms: &mut Vec<Vec<SaAttribute>>,
vendor_ids: &mut Vec<String>, payload_types: &mut HashSet<u8>,
) -> Result<(), ()> {
}
}
-fn parse_security_association_payload<'a>(
- data: &'a [u8], data_length: u16, domain_of_interpretation: &mut Option<u32>,
+fn parse_security_association_payload(
+ data: &[u8], data_length: u16, domain_of_interpretation: &mut Option<u32>,
key_exchange: &mut Vec<u8>, nonce: &mut Vec<u8>, transforms: &mut Vec<Vec<SaAttribute>>,
vendor_ids: &mut Vec<String>, payload_types: &mut HashSet<u8>,
) -> Result<(), ()> {
}
}
- pub fn process_request_record_lookup<'b>(&mut self, r: &RpcPacket<'b>, xidmap: &mut NFSRequestXidMap) {
+ pub fn process_request_record_lookup(&mut self, r: &RpcPacket, xidmap: &mut NFSRequestXidMap) {
match parse_nfs3_request_lookup(r.prog_data) {
Ok((_, lookup)) => {
SCLogDebug!("LOOKUP {:?}", lookup);
}
/// complete request record
- fn process_request_record<'b>(&mut self, flow: *const Flow, stream_slice: &StreamSlice, r: &RpcPacket<'b>) {
+ fn process_request_record(&mut self, flow: *const Flow, stream_slice: &StreamSlice, r: &RpcPacket) {
SCLogDebug!("REQUEST {} procedure {} ({}) blob size {}",
r.hdr.xid, r.procedure, self.requestmap.len(), r.prog_data.len());
return self.process_write_record(r, w);
}
- fn process_reply_record<'b>(&mut self, flow: *const Flow, stream_slice: &StreamSlice, r: &RpcReplyPacket<'b>) -> u32 {
+ fn process_reply_record(&mut self, flow: *const Flow, stream_slice: &StreamSlice, r: &RpcReplyPacket) -> u32 {
let mut xidmap;
match self.requestmap.remove(&r.hdr.xid) {
Some(p) => { xidmap = p; },
impl NFSState {
/// complete request record
- pub fn process_request_record_v2<'b>(&mut self, r: &RpcPacket<'b>) {
+ pub fn process_request_record_v2(&mut self, r: &RpcPacket) {
SCLogDebug!("NFSv2: REQUEST {} procedure {} ({}) blob size {}",
r.hdr.xid, r.procedure, self.requestmap.len(), r.prog_data.len());
self.requestmap.insert(r.hdr.xid, xidmap);
}
- pub fn process_reply_record_v2<'b>(&mut self, r: &RpcReplyPacket<'b>, xidmap: &NFSRequestXidMap) {
+ pub fn process_reply_record_v2(&mut self, r: &RpcReplyPacket, xidmap: &NFSRequestXidMap) {
let mut nfs_status = 0;
let resp_handle = Vec::new();
impl NFSState {
/// complete NFS3 request record
- pub fn process_request_record_v3<'b>(&mut self, r: &RpcPacket<'b>) {
+ pub fn process_request_record_v3(&mut self, r: &RpcPacket) {
SCLogDebug!("REQUEST {} procedure {} ({}) blob size {}",
r.hdr.xid, r.procedure, self.requestmap.len(), r.prog_data.len());
self.requestmap.insert(r.hdr.xid, xidmap);
}
- pub fn process_reply_record_v3<'b>(&mut self, r: &RpcReplyPacket<'b>, xidmap: &mut NFSRequestXidMap) {
+ pub fn process_reply_record_v3(&mut self, r: &RpcReplyPacket, xidmap: &mut NFSRequestXidMap) {
let mut nfs_status = 0;
let mut resp_handle = Vec::new();
}
}
- fn new_tx_v4<'b>(
- &mut self, r: &RpcPacket<'b>, xidmap: &NFSRequestXidMap, procedure: u32,
+ fn new_tx_v4(
+ &mut self, r: &RpcPacket, xidmap: &NFSRequestXidMap, procedure: u32,
_aux_opcodes: &[u32],
) {
let mut tx = self.new_tx();
}
/// complete request record
- pub fn process_request_record_v4<'b>(&mut self, r: &RpcPacket<'b>) {
+ pub fn process_request_record_v4(&mut self, r: &RpcPacket) {
SCLogDebug!(
"NFSv4 REQUEST {} procedure {} ({}) blob size {}",
r.hdr.xid,
}
}
- pub fn process_reply_record_v4<'b>(
- &mut self, r: &RpcReplyPacket<'b>, xidmap: &mut NFSRequestXidMap,
+ pub fn process_reply_record_v4(
+ &mut self, r: &RpcReplyPacket, xidmap: &mut NFSRequestXidMap,
) {
if xidmap.procedure == NFSPROC4_COMPOUND {
let mut data = r.prog_data;
/// Handle DCERPC reply record. Called for READ, TRANS, IOCTL
///
-pub fn smb_read_dcerpc_record<'b>(state: &mut SMBState,
+pub fn smb_read_dcerpc_record(state: &mut SMBState,
vercmd: SMBVerCmdStat,
hdr: SMBCommonHdr,
guid: &[u8],
- indata: &'b [u8]) -> bool
+ indata: &[u8]) -> bool
{
let (_, ntstatus) = vercmd.get_ntstatus();
}
/// return bytes consumed
- pub fn parse_tcp_data_ts_partial<'b>(&mut self, flow: *const Flow, stream_slice: &StreamSlice, input: &'b[u8]) -> usize
+ pub fn parse_tcp_data_ts_partial(&mut self, flow: *const Flow, stream_slice: &StreamSlice, input: &[u8]) -> usize
{
SCLogDebug!("incomplete of size {}", input.len());
if input.len() < 512 {
}
/// return bytes consumed
- pub fn parse_tcp_data_tc_partial<'b>(&mut self, flow: *const Flow, stream_slice: &StreamSlice, input: &'b[u8]) -> usize
+ pub fn parse_tcp_data_tc_partial(&mut self, flow: *const Flow, stream_slice: &StreamSlice, input: &[u8]) -> usize
{
SCLogDebug!("incomplete of size {}", input.len());
if input.len() < 512 {
}
}
-fn smb1_request_record_one<'b>(state: &mut SMBState, r: &SmbRecord<'b>, command: u8, andx_offset: &mut usize) {
+fn smb1_request_record_one(state: &mut SMBState, r: &SmbRecord, command: u8, andx_offset: &mut usize) {
let mut events : Vec<SMBEvent> = Vec::new();
let mut no_response_expected = false;
}
}
-pub fn smb1_request_record<'b>(state: &mut SMBState, r: &SmbRecord<'b>) -> u32 {
+pub fn smb1_request_record(state: &mut SMBState, r: &SmbRecord) -> u32 {
SCLogDebug!("record: command {}: record {:?}", r.command, r);
let mut andx_offset = SMB1_HEADER_SIZE;
0
}
-fn smb1_response_record_one<'b>(state: &mut SMBState, r: &SmbRecord<'b>, command: u8, andx_offset: &mut usize) {
+fn smb1_response_record_one(state: &mut SMBState, r: &SmbRecord, command: u8, andx_offset: &mut usize) {
SCLogDebug!("record: command {} status {} -> {:?}", r.command, r.nt_status, r);
let key_ssn_id = r.ssn_id;
}
}
-pub fn smb1_response_record<'b>(state: &mut SMBState, r: &SmbRecord<'b>) -> u32 {
+pub fn smb1_response_record(state: &mut SMBState, r: &SmbRecord) -> u32 {
let mut andx_offset = SMB1_HEADER_SIZE;
let mut command = r.command;
loop {
0
}
-pub fn smb1_trans_request_record<'b>(state: &mut SMBState, r: &SmbRecord<'b>)
+pub fn smb1_trans_request_record(state: &mut SMBState, r: &SmbRecord)
{
let mut events : Vec<SMBEvent> = Vec::new();
smb1_request_record_generic(state, r, events);
}
-pub fn smb1_trans_response_record<'b>(state: &mut SMBState, r: &SmbRecord<'b>)
+pub fn smb1_trans_response_record(state: &mut SMBState, r: &SmbRecord)
{
let mut events : Vec<SMBEvent> = Vec::new();
}
/// Handle WRITE, WRITE_ANDX, WRITE_AND_CLOSE request records
-pub fn smb1_write_request_record<'b>(state: &mut SMBState, r: &SmbRecord<'b>, andx_offset: usize, command: u8)
+pub fn smb1_write_request_record(state: &mut SMBState, r: &SmbRecord, andx_offset: usize, command: u8)
{
let mut events : Vec<SMBEvent> = Vec::new();
smb1_request_record_generic(state, r, events);
}
-pub fn smb1_read_response_record<'b>(state: &mut SMBState, r: &SmbRecord<'b>, andx_offset: usize)
+pub fn smb1_read_response_record(state: &mut SMBState, r: &SmbRecord, andx_offset: usize)
{
let mut events : Vec<SMBEvent> = Vec::new();
/// create a tx for a command / response pair if we're
/// configured to do so, or if this is a tx especially
/// for setting an event.
-fn smb1_request_record_generic<'b>(state: &mut SMBState, r: &SmbRecord<'b>, events: Vec<SMBEvent>) {
+fn smb1_request_record_generic(state: &mut SMBState, r: &SmbRecord, events: Vec<SMBEvent>) {
if smb1_create_new_tx(r.command) || !events.is_empty() {
let tx_key = SMBCommonHdr::from1(r, SMBHDR_TYPE_GENERICTX);
let tx = state.new_generic_tx(1, r.command as u16, tx_key);
/// update or create a tx for a command / reponse pair based
/// on the response. We only create a tx for the response side
/// if we didn't already update a tx, and we have to set events
-fn smb1_response_record_generic<'b>(state: &mut SMBState, r: &SmbRecord<'b>, events: Vec<SMBEvent>) {
+fn smb1_response_record_generic(state: &mut SMBState, r: &SmbRecord, events: Vec<SMBEvent>) {
let tx_key = SMBCommonHdr::from1(r, SMBHDR_TYPE_GENERICTX);
if let Some(tx) = state.get_generic_tx(1, r.command as u16, &tx_key) {
tx.request_done = true;
Ok((i, req))
}
-pub fn parse_smb_trans_request_record<'a, 'b>(i: &'a[u8], r: &SmbRecord<'b>)
+pub fn parse_smb_trans_request_record<'a>(i: &'a[u8], r: &SmbRecord)
-> IResult<&'a[u8], SmbRecordTransRequest<'a>, SmbError>
{
let (rem, (params, pipe)) = parse_smb_trans_request_record_params(i)?;
}
}
-fn smb2_read_response_record_generic<'b>(state: &mut SMBState, r: &Smb2Record<'b>)
+fn smb2_read_response_record_generic(state: &mut SMBState, r: &Smb2Record)
{
if smb2_create_new_tx(r.command) {
let tx_hdr = SMBCommonHdr::from2(r, SMBHDR_TYPE_GENERICTX);
}
}
-pub fn smb2_read_response_record<'b>(state: &mut SMBState, r: &Smb2Record<'b>)
+pub fn smb2_read_response_record(state: &mut SMBState, r: &Smb2Record)
{
let max_queue_size = unsafe { SMB_CFG_MAX_READ_QUEUE_SIZE };
let max_queue_cnt = unsafe { SMB_CFG_MAX_READ_QUEUE_CNT };
}
}
-pub fn smb2_write_request_record<'b>(state: &mut SMBState, r: &Smb2Record<'b>)
+pub fn smb2_write_request_record(state: &mut SMBState, r: &Smb2Record)
{
let max_queue_size = unsafe { SMB_CFG_MAX_WRITE_QUEUE_SIZE };
let max_queue_cnt = unsafe { SMB_CFG_MAX_WRITE_QUEUE_CNT };
}
}
-pub fn smb2_request_record<'b>(state: &mut SMBState, r: &Smb2Record<'b>)
+pub fn smb2_request_record(state: &mut SMBState, r: &Smb2Record)
{
SCLogDebug!("SMBv2 request record, command {} tree {} session {}",
&smb2_command_string(r.command), r.tree_id, r.session_id);
}
}
-pub fn smb2_response_record<'b>(state: &mut SMBState, r: &Smb2Record<'b>)
+pub fn smb2_response_record(state: &mut SMBState, r: &Smb2Record)
{
SCLogDebug!("SMBv2 response record, command {} status {} tree {} session {} message {}",
&smb2_command_string(r.command), r.nt_status,
}
// IOCTL responses ASYNC don't set the tree id
-pub fn smb2_ioctl_request_record<'b>(state: &mut SMBState, r: &Smb2Record<'b>)
+pub fn smb2_ioctl_request_record(state: &mut SMBState, r: &Smb2Record)
{
let hdr = SMBCommonHdr::from2(r, SMBHDR_TYPE_HEADER);
match parse_smb2_request_ioctl(r.data) {
}
// IOCTL responses ASYNC don't set the tree id
-pub fn smb2_ioctl_response_record<'b>(state: &mut SMBState, r: &Smb2Record<'b>)
+pub fn smb2_ioctl_response_record(state: &mut SMBState, r: &Smb2Record)
{
let hdr = SMBCommonHdr::from2(r, SMBHDR_TYPE_HEADER);
match parse_smb2_response_ioctl(r.data) {