mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 14:11:29 +00:00
o [libpcap] Added a --disable-packet-ring option to force the use of
an older, slower packet capture mechanism on Linux. Before Linux 2.6.27, the packet ring mechanism uses different-sized kernel structures on 32- and 64-bit architectures, so a 32-bit program will not run correctly on a 64-bit kernel. The older mechanism does not have this flaw.
This commit is contained in:
@@ -232,17 +232,19 @@ static const char rcsid[] _U_ =
|
||||
# endif /* PACKET_HOST */
|
||||
|
||||
|
||||
/* check for memory mapped access avaibility. We assume every needed
|
||||
* struct is defined if the macro TPACKET_HDRLEN is defined, because it
|
||||
* uses many ring related structs and macros */
|
||||
# ifdef TPACKET_HDRLEN
|
||||
# define HAVE_PACKET_RING
|
||||
# ifdef TPACKET2_HDRLEN
|
||||
# define HAVE_TPACKET2
|
||||
# else
|
||||
# define TPACKET_V1 0
|
||||
# endif /* TPACKET2_HDRLEN */
|
||||
# endif /* TPACKET_HDRLEN */
|
||||
# ifdef PCAP_SUPPORT_PACKET_RING
|
||||
/* check for memory mapped access avaibility. We assume every needed
|
||||
* struct is defined if the macro TPACKET_HDRLEN is defined, because it
|
||||
* uses many ring related structs and macros */
|
||||
# ifdef TPACKET_HDRLEN
|
||||
# define HAVE_PACKET_RING
|
||||
# ifdef TPACKET2_HDRLEN
|
||||
# define HAVE_TPACKET2
|
||||
# else
|
||||
# define TPACKET_V1 0
|
||||
# endif /* TPACKET2_HDRLEN */
|
||||
# endif /* TPACKET_HDRLEN */
|
||||
# endif /* PCAP_SUPPORT_PACKET_RING */
|
||||
#endif /* PF_PACKET */
|
||||
|
||||
#ifdef SO_ATTACH_FILTER
|
||||
|
||||
Reference in New Issue
Block a user