ublk-cpp v0.0
Loading...
Searching...
No Matches
daemon.hpp File Reference

Public high-level API for running a ublk daemon. More...

Go to the source code of this file.

Classes

struct  ublk::daemon::Options
 Extra options for daemon::run(). More...

Namespaces

namespace  ublk
 The main namespace of the ublk-cpp library.
namespace  ublk::daemon
 High-level API for running a ublk daemon.

Functions

auto ublk::daemon::setup (int control_fd, ublksrv_ctrl_dev_info *info) noexcept
 Ensure the device described by info has been created and return its current information.
auto ublk::daemon::configure (int control_fd, uint32_t dev_id, ublk_params *params) noexcept
 Ensure the device has been configured and return its current configuration in params.
auto ublk::daemon::start (int control_fd, uint32_t dev_id, int32_t daemon_pid) noexcept
 Start the device, served by this daemon, if possible.
template<IoHandler Handler>
auto ublk::daemon::run (int control_fd, uint32_t dev_id, Handler &handler, Options options) noexcept
 Run the daemon serving a device until it stops.
template<ShmHandler Handler>
auto ublk::daemon::run_shm_server (int control_fd, uint32_t dev_id, std::string_view path, Handler &handler, uint32_t flags) noexcept
 Run the shared memory buffer registration service over a Unix domain socket (UBLK_F_SHMEM_ZC).

Detailed Description

Public high-level API for running a ublk daemon.

Definition in file daemon.hpp.