bpf::system::Module class

Represents a module or dynamically loaded library

Constructors, destructors, conversion operators

Module(const bpf::String& path) explicit
Module() noexcept
~Module()
Module(Module&& other) noexcept
Module(const Module& other) deleted

Public functions

auto operator=(Module&& other) -> Module& noexcept
auto operator=(const Module& other) -> Module& deleted
auto LoadSymbol(const bpf::String& name) -> void*
auto Path() const -> const bpf::String& noexcept

Function documentation

bpf::system::Module::Module(const bpf::String& path) explicit

Parameters
path the path to the binary module without file extension
Exceptions
ModuleException in case of system error

Opens a module binary at a specified path, file extension omitted.

bpf::system::Module::Module() noexcept

Constructs an empty module

bpf::system::Module::Module(Module&& other) noexcept

Move constructor

bpf::system::Module::Module(const Module& other) deleted

Deleted copy constructor

Module& bpf::system::Module::operator=(Module&& other) noexcept

Move assignment operator

Module& bpf::system::Module::operator=(const Module& other) deleted

Deleted copy assignment operator

void* bpf::system::Module::LoadSymbol(const bpf::String& name)

Parameters
name the symbol name
Returns pointer to loaded symbol
Exceptions
ModuleException in case of system error

Loads a symbol from the module

const bpf::String& bpf::system::Module::Path() const noexcept

Returns high-level string

Returns the path to this module