|
|
|
@ -46,7 +46,7 @@ lazy_static! {
|
|
|
|
.unwrap();
|
|
|
|
.unwrap();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, PartialEq)]
|
|
|
|
#[derive(Debug, PartialEq, Default)]
|
|
|
|
pub struct DetectModbusRust {
|
|
|
|
pub struct DetectModbusRust {
|
|
|
|
category: Option<Flags<CodeCategory>>,
|
|
|
|
category: Option<Flags<CodeCategory>>,
|
|
|
|
function: Option<FunctionCode>,
|
|
|
|
function: Option<FunctionCode>,
|
|
|
|
@ -57,20 +57,6 @@ pub struct DetectModbusRust {
|
|
|
|
value: Option<Range<u16>>,
|
|
|
|
value: Option<Range<u16>>,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
impl Default for DetectModbusRust {
|
|
|
|
|
|
|
|
fn default() -> Self {
|
|
|
|
|
|
|
|
DetectModbusRust {
|
|
|
|
|
|
|
|
category: None,
|
|
|
|
|
|
|
|
function: None,
|
|
|
|
|
|
|
|
subfunction: None,
|
|
|
|
|
|
|
|
access_type: None,
|
|
|
|
|
|
|
|
unit_id: None,
|
|
|
|
|
|
|
|
address: None,
|
|
|
|
|
|
|
|
value: None,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Compares a range from the alert signature to the transaction's unit_id/address/value
|
|
|
|
/// Compares a range from the alert signature to the transaction's unit_id/address/value
|
|
|
|
/// range. If the signature's range intersects with the transaction, it is a match and true is
|
|
|
|
/// range. If the signature's range intersects with the transaction, it is a match and true is
|
|
|
|
/// returned.
|
|
|
|
/// returned.
|
|
|
|
|