extern structstd.os.linux.bpf.ProgAttachAttr[src]

struct used by Cmd.prog_attach/detach commands

Fields

target_fd: fd_t

container object to attach to

attach_bpf_fd: fd_t

eBPF program to attach

attach_type: u32
attach_flags: u32
replace_bpf_fd: fd_t

previously attached eBPF program to replace if .replace is used

Source Code

Source code
pub const ProgAttachAttr = extern struct {
    /// container object to attach to
    target_fd: fd_t,

    /// eBPF program to attach
    attach_bpf_fd: fd_t,

    attach_type: u32,
    attach_flags: u32,

    // TODO: BPF_F_REPLACE flags
    /// previously attached eBPF program to replace if .replace is used
    replace_bpf_fd: fd_t,
}