Skip to content

Bof flag args #1925

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Apr 10, 2025
Merged

Bof flag args #1925

merged 18 commits into from
Apr 10, 2025

Conversation

c2biz
Copy link
Contributor

@c2biz c2biz commented Apr 10, 2025

Adds flag-based argument parsing for Beacon Object Files (BOFs) using Go's standard flag package. This implementation:

  • Converts user-friendly flag-style inputs to BOF-compatible positional argument buffers
  • Adds new default field to extension manifests for specifying argument defaults
  • Handles optional arguments by applying manifest-defined defaults when available
  • Falls back to type-appropriate zero values for optional args without defaults
  • Maintains argument type integrity (string, wstring, int, short, file)
  • Backwards compatible with existing BOF extensions and manifests

The code processes manifest-defined arguments, parses user-provided flags, and builds the binary buffer structure BOFs expect.

This PR also includes unmerged changes from #1862 (extensions_cmd_improvements) and #1923 (dll_extension_arg_fix).

@c2biz c2biz requested a review from a team as a code owner April 10, 2025 01:31
TimBF added 2 commits April 10, 2025 21:50
remove outer loop and switch to contains for extension lists

Signed-off-by: Timothy Makram Ghatas <47985652+TimBF@users.noreply.github.com>
@TimBF TimBF merged commit 6697801 into master Apr 10, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants