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

io_error: Error

The io::Error returned by the BPF_PROG_LOAD syscall.

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.

io_error: Error

The io::Error returned by the syscall.

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

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.