|
|
|
@ -53,13 +53,7 @@ pub fn conf_get_node(key: &str) -> Option<ConfNode> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pub use suricata_ffi::conf::conf_get;
|
|
|
|
pub use suricata_ffi::conf::{conf_get, conf_get_bool};
|
|
|
|
|
|
|
|
|
|
|
|
// Return the value of key as a boolean. A value that is not set is
|
|
|
|
|
|
|
|
// the same as having it set to false.
|
|
|
|
|
|
|
|
pub fn conf_get_bool(key: &str) -> bool {
|
|
|
|
|
|
|
|
matches!(conf_get(key), Some("1" | "yes" | "true" | "on"))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Wrap a Suricata ConfNode and expose some of its methods with a
|
|
|
|
/// Wrap a Suricata ConfNode and expose some of its methods with a
|
|
|
|
/// Rust friendly interface.
|
|
|
|
/// Rust friendly interface.
|
|
|
|
|