use std::mem::transmute;
-use crate::applayer::AppLayerResult;
+use crate::applayer::{AppLayerResult, AppLayerTxData};
use crate::core;
use crate::dcerpc::dcerpc::{
DCERPCRequest, DCERPCResponse, DCERPCUuidEntry, DCERPC_TYPE_REQUEST, DCERPC_TYPE_RESPONSE,
pub uuid_entry: Option<DCERPCUuidEntry>,
pub uuid_list: Vec<DCERPCUuidEntry>,
pub de_state: Option<*mut core::DetectEngineState>,
+ pub tx_data: AppLayerTxData,
}
impl DCERPCUDPState {
uuid_entry: None,
uuid_list: Vec::new(),
de_state: None,
+ tx_data: AppLayerTxData::new(),
};
}
0
}
+#[no_mangle]
+pub extern "C" fn rs_dcerpc_udp_get_tx_data(
+ tx: *mut std::os::raw::c_void)
+ -> *mut AppLayerTxData
+{
+ let tx = cast_pointer!(tx, DCERPCUDPState);
+ return &mut tx.tx_data;
+}
+
#[no_mangle]
pub extern "C" fn rs_dcerpc_udp_get_tx(
state: *mut std::os::raw::c_void,
RustDCERPCUDPGetTxDetectState, RustDCERPCUDPSetTxDetectState);
AppLayerParserRegisterGetTx(IPPROTO_UDP, ALPROTO_DCERPC, RustDCERPCUDPGetTx);
+ AppLayerParserRegisterTxDataFunc(IPPROTO_UDP, ALPROTO_DCERPC, rs_dcerpc_udp_get_tx_data);
AppLayerParserRegisterGetTxCnt(IPPROTO_UDP, ALPROTO_DCERPC, RustDCERPCUDPGetTxCnt);