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

Revise safety bounds for npcap libraries #25

Merged
merged 1 commit into from
Feb 15, 2025

Conversation

nathaniel-bennett
Copy link
Collaborator

npcap wrapper functions are currently designed to pass mutable references; this adheres to safety constraints but makes async runtimes untenable. This PR changes safety boundaries, opting to pass NonNull<Adapter> rather than &mut Adapter references to wrapper functions, thereby enabling safe parallel operations to be performed (provided that UnsafeCell is correctly added and underlying libraries are appropriately thread-safe).

@nathaniel-bennett nathaniel-bennett force-pushed the windows-pointer-fixes branch 6 times, most recently from 7e20f9b to d39fc0b Compare February 15, 2025 03:08
@nathaniel-bennett nathaniel-bennett merged commit 5f03a4f into main Feb 15, 2025
9 checks passed
@pkts-rs pkts-rs deleted the windows-pointer-fixes branch February 15, 2025 03:21
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