pub struct LiveHostKernelEnv {
pub release: String,
pub btf_path: PathBuf,
pub vmlinux_elf_path: Option<PathBuf>,
pub kallsyms_path: PathBuf,
}Expand description
Resolved live-host kernel environment.
Built once at the start of a live-host introspection run; the
dump pipeline holds it alongside the
super::bpf_syscall::BpfSyscallAccessor for the duration of
the dump.
Fields§
§release: StringOutput of uname -r — the running kernel’s release string
(e.g. “6.16.0-1234-generic”). Used to interpolate paths
like /lib/modules/<release>/build/vmlinux.
btf_path: PathBufPath to the vmlinux ELF (or raw BTF blob) the BTF parser will load. Always set; resolution order is documented on the module-level doc.
vmlinux_elf_path: Option<PathBuf>Path to a vmlinux ELF when one is reachable on this host.
None when only /sys/kernel/btf/vmlinux is available
(raw BTF, no ELF) — most common on stripped distro kernels
without linux-headers-* / linux-image-*-dbg installed.
kallsyms_path: PathBufPath to /proc/kallsyms — fixed but kept here so callers
that want to swap in a unit-test fixture (or /proc/PID/maps
alternative) have a single override point.
Implementations§
Source§impl LiveHostKernelEnv
impl LiveHostKernelEnv
Sourcepub fn discover() -> Result<Self>
pub fn discover() -> Result<Self>
Auto-discover every resource needed by the live-host introspection pipeline.
Returns an error only when none of the BTF candidate paths
resolve — without BTF the failure-dump renderer can’t decode
any field. Missing vmlinux ELF or unreadable /proc/kallsyms
are NOT errors at this layer: callers that need ELF or
symbols for their specific dump pass surface their own error
when they reach for an unavailable resource.
Trait Implementations§
Source§impl Clone for LiveHostKernelEnv
impl Clone for LiveHostKernelEnv
Source§fn clone(&self) -> LiveHostKernelEnv
fn clone(&self) -> LiveHostKernelEnv
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for LiveHostKernelEnv
impl RefUnwindSafe for LiveHostKernelEnv
impl Send for LiveHostKernelEnv
impl Sync for LiveHostKernelEnv
impl Unpin for LiveHostKernelEnv
impl UnwindSafe for LiveHostKernelEnv
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more