libbpf-rs 0.26.2

libbpf-rs is a safe, idiomatic, and opinionated wrapper around libbpf-sys
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "vmlinux.h"

#include <bpf/bpf_core_read.h>
#include <bpf/bpf_helpers.h>

struct {
    __uint(type, BPF_MAP_TYPE_HASH);
    __type(key, u32);
    __type(value, u32);
    __uint(max_entries, 1);
    __uint(pinning, LIBBPF_PIN_BY_NAME);
} auto_pin_map SEC(".maps");

u64 resizable_data[1] SEC(".data.resizable_data");

char _license[] SEC("license") = "GPL";