diff --git a/rust/src/sip/sip.rs b/rust/src/sip/sip.rs index f5a86cfc39..da47c7e262 100755 --- a/rust/src/sip/sip.rs +++ b/rust/src/sip/sip.rs @@ -36,6 +36,12 @@ pub struct SIPState { tx_id: u64, } +impl State for SIPState { + fn get_transactions(&self) -> &[SIPTransaction] { + &self.transactions + } +} + pub struct SIPTransaction { id: u64, pub request: Option, @@ -47,6 +53,12 @@ pub struct SIPTransaction { tx_data: applayer::AppLayerTxData, } +impl Transaction for SIPTransaction { + fn id(&self) -> u64 { + self.id + } +} + impl SIPState { pub fn new() -> SIPState { SIPState { @@ -326,7 +338,7 @@ pub unsafe extern "C" fn rs_sip_register_parser() { localstorage_new: None, localstorage_free: None, get_files: None, - get_tx_iterator: None, + get_tx_iterator: Some(applayer::state_get_tx_iterator::), get_tx_data: rs_sip_get_tx_data, apply_tx_config: None, flags: APP_LAYER_PARSER_OPT_UNIDIR_TXS,