Implement SMB Oplocks Phase 3+5
Phase 3: NotificationQueue - Add notification_tx to Connection struct - Modify writer.rs to use tokio::select! for response + notification - Add write_to_bytes() to OplockBreakNotification - Support server→client async messages Phase 5: WRITE Handler oplock break - Get path/share_access before write - Trigger OplockManager.break_oplock() - Send OPLOCK_BREAK_NOTIFICATION to affected clients - Encode and send via notification channel All 229 tests pass.
This commit is contained in:
@@ -33,6 +33,12 @@ impl OplockBreakNotification {
|
||||
out.extend_from_slice(&c.into_inner());
|
||||
Ok(())
|
||||
}
|
||||
/// Phase 3: Write to a new Vec (convenience method).
|
||||
pub fn write_to_bytes(&self) -> Vec<u8> {
|
||||
let mut buf = Vec::new();
|
||||
self.write_to(&mut buf).expect("encode notification");
|
||||
buf
|
||||
}
|
||||
}
|
||||
|
||||
/// SMB2_OPLOCK_BREAK_ACK (MS-SMB2 §2.2.24.1) — same wire shape as the
|
||||
|
||||
Reference in New Issue
Block a user