-
Notifications
You must be signed in to change notification settings - Fork 75
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
Does pypcap now require libpcap 1.0 or later? #86
Comments
This is a good point. As part of: #67 we starting using For some reason in 5de8fac#diff-c3876f456249b5e6c8991968ee76b8a5 I re-added I think it's reasonable to drop support for libpcap < 1.0 (which came out 10 years ago), though I think you are more knowledgeable about libpcap and what the tradeoffs between doing this or not doing this are. What do you think would be best? If we do go for deprecating 1.0, we should explicitly mention this in the readme and maybe add a check for it in the |
The only tradeoff I see is that if you drop support for libpcap < 1.0 you drop support for old UN*Xes that shipped with older libpcaps, unless the user builds and installs a newer libpcap on their UN*X and builds pypcap to use it rather than the system libpcap, and may also drop support for older versions of WinPcap. The UN*Xes I know of that ship libpcap are:
sources.debian.org's libpcap entry appears to indicate that the first Debian release with libpcap 1.x was 6.0 "Squeeze", from February 2011. blueprints.launchpad.net's libpcap Changelog for Jaunty and The Fedora 12 release notes indicate that the first Fedora release to have libpcap 1.x was Fedora 12. This email message says that RHEL 6.1 had libpcap 1.0.0; I don't know whether 6.0, or any previous releases, had it. I'll let other people research other distributions. Some poking around in the source repositories indicates that:
Mac OS X 10.6 "Snow Leopard", from August 2009, was the first macOS release to have libpcap 1.x. Solaris 11.4, from August 2018, has the AIX, however, still doesn't have the As for WinPcap, the WinPcap news page seems to indicate that WinPcap 4.1 was the first release with libpcap 1.x; all versions of Npcap have libpcap 1.x. |
Thanks for the very thorough and well researched response @guyharris. I think that dropping support for systems older than 10 years is reasonable, but I would like to hear if other users of pypcap have a problem with that. I suppose that if they need to use such an old OS they can probably also rely on using an older version of pypcap which doesn't have python3 support. I am going to leave this open for a bit more time and unless there is any strong argument to re-add pre 1.x pcap support I am going to just add a line in the documentation mentioning this (and perhaps a check in the setup.py script). |
The current master branch's
pcap.pyx' declares
pcap_open_live(), but doesn't appear to use it; the
pcapclass's
initmethod appears to unconditionally call
pcap_create()`.If so, that means it won't work with pre-1.0 versions of libpcap that lack
pcap_create()
andpcap_activate()
- in which case there's no need for it to declarepcap_open_live()
.The text was updated successfully, but these errors were encountered: