Enum aya::programs::ProgramError
source · [−]pub enum ProgramError {
Show 19 variants
AlreadyLoaded,
NotLoaded,
AlreadyDetached,
NotAttached,
LoadError {
io_error: Error,
verifier_log: String,
},
SyscallError {
call: String,
io_error: Error,
},
UnknownInterface {
name: String,
},
UnexpectedProgramType,
InvalidPinPath {
error: String,
},
MapError(MapError),
KProbeError(KProbeError),
UProbeError(UProbeError),
TracePointError(TracePointError),
SocketFilterError(SocketFilterError),
XdpError(XdpError),
TcError(TcError),
ExtensionError(ExtensionError),
Btf(BtfError),
InvalidName {
name: String,
},
}
Expand description
Error type returned when working with programs.
Variants
AlreadyLoaded
The program is already loaded.
NotLoaded
The program is not loaded.
AlreadyDetached
The program is already detached.
NotAttached
The program is not attached.
LoadError
Fields
verifier_log: String
The error log produced by the kernel verifier.
Loading the program failed.
SyscallError
Fields
call: String
The name of the syscall which failed.
A syscall failed.
UnknownInterface
Fields
name: String
interface name
The network interface does not exist.
UnexpectedProgramType
The program is not of the expected type.
InvalidPinPath
Fields
error: String
the error message
Invalid pin path
MapError(MapError)
A map error occurred while loading or attaching a program.
KProbeError(KProbeError)
An error occurred while working with a KProbe
.
UProbeError(UProbeError)
An error occurred while working with an UProbe
.
TracePointError(TracePointError)
An error occurred while working with a TracePoint
.
SocketFilterError(SocketFilterError)
An error occurred while working with a SocketFilter
.
XdpError(XdpError)
An error occurred while working with an Xdp
program.
TcError(TcError)
An error occurred while working with a TC program.
ExtensionError(ExtensionError)
An error occurred while working with an Extension
program.
Btf(BtfError)
An error occurred while working with BTF.
InvalidName
Fields
name: String
program name
The program is not attached.
Trait Implementations
sourceimpl Debug for ProgramError
impl Debug for ProgramError
sourceimpl Display for ProgramError
impl Display for ProgramError
sourceimpl Error for ProgramError
impl Error for ProgramError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<BtfError> for ProgramError
impl From<BtfError> for ProgramError
sourceimpl From<ExtensionError> for ProgramError
impl From<ExtensionError> for ProgramError
sourcefn from(source: ExtensionError) -> Self
fn from(source: ExtensionError) -> Self
Performs the conversion.
sourceimpl From<KProbeError> for ProgramError
impl From<KProbeError> for ProgramError
sourcefn from(source: KProbeError) -> Self
fn from(source: KProbeError) -> Self
Performs the conversion.
sourceimpl From<MapError> for ProgramError
impl From<MapError> for ProgramError
sourceimpl From<ProgramError> for BpfError
impl From<ProgramError> for BpfError
sourcefn from(source: ProgramError) -> Self
fn from(source: ProgramError) -> Self
Performs the conversion.
sourceimpl From<SocketFilterError> for ProgramError
impl From<SocketFilterError> for ProgramError
sourcefn from(source: SocketFilterError) -> Self
fn from(source: SocketFilterError) -> Self
Performs the conversion.
sourceimpl From<TcError> for ProgramError
impl From<TcError> for ProgramError
sourceimpl From<TracePointError> for ProgramError
impl From<TracePointError> for ProgramError
sourcefn from(source: TracePointError) -> Self
fn from(source: TracePointError) -> Self
Performs the conversion.
sourceimpl From<UProbeError> for ProgramError
impl From<UProbeError> for ProgramError
sourcefn from(source: UProbeError) -> Self
fn from(source: UProbeError) -> Self
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for ProgramError
impl Send for ProgramError
impl Sync for ProgramError
impl Unpin for ProgramError
impl !UnwindSafe for ProgramError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more