1#[derive(thiserror::Error, Debug, PartialEq, Eq)]
6pub enum EbpfError {
7 #[error("Unable to create VM")]
8 VmInitialization,
9
10 #[error("VM error registering callback: {0}")]
11 VmRegisterError(String),
12
13 #[error("Verification error loading program: {0}")]
14 ProgramVerifyError(String),
15
16 #[error("Failed to link program: {0}")]
17 ProgramLinkError(String),
18
19 #[error("VM error loading program: {0}")]
20 VmLoadError(String),
21
22 #[error("Invalid cBPF instruction code: 0x{0:x}")]
23 InvalidCbpfInstruction(u16),
24
25 #[error("Invalid cBPF scratch memory offset: 0x{0:x}")]
26 InvalidCbpfScratchOffset(u32),
27
28 #[error("Invalid cBPF jump offset: 0x{0:x}")]
29 InvalidCbpfJumpOffset(u32),
30}