Struct libbpf_rs::Program[][src]

pub struct Program { /* fields omitted */ }
Expand description

Represents a loaded Program.

This struct is not safe to clone because the underlying libbpf resource cannot currently be protected from data races.

If you attempt to attach a Program with the wrong attach method, the attach_* method will fail with the appropriate error.

Implementations

Name of the section this Program belongs to.

Returns a file descriptor to the underlying program.

Pin this program to bpffs.

Unpin this program from bpffs

Auto-attach based on prog section

Attach this program to a cgroup.

Attach this program to a perf event.

Attach this program to a userspace probe.

Attach this program to a kernel probe.

Attach this program to a kernel tracepoint.

Attach this program to a raw kernel tracepoint.

Attach to an LSM hook

Attach a verdict/parser to a sockmap/sockhash

Attach this program to XDP

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

Performs the conversion.

Performs the conversion.

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.