Libbpf userspace function user_ring_buffer__new
Creates a new instance of a user ring buffer.
Definition
struct user_ring_buffer * user_ring_buffer__new(int map_fd, const struct user_ring_buffer_opts *opts);
Parameters
map_fd
: A file descriptor to aBPF_MAP_TYPE_USER_RINGBUF
map.opts
: Options for how the ring buffer should be created.
Return
A user ring buffer on success; NULL
and errno
being set on a
failure.
struct user_ring_buffer_opts
struct user_ring_buffer_opts {
size_t sz; /* size of this struct, for forward/backward compatibility */
};
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