Skip to content

Libbpf userspace function libbpf_prog_type_by_name

0.0.1

Resolve the program and attach type from the provided ELF section name.

Definition

int libbpf_prog_type_by_name(const char *name, enum bpf_prog_type *prog_type, enum bpf_attach_type *expected_attach_type);

Parameters

  • name: The ELF section name.
  • prog_type: Pointer to program type, will be set to the resolved program type.
  • expected_attach_type: Pointer to expected attach type, will be set to the resolved expected attach type.

Return

0 on success, negative error code on failure.

Usage

Docs could be improved

This part of the docs is incomplete, contributions are very welcome

Example

Docs could be improved

This part of the docs is incomplete, contributions are very welcome