From: Victor Julien Date: Wed, 21 Mar 2018 14:53:15 +0000 (+0100) Subject: nfs/rpc: add parser for GSSAPI Integrity records X-Git-Tag: suricata-4.1.0-rc1~133 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75c5722b7e1707623c70911f660b6836e9b1c364;p=thirdparty%2Fsuricata.git nfs/rpc: add parser for GSSAPI Integrity records --- diff --git a/rust/src/nfs/rpc_records.rs b/rust/src/nfs/rpc_records.rs index 30bfcd7b5d..446935a0ba 100644 --- a/rust/src/nfs/rpc_records.rs +++ b/rust/src/nfs/rpc_records.rs @@ -92,6 +92,25 @@ named!(parse_rpc_request_creds_unknown, >> (RpcRequestCreds::Unknown(blob) ) )); +#[derive(Debug,PartialEq)] +pub struct RpcGssApiIntegrity<'a> { + pub seq_num: u32, + pub data: &'a[u8], +} + +// Parse the GSSAPI Integrity envelope to get to the +// data we care about. +named!(pub parse_rpc_gssapi_integrity, + do_parse!( + len: be_u32 + >> seq_num: be_u32 + >> data: take!(len) + >> (RpcGssApiIntegrity { + seq_num: seq_num, + data: data, + }) +)); + #[derive(Debug,PartialEq)] pub struct RpcPacketHeader<> { pub frag_is_last: bool,