Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
2
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
a33f607
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
accounting
arch
bootconfig
bpf
build
cgroup
debugging
edid
firewire
firmware
gpio
hv
iio
include
io_uring
kvm
laptop
leds
lib
api
bpf
.gitignore
Build
Makefile
bpf.c
bpf.h
bpf_core_read.h
bpf_endian.h
bpf_gen_internal.h
bpf_helpers.h
bpf_prog_linfo.c
bpf_tracing.h
btf.c
btf.h
btf_dump.c
gen_loader.c
hashmap.c
hashmap.h
libbpf.c
libbpf.h
libbpf.map
libbpf.pc.template
libbpf_common.h
libbpf_errno.c
libbpf_internal.h
libbpf_legacy.h
libbpf_probes.c
libbpf_version.h
linker.c
netlink.c
nlattr.c
nlattr.h
relo_core.c
relo_core.h
ringbuf.c
skel_internal.h
str_error.c
str_error.h
strset.c
strset.h
xsk.c
xsk.h
lockdep
perf
subcmd
symbol
traceevent
argv_split.c
bitmap.c
ctype.c
find_bit.c
hweight.c
rbtree.c
str_error_r.c
string.c
vsprintf.c
zalloc.c
memory-model
objtool
pci
pcmcia
perf
power
rcu
scripts
spi
testing
thermal
time
tracing
usb
virtio
vm
wmi
Makefile
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
Breadcrumbs
linux
/
tools
/
lib
/
bpf
/
libbpf_legacy.h
Blame
Blame
Latest commit
History
History
71 lines (60 loc) · 1.93 KB
Breadcrumbs
linux
/
tools
/
lib
/
bpf
/
libbpf_legacy.h
Top
File metadata and controls
Code
Blame
71 lines (60 loc) · 1.93 KB
Raw
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */ /* * Libbpf legacy APIs (either discouraged or deprecated, as mentioned in [0]) * * [0] https://docs.google.com/document/d/1UyjTZuPFWiPFyKk1tV5an11_iaRuec6U-ZESZ54nNTY * * Copyright (C) 2021 Facebook */ #ifndef __LIBBPF_LEGACY_BPF_H #define __LIBBPF_LEGACY_BPF_H #include <linux/bpf.h> #include <stdbool.h> #include <stddef.h> #include <stdint.h> #include "libbpf_common.h" #ifdef __cplusplus extern "C" { #endif enum libbpf_strict_mode { /* Turn on all supported strict features of libbpf to simulate libbpf * v1.0 behavior. * This will be the default behavior in libbpf v1.0. */ LIBBPF_STRICT_ALL = 0xffffffff, /* * Disable any libbpf 1.0 behaviors. This is the default before libbpf * v1.0. It won't be supported anymore in v1.0, please update your * code so that it handles LIBBPF_STRICT_ALL mode before libbpf v1.0. */ LIBBPF_STRICT_NONE = 0x00, /* * Return NULL pointers on error, not ERR_PTR(err). * Additionally, libbpf also always sets errno to corresponding Exx * (positive) error code. */ LIBBPF_STRICT_CLEAN_PTRS = 0x01, /* * Return actual error codes from low-level APIs directly, not just -1. * Additionally, libbpf also always sets errno to corresponding Exx * (positive) error code. */ LIBBPF_STRICT_DIRECT_ERRS = 0x02, /* * Enforce strict BPF program section (SEC()) names. * E.g., while prefiously SEC("xdp_whatever") or SEC("perf_event_blah") were * allowed, with LIBBPF_STRICT_SEC_PREFIX this will become * unrecognized by libbpf and would have to be just SEC("xdp") and * SEC("xdp") and SEC("perf_event"). * * Note, in this mode the program pin path will be based on the * function name instead of section name. */ LIBBPF_STRICT_SEC_NAME = 0x04, __LIBBPF_STRICT_LAST, }; LIBBPF_API int libbpf_set_strict_mode(enum libbpf_strict_mode mode); #ifdef __cplusplus } /* extern "C" */ #endif #endif /* __LIBBPF_LEGACY_BPF_H */
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
You can’t perform that action at this time.