• Home
  • Raw
  • Download

Lines Matching +full:pre +full:- +full:programs

2 bpftool-gen
4 -------------------------------------------------------------------------------
5 tool for BPF code-generation
6 -------------------------------------------------------------------------------
15 *OPTIONS* := { { **-j** | **--json** } [{ **-p** | **--pretty** }] }
33 with BPF programs from userspace side. Generated code is
43 programs, skeleton provides a storage for BPF links (**struct
45 requested, supported BPF programs will be automatically
47 user in pre-allocated fields in skeleton struct. For BPF
48 programs that can't be automatically attached by libbpf,
50 in per-program link field. All such set up links will be
53 rely on libbpf support to detach programs and free up
57 global variables of all supported kinds: mutable, read-only,
58 as well as extern ones. This interface allows to pre-setup
60 verified by kernel. For non-read-only variables, the same
67 object file are matching 1-to-1 and always stay in sync.
68 Generated code is dual-licensed under LGPL-2.1 and
69 BSD-2-Clause licenses.
75 specific maps, programs, etc.
83 - **example__open** and **example__open_opts**.
89 - **example__load**.
91 programs, initializes global data maps. It corresponds to
94 - **example__open_and_load** combines **example__open** and
98 - **example__attach** and **example__detach**
101 programs of types supported by libbpf for auto-attachment
102 will be auto-attached and their corresponding BPF links
103 instantiated. For other BPF programs, user can manually
109 - **example__destroy**
110 Detach and unload BPF programs, free up all the resources
119 Afterwards, if target kernel supports memory-mapped BPF
121 (non-read-only) data from userspace, with same simplicity
172 This is example BPF application with two BPF programs and a mix of BPF maps
179 /* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
245 skel->rodata->param1 = 128;
256 printf("my_map name: %s\n", bpf_map__name(skel->maps.my_map));
258 bpf_program__fd(skel->progs.handle_sys_enter));
260 /* detach and re-attach sys_exit program */
261 bpf_link__destroy(skel->links.handle_sys_exit);
262 skel->links.handle_sys_exit =
263 bpf_program__attach(skel->progs.handle_sys_exit);
266 skel->bss->handle_sys_enter_my_static_var);
281 This is a stripped-out version of skeleton generated for above example code.