Skip to main content

Crate smb_server

Crate smb_server 

Source
Expand description

SMB2/3 file-sharing server with pluggable storage backends.

Example:

use smb_server::{SmbServer, Share, Access, ShareBackend};
SmbServer::builder()
    .listen("0.0.0.0:4445".parse()?)
    .user("alice", "password")
    .share(Share::new("home", backend).user("alice", Access::ReadWrite))
    .build()?
    .serve()
    .await?;

Modules§

ntstatus
NTSTATUS values (MS-ERREF §2.3.1).
wire

Structs§

BackendCapabilities
Static, advertised capabilities of a backend.
Bytes
A cheaply cloneable and sliceable chunk of contiguous memory.
ConfigHandle
DirEntry
One entry of a directory listing.
FileInfo
Filesystem-style metadata for a single file or directory.
FileTimes
Optional FILETIME values for set_times. None means “leave unchanged”.
LocalFsBackend
Local-filesystem backend, sandboxed at a single root directory.
OpenOptions
Options passed to ShareBackend::open.
Share
One share definition, attached to a single backend.
ShutdownHandle
Cheaply-clonable shutdown handle. Outlives SmbServer::serve consuming the server.
SmbPath
A validated, component-list path. No .., no Windows-forbidden chars, no alternate streams. Always relative to the share root; the empty path is the root.
SmbServer
A built but not-yet-running SMB server.
SmbServerBuilder
Builder for SmbServer. See SmbServer::builder.

Enums§

Access
Access level granted to a user on a share, or to anonymous on a public share.
BuildError
Errors raised by SmbServerBuilder::build.
ConfigError
Identity
Identity recovered from a successful (or anonymous) authentication.
OpenIntent
SMB CREATE disposition as seen by a backend.
ShareMode
SmbError
Errors returned by ShareBackend and surfaced through the SMB protocol.

Traits§

Handle
A live open file or directory handle.
ShareBackend
Pluggable storage backend mounted as a share.

Type Aliases§

SmbResult