Skip to content

Commit

Permalink
added example for interacting with static/global vars
Browse files Browse the repository at this point in the history
Signed-off-by: Simone Magnani <[email protected]>
  • Loading branch information
smagnani96 committed Aug 8, 2024
1 parent 521eecf commit d978138
Show file tree
Hide file tree
Showing 7 changed files with 439 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Please see our [guide on what makes a good example](https://ebpf-go.dev/contribu
* [tcx](./tcx/) - Print packet counts for ingress and egress.
* XDP - Attach a program to a network interface to process incoming packets.
* [xdp](xdp/) - Print packet counts by IPv4 source address.
* [globals](globals/) - Read and manipulate global variables from an XDP program while processing packets.

## How to run

Expand Down
150 changes: 150 additions & 0 deletions examples/globals/bpf_bpfeb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added examples/globals/bpf_bpfeb.o
Binary file not shown.
150 changes: 150 additions & 0 deletions examples/globals/bpf_bpfel.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added examples/globals/bpf_bpfel.o
Binary file not shown.
Loading

0 comments on commit d978138

Please sign in to comment.