// FUSE-over-virtio wire protocol types.
//
// virtio-fs reuses the Linux FUSE protocol verbatim — every guest fs
// syscall on a virtiofs mount serializes to a FUSE request, gets
// shoved into the virtio request queue, and the device replies with a
// FUSE response in the same descriptor chain. The protocol is defined
// at `include/uapi/linux/fuse.h` in the kernel tree.
//
// What lives here:
//   - opcodes (`Opcode`) — the FUSE_* operation enum
//   - flags + status constants
//   - wire-format structs (`InHeader`, `OutHeader`, `InitIn`, `InitOut`,
//     `LookupIn`, etc.) marked `#[repr(C)]` so they decode from raw
//     guest-memory byte slices via std::mem::transmute or pointer
//     reads.
//
// What deliberately doesn't live here:
//   - the request dispatcher (lives in `fuse::server`)
//   - the virtio-fs device emulation (lives in `devices::virtio::fs`)
//   - the host filesystem backend (lives in `fuse::backend`)
//
// We target FUSE protocol version 7.36 — the version Linux 6.12 ships
// with, which is what the guest will negotiate. SETUPMAPPING /
// REMOVEMAPPING for DAX were added in 7.31, so 7.36 covers everything
// we need.

#![allow(dead_code)]

pub mod backend;
pub mod dax;
pub mod notify;
pub mod posix;
#[cfg(test)]
mod posix_compliance;
pub mod protocol;
pub mod server;

pub use backend::{DirEntry, Entry, Errno, FsBackend, MemoryFs, StatFs};
pub use dax::{DaxSession, HvfMapper, MockHvfMapper, DAX_PROT_READ, DAX_PROT_WRITE};
pub use notify::{build_inval_entry, build_inval_inode, MockNotifier, Notifier, NullNotifier};
pub use posix::PosixFs;
pub use protocol::*;
pub use server::{FuseServer, Reply};
