pub struct Request {
pub dialects: Vec<u16>,
pub client_guid: [u8; 16],
pub contexts: Vec<Context>,
}Expand description
Parsed SMB2 NEGOTIATE request.
Fields§
§dialects: Vec<u16>Dialect numbers offered by the client.
client_guid: [u8; 16]Client GUID.
contexts: Vec<Context>Negotiate contexts (3.1.1 only; empty otherwise).
Implementations§
Source§impl Request
impl Request
Sourcepub fn parse(b: &[u8]) -> Option<Request>
pub fn parse(b: &[u8]) -> Option<Request>
Parse from the request body (bytes after the 64-byte header).
Two layouts exist ([MS-SMB2] §2.2.3.1): pre-3.1.1 clients place the dialect array directly after the fixed part (offset 28); 3.1.1-aware clients interpose NegotiateContextOffset/Count fields so dialects begin at offset 36. We accept either by validating candidates against the set of known dialect revisions.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnsafeUnpin for Request
impl UnwindSafe for Request
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more