Libbpf userspace function bpf_linker__add_fd
Add a file descriptor to the linker.
Definition
int bpf_linker__add_fd(struct bpf_linker *linker, int fd, const struct bpf_linker_file_opts *opts);
Parameters
linker
: pointer to astruct bpf_linker
objectfd
: file descriptor of the file to add to the linkeropts
: pointer to astruct bpf_linker_file_opts
object that contains options for the file
Return
0
, on success; On error negative error code, and errno
is set to the error code.
struct bpf_linker_file_opts
struct bpf_linker_file_opts {
/* size of this struct, for forward/backward compatibility */
size_t sz;
};
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