HALF ECHO LEARN / REFERENCE COLLECTION

v262.2

src/shared/bpf-link.h

Git blob: 4972abab4aa82d95f462451a55231f8c065881c7

Lines 1–25 of 25

/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
 
#if HAVE_LIBBPF
#ifndef SYSTEMD_CFLAGS_MARKER_LIBBPF
#  error "missing libbpf_cflags in meson dependency."
#endif
 
#include <bpf/libbpf.h>
 
#include "forward.h"
 
bool bpf_can_link_program(struct bpf_program *prog);
bool bpf_can_link_lsm_program(struct bpf_program *prog);
 
int bpf_serialize_link(FILE *f, FDSet *fds, const char *key, struct bpf_link *link);
 
struct bpf_link* bpf_link_free(struct bpf_link *link);
DEFINE_TRIVIAL_CLEANUP_FUNC(struct bpf_link *, bpf_link_free);
 
struct ring_buffer* bpf_ring_buffer_free(struct ring_buffer *rb);
DEFINE_TRIVIAL_CLEANUP_FUNC(struct ring_buffer *, bpf_ring_buffer_free);
 
#endif