tcpdump mailing list archives

Re: Add WinPcap specific functions like pcap_open() to libpcap on Windows for binary compatibility


From: Guy Harris <guy () alum mit edu>
Date: Tue, 28 Jun 2016 10:10:36 -0700

On Jun 27, 2016, at 11:22 PM, Yang Luo <hsluoyb () gmail com> wrote:

So my thought is we need to add back those functions to libpcap on Windows, the related source code files are 
remote-ext.h, pcap-new.c, etc, which don't exist in libpcap. So are we OK with this?

I am not OK with any solution that reintroduces the "pcap_md" structure.

The way libpcap works, and will continue to work, is that the pcap_t structure has a "void *" member called "priv". 
Each pcap-XXX.c file defines, internally, its own private data structure, allocates such a structure, and sets "priv" 
to point to that structure.

The code that captures remotely with rpcap must do this for all the information it needs.

Doing remote capture in an acceptable fashion, even if we don't generalize it (as I intend to do in the future) to 
support multiple modules for multiple protocols in addition to rpcap, is going to require significant changes to the 
WinPcap remote-capture code.  You might have to, for now, maintain a temporary fork of the current libpcap code, and 
remove your local changes once I've added an rpcap client module to it.
_______________________________________________
tcpdump-workers mailing list
tcpdump-workers () lists tcpdump org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers


Current thread: