Skip to content

Commit bbe1aba

Browse files
committed
added example for interacting with static/global vars
Signed-off-by: Simone Magnani <[email protected]>
1 parent 56f2790 commit bbe1aba

File tree

7 files changed

+423
-0
lines changed

7 files changed

+423
-0
lines changed

examples/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Please see our [guide on what makes a good example](https://ebpf-go.dev/contribu
2323
* [tcx](./tcx/) - Print packet counts for ingress and egress.
2424
* XDP - Attach a program to a network interface to process incoming packets.
2525
* [xdp](xdp/) - Print packet counts by IPv4 source address.
26+
* [globals](globals/) - Read and manipulate global variables from an XDP program while processing packets.
2627

2728
## How to run
2829

examples/globals/bpf_bpfeb.go

+150
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/globals/bpf_bpfeb.o

3.09 KB
Binary file not shown.

examples/globals/bpf_bpfel.go

+150
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/globals/bpf_bpfel.o

3.09 KB
Binary file not shown.

0 commit comments

Comments
 (0)