Skip to content

Commit

Permalink
krb5: register tx detect flags
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonish committed Nov 27, 2019
1 parent 8a232be commit fa4b9d3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions rust/src/krb/krb5.rs
Expand Up @@ -89,6 +89,7 @@ pub struct KRB5Transaction {
events: *mut core::AppLayerDecoderEvents,

logged: applayer::LoggerFlags,
detect_flags: applayer::TxDetectFlags,
}

pub fn to_hex_string(bytes: &[u8]) -> String {
Expand Down Expand Up @@ -240,6 +241,7 @@ impl KRB5Transaction {
de_state: None,
events: std::ptr::null_mut(),
logged: applayer::LoggerFlags::new(),
detect_flags: applayer::TxDetectFlags::default(),
}
}
}
Expand Down Expand Up @@ -633,6 +635,8 @@ pub extern "C" fn rs_krb5_parse_response_tcp(_flow: *const core::Flow,
status
}

export_tx_detect_flags_set!(rs_krb5_tx_detect_flags_set, KRB5Transaction);
export_tx_detect_flags_get!(rs_krb5_tx_detect_flags_get, KRB5Transaction);

const PARSER_NAME : &'static [u8] = b"krb5\0";

Expand Down Expand Up @@ -669,8 +673,8 @@ pub unsafe extern "C" fn rs_register_krb5_parser() {
set_tx_mpm_id : None,
get_files : None,
get_tx_iterator : None,
get_tx_detect_flags: None,
set_tx_detect_flags: None,
get_tx_detect_flags: Some(rs_krb5_tx_detect_flags_get),
set_tx_detect_flags: Some(rs_krb5_tx_detect_flags_set),
};
// register UDP parser
let ip_proto_str = CString::new("udp").unwrap();
Expand Down

0 comments on commit fa4b9d3

Please sign in to comment.