-
Notifications
You must be signed in to change notification settings - Fork 853
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
drop #1372
Comments
To which "rather than copy or bypass" are you referring here? |
The existing is to add a bypass to the data link layer; |
Presuambly by "the existing" you're referring to the way libpcap captures packets on whatever OS you're capturing. If it's Linux:
If it's *BSD/macOS/AIX/Solaris 11:
If it's Windows with Npcap:
The copy is required, because 1) the purpose of those mechanisms is to passively capture incoming and outgoing traffic without affecting that traffic in any fashion and 2) the data has to remain around even if the Linux skbuff/{*BSD,macOS,AIX,Solaris 11} network packet buffer (mbuf for most of them)/NDIS packet buffer gets freed.
If you want to modify or drop incoming or outgoing packets before they're transmitted or after they're received, he mechanisms that libpcap/Npcap uses do not support that, as they were not designed to do that. Different operating systems may offer mechanism for doing that, but 1) it's not the same mechanism on all operating systems and 2) ou'll have to research that yourself. |
ask PacketInitPacket, PacketReceivePacket which library is the source code of these packet interfaces. |
Those are part of the packet.dll library in Npcap (and WinPcap before that). See the Npcap repository. |
What about for Cywgin or MingGW/MSYS? |
If you want to capture traffic with a library with a libpcap API, you'll have to use Npcap or some other such library-plus-driver combination, regardless of whether you use Cygwin or MinGW/MSYS - neither of those, as far as I know, have Npcap or WinPcap or... bundled with them. This is #1377; discuss that question there, not here. |
Is there anything linux can do that combines libpcap with the NDIS functionality in windows |
No; the Linux network stack doesn't have NDIS. On Linux, libpcap uses PF_PACKET socket to do capturing. |
Closing as resolved. |
How to intercept the original communication packets (rather than copy or bypass)
The text was updated successfully, but these errors were encountered: