1*8b26181fSAndroid Build Coastguard WorkerCurrently, libpcap supports packet capturing on Linux 2.6.27 and later; 2*8b26181fSAndroid Build Coastguard Workerearlier versions are not supported. 3*8b26181fSAndroid Build Coastguard Worker 4*8b26181fSAndroid Build Coastguard WorkerYou must configure 2.6.x kernels with the CONFIG_PACKET_MMAP option for 5*8b26181fSAndroid Build Coastguard Workerthis protocol. 3.x and later kernels do not require that. 6*8b26181fSAndroid Build Coastguard Worker 7*8b26181fSAndroid Build Coastguard WorkerNote that, by default, libpcap will, if libnl is present, build with it; 8*8b26181fSAndroid Build Coastguard Workerit uses libnl to support monitor mode on mac80211 devices. There is a 9*8b26181fSAndroid Build Coastguard Workerconfiguration option to disable building with libnl, but, if that option 10*8b26181fSAndroid Build Coastguard Workeris chosen, the monitor-mode APIs (as used by tcpdump's "-I" flag, and as 11*8b26181fSAndroid Build Coastguard Workerwill probably be used by other applications in the future) won't work 12*8b26181fSAndroid Build Coastguard Workerproperly on mac80211 devices. 13*8b26181fSAndroid Build Coastguard Worker 14*8b26181fSAndroid Build Coastguard WorkerLinux's run-time linker allows shared libraries to be linked with other 15*8b26181fSAndroid Build Coastguard Workershared libraries, which means that if an older version of a shared 16*8b26181fSAndroid Build Coastguard Workerlibrary doesn't require routines from some other shared library, and a 17*8b26181fSAndroid Build Coastguard Workerlater version of the shared library does require those routines, the 18*8b26181fSAndroid Build Coastguard Workerlater version of the shared library can be linked with that other shared 19*8b26181fSAndroid Build Coastguard Workerlibrary and, if it's otherwise binary-compatible with the older version, 20*8b26181fSAndroid Build Coastguard Workercan replace that older version without breaking applications built with 21*8b26181fSAndroid Build Coastguard Workerthe older version, and without breaking configure scripts or the build 22*8b26181fSAndroid Build Coastguard Workerprocedure for applications whose configure script doesn't use the 23*8b26181fSAndroid Build Coastguard Workerpcap-config script if they build with the shared library. (The build 24*8b26181fSAndroid Build Coastguard Workerprocedure for applications whose configure scripts use the pcap-config 25*8b26181fSAndroid Build Coastguard Workerscript if present will not break even if they build with the static 26*8b26181fSAndroid Build Coastguard Workerlibrary.) 27*8b26181fSAndroid Build Coastguard Worker 28*8b26181fSAndroid Build Coastguard WorkerStatistics: 29*8b26181fSAndroid Build Coastguard WorkerStatistics reported by pcap are platform specific. The statistics 30*8b26181fSAndroid Build Coastguard Workerreported by pcap_stats on Linux are as follows: 31*8b26181fSAndroid Build Coastguard Worker 32*8b26181fSAndroid Build Coastguard Workerps_recv Number of packets that were accepted by the pcap filter 33*8b26181fSAndroid Build Coastguard Workerps_drop Number of packets that had passed filtering but were not 34*8b26181fSAndroid Build Coastguard Worker passed on to pcap due to things like buffer shortage, etc. 35*8b26181fSAndroid Build Coastguard Worker This is useful because these are packets you are interested in 36*8b26181fSAndroid Build Coastguard Worker but won't be reported by, for example, tcpdump output. 37