Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rust: remove unused #9498

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions rust/src/dcerpc/dcerpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,54 +38,12 @@ pub const DCERPC_UUID_ENTRY_FLAG_FF: u16 = 0x0001;
pub const PFC_FIRST_FRAG: u8 = 0x01;
// Value to indicate last fragment
pub const PFC_LAST_FRAG: u8 = 0x02;
// Cancel was pending at sender
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really see defines like this as dead code, would rather have them stay. It will make things easier when support is added.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use a rather Rusty convention and prefix with with _ so its clear to the reader they are not used? And perhaps awaiting use?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would work for me

pub const PFC_PENDING_CANCEL: u8 = 0x04;
pub const PFC_RESERVED_1: u8 = 0x08;
// supports concurrent multiplexing of a single connection.
pub const PFC_CONC_MPX: u8 = 0x10;
// only meaningful on `fault' packet; if true, guaranteed
// call did not execute.
pub const PFC_DID_NOT_EXECUTE: u8 = 0x20;
// `maybe' call semantics requested
pub const PFC_MAYBE: u8 = 0x40;
// if true, a non-nil object UUID was specified in the handle, and
// is present in the optional object field. If false, the object field
// is omitted.
pub const PFC_OBJECT_UUID: u8 = 0x80;

// Flag bits in first flag field in connectionless PDU header.
pub const PFCL1_RESERVED_01: u8 = 0x01; // Reserved for use by implementations
pub const PFCL1_LASTFRAG: u8 = 0x02; // If set, the PDU is the last fragment
// of a multi-PDU transmission
pub const PFCL1_FRAG: u8 = 0x04; // If set, the PDU is a fragment
// of a multi-PDU transmission
pub const PFCL1_NOFACK: u8 = 0x08; // If set, the receiver is not requested
// to send a `fack' PDU for the fragment
pub const PFCL1_MAYBE: u8 = 0x10; // If set, the PDU is for a `maybe' request
pub const PFCL1_IDEMPOTENT: u8 = 0x20; // If set, the PDU is for
// an idempotent request
pub const PFCL1_BROADCAST: u8 = 0x40; // If set, the PDU is for
// a broadcast request
pub const PFCL1_RESERVED_80: u8 = 0x80; // Reserved for use by implementations

// Flag bits in second flag field in connectionless PDU header.
pub const PFCL2_RESERVED_01: u8 = 0x01; // Reserved for use by implementations
pub const PFCL2_CANCEL_PENDING: u8 = 0x02; // Cancel pending at the call end
pub const PFCL2_RESERVED_04: u8 = 0x04; // Reserved for future use
pub const PFCL2_RESERVED_08: u8 = 0x08; // Reserved for future use
pub const PFCL2_RESERVED_10: u8 = 0x10; // Reserved for future use
pub const PFCL2_RESERVED_20: u8 = 0x20; // Reserved for future use
pub const PFCL2_RESERVED_40: u8 = 0x40; // Reserved for future use
pub const PFCL2_RESERVED_80: u8 = 0x80; // Reserved for future use

pub const REASON_NOT_SPECIFIED: u8 = 0;
pub const TEMPORARY_CONGESTION: u8 = 1;
pub const LOCAL_LIMIT_EXCEEDED: u8 = 2;
pub const CALLED_PADDR_UNKNOWN: u8 = 3; /* not used */
pub const PROTOCOL_VERSION_NOT_SUPPORTED: u8 = 4;
pub const DEFAULT_CONTEXT_NOT_SUPPORTED: u8 = 5; /* not used */
pub const USER_DATA_NOT_READABLE: u8 = 6; /* not used */
pub const NO_PSAP_AVAILABLE: u8 = 7; /* not used */

// DCERPC Header packet types
pub const DCERPC_TYPE_REQUEST: u8 = 0;
Expand Down
5 changes: 0 additions & 5 deletions rust/src/smb/smb2_records.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ pub struct Smb2SecBlobRecord<'a> {
pub data: &'a [u8],
}

pub fn parse_smb2_sec_blob(i: &[u8]) -> IResult<&[u8], Smb2SecBlobRecord> {
let (i, data) = rest(i)?;
Ok((i, Smb2SecBlobRecord { data }))
}

#[derive(Debug, PartialEq, Eq)]
pub struct Smb2RecordDir {
pub request: bool,
Expand Down
Loading