Skip to main content

Module handler

Module handler 

Source
Expand description

USB Mass Storage Class handler with BOT protocol and SCSI commands

This module implements the UsbInterfaceHandler trait for Mass Storage Class devices. It handles Bulk-Only Transport (BOT) protocol and SCSI transparent command set.

Everything here is synchronous. usbip calls UsbInterfaceHandler::handle_urb from inside an async fn on a tokio worker thread, so Handle::current().block_on(...) — which is what this file used to do for every SCSI command — panics with “Cannot block the current thread from within a runtime”. The disk sits behind a std::sync::Mutex and the SCSI path never awaits.

Structs§

UsbMscHandler
USB Mass Storage Class handler implementing BOT protocol

Enums§

MscIoEvent
A completed sector transfer, reported to the connection task so it can raise an LLM event.

Type Aliases§

SharedDisk
Shared handle on the mounted disk image.