Merge "Update libpcap to 1.9.0"
am: 530f5327d3

Change-Id: Id8480d4abb6ca90675020a8f40faacf9c743af27
tree: 8b959bf9d2b44f2b12c86dfdc5810210d587e99e
  1. ChmodBPF/
  2. cmake/
  3. doc/
  4. lbl/
  5. missing/
  6. msdos/
  7. pcap/
  8. rpcapd/
  9. testprogs/
  10. tests/
  11. Win32/
  12. .gitignore
  13. aclocal.m4
  14. Android.bp
  15. arcnet.h
  16. atmuni31.h
  17. bpf_dump.c
  18. bpf_filter.c
  19. bpf_image.c
  20. CHANGES
  21. chmod_bpf
  22. CleanSpec.mk
  23. cmake_uninstall.cmake.in
  24. cmakeconfig.h.in
  25. CMakeLists.txt
  26. config.guess
  27. config.h
  28. config.h.in
  29. config.sub
  30. configure
  31. configure.ac
  32. CONTRIBUTING.md
  33. CREDITS
  34. diag-control.h
  35. dlpisubs.c
  36. dlpisubs.h
  37. etherent.c
  38. ethertype.h
  39. extract.h
  40. fad-getad.c
  41. fad-gifc.c
  42. fad-glifc.c
  43. fmtutils.c
  44. fmtutils.h
  45. ftmacros.h
  46. gencode.c
  47. gencode.h
  48. grammar.c
  49. grammar.h
  50. grammar.y
  51. ieee80211.h
  52. install-sh
  53. INSTALL.md
  54. libpcap.pc.in
  55. LICENSE
  56. llc.h
  57. Makefile-devel-adds
  58. Makefile.in
  59. METADATA
  60. mkdep
  61. MODULE_LICENSE_BSD
  62. nametoaddr.c
  63. nametoaddr.h
  64. nlpid.h
  65. nomkdep
  66. NOTICE
  67. optimize.c
  68. optimize.h
  69. org.tcpdump.chmod_bpf.plist
  70. OWNERS
  71. pcap-bpf.c
  72. pcap-bpf.h
  73. pcap-bt-linux.c
  74. pcap-bt-linux.h
  75. pcap-bt-monitor-linux.c
  76. pcap-bt-monitor-linux.h
  77. pcap-common.c
  78. pcap-common.h
  79. pcap-config.1
  80. pcap-config.in
  81. pcap-dag.c
  82. pcap-dag.h
  83. pcap-dbus.c
  84. pcap-dbus.h
  85. pcap-dll.rc
  86. pcap-dlpi.c
  87. pcap-dos.c
  88. pcap-dos.h
  89. pcap-enet.c
  90. pcap-filter.manmisc
  91. pcap-filter.manmisc.in
  92. pcap-int.h
  93. pcap-libdlpi.c
  94. pcap-linktype.manmisc
  95. pcap-linktype.manmisc.in
  96. pcap-linux.c
  97. pcap-namedb.h
  98. pcap-netfilter-linux-android.c
  99. pcap-netfilter-linux-android.h
  100. pcap-netfilter-linux.c
  101. pcap-netfilter-linux.h
  102. pcap-netmap.c
  103. pcap-netmap.h
  104. pcap-new.c
  105. pcap-nit.c
  106. pcap-npf.c
  107. pcap-null.c
  108. pcap-pf.c
  109. pcap-rdmasniff.c
  110. pcap-rdmasniff.h
  111. pcap-rpcap-int.h
  112. pcap-rpcap.c
  113. pcap-rpcap.h
  114. pcap-savefile.manfile
  115. pcap-savefile.manfile.in
  116. pcap-septel.c
  117. pcap-septel.h
  118. pcap-sita.c
  119. pcap-sita.h
  120. pcap-sita.html
  121. pcap-snf.c
  122. pcap-snf.h
  123. pcap-snit.c
  124. pcap-snoop.c
  125. pcap-tc.c
  126. pcap-tc.h
  127. pcap-tstamp.manmisc
  128. pcap-tstamp.manmisc.in
  129. pcap-types.h
  130. pcap-usb-linux.c
  131. pcap-usb-linux.h
  132. pcap.3pcap
  133. pcap.3pcap.in
  134. pcap.c
  135. pcap.h
  136. pcap_activate.3pcap
  137. pcap_breakloop.3pcap
  138. pcap_can_set_rfmon.3pcap
  139. pcap_close.3pcap
  140. pcap_compile.3pcap
  141. pcap_compile.3pcap.in
  142. pcap_create.3pcap
  143. pcap_datalink.3pcap
  144. pcap_datalink.3pcap.in
  145. pcap_datalink_name_to_val.3pcap
  146. pcap_datalink_val_to_name.3pcap
  147. pcap_dump.3pcap
  148. pcap_dump_close.3pcap
  149. pcap_dump_file.3pcap
  150. pcap_dump_flush.3pcap
  151. pcap_dump_ftell.3pcap
  152. pcap_dump_open.3pcap
  153. pcap_dump_open.3pcap.in
  154. pcap_file.3pcap
  155. pcap_fileno.3pcap
  156. pcap_findalldevs.3pcap
  157. pcap_freecode.3pcap
  158. pcap_get_required_select_timeout.3pcap
  159. pcap_get_selectable_fd.3pcap
  160. pcap_get_tstamp_precision.3pcap
  161. pcap_get_tstamp_precision.3pcap.in
  162. pcap_geterr.3pcap
  163. pcap_inject.3pcap
  164. pcap_is_swapped.3pcap
  165. pcap_lib_version.3pcap
  166. pcap_list_datalinks.3pcap
  167. pcap_list_datalinks.3pcap.in
  168. pcap_list_tstamp_types.3pcap
  169. pcap_list_tstamp_types.3pcap.in
  170. pcap_lookupdev.3pcap
  171. pcap_lookupnet.3pcap
  172. pcap_loop.3pcap
  173. pcap_major_version.3pcap
  174. pcap_next_ex.3pcap
  175. pcap_offline_filter.3pcap
  176. pcap_open_dead.3pcap
  177. pcap_open_dead.3pcap.in
  178. pcap_open_live.3pcap
  179. pcap_open_offline.3pcap
  180. pcap_open_offline.3pcap.in
  181. pcap_set_buffer_size.3pcap
  182. pcap_set_datalink.3pcap
  183. pcap_set_immediate_mode.3pcap
  184. pcap_set_promisc.3pcap
  185. pcap_set_protocol_linux.3pcap
  186. pcap_set_rfmon.3pcap
  187. pcap_set_snaplen.3pcap
  188. pcap_set_timeout.3pcap
  189. pcap_set_tstamp_precision.3pcap
  190. pcap_set_tstamp_precision.3pcap.in
  191. pcap_set_tstamp_type.3pcap
  192. pcap_set_tstamp_type.3pcap.in
  193. pcap_setdirection.3pcap
  194. pcap_setfilter.3pcap
  195. pcap_setnonblock.3pcap
  196. pcap_snapshot.3pcap
  197. pcap_stats.3pcap
  198. pcap_statustostr.3pcap
  199. pcap_strerror.3pcap
  200. pcap_tstamp_type_name_to_val.3pcap
  201. pcap_tstamp_type_val_to_name.3pcap
  202. portability.h
  203. ppp.h
  204. README.md
  205. rpcap-protocol.c
  206. rpcap-protocol.h
  207. savefile.c
  208. scanner.c
  209. scanner.h
  210. scanner.l
  211. sf-pcap.c
  212. sf-pcap.h
  213. sf-pcapng.c
  214. sf-pcapng.h
  215. sockutils.c
  216. sockutils.h
  217. sunatmpos.h
  218. TODO
  219. varattrs.h
  220. VERSION
README.md

To report a security issue please send an e-mail to security@tcpdump.org.

To report bugs and other problems, contribute patches, request a feature, provide generic feedback etc please see the file CONTRIBUTING in the libpcap source tree root.

The directory doc/ has README files about specific operating systems and options.

LIBPCAP 1.x.y Now maintained by "The Tcpdump Group" https://www.tcpdump.org

Anonymous Git is available via: https://github.com/the-tcpdump-group/libpcap.git

formerly from Lawrence Berkeley National Laboratory Network Research Group libpcap@ee.lbl.gov ftp://ftp.ee.lbl.gov/old/libpcap-0.4a7.tar.Z

This directory contains source code for libpcap, a system-independent interface for user-level packet capture. libpcap provides a portable framework for low-level network monitoring. Applications include network statistics collection, security monitoring, network debugging, etc. Since almost every system vendor provides a different interface for packet capture, and since we've developed several tools that require this functionality, we've created this system-independent API to ease in porting and to alleviate the need for several system-dependent packet capture modules in each application.

For some platforms there are README.{system} files that discuss issues with the OS's interface for packet capture on those platforms, such as how to enable support for that interface in the OS, if it's not built in by default.

The libpcap interface supports a filtering mechanism based on the architecture in the BSD packet filter. BPF is described in the 1993 Winter Usenix paper ``The BSD Packet Filter: A New Architecture for User-level Packet Capture''. A compressed PostScript version can be found at

ftp://ftp.ee.lbl.gov/papers/bpf-usenix93.ps.Z

or

https://www.tcpdump.org/papers/bpf-usenix93.ps.Z

and a gzipped version can be found at

https://www.tcpdump.org/papers/bpf-usenix93.ps.gz

A PDF version can be found at

https://www.tcpdump.org/papers/bpf-usenix93.pdf

Although most packet capture interfaces support in-kernel filtering, libpcap utilizes in-kernel filtering only for the BPF interface. On systems that don't have BPF, all packets are read into user-space and the BPF filters are evaluated in the libpcap library, incurring added overhead (especially, for selective filters). Ideally, libpcap would translate BPF filters into a filter program that is compatible with the underlying kernel subsystem, but this is not yet implemented.

BPF is standard in 4.4BSD, BSD/OS, NetBSD, FreeBSD, OpenBSD, DragonFly BSD, and macOS; an older, modified and undocumented version is standard in AIX. {DEC OSF/1, Digital UNIX, Tru64 UNIX} uses the packetfilter interface but has been extended to accept BPF filters (which libpcap utilizes). Also, you can add BPF filter support to Ultrix using the kernel source and/or object patches available in:

https://www.tcpdump.org/other/bpfext42.tar.Z

Linux has a number of BPF based systems, and libpcap does not support any of the eBPF mechanisms as yet, although it supports many of the memory mapped receive mechanisms. See the README.linux file for more information.

Note to Linux distributions and *BSD systems that include libpcap:

There's now a rule to make a shared library, which should work on Linux and *BSD, among other platforms.

It sets the soname of the library to "libpcap.so.1"; this is what it should be, NOT libpcap.so.1.x or libpcap.so.1.x.y or something such as that.

We've been maintaining binary compatibility between libpcap releases for quite a while; there's no reason to tie a binary linked with libpcap to a particular release of libpcap.

Current versions can be found at https://www.tcpdump.org.

  • The TCPdump group