#[repr(u32)]pub enum OptionReplyError {
Unsupported = 2_147_483_649,
Policy = 2_147_483_650,
Invalid = 2_147_483_651,
Platform = 2_147_483_652,
TLSRequired = 2_147_483_653,
UnknownExport = 2_147_483_654,
Shutdown = 2_147_483_655,
BlockSizeRequired = 2_147_483_656,
TooBig = 2_147_483_657,
ExtendedHeaderRequired = 2_147_483_658,
}Expand description
Errors that can occur during the option negotiation phase of the NBD protocol.
These errors are sent in reply to option requests from the client during the handshake and negotiation phase. All of these error codes have bit 31 set (0x80000000) to distinguish them from successful replies.
Each error provides specific information about why an option request failed, allowing clients to make informed decisions about how to proceed.
Variants§
Unsupported = 2_147_483_649
The option sent by the client is unknown by this server implementation.
This may occur because the server is too old or from another source that doesn’t support the requested option.
Corresponds to NBD_REP_ERR_UNSUP (2^31 + 1).
Policy = 2_147_483_650
The option sent by the client is known but forbidden by server policy.
The server recognizes the option and it’s syntactically valid, but server-side policy forbids the server to allow the option (e.g., the client sent NBD_OPT_LIST but server configuration has that disabled).
Corresponds to NBD_REP_ERR_POLICY (2^31 + 2).
Invalid = 2_147_483_651
The option sent by the client is known but syntactically or semantically invalid.
For instance, the client sent an NBD_OPT_LIST with nonzero data length, or the client sent a second NBD_OPT_STARTTLS after TLS was already negotiated.
Corresponds to NBD_REP_ERR_INVALID (2^31 + 3).
Platform = 2_147_483_652
The option is not supported on the platform where the server is running.
This error occurs when an option requires compile-time options that were disabled on the server, e.g., when trying to use TLS but the server was built without TLS support.
Corresponds to NBD_REP_ERR_PLATFORM (2^31 + 4).
TLSRequired = 2_147_483_653
The server requires TLS to be initiated before continuing negotiation.
For NBD_OPT_INFO and NBD_OPT_GO, this unwillingness may be limited to the export in question, depending on the TLS mode.
Corresponds to NBD_REP_ERR_TLS_REQD (2^31 + 5).
UnknownExport = 2_147_483_654
The requested export is not available on the server.
This is typically returned when a client attempts to connect to an export that doesn’t exist or isn’t configured on the server.
Corresponds to NBD_REP_ERR_UNKNOWN (2^31 + 6).
Shutdown = 2_147_483_655
The server is in the process of shutting down.
The server is unwilling to continue negotiation as it is being shut down.
Corresponds to NBD_REP_ERR_SHUTDOWN (2^31 + 7).
BlockSizeRequired = 2_147_483_656
The server requires block size information before proceeding.
The server is unwilling to enter transmission phase for a given export unless the client first acknowledges (via NBD_INFO_BLOCK_SIZE) that it will obey non-default block sizing requirements.
Corresponds to NBD_REP_ERR_BLOCK_SIZE_REQD (2^31 + 8).
TooBig = 2_147_483_657
The request or reply is too large for the server to process.
This can occur when a client sends a request that exceeds the server’s processing capabilities, or when a reply would be too large to send.
Corresponds to NBD_REP_ERR_TOO_BIG (2^31 + 9).
ExtendedHeaderRequired = 2_147_483_658
The server requires extended headers for the operation.
This is defined by the experimental EXTENDED_HEADERS extension to the NBD protocol.
Corresponds to NBD_REP_ERR_EXT_HEADER_REQD (2^31 + 10).
Trait Implementations§
Source§impl Clone for OptionReplyError
impl Clone for OptionReplyError
Source§fn clone(&self) -> OptionReplyError
fn clone(&self) -> OptionReplyError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for OptionReplyError
Source§impl Debug for OptionReplyError
impl Debug for OptionReplyError
Source§impl Display for OptionReplyError
impl Display for OptionReplyError
impl Eq for OptionReplyError
Source§impl Error for OptionReplyError
impl Error for OptionReplyError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<OptionReplyError> for u32
impl From<OptionReplyError> for u32
Source§fn from(v: OptionReplyError) -> Self
fn from(v: OptionReplyError) -> Self
Source§impl PartialEq for OptionReplyError
impl PartialEq for OptionReplyError
Source§fn eq(&self, other: &OptionReplyError) -> bool
fn eq(&self, other: &OptionReplyError) -> bool
self and other values to be equal, and is used by ==.