mirror of
https://github.com/nmap/nmap.git
synced 2026-01-04 05:39:01 +00:00
Add a long comment about Solaris 11 BPF.
I was surprised when I found that Solaris 11 scanning works now. I thought that it would require a change in the defines around pcap_selectable_fd_valid, because it's valid for Solaris 10 and earlier but not for Solaris 11. Why it started working was the pcap_selectable_fd_one_to_one test added in r28319. As a side effect of that function overrides pcap_selectable_fd_valid for all Solaris releases, it makes changes in pcap_selectable_fd_valid unnecessary. However it is indirect in the way it does it, so I'm adding a comment explaining the situation and a hope that there is an easy change to make pcap_selectable_fd_valid correct on its own.
This commit is contained in:
@@ -857,6 +857,13 @@ void set_ttl(int sd, int ttl) {
|
||||
#endif
|
||||
}
|
||||
|
||||
/* This should additionally be true for Solaris version 11 (but not 10 or
|
||||
earlier), but I haven't found a preprocessor symbol that allows easily
|
||||
testing that. Solaris 10 used DLPI for packet capture, but what OS X,
|
||||
FreeBSD, and Solaris 11 have in common is that they use BPF. We can get away
|
||||
with not having Solaris 11 here because the pcap_selectable_fd_one_to_one
|
||||
test is true for all Solaris and overrides this function everywhere it is
|
||||
used. */
|
||||
#if defined(WIN32) || defined(MACOSX) || (defined(FREEBSD) && (__FreeBSD_version < 500000))
|
||||
/* Returns whether the system supports pcap_get_selectable_fd() properly */
|
||||
int pcap_selectable_fd_valid() {
|
||||
|
||||
Reference in New Issue
Block a user