]> Zhao Yanbai Git Server - minix.git/commit
Import NetBSD libpcap 69/3469/1
authorDavid van Moolenbroek <david@minix3.org>
Sun, 19 Feb 2017 00:34:03 +0000 (00:34 +0000)
committerDavid van Moolenbroek <david@minix3.org>
Tue, 21 Mar 2017 22:00:18 +0000 (22:00 +0000)
commitd56f51ea7d8b9045e5c8e2028422523d3f9a5840
tree32fe06fb94a2c5bb4594a610c2ad299b993a6cfa
parent83ee113ee0d94f3844d44065af2311604e9a30ad
Import NetBSD libpcap

As part of this, we import bpf_filter.c from NetBSD.  Even though that
file is part of the NetBSD kernel, it is also used by userland (as is
clear here).  Our LWIP service has its own bpf_filter.c implementation
but that implementation has certain limits (e.g. on program size) that
are fine for a system service but should not apply to userland.

The libpcap code has a number of blocks guarded by __NetBSD__, but
none of those blocks apply to MINIX 3.  In particular, some of the
alignment logic used for NetBSD may in fact not work in our case.

Change-Id: Ib187e22d627c929e111d5d4a991c3bee3c0154cb
248 files changed:
distrib/sets/lists/minix-base/mi
distrib/sets/lists/minix-comp/mi
distrib/sets/lists/minix-debug/mi
distrib/sets/lists/minix-man/mi
etc/mtree/NetBSD.dist.base
external/bsd/Makefile
external/bsd/libpcap/Makefile [new file with mode: 0644]
external/bsd/libpcap/bin/Makefile [new file with mode: 0644]
external/bsd/libpcap/dist/CHANGES [new file with mode: 0644]
external/bsd/libpcap/dist/CREDITS [new file with mode: 0644]
external/bsd/libpcap/dist/ChmodBPF/ChmodBPF [new file with mode: 0755]
external/bsd/libpcap/dist/ChmodBPF/StartupParameters.plist [new file with mode: 0644]
external/bsd/libpcap/dist/INSTALL.txt [new file with mode: 0644]
external/bsd/libpcap/dist/LICENSE [new file with mode: 0644]
external/bsd/libpcap/dist/Makefile-devel-adds [new file with mode: 0644]
external/bsd/libpcap/dist/Makefile.in [new file with mode: 0644]
external/bsd/libpcap/dist/README [new file with mode: 0644]
external/bsd/libpcap/dist/README.Win32 [new file with mode: 0644]
external/bsd/libpcap/dist/README.aix [new file with mode: 0644]
external/bsd/libpcap/dist/README.dag [new file with mode: 0644]
external/bsd/libpcap/dist/README.hpux [new file with mode: 0644]
external/bsd/libpcap/dist/README.linux [new file with mode: 0644]
external/bsd/libpcap/dist/README.macosx [new file with mode: 0644]
external/bsd/libpcap/dist/README.septel [new file with mode: 0644]
external/bsd/libpcap/dist/README.sita [new file with mode: 0644]
external/bsd/libpcap/dist/README.tru64 [new file with mode: 0644]
external/bsd/libpcap/dist/SUNOS4/nit_if.o.sparc [new file with mode: 0644]
external/bsd/libpcap/dist/SUNOS4/nit_if.o.sun3 [new file with mode: 0644]
external/bsd/libpcap/dist/SUNOS4/nit_if.o.sun4c.4.0.3c [new file with mode: 0644]
external/bsd/libpcap/dist/TODO [new file with mode: 0644]
external/bsd/libpcap/dist/VERSION [new file with mode: 0644]
external/bsd/libpcap/dist/Win32/Include/Gnuc.h [new file with mode: 0644]
external/bsd/libpcap/dist/Win32/Include/addrinfo.h [new file with mode: 0644]
external/bsd/libpcap/dist/Win32/Include/arpa/nameser.h [new file with mode: 0644]
external/bsd/libpcap/dist/Win32/Include/bittypes.h [new file with mode: 0644]
external/bsd/libpcap/dist/Win32/Include/cdecl_ext.h [new file with mode: 0644]
external/bsd/libpcap/dist/Win32/Include/inetprivate.h [new file with mode: 0644]
external/bsd/libpcap/dist/Win32/Include/ip6_misc.h [new file with mode: 0644]
external/bsd/libpcap/dist/Win32/Include/net/if.h [new file with mode: 0644]
external/bsd/libpcap/dist/Win32/Include/net/netdb.h [new file with mode: 0644]
external/bsd/libpcap/dist/Win32/Include/net/paths.h [new file with mode: 0644]
external/bsd/libpcap/dist/Win32/Include/sockstorage.h [new file with mode: 0644]
external/bsd/libpcap/dist/Win32/Prj/libpcap.dsp [new file with mode: 0644]
external/bsd/libpcap/dist/Win32/Prj/libpcap.dsw [new file with mode: 0644]
external/bsd/libpcap/dist/Win32/Src/ffs.c [new file with mode: 0644]
external/bsd/libpcap/dist/Win32/Src/gai_strerror.c [new file with mode: 0644]
external/bsd/libpcap/dist/Win32/Src/getaddrinfo.c [new file with mode: 0644]
external/bsd/libpcap/dist/Win32/Src/getnetbynm.c [new file with mode: 0644]
external/bsd/libpcap/dist/Win32/Src/getnetent.c [new file with mode: 0644]
external/bsd/libpcap/dist/Win32/Src/getopt.c [new file with mode: 0644]
external/bsd/libpcap/dist/Win32/Src/getservent.c [new file with mode: 0644]
external/bsd/libpcap/dist/Win32/Src/inet_aton.c [new file with mode: 0644]
external/bsd/libpcap/dist/Win32/Src/inet_net.c [new file with mode: 0644]
external/bsd/libpcap/dist/Win32/Src/inet_pton.c [new file with mode: 0644]
external/bsd/libpcap/dist/aclocal.m4 [new file with mode: 0644]
external/bsd/libpcap/dist/arcnet.h [new file with mode: 0644]
external/bsd/libpcap/dist/atmuni31.h [new file with mode: 0644]
external/bsd/libpcap/dist/bpf/net/bpf_filter.c [new file with mode: 0644]
external/bsd/libpcap/dist/bpf_dump.c [new file with mode: 0644]
external/bsd/libpcap/dist/bpf_image.c [new file with mode: 0644]
external/bsd/libpcap/dist/chmod_bpf [new file with mode: 0755]
external/bsd/libpcap/dist/config.guess [new file with mode: 0755]
external/bsd/libpcap/dist/config.h.in [new file with mode: 0644]
external/bsd/libpcap/dist/config.sub [new file with mode: 0755]
external/bsd/libpcap/dist/configure [new file with mode: 0755]
external/bsd/libpcap/dist/configure.in [new file with mode: 0644]
external/bsd/libpcap/dist/dlpisubs.c [new file with mode: 0644]
external/bsd/libpcap/dist/dlpisubs.h [new file with mode: 0644]
external/bsd/libpcap/dist/etherent.c [new file with mode: 0644]
external/bsd/libpcap/dist/ethertype.h [new file with mode: 0644]
external/bsd/libpcap/dist/fad-getad.c [new file with mode: 0644]
external/bsd/libpcap/dist/fad-gifc.c [new file with mode: 0644]
external/bsd/libpcap/dist/fad-glifc.c [new file with mode: 0644]
external/bsd/libpcap/dist/fad-null.c [new file with mode: 0644]
external/bsd/libpcap/dist/fad-sita.c [new file with mode: 0644]
external/bsd/libpcap/dist/fad-win32.c [new file with mode: 0644]
external/bsd/libpcap/dist/gencode.c [new file with mode: 0644]
external/bsd/libpcap/dist/gencode.h [new file with mode: 0644]
external/bsd/libpcap/dist/grammar.y [new file with mode: 0644]
external/bsd/libpcap/dist/ieee80211.h [new file with mode: 0644]
external/bsd/libpcap/dist/inet.c [new file with mode: 0644]
external/bsd/libpcap/dist/install-sh [new file with mode: 0755]
external/bsd/libpcap/dist/lbl/os-aix4.h [new file with mode: 0644]
external/bsd/libpcap/dist/lbl/os-hpux11.h [new file with mode: 0644]
external/bsd/libpcap/dist/lbl/os-osf4.h [new file with mode: 0644]
external/bsd/libpcap/dist/lbl/os-osf5.h [new file with mode: 0644]
external/bsd/libpcap/dist/lbl/os-solaris2.h [new file with mode: 0644]
external/bsd/libpcap/dist/lbl/os-sunos4.h [new file with mode: 0644]
external/bsd/libpcap/dist/lbl/os-ultrix4.h [new file with mode: 0644]
external/bsd/libpcap/dist/llc.h [new file with mode: 0644]
external/bsd/libpcap/dist/missing/snprintf.c [new file with mode: 0644]
external/bsd/libpcap/dist/mkdep [new file with mode: 0755]
external/bsd/libpcap/dist/msdos/bin2c.c [new file with mode: 0644]
external/bsd/libpcap/dist/msdos/common.dj [new file with mode: 0644]
external/bsd/libpcap/dist/msdos/makefile [new file with mode: 0644]
external/bsd/libpcap/dist/msdos/makefile.dj [new file with mode: 0644]
external/bsd/libpcap/dist/msdos/makefile.wc [new file with mode: 0644]
external/bsd/libpcap/dist/msdos/ndis2.c [new file with mode: 0644]
external/bsd/libpcap/dist/msdos/ndis2.h [new file with mode: 0644]
external/bsd/libpcap/dist/msdos/ndis_0.asm [new file with mode: 0644]
external/bsd/libpcap/dist/msdos/pkt_rx0.asm [new file with mode: 0644]
external/bsd/libpcap/dist/msdos/pkt_rx1.s [new file with mode: 0644]
external/bsd/libpcap/dist/msdos/pktdrvr.c [new file with mode: 0644]
external/bsd/libpcap/dist/msdos/pktdrvr.h [new file with mode: 0644]
external/bsd/libpcap/dist/msdos/readme.dos [new file with mode: 0644]
external/bsd/libpcap/dist/nametoaddr.c [new file with mode: 0644]
external/bsd/libpcap/dist/nlpid.h [new file with mode: 0644]
external/bsd/libpcap/dist/optimize.c [new file with mode: 0644]
external/bsd/libpcap/dist/org.tcpdump.chmod_bpf.plist [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-bpf.c [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-bpf.h [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-bt-linux.c [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-bt-linux.h [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-bt-monitor-linux.c [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-bt-monitor-linux.h [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-can-linux.c [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-can-linux.h [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-canusb-linux.c [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-canusb-linux.h [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-common.c [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-common.h [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-config.1 [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-config.in [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-dag.c [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-dag.h [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-dbus.c [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-dbus.h [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-dlpi.c [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-dos.c [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-dos.h [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-enet.c [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-filter.manmisc.in [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-int.h [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-libdlpi.c [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-linktype.manmisc.in [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-linux.c [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-namedb.h [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-netfilter-linux.c [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-netfilter-linux.h [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-nit.c [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-null.c [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-pf.c [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-savefile.manfile.in [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-septel.c [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-septel.h [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-sita.c [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-sita.h [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-sita.html [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-snf.c [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-snf.h [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-snit.c [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-snoop.c [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-stdinc.h [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-tstamp.manmisc.in [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-usb-linux.c [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-usb-linux.h [new file with mode: 0644]
external/bsd/libpcap/dist/pcap-win32.c [new file with mode: 0644]
external/bsd/libpcap/dist/pcap.3pcap.in [new file with mode: 0644]
external/bsd/libpcap/dist/pcap.c [new file with mode: 0644]
external/bsd/libpcap/dist/pcap.h [new file with mode: 0644]
external/bsd/libpcap/dist/pcap/bluetooth.h [new file with mode: 0644]
external/bsd/libpcap/dist/pcap/bpf.h [new file with mode: 0644]
external/bsd/libpcap/dist/pcap/ipnet.h [new file with mode: 0644]
external/bsd/libpcap/dist/pcap/namedb.h [new file with mode: 0644]
external/bsd/libpcap/dist/pcap/nflog.h [new file with mode: 0644]
external/bsd/libpcap/dist/pcap/pcap.h [new file with mode: 0644]
external/bsd/libpcap/dist/pcap/sll.h [new file with mode: 0644]
external/bsd/libpcap/dist/pcap/usb.h [new file with mode: 0644]
external/bsd/libpcap/dist/pcap/vlan.h [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_activate.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_breakloop.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_can_set_rfmon.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_close.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_compile.3pcap.in [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_create.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_datalink.3pcap.in [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_datalink_name_to_val.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_datalink_val_to_name.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_dump.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_dump_close.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_dump_file.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_dump_flush.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_dump_ftell.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_dump_open.3pcap.in [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_file.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_fileno.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_findalldevs.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_freecode.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_get_selectable_fd.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_get_tstamp_precision.3pcap.in [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_geterr.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_inject.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_is_swapped.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_lib_version.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_list_datalinks.3pcap.in [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_list_tstamp_types.3pcap.in [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_lookupdev.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_lookupnet.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_loop.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_major_version.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_next_ex.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_offline_filter.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_open_dead.3pcap.in [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_open_live.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_open_offline.3pcap.in [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_set_buffer_size.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_set_datalink.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_set_immediate_mode.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_set_promisc.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_set_rfmon.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_set_snaplen.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_set_timeout.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_set_tstamp_precision.3pcap.in [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_set_tstamp_type.3pcap.in [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_setdirection.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_setfilter.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_setnonblock.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_snapshot.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_stats.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_statustostr.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_strerror.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_tstamp_type_name_to_val.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/pcap_tstamp_type_val_to_name.3pcap [new file with mode: 0644]
external/bsd/libpcap/dist/ppp.h [new file with mode: 0644]
external/bsd/libpcap/dist/runlex.sh [new file with mode: 0755]
external/bsd/libpcap/dist/savefile.c [new file with mode: 0644]
external/bsd/libpcap/dist/scanner.c.top [new file with mode: 0644]
external/bsd/libpcap/dist/scanner.l [new file with mode: 0644]
external/bsd/libpcap/dist/sf-pcap-ng.c [new file with mode: 0644]
external/bsd/libpcap/dist/sf-pcap-ng.h [new file with mode: 0644]
external/bsd/libpcap/dist/sf-pcap.c [new file with mode: 0644]
external/bsd/libpcap/dist/sf-pcap.h [new file with mode: 0644]
external/bsd/libpcap/dist/sunatmpos.h [new file with mode: 0644]
external/bsd/libpcap/dist/tests/capturetest.c [new file with mode: 0644]
external/bsd/libpcap/dist/tests/filtertest.c [new file with mode: 0644]
external/bsd/libpcap/dist/tests/findalldevstest.c [new file with mode: 0644]
external/bsd/libpcap/dist/tests/opentest.c [new file with mode: 0644]
external/bsd/libpcap/dist/tests/reactivatetest.c [new file with mode: 0644]
external/bsd/libpcap/dist/tests/selpolltest.c [new file with mode: 0644]
external/bsd/libpcap/dist/tests/valgrindtest.c [new file with mode: 0644]
external/bsd/libpcap/include/config.h [new file with mode: 0644]
external/bsd/libpcap/lib/Makefile [new file with mode: 0644]
external/bsd/libpcap/lib/shlib_version [new file with mode: 0644]
external/bsd/libpcap/lib/version.c [new file with mode: 0644]
external/bsd/libpcap/lib/version.h [new file with mode: 0644]
external/bsd/libpcap/libpcap2netbsd [new file with mode: 0755]
lib/Makefile
sys/net/bpf_filter.c [new file with mode: 0644]