use std;
use crate::core::{self, ALPROTO_UNKNOWN, AppProto, Flow, IPPROTO_TCP};
-use crate::log::*;
use std::mem::transmute;
use crate::applayer::{self, LoggerFlags};
use crate::parser::*;
use std::ptr;
use std::str;
-use crate::log::*;
-
extern {
fn ConfGet(key: *const c_char, res: *mut *const c_char) -> i8;
fn ConfGetChildValue(conf: *const c_void, key: *const c_char,
use crate::core::{ALPROTO_UNKNOWN, AppProto, Flow, IPPROTO_UDP};
use crate::core::{sc_detect_engine_state_free, sc_app_layer_decoder_events_free_events};
use crate::dhcp::parser::*;
-use crate::log::*;
use crate::parser::*;
use std;
use std::ffi::{CStr,CString};
use std;
use std::mem::transmute;
-use crate::log::*;
use crate::applayer::LoggerFlags;
use crate::core;
use crate::dns::parser;
use std::ptr;
use std::os::raw::{c_void};
-use crate::log::*;
use crate::core::*;
pub struct File;
* The tracker does continue to follow the file.
*/
-use crate::log::*;
use crate::core::*;
use std::collections::HashMap;
use std::collections::hash_map::Entry::{Occupied, Vacant};
self.file_is_truncated = true;
}
- pub fn create(&mut self, name: &[u8], file_size: u64) {
+ pub fn create(&mut self, _name: &[u8], _file_size: u64) {
if self.file_open == true { panic!("close existing file first"); }
- SCLogDebug!("CREATE: name {:?} file_size {}", name, file_size);
+ SCLogDebug!("CREATE: name {:?} file_size {}", _name, _file_size);
}
pub fn new_chunk(&mut self, config: &'static SuricataFileContext,
if self.chunk_is_ooo == false {
loop {
- let offset = self.tracked;
+ let _offset = self.tracked;
match self.chunks.remove(&self.tracked) {
Some(c) => {
let res = files.file_append(&self.track_id, &c.chunk, c.contains_gap);
self.tracked += c.chunk.len() as u64;
self.cur_ooo -= c.chunk.len() as u64;
- SCLogDebug!("STORED OOO CHUNK at offset {}, tracked now {}, stored len {}", offset, self.tracked, c.chunk.len());
+ SCLogDebug!("STORED OOO CHUNK at offset {}, tracked now {}, stored len {}", _offset, self.tracked, c.chunk.len());
},
_ => {
- SCLogDebug!("NO STORED CHUNK found at offset {}", self.tracked);
+ SCLogDebug!("NO STORED CHUNK found at _offset {}", self.tracked);
break;
},
};
use std;
use std::str::FromStr;
-use crate::log::*;
-
// We transform an integer string into a i64, ignoring surrounding whitespaces
// We look for a digit suite, and try to convert it.
// If either str::from_utf8 or FromStr::from_str fail,
return dport;
},
Err(nom::Err::Incomplete(_)) => {
- let buf = unsafe{std::slice::from_raw_parts(input, len as usize)};
SCLogDebug!("pasv incomplete: '{:?}'", String::from_utf8_lossy(buf));
},
Err(_) => {
- let buf = unsafe{std::slice::from_raw_parts(input, len as usize)};
SCLogDebug!("pasv error on '{:?}'", String::from_utf8_lossy(buf));
},
}
return dport;
},
Err(nom::Err::Incomplete(_)) => {
- let buf = unsafe{std::slice::from_raw_parts(input, len as usize)};
SCLogDebug!("epsv incomplete: '{:?}'", String::from_utf8_lossy(buf));
},
Err(_) => {
- let buf = unsafe{std::slice::from_raw_parts(input, len as usize)};
SCLogDebug!("epsv incomplete: '{:?}'", String::from_utf8_lossy(buf));
},
use std;
use std::ffi::{CStr,CString};
-use crate::log::*;
-
use nom;
#[repr(u32)]
self.dh_group = kex.dh_group;
}
},
- IkeV2PayloadContent::Nonce(ref n) => {
- SCLogDebug!("Nonce: {:?}", n);
+ IkeV2PayloadContent::Nonce(ref _n) => {
+ SCLogDebug!("Nonce: {:?}", _n);
},
IkeV2PayloadContent::Notify(ref n) => {
SCLogDebug!("Notify: {:?}", n);
}
};
},
- e => { SCLogDebug!("parse_ikev2_payload_with_type: {:?}",e); () },
+ _e => { SCLogDebug!("parse_ikev2_payload_with_type: {:?}",_e); () },
}
1
},
_ => (),
}
},
- IkeV2Transform::Unknown(tx_type,tx_id) => {
- SCLogDebug!("Unknown proposal: type={:?}, id={}", tx_type, tx_id);
+ IkeV2Transform::Unknown(_tx_type,_tx_id) => {
+ SCLogDebug!("Unknown proposal: type={:?}, id={}", _tx_type, _tx_id);
self.set_event(IKEV2Event::UnknownProposal);
},
_ => (),
use der_parser;
use der_parser::parse_der_oid;
-use crate::log::*;
-
pub const SECBLOB_NOT_SPNEGO : u32 = 128;
pub const SECBLOB_KRB_FMT_ERR : u32 = 129;
use crate::core::{AppProto,Flow,ALPROTO_FAILED,ALPROTO_UNKNOWN,STREAM_TOCLIENT,STREAM_TOSERVER,sc_detect_engine_state_free};
use crate::parser::*;
-use crate::log::*;
-
#[repr(u32)]
pub enum KRB5Event {
MalformedData = 0,
use crate::core::*;
#[derive(Debug)]
+#[repr(C)]
pub enum Level {
NotSet = -1,
None = 0,
message);
}
+#[cfg(feature = "function-macro")]
+#[macro_export(local_inner_macros)]
+macro_rules!function {
+ () => {{
+ // Okay, this is ugly, I get it. However, this is the best we can get on a stable rust.
+ fn __f() {}
+ fn type_name_of<T>(_: T) -> &'static str {
+ std::any::type_name::<T>()
+ }
+ let name = type_name_of(__f);
+ &name[..name.len() - 5]
+ }}
+}
/// Return the function name, but for now just return <rust> as Rust
/// has no macro to return the function name, but may in the future,
/// see: https://github.com/rust-lang/rfcs/pull/1719
+#[cfg(not(feature = "function-macro"))]
+#[macro_export(local_inner_macros)]
macro_rules!function {
() => {{ "<rust>" }}
}
#[macro_export]
macro_rules!do_log {
- ($level:expr, $file:expr, $line:expr, $function:expr, $code:expr,
- $($arg:tt)*) => {
- if get_log_level() >= $level as i32 {
- sclog($level, $file, $line, $function, $code,
+ ($level:expr, $code:expr, $($arg:tt)*) => {
+ if $crate::log::get_log_level() >= $level as i32 {
+ $crate::log::sclog($level, file!(), line!(), $crate::function!(), $code,
&(format!($($arg)*)));
}
}
#[macro_export]
macro_rules!SCLogNotice {
($($arg:tt)*) => {
- do_log!(Level::Notice, file!(), line!(), function!(), 0, $($arg)*);
+ $crate::do_log!($crate::log::Level::Notice, 0, $($arg)*);
}
}
#[macro_export]
macro_rules!SCLogInfo {
($($arg:tt)*) => {
- do_log!(Level::Info, file!(), line!(), function!(), 0, $($arg)*);
+ $crate::do_log!($crate::log::Level::Info, 0, $($arg)*);
}
}
#[macro_export]
macro_rules!SCLogPerf {
($($arg:tt)*) => {
- do_log!(Level::Perf, file!(), line!(), function!(), 0, $($arg)*);
+ $crate::do_log!($crate::log::Level::Perf, 0, $($arg)*);
}
}
#[macro_export]
macro_rules!SCLogConfig {
($($arg:tt)*) => {
- do_log!(Level::Config, file!(), line!(), function!(), 0, $($arg)*);
+ $crate::do_log!($crate::log::Level::Config, 0, $($arg)*);
}
}
+#[macro_export]
+macro_rules!SCLogError {
+ ($($arg:tt)*) => {
+ $crate::do_log!($crate::log::Level::Error, 0, $($arg)*);
+ };
+}
+
// Debug mode: call C SCLogDebug
#[cfg(feature = "debug")]
#[macro_export]
macro_rules!SCLogDebug {
($($arg:tt)*) => {
- do_log!(Level::Debug, file!(), line!(), function!(), 0, $($arg)*);
+ do_log!($crate::log::Level::Debug, 0, $($arg)*);
}
}
#[cfg(not(feature = "debug"))]
#[macro_export]
macro_rules!SCLogDebug {
- ($last:expr) => { let _ = &$last; let _ = Level::Debug; };
+ ($last:expr) => { let _ = &$last; let _ = $crate::log::Level::Debug; };
($one:expr, $($arg:tt)*) => { let _ = &$one; SCLogDebug!($($arg)*); };
}
use nom;
-use crate::log::*;
use crate::applayer;
use crate::applayer::LoggerFlags;
use crate::core::*;
if self.ts_gap {
SCLogDebug!("TS trying to catch up after GAP (input {})", cur_i.len());
- let mut cnt = 0;
+ let mut _cnt = 0;
while cur_i.len() > 0 {
- cnt += 1;
+ _cnt += 1;
match nfs_probe(cur_i, STREAM_TOSERVER) {
1 => {
SCLogDebug!("expected data found");
break;
},
0 => {
- SCLogDebug!("incomplete, queue and retry with the next block (input {}). Looped {} times.", cur_i.len(), cnt);
+ SCLogDebug!("incomplete, queue and retry with the next block (input {}). Looped {} times.",
+ cur_i.len(), _cnt);
self.tcp_buffer_ts.extend_from_slice(cur_i);
return 0;
},
-1 => {
cur_i = &cur_i[1..];
if cur_i.len() == 0 {
- SCLogDebug!("all post-GAP data in this chunk was bad. Looped {} times.", cnt);
+ SCLogDebug!("all post-GAP data in this chunk was bad. Looped {} times.", _cnt);
}
},
_ => { return 1; },
if self.tc_gap {
SCLogDebug!("TC trying to catch up after GAP (input {})", cur_i.len());
- let mut cnt = 0;
+ let mut _cnt = 0;
while cur_i.len() > 0 {
- cnt += 1;
+ _cnt += 1;
match nfs_probe(cur_i, STREAM_TOCLIENT) {
1 => {
SCLogDebug!("expected data found");
break;
},
0 => {
- SCLogDebug!("incomplete, queue and retry with the next block (input {}). Looped {} times.", cur_i.len(), cnt);
+ SCLogDebug!("incomplete, queue and retry with the next block (input {}). Looped {} times.",
+ cur_i.len(), _cnt);
self.tcp_buffer_tc.extend_from_slice(cur_i);
return 0;
},
-1 => {
cur_i = &cur_i[1..];
if cur_i.len() == 0 {
- SCLogDebug!("all post-GAP data in this chunk was bad. Looped {} times.", cnt);
+ SCLogDebug!("all post-GAP data in this chunk was bad. Looped {} times.", _cnt);
}
},
_ => { return 1; },
// written by Victor Julien
use nom;
-use crate::log::*;
use crate::nfs::nfs::*;
use crate::nfs::types::*;
// written by Victor Julien
use nom;
-use crate::log::*;
use crate::core::*;
use crate::nfs::nfs::*;
use nom::be_u32;
use crate::core::*;
-use crate::log::*;
use crate::nfs::nfs::*;
use crate::nfs::types::*;
self.commit_v4(r, fh);
}
}
- &Nfs4RequestContent::Close(ref rd) => {
- SCLogDebug!("CLOSEv4: {:?}", rd);
+ &Nfs4RequestContent::Close(ref _rd) => {
+ SCLogDebug!("CLOSEv4: {:?}", _rd);
}
&Nfs4RequestContent::Create(ref rd) => {
SCLogDebug!("CREATEv4: {:?}", rd);
xidmap.file_name = rd.to_vec();
main_opcode = NFSPROC4_REMOVE;
}
- &Nfs4RequestContent::SetClientId(ref rd) => {
+ &Nfs4RequestContent::SetClientId(ref _rd) => {
SCLogDebug!("SETCLIENTIDv4: client id {} r_netid {} r_addr {}",
- String::from_utf8_lossy(&rd.client_id),
- String::from_utf8_lossy(&rd.r_netid),
- String::from_utf8_lossy(&rd.r_addr));
+ String::from_utf8_lossy(&_rd.client_id),
+ String::from_utf8_lossy(&_rd.r_netid),
+ String::from_utf8_lossy(&_rd.r_addr));
}
&_ => { },
}
for c in &cr.commands {
SCLogDebug!("c {:?}", c);
match c {
- &Nfs4ResponseContent::ReadDir(s, ref rd) => {
+ &Nfs4ResponseContent::ReadDir(_s, ref rd) => {
if let &Some(ref rd) = rd {
- SCLogDebug!("READDIRv4: status {} eof {}", s, rd.eof);
+ SCLogDebug!("READDIRv4: status {} eof {}", _s, rd.eof);
for d in &rd.listing {
- if let &Some(ref d) = d {
- SCLogDebug!("READDIRv4: dir {}", String::from_utf8_lossy(&d.name));
+ if let &Some(ref _d) = d {
+ SCLogDebug!("READDIRv4: dir {}", String::from_utf8_lossy(&_d.name));
}
}
self.process_read_record(r, &reply, Some(&xidmap));
}
},
- &Nfs4ResponseContent::Open(s, ref rd) => {
- if let &Some(ref rd) = rd {
- SCLogDebug!("OPENv4: status {} opendata {:?}", s, rd);
+ &Nfs4ResponseContent::Open(_s, ref rd) => {
+ if let &Some(ref _rd) = rd {
+ SCLogDebug!("OPENv4: status {} opendata {:?}", _s, _rd);
insert_filename_with_getfh = true;
}
},
use std;
use std::ffi::{CStr,CString};
-use crate::log::*;
-
use nom;
#[repr(u32)]
use conf;
use core;
use core::{sc_detect_engine_state_free, AppProto, Flow, ALPROTO_UNKNOWN};
-use log::*;
use parser::*;
use sip::parser::*;
use std;
use crate::kerberos::*;
-use crate::log::*;
use crate::smb::ntlmssp_records::*;
use crate::smb::smb::*;
// written by Victor Julien
-use crate::log::*;
-
use crate::smb::smb::*;
use crate::smb::smb2::*;
use crate::smb::dcerpc_records::*;
use crate::smb::smb::*;
-#[cfg(feature = "debug")]
-use log::*;
-
impl SMBState {
#[cfg(not(feature = "debug"))]
pub fn _debug_tx_stats(&self) { }
use std;
use std::ptr;
use crate::core::*;
-use crate::log::*;
use crate::smb::smb::*;
#[no_mangle]
*/
use crate::core::*;
-use crate::log::*;
use crate::smb::smb::*;
#[repr(u32)]
*/
use crate::core::*;
-use crate::log::*;
use crate::filetracker::*;
use crate::filecontainer::*;
* 02110-1301, USA.
*/
-use crate::log::*;
use crate::kerberos::*;
use crate::smb::smb::*;
use crate::smb::smb1_session::*;
use nom;
use crate::core::*;
-use crate::log::*;
use crate::applayer;
use crate::applayer::LoggerFlags;
}
cur_i = rem;
},
- Err(nom::Err::Incomplete(needed)) => {
- SCLogDebug!("INCOMPLETE have {} needed {:?}", cur_i.len(), needed);
+ Err(nom::Err::Incomplete(_needed)) => {
+ SCLogDebug!("INCOMPLETE have {} needed {:?}", cur_i.len(), _needed);
let consumed = self.parse_tcp_data_tc_partial(cur_i);
cur_i = &cur_i[consumed ..];
use nom;
use crate::core::*;
-use crate::log::*;
use crate::smb::smb::*;
use crate::smb::dcerpc::*;
true
},
- Err(nom::Err::Incomplete(n)) => {
- SCLogDebug!("TRANS2 SET_FILE_INFO DATA DISPOSITION INCOMPLETE {:?}", n);
+ Err(nom::Err::Incomplete(_n)) => {
+ SCLogDebug!("TRANS2 SET_FILE_INFO DATA DISPOSITION INCOMPLETE {:?}", _n);
events.push(SMBEvent::MalformedData);
false
},
- Err(nom::Err::Error(e)) |
- Err(nom::Err::Failure(e)) => {
- SCLogDebug!("TRANS2 SET_FILE_INFO DATA DISPOSITION ERROR {:?}", e);
+ Err(nom::Err::Error(_e)) |
+ Err(nom::Err::Failure(_e)) => {
+ SCLogDebug!("TRANS2 SET_FILE_INFO DATA DISPOSITION ERROR {:?}", _e);
events.push(SMBEvent::MalformedData);
false
},
tx.vercmd.set_smb1_cmd(SMB1_COMMAND_TRANS2);
true
},
- Err(nom::Err::Incomplete(n)) => {
- SCLogDebug!("TRANS2 SET_PATH_INFO DATA RENAME INCOMPLETE {:?}", n);
+ Err(nom::Err::Incomplete(_n)) => {
+ SCLogDebug!("TRANS2 SET_PATH_INFO DATA RENAME INCOMPLETE {:?}", _n);
events.push(SMBEvent::MalformedData);
false
},
- Err(nom::Err::Error(e)) |
- Err(nom::Err::Failure(e)) => {
- SCLogDebug!("TRANS2 SET_PATH_INFO DATA RENAME ERROR {:?}", e);
+ Err(nom::Err::Error(_e)) |
+ Err(nom::Err::Failure(_e)) => {
+ SCLogDebug!("TRANS2 SET_PATH_INFO DATA RENAME ERROR {:?}", _e);
events.push(SMBEvent::MalformedData);
false
},
false
}
},
- Err(nom::Err::Incomplete(n)) => {
- SCLogDebug!("TRANS2 SET_PATH_INFO PARAMS INCOMPLETE {:?}", n);
+ Err(nom::Err::Incomplete(_n)) => {
+ SCLogDebug!("TRANS2 SET_PATH_INFO PARAMS INCOMPLETE {:?}", _n);
events.push(SMBEvent::MalformedData);
false
},
- Err(nom::Err::Error(e)) |
- Err(nom::Err::Failure(e)) => {
- SCLogDebug!("TRANS2 SET_PATH_INFO PARAMS ERROR {:?}", e);
+ Err(nom::Err::Error(_e)) |
+ Err(nom::Err::Failure(_e)) => {
+ SCLogDebug!("TRANS2 SET_PATH_INFO PARAMS ERROR {:?}", _e);
events.push(SMBEvent::MalformedData);
false
},
true
},
- Err(nom::Err::Incomplete(n)) => {
- SCLogDebug!("TRANS2 SET_FILE_INFO DATA DISPOSITION INCOMPLETE {:?}", n);
+ Err(nom::Err::Incomplete(_n)) => {
+ SCLogDebug!("TRANS2 SET_FILE_INFO DATA DISPOSITION INCOMPLETE {:?}", _n);
events.push(SMBEvent::MalformedData);
false
},
- Err(nom::Err::Error(e)) |
- Err(nom::Err::Failure(e)) => {
- SCLogDebug!("TRANS2 SET_FILE_INFO DATA DISPOSITION ERROR {:?}", e);
+ Err(nom::Err::Error(_e)) |
+ Err(nom::Err::Failure(_e)) => {
+ SCLogDebug!("TRANS2 SET_FILE_INFO DATA DISPOSITION ERROR {:?}", _e);
events.push(SMBEvent::MalformedData);
false
},
tx.vercmd.set_smb1_cmd(SMB1_COMMAND_TRANS2);
true
},
- Err(nom::Err::Incomplete(n)) => {
- SCLogDebug!("TRANS2 SET_FILE_INFO DATA RENAME INCOMPLETE {:?}", n);
+ Err(nom::Err::Incomplete(_n)) => {
+ SCLogDebug!("TRANS2 SET_FILE_INFO DATA RENAME INCOMPLETE {:?}", _n);
events.push(SMBEvent::MalformedData);
false
},
- Err(nom::Err::Error(e)) |
- Err(nom::Err::Failure(e)) => {
- SCLogDebug!("TRANS2 SET_FILE_INFO DATA RENAME ERROR {:?}", e);
+ Err(nom::Err::Error(_e)) |
+ Err(nom::Err::Failure(_e)) => {
+ SCLogDebug!("TRANS2 SET_FILE_INFO DATA RENAME ERROR {:?}", _e);
events.push(SMBEvent::MalformedData);
false
},
false
}
},
- Err(nom::Err::Incomplete(n)) => {
- SCLogDebug!("TRANS2 SET_FILE_INFO PARAMS INCOMPLETE {:?}", n);
+ Err(nom::Err::Incomplete(_n)) => {
+ SCLogDebug!("TRANS2 SET_FILE_INFO PARAMS INCOMPLETE {:?}", _n);
events.push(SMBEvent::MalformedData);
false
},
- Err(nom::Err::Error(e)) |
- Err(nom::Err::Failure(e)) => {
- SCLogDebug!("TRANS2 SET_FILE_INFO PARAMS ERROR {:?}", e);
+ Err(nom::Err::Error(_e)) |
+ Err(nom::Err::Failure(_e)) => {
+ SCLogDebug!("TRANS2 SET_FILE_INFO PARAMS ERROR {:?}", _e);
events.push(SMBEvent::MalformedData);
false
},
false
}
},
- Err(nom::Err::Incomplete(n)) => {
- SCLogDebug!("TRANS2 INCOMPLETE {:?}", n);
+ Err(nom::Err::Incomplete(_n)) => {
+ SCLogDebug!("TRANS2 INCOMPLETE {:?}", _n);
events.push(SMBEvent::MalformedData);
false
},
- Err(nom::Err::Error(e)) |
- Err(nom::Err::Failure(e)) => {
- SCLogDebug!("TRANS2 ERROR {:?}", e);
+ Err(nom::Err::Error(_e)) |
+ Err(nom::Err::Failure(_e)) => {
+ SCLogDebug!("TRANS2 ERROR {:?}", _e);
events.push(SMBEvent::MalformedData);
false
},
let mut frankenfid = pipe.fid.to_vec();
frankenfid.extend_from_slice(&u32_as_bytes(r.ssn_id));
- let (filename, is_dcerpc) = match state.get_service_for_guid(&frankenfid) {
+ let (_filename, is_dcerpc) = match state.get_service_for_guid(&frankenfid) {
(n, x) => (n, x),
};
SCLogDebug!("smb1_trans_request_record: name {} is_dcerpc {}",
- filename, is_dcerpc);
+ _filename, is_dcerpc);
pipe_dcerpc = is_dcerpc;
}
let mut frankenfid = fid.to_vec();
frankenfid.extend_from_slice(&u32_as_bytes(r.ssn_id));
- let (filename, is_dcerpc) = match state.get_service_for_guid(&frankenfid) {
+ let (_filename, is_dcerpc) = match state.get_service_for_guid(&frankenfid) {
(n, x) => (n, x),
};
SCLogDebug!("smb1_trans_response_record: name {} is_dcerpc {}",
- filename, is_dcerpc);
+ _filename, is_dcerpc);
// if we get status 'BUFFER_OVERFLOW' this is only a part of
// the data. Store it in the ssn/tree for later use.
* 02110-1301, USA.
*/
-use crate::log::*;
use nom::{rest, le_u8, le_u16, le_u32, le_u64, IResult};
use crate::smb::smb::*;
use crate::smb::smb_records::*;
* 02110-1301, USA.
*/
-use crate::log::*;
-
use crate::smb::smb_records::*;
use crate::smb::smb1_records::*;
use crate::smb::smb::*;
use nom;
use crate::core::*;
-use crate::log::*;
use crate::smb::smb::*;
use crate::smb::smb2_records::*;
if r.nt_status == SMB_NTSTATUS_SUCCESS {
match parse_smb2_response_write(r.data)
{
- Ok((_, wr)) => {
- SCLogDebug!("SMBv2: Write response => {:?}", wr);
+ Ok((_, _wr)) => {
+ SCLogDebug!("SMBv2: Write response => {:?}", _wr);
/* search key-guid map */
let guid_key = SMBCommonHdr::new(SMBHDR_TYPE_GUID,
r.session_id, r.tree_id, r.message_id);
- let guid_vec = match state.ssn2vec_map.remove(&guid_key) {
+ let _guid_vec = match state.ssn2vec_map.remove(&guid_key) {
Some(p) => p,
None => {
SCLogDebug!("SMBv2 response: GUID NOT FOUND");
Vec::new()
},
};
- SCLogDebug!("SMBv2 write response for GUID {:?}", guid_vec);
+ SCLogDebug!("SMBv2 write response for GUID {:?}", _guid_vec);
}
_ => {
events.push(SMBEvent::MalformedData);
* 02110-1301, USA.
*/
-use crate::log::*;
use crate::smb::smb::*;
use crate::smb::smb2::*;
use crate::smb::smb2_records::*;
* 02110-1301, USA.
*/
-use crate::log::*;
-
use crate::smb::smb2_records::*;
use crate::smb::smb::*;
//use smb::events::*;
use nom;
use nom::{ErrorKind, IResult};
-use crate::log::*;
/// parse a UTF16 string that is null terminated. Normally by 2 null
/// bytes, but at the end of the data it can also be a single null.
use std::ffi::{CStr,CString};
use std::mem::transmute;
-use crate::log::*;
-
use der_parser::{DerObjectContent,parse_der_sequence};
use der_parser::oid::Oid;
use nom;
Ok((_rem,SnmpGenericMessage::V1(msg))) |
Ok((_rem,SnmpGenericMessage::V2(msg))) => self.handle_snmp_v12(msg, direction),
Ok((_rem,SnmpGenericMessage::V3(msg))) => self.handle_snmp_v3(msg, direction),
- Err(e) => {
- SCLogDebug!("parse_snmp failed: {:?}", e);
+ Err(_e) => {
+ SCLogDebug!("parse_snmp failed: {:?}", _e);
self.set_event(SNMPEvent::MalformedData);
-1
},