* Update to latest libbpf .h files
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Add libbpf_bpf_{prog,attach}_type_str APIs
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Add libbpf_attach_type_by_name
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Add libbpf_bpf_{link,map}_type_str
And add tests for prog type and attach type names
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Add tests
And change type names to match Linux
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix cmake build
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Update tests
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Update docs
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Add bpf_program__insn_cnt()
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Add MSVC deprecated attribute to most deprecated APIs
Still haven't done bpf_object__next() or bpf_prog_load_deprecated()
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Mark bpf_object__next was deprecated
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix some test failures
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Suppress instead of disable deprecated warnings
To simplify diffs
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Merge with latest main
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* PR feedback
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Update to latest libbpf and bpftool
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix test
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Update to latest verifier commit
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Add bpf_prog_load()
* Move prototype for bpf_prog_load_deprecated() from libbpf.h to bpf.h
to match libbpf
* Mark as deprecated bpf_object__load_xattr(), bpf_load_program(), and
bpf_load_program_xattr() to match libbpf
* Make bpf_load_program_xattr() support the program name field, where
previously it was ignored and a random name was used.
Fixes#1073
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Make bpf_object__open_file work with native files
* Update bpf_object__open_file()
* Add bpf_object__open()
* Rename ebpf_enumerate_sections() to ebpf_enumerate_program_sections()
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Remove ebpf_program_load
And add a couple of windows-specific libbpf related APIs
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix bug in enumerate sections hit by tail_call_multiple_um.dll
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix program_name field in object_open
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Cleanup
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix order of PE sections returned
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Bug fix
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Bug fix
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Bug fix and revert enumerate_sections rename
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Updated expected bpf2c output
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix analysis warning
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Updated issue number in TODO comments
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Address Anurag's feedback
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* WIP: Developer nuget package
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Add bpf2c utility
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Build nupkg from within VisualStudio
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Don't use relative path to externals
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Update props file in nuget package
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix include and library paths
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Fix debug build
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
Co-authored-by: saxena-anurag <43585259+saxena-anurag@users.noreply.github.com>
* remove dependabot from the fork.
* Revert "remove dependabot from the fork."
This reverts commit c542c6cd44.
* Program info and hook NPI providers for sock_addr.
* Program info and hook NPI providers for sock_addr.
* PR Feedback.
* PR Feedback 2.
* wfp callout for sock_addr hook.
* PR Feedback.
* fix build break.
* Allow attaching an XDP program to a specific ifindex
* Update tests since droppacket.o changed
* Add ifindex use back to droppacket.c for testing purposes
* Verify xdp program to unlink is actually an XDP program
* Add comment re moving xdp fd replace logic to execution context
* Add libbpf test and add support for bpf_xdp_query_id
Signed-off-by: Dave Thaler <dthaler@microsoft.com>
* Libbpf doxygen fixes
* Add missing bpf_map__name
* Move bpf_object__unload to be in alphabetical order
Signed-off-by: Dave Thaler <dthaler@microsoft.com>