-
Notifications
You must be signed in to change notification settings - Fork 95
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
Split logic #367
Split logic #367
Commits on Oct 26, 2023
-
chore: split logic into multiple files
This only moves code around, no functional changes.
Configuration menu - View commit details
-
Copy full SHA for c192943 - Browse repository at this point
Copy the full SHA c192943View commit details -
chore(link): make BPF link legacy a private type
It has no methods, and is only used embedded in the BPFLink type.
Configuration menu - View commit details
-
Copy full SHA for 0c6a05f - Browse repository at this point
Copy the full SHA 0c6a05fView commit details -
- Changed C function returns to 'retC' in functions that return error values to avoid confusion with possible use of errno. - Changed returns to 'valueC' in functions that return 'value' or pointers to 'value'. This also changed comparisons to "< 0" instead of "!= 0".
Configuration menu - View commit details
-
Copy full SHA for a4c5f50 - Browse repository at this point
Copy the full SHA a4c5f50View commit details -
chore: use cgo_* helpers for struct lifecycle
Introduced struct helpers to manage the C struct lifecycle on the C side, which avoids problems with structs which may contain bitfields. See aquasecurity#244. - cgo_bpf_map_info_new() - cgo_bpf_map_info_size() - cgo_bpf_map_info_free() - cgo_bpf_tc_opts_new() - cgo_bpf_tc_opts_free() - cgo_bpf_tc_hook_new() - cgo_bpf_tc_hook_free() Based on the same aquasecurity#244 concerns, introduced bpf_map_info getters: - cgo_bpf_map_info_type() - cgo_bpf_map_info_id() - cgo_bpf_map_info_key_size() - cgo_bpf_map_info_value_size() - cgo_bpf_map_info_max_entries() - cgo_bpf_map_info_map_flags() - cgo_bpf_map_info_name() - cgo_bpf_map_info_ifindex() - cgo_bpf_map_info_btf_vmlinux_value_type_id() - cgo_bpf_map_info_netns_dev() - cgo_bpf_map_info_netns_ino() - cgo_bpf_map_info_btf_id() - cgo_bpf_map_info_btf_key_type_id() - cgo_bpf_map_info_btf_value_type_id() - cgo_bpf_map_info_map_extra() - cgo_bpf_tc_opts_prog_fd() - cgo_bpf_tc_opts_flags() - cgo_bpf_tc_opts_prog_id() - cgo_bpf_tc_opts_handle() - cgo_bpf_tc_opts_priority() Changed these functions to use cgo_* struct handlers: - NewModuleFromFileArgs() - GetMapInfoByFD() - TcHook.Destroy() - TcHook.Attach() - TcHook.Detach() - TcHook.Query()
Configuration menu - View commit details
-
Copy full SHA for 913d1ea - Browse repository at this point
Copy the full SHA 913d1eaView commit details -
chore: add information to SetStrictMode()
SetStrictMode is no-op as of libbpf v1.0.
Configuration menu - View commit details
-
Copy full SHA for 1b882cf - Browse repository at this point
Copy the full SHA 1b882cfView commit details -
The underlying bpf_link__unpin() does not receive a pointer to the pin path, only for the link itself.
Configuration menu - View commit details
-
Copy full SHA for 3aeb45b - Browse repository at this point
Copy the full SHA 3aeb45bView commit details -
Applied the use of 'defer' for better resource management.
Configuration menu - View commit details
-
Copy full SHA for 87088b6 - Browse repository at this point
Copy the full SHA 87088b6View commit details -
chore(prog): remove inner name field
The API must rely on the program name returned by the libbpf API.
Configuration menu - View commit details
-
Copy full SHA for 77c521f - Browse repository at this point
Copy the full SHA 77c521fView commit details -
chore: give breath to the code putting spaces
This adds spaces to the code to make it more readable. This also puts RingBuffer.Stop() and PerfBuffer.Stop() happy path out of the branching logic.
Configuration menu - View commit details
-
Copy full SHA for 0228f12 - Browse repository at this point
Copy the full SHA 0228f12View commit details -
Configuration menu - View commit details
-
Copy full SHA for 62f0ccc - Browse repository at this point
Copy the full SHA 62f0cccView commit details -
Configuration menu - View commit details
-
Copy full SHA for f1738f9 - Browse repository at this point
Copy the full SHA f1738f9View commit details