pub enum BtfError {
Show 21 variants
FileError {
path: PathBuf,
error: Error,
},
InvalidHeader,
InvalidTypeInfo,
InvalidRelocationInfo,
InvalidTypeKind {
kind: u32,
},
InvalidRelocationKind {
kind: u32,
},
InvalidStringOffset {
offset: usize,
},
InvalidInfo {
offset: usize,
len: usize,
section_len: usize,
},
InvalidLineInfo {
offset: usize,
len: usize,
section_len: usize,
},
UnknownBtfType {
type_id: u32,
},
UnexpectedBtfType {
type_id: u32,
},
UnknownBtfTypeName {
type_name: String,
},
MaximumTypeDepthReached {
type_id: u32,
},
LoadError {
io_error: Error,
verifier_log: VerifierLog,
},
SymbolOffsetNotFound {
symbol_name: String,
},
InvalidDatasec,
UnknownSectionSize {
section_name: String,
},
InvalidSymbolName,
InnerMapCannotBePinned {
name: String,
},
MultiLevelMapInMapNotSupported {
name: String,
},
InvalidValuesSpec {
name: String,
},
}Expand description
The error type returned when BTF operations fail.
Variants§
FileError
std only.Error parsing file
InvalidHeader
Error parsing BTF header
InvalidTypeInfo
invalid BTF type info segment
InvalidRelocationInfo
invalid BTF relocation info segment
InvalidTypeKind
invalid BTF type kind
InvalidRelocationKind
invalid BTF relocation kind
InvalidStringOffset
invalid BTF string offset
InvalidInfo
invalid BTF info
InvalidLineInfo
invalid BTF line infos
UnknownBtfType
unknown BTF type id
UnexpectedBtfType
unexpected btf type id
UnknownBtfTypeName
unknown BTF type
MaximumTypeDepthReached
maximum depth reached resolving BTF type
LoadError
std only.Loading the btf failed
Fields
io_error: ErrorThe std::io::Error returned by the BPF_BTF_LOAD syscall.
verifier_log: VerifierLogThe error log produced by the kernel verifier.
SymbolOffsetNotFound
offset not found for symbol
InvalidDatasec
btf type that is not VAR found in DATASEC
UnknownSectionSize
unable to determine the size of section
InvalidSymbolName
unable to get symbol name
InnerMapCannotBePinned
Inner map definition cannot be pinned.
MultiLevelMapInMapNotSupported
Multi-level map-in-map is not supported.
InvalidValuesSpec
The values spec must be a zero-sized array.
Trait Implementations§
Source§impl Error for BtfError
impl Error for BtfError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()