|
|
|
@ -75,13 +75,13 @@ impl FileContainer {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pub fn file_open(&mut self, cfg: &'static SuricataFileContext, track_id: &u32, name: &[u8], flags: u16) -> i32 {
|
|
|
|
pub fn file_open(&mut self, cfg: &'static SuricataFileContext, track_id: u32, name: &[u8], flags: u16) -> i32 {
|
|
|
|
match unsafe {SC} {
|
|
|
|
match unsafe {SC} {
|
|
|
|
None => panic!("BUG no suricata_config"),
|
|
|
|
None => panic!("BUG no suricata_config"),
|
|
|
|
Some(c) => {
|
|
|
|
Some(c) => {
|
|
|
|
SCLogDebug!("FILE {:p} OPEN flags {:04X}", &self, flags);
|
|
|
|
SCLogDebug!("FILE {:p} OPEN flags {:04X}", &self, flags);
|
|
|
|
|
|
|
|
|
|
|
|
let res = (c.FileOpenFile)(self, cfg.files_sbcfg, *track_id,
|
|
|
|
let res = (c.FileOpenFile)(self, cfg.files_sbcfg, track_id,
|
|
|
|
name.as_ptr(), name.len() as u16,
|
|
|
|
name.as_ptr(), name.len() as u16,
|
|
|
|
ptr::null(), 0u32, flags);
|
|
|
|
ptr::null(), 0u32, flags);
|
|
|
|
res
|
|
|
|
res
|
|
|
|
|