Expand description
Network Block Device (NBD) driver implementation and server functionality.
This module provides core components for implementing an NBD server:
crate::device::NbdDriver: A trait for defining NBD devicescrate::server::NbdServer: A struct for handling the NBD protocol
§Protocol Compliance
This implementation follows the NBD protocol specification as defined at NetworkBlockDevice/nbd.
§Security Considerations
NBD does not provide built-in authentication or encryption. For secure deployments:
- Use on trusted networks only
- Consider implementing TLS support (with the
START_TLSoption) - Use firewall rules to restrict access
§Logging
This crate uses the tracing crate for logging. To enable logging, you need to install
a tracing subscriber. For simple usage, you can use the init_default_tracing function
provided by this crate.
tokio_nbd::init_default_tracing();For more advanced usage, you can use the tracing crate directly to configure logging.
Modules§
- device
- Network Block Device (NBD) driver implementation and server functionality.
- errors
- Error types for the NBD (Network Block Device) protocol.
- flags
- Flag definitions for the NBD (Network Block Device) protocol.
- server
- Network Block Device (NBD) driver implementation and server functionality.
Functions§
- init_
default_ tracing - Initializes a default tracing subscriber suitable for use with tokio-nbd.