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

Npcap: Separate OPEN_INSTANCE struct into 2 different types #1572

Open
dmiller-nmap opened this issue Apr 25, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@dmiller-nmap
Copy link

commented Apr 25, 2019

Right now, Npcap uses the same struct, typedef'd as OPEN_INSTANCE, to keep track of a filter module as well as each handle that a user program opens via PacketOpenAdapter. These are large structs: IntelliSense shows sizeof(OPEN_INSTANCE) to be 58416 bytes, allocated from non-paged memory (though I suppose we should evaluate that choice, too). And each one necessarily has a lot of dynamically-allocated members: 7 spin locks plus one for each CPU core, 256 bytes for the adapter name, and a NET_BUFFER_LIST structure pool. Most of this could be limited to the filter module itself (what the code calls the GroupHead).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.