Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is another PR that cleans up includes and improves and organizes a couple of other things. Initially, my goal was to make it so when using the static option, it wouldn't require LibXDP and LibBPF to be installed on your system all together. However, there are a couple of source files in the LibXDP submodule that relies on specific headers within the
/usr/include
and/usr/local/include
include paths (where LibXDP and LibBPF header files are installed to) which causes an error when not having LibXDP and LibBPF installed on your system.I encountered this issue on a vanilla VM I made running Debian 12 to build and install XDP Firewall without having LibXDP installed on the system as well (no static build). Therefore, I believe the best choice is to enable the static option when building by default. There are a couple of positives when building using the no static option (faster build, etc.), so I wanted to leave the option there for those interested.
Additionally, I've made a few other small changes like renaming variable names and altering the verbose output.