Skip to content
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

libbpf to export a function to get handle from a program/map fd #4176

Open
ExceptionalHandler opened this issue Feb 3, 2025 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@ExceptionalHandler
Copy link

Describe the feature you'd like supported

As suggested in this comment here, an api to convert FDs to Windows handle can be useful for consumers of libbpf. An example is to use the handle for various Windows APIs that need a handle and do not operate on FDs.
The crt function _get_osfhandle depends on crt version used by the lib and can cause an exception if used from a different version of msvcrt than the one used by libbpf.

Proposed solution

Proposed solution is to export a function : ebpf_get_handle_from_fd from libbpf that can wrap the _get_osfhandle.

Additional context

No response

@ExceptionalHandler ExceptionalHandler added the enhancement New feature or request label Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant