Summary for 1.4.0 libpcap release Add netfilter/nfqueue interface. If we don't have support for IPv6 address resolution, support, in filter expressions, what IPv6 stuff we can. Checks added for malloc()/realloc()/etc. failures. Fix pcap-config to include -lpthread if canusb support is present Try to fix "pcap_parse not defined" problems when --without-flex and --without-bison are used when you have Flex and Bison Fix some issues with the pcap_loop man page. Fix pcap_getnonblock() and pcap_setnonblock() to fill in the supplied error message buffer Fix typo that, it appeared, would cause pcap-libdlpi.c not to compile (perhaps systems with libdlpi also have BPF and use that instead) Catch attempts to call pcap_compile() on a non-activated pcap_t Fix crash on Linux with CAN-USB support without usbfs Fix addition of VLAN tags for Linux cooked captures Check for both EOPNOTSUPP and EINVAL after SIOCETHTOOL ioctl, so that the driver can report either one if it doesn't support SIOCETHTOOL Add DLT_INFINIBAND and DLT_SCTP Describe "proto XXX" and "protochain XXX" in the pcap-filter man page Handle either directories, or symlinks to directories, that correspond to interfaces in /sys/class/net Fix handling of VLAN tag insertion to check, on Linux 3.x kernels, for VLAN tag valid flag Clean up some man pages Support libnl3 as well as libnl1 and libnl2 on Linuxdiff -r1.53 -r1.54 pkgsrc/net/libpcap/Makefile
(adam)
@@ -1,17 +1,16 @@ | @@ -1,17 +1,16 @@ | |||
1 | # $NetBSD: Makefile,v 1.53 2013/03/30 22:21:10 tron Exp $ | 1 | # $NetBSD: Makefile,v 1.54 2013/06/15 21:01:22 adam Exp $ | |
2 | 2 | |||
3 | DISTNAME= libpcap-1.3.0 | 3 | DISTNAME= libpcap-1.4.0 | |
4 | PKGREVISION= 2 | |||
5 | SVR4_PKGNAME= lpcap | 4 | SVR4_PKGNAME= lpcap | |
6 | CATEGORIES= net | 5 | CATEGORIES= net | |
7 | MASTER_SITES= http://www.tcpdump.org/release/ | 6 | MASTER_SITES= http://www.tcpdump.org/release/ | |
8 | 7 | |||
9 | MAINTAINER= pkgsrc-users@NetBSD.org | 8 | MAINTAINER= pkgsrc-users@NetBSD.org | |
10 | HOMEPAGE= http://www.tcpdump.org/ | 9 | HOMEPAGE= http://www.tcpdump.org/ | |
11 | COMMENT= System-independent interface for user-level packet capture | 10 | COMMENT= System-independent interface for user-level packet capture | |
12 | LICENSE= modified-bsd | 11 | LICENSE= modified-bsd | |
13 | 12 | |||
14 | NOT_FOR_PLATFORM+= Interix-*-* # no raw interface access | 13 | NOT_FOR_PLATFORM+= Interix-*-* # no raw interface access | |
15 | 14 | |||
16 | PKG_INSTALLATION_TYPES= overwrite pkgviews | 15 | PKG_INSTALLATION_TYPES= overwrite pkgviews | |
17 | 16 |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.10 2013/02/06 18:07:04 jperkin Exp $ | 1 | @comment $NetBSD: PLIST,v 1.11 2013/06/15 21:01:22 adam Exp $ | |
2 | bin/pcap-config | 2 | bin/pcap-config | |
3 | include/pcap-bpf.h | 3 | include/pcap-bpf.h | |
4 | include/pcap-int.h | 4 | include/pcap-int.h | |
5 | include/pcap-namedb.h | 5 | include/pcap-namedb.h | |
6 | include/pcap.h | 6 | include/pcap.h | |
7 | include/pcap/bluetooth.h | 7 | include/pcap/bluetooth.h | |
8 | include/pcap/bpf.h | 8 | include/pcap/bpf.h | |
9 | include/pcap/ipnet.h | 9 | include/pcap/ipnet.h | |
10 | include/pcap/namedb.h | 10 | include/pcap/namedb.h | |
11 | include/pcap/pcap.h | 11 | include/pcap/pcap.h | |
12 | include/pcap/sll.h | 12 | include/pcap/sll.h | |
13 | include/pcap/usb.h | 13 | include/pcap/usb.h | |
14 | include/pcap/vlan.h | 14 | include/pcap/vlan.h | |
@@ -69,16 +69,16 @@ man/man3/pcap_set_rfmon.3 | @@ -69,16 +69,16 @@ man/man3/pcap_set_rfmon.3 | |||
69 | man/man3/pcap_set_snaplen.3 | 69 | man/man3/pcap_set_snaplen.3 | |
70 | man/man3/pcap_set_timeout.3 | 70 | man/man3/pcap_set_timeout.3 | |
71 | man/man3/pcap_set_tstamp_type.3 | 71 | man/man3/pcap_set_tstamp_type.3 | |
72 | man/man3/pcap_setdirection.3 | 72 | man/man3/pcap_setdirection.3 | |
73 | man/man3/pcap_setfilter.3 | 73 | man/man3/pcap_setfilter.3 | |
74 | man/man3/pcap_setnonblock.3 | 74 | man/man3/pcap_setnonblock.3 | |
75 | man/man3/pcap_snapshot.3 | 75 | man/man3/pcap_snapshot.3 | |
76 | man/man3/pcap_stats.3 | 76 | man/man3/pcap_stats.3 | |
77 | man/man3/pcap_statustostr.3 | 77 | man/man3/pcap_statustostr.3 | |
78 | man/man3/pcap_strerror.3 | 78 | man/man3/pcap_strerror.3 | |
79 | man/man3/pcap_tstamp_type_name_to_val.3 | 79 | man/man3/pcap_tstamp_type_name_to_val.3 | |
80 | man/man3/pcap_tstamp_type_val_to_name.3 | 80 | man/man3/pcap_tstamp_type_val_to_name.3 | |
81 | man/man5/pcap-savefile.5 | 81 | man/man5/pcap-savefile.5 | |
82 | man/man7/pcap-tstamp.7 | |||
83 | man/man7/pcap-filter.7 | 82 | man/man7/pcap-filter.7 | |
84 | man/man7/pcap-linktype.7 | 83 | man/man7/pcap-linktype.7 | |
84 | man/man7/pcap-tstamp.7 |
@@ -1,10 +1,10 @@ | @@ -1,10 +1,10 @@ | |||
1 | $NetBSD: distinfo,v 1.27 2013/02/06 18:07:04 jperkin Exp $ | 1 | $NetBSD: distinfo,v 1.28 2013/06/15 21:01:22 adam Exp $ | |
2 | 2 | |||
3 | SHA1 (libpcap-1.3.0.tar.gz) = 90aa2f0fcfb4bf79fc50ccdaa70f484d96295be3 | 3 | SHA1 (libpcap-1.4.0.tar.gz) = 9c9710aab68be58ed1d41b5c36dc2599419a80e0 | |
4 | RMD160 (libpcap-1.3.0.tar.gz) = 3d80cd06c89b32bee1f344bfe720624c2c35763f | 4 | RMD160 (libpcap-1.4.0.tar.gz) = 5c82a5b813b62fdd10c01c704e1c775ed74d0906 | |
5 | Size (libpcap-1.3.0.tar.gz) = 608967 bytes | 5 | Size (libpcap-1.4.0.tar.gz) = 619045 bytes | |
6 | SHA1 (patch-ac) = 859fc7f91a2831030a3b685ef6448a0c26065b3e | 6 | SHA1 (patch-ac) = 859fc7f91a2831030a3b685ef6448a0c26065b3e | |
7 | SHA1 (patch-ad) = 3eb306bbd997f83b55d08cdda1573cf2fdef54f1 | 7 | SHA1 (patch-ad) = 3eb306bbd997f83b55d08cdda1573cf2fdef54f1 | |
8 | SHA1 (patch-configure) = 25c1bb8f7ec0b493d3a37bb0d9454519312da3e4 | 8 | SHA1 (patch-configure) = 441afc32ef24d01359d1e0aa568d5895ddc26236 | |
9 | SHA1 (patch-gencode.c) = d232d89924ae59ac23b224a5d9b40b0677757656 | 9 | SHA1 (patch-gencode.c) = e3791f1cd33826907e7d1986799b22333d96dc42 | |
10 | SHA1 (patch-pcap-libdlpi.c) = 5626ed40845ca3b96b6a599547f64b11a8f89f81 | 10 | SHA1 (patch-pcap-libdlpi.c) = f5df74e9a747f1dddca18cee908a2f89eb5e6261 |
@@ -1,75 +1,31 @@ | @@ -1,75 +1,31 @@ | |||
1 | $NetBSD: patch-configure,v 1.1 2013/02/06 18:07:04 jperkin Exp $ | 1 | $NetBSD: patch-configure,v 1.2 2013/06/15 21:01:22 adam Exp $ | |
2 | 2 | |||
3 | * Fix sys/bufmod.h and linking issues on Solaris. | 3 | --- configure.orig 2013-03-25 14:51:40.000000000 +0000 | |
4 | * Use standard manpage layout on all platforms. | |||
5 | ||||
6 | --- configure.orig 2012-03-29 12:57:32.000000000 +0000 | |||
7 | +++ configure | 4 | +++ configure | |
8 | @@ -5225,6 +5225,20 @@ dlpi) | 5 | @@ -8835,7 +8835,6 @@ echo "${ECHO_T}$ac_cv_lbl_have_siocglifc | |
9 | # Also, due to the bug above applications that link to libpcap with | |||
10 | # libdlpi will have to add "-L/lib" option to "configure". | |||
11 | # | |||
12 | + for ac_header in sys/bufmod.h sys/dlpi_ext.h | |||
13 | +do : | |||
14 | + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |||
15 | +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |||
16 | +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |||
17 | + cat >>confdefs.h <<_ACEOF | |||
18 | +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |||
19 | +_ACEOF | |||
20 | + | |||
21 | +fi | |||
22 | + | |||
23 | +done | |||
24 | + SSRC="dlpisubs.c" | |||
25 | + | |||
26 | saved_ldflags=$LDFLAGS | |||
27 | LDFLAGS="$LIBS -L/lib" | |||
28 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlpi_walk in -ldlpi" >&5 | |||
29 | @@ -5763,19 +5777,6 @@ else | |||
30 | case "$V_PCAP" in | |||
31 | ||||
32 | dlpi|libdlpi) | |||
33 | - for ac_header in sys/bufmod.h sys/dlpi_ext.h | |||
34 | -do : | |||
35 | - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` | |||
36 | -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" | |||
37 | -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : | |||
38 | - cat >>confdefs.h <<_ACEOF | |||
39 | -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |||
40 | -_ACEOF | |||
41 | - | |||
42 | -fi | |||
43 | - | |||
44 | -done | |||
45 | - | |||
46 | # | |||
47 | # This might be Solaris 8 or later, with | |||
48 | # SIOCGLIFCONF, or it might be some other OS | |||
49 | @@ -5820,7 +5821,6 @@ $as_echo "$ac_cv_lbl_have_siocglifconf" | |||
50 | # | 6 | # | |
51 | # Needed for common functions used by pcap-[dlpi,libdlpi].c | 7 | # Needed for common functions used by pcap-[dlpi,libdlpi].c | |
52 | # | 8 | # | |
53 | - SSRC="dlpisubs.c" | 9 | - SSRC="dlpisubs.c" | |
54 | ;; | 10 | ;; | |
55 | 11 | |||
56 | *) | 12 | *) | |
57 | @@ -6688,8 +6688,6 @@ fi | 13 | @@ -9986,8 +9985,6 @@ fi | |
58 | # Individual cases can override this. | 14 | # Individual cases can override this. | |
59 | # | 15 | # | |
60 | DYEXT="none" | 16 | DYEXT="none" | |
61 | -MAN_FILE_FORMATS=5 | 17 | -MAN_FILE_FORMATS=5 | |
62 | -MAN_MISC_INFO=7 | 18 | -MAN_MISC_INFO=7 | |
63 | case "$host_os" in | 19 | case "$host_os" in | |
64 | 20 | |||
65 | aix*) | 21 | aix*) | |
66 | @@ -6916,6 +6914,9 @@ $as_echo "#define HAVE_SOLARIS 1" >>conf | 22 | @@ -10255,6 +10252,9 @@ fi | |
67 | ;; | 23 | ||
68 | esac | 24 | test "x$enable_shared" = "xno" && DYEXT="none" | |
69 | 25 | |||
70 | +MAN_FILE_FORMATS=5 | 26 | +MAN_FILE_FORMATS=5 | |
71 | +MAN_MISC_INFO=7 | 27 | +MAN_MISC_INFO=7 | |
72 | + | 28 | + | |
73 | if test -n "$ac_tool_prefix"; then | 29 | if test -n "$ac_tool_prefix"; then | |
74 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | 30 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
75 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | 31 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 |
@@ -1,24 +1,24 @@ | @@ -1,24 +1,24 @@ | |||
1 | $NetBSD: patch-gencode.c,v 1.1 2013/02/06 18:07:04 jperkin Exp $ | 1 | $NetBSD: patch-gencode.c,v 1.2 2013/06/15 21:01:22 adam Exp $ | |
2 | 2 | |||
3 | * Correctly limit Linux interfaces to Linux-only. | 3 | * Correctly limit Linux interfaces to Linux-only. | |
4 | 4 | |||
5 | --- gencode.c.orig 2012-06-12 16:55:36.000000000 +0000 | 5 | --- gencode.c.orig 2012-06-12 16:55:36.000000000 +0000 | |
6 | +++ gencode.c | 6 | +++ gencode.c | |
7 | @@ -84,7 +84,7 @@ static const char rcsid[] _U_ = | 7 | @@ -84,7 +84,7 @@ static const char rcsid[] _U_ = | |
8 | #include "pcap/sll.h" | 8 | #include "pcap/sll.h" | |
9 | #include "pcap/ipnet.h" | 9 | #include "pcap/ipnet.h" | |
10 | #include "arcnet.h" | 10 | #include "arcnet.h" | |
11 | -#if defined(PF_PACKET) && defined(SO_ATTACH_FILTER) | 11 | -#if defined(PF_PACKET) && defined(SO_ATTACH_FILTER) | |
12 | +#if defined(linux) && defined(PF_PACKET) && defined(SO_ATTACH_FILTER) | 12 | +#if defined(linux) && defined(PF_PACKET) && defined(SO_ATTACH_FILTER) | |
13 | #include <linux/types.h> | 13 | #include <linux/types.h> | |
14 | #include <linux/if_packet.h> | 14 | #include <linux/if_packet.h> | |
15 | #include <linux/filter.h> | 15 | #include <linux/filter.h> | |
16 | @@ -7583,7 +7583,7 @@ gen_inbound(dir) | 16 | @@ -7533,7 +7533,7 @@ gen_inbound(dir) | |
17 | * check it, otherwise give up as this link-layer type | 17 | * check it, otherwise give up as this link-layer type | |
18 | * has nothing in the packet data. | 18 | * has nothing in the packet data. | |
19 | */ | 19 | */ | |
20 | -#if defined(PF_PACKET) && defined(SO_ATTACH_FILTER) | 20 | -#if defined(PF_PACKET) && defined(SO_ATTACH_FILTER) | |
21 | +#if defined(linux) && defined(PF_PACKET) && defined(SO_ATTACH_FILTER) | 21 | +#if defined(linux) && defined(PF_PACKET) && defined(SO_ATTACH_FILTER) | |
22 | /* | 22 | /* | |
23 | * We infer that this is Linux with PF_PACKET support. | 23 | * We infer that this is Linux with PF_PACKET support. | |
24 | * If this is a *live* capture, we can look at | 24 | * If this is a *live* capture, we can look at |
@@ -1,18 +1,15 @@ | @@ -1,18 +1,15 @@ | |||
1 | $NetBSD: patch-pcap-libdlpi.c,v 1.1 2013/02/06 18:07:04 jperkin Exp $ | 1 | $NetBSD: patch-pcap-libdlpi.c,v 1.2 2013/06/15 21:01:22 adam Exp $ | |
2 | 2 | |||
3 | * Fix compile on Solaris. | 3 | * Fix compile on Solaris. | |
4 | 4 | |||
5 | --- pcap-libdlpi.c.orig 2012-03-29 12:57:32.000000000 +0000 | 5 | --- pcap-libdlpi.c.orig 2013-02-21 03:51:49.000000000 +0000 | |
6 | +++ pcap-libdlpi.c | 6 | +++ pcap-libdlpi.c | |
7 | @@ -235,9 +235,9 @@ bad: | 7 | @@ -235,7 +235,7 @@ bad: | |
8 | static int | 8 | static int | |
9 | dlpromiscon(pcap_t *p, bpf_u_int32 level) | 9 | dlpromiscon(pcap_t *p, bpf_u_int32 level) | |
10 | { | 10 | { | |
11 | - int err; | 11 | - int err; | |
12 | + int err, retv; | 12 | + int err, retv; | |
13 | 13 | |||
14 | - retv = dlpi_promiscon(p->hd, level); | 14 | retv = dlpi_promiscon(p->dlpi_hd, level); | |
15 | + retv = dlpi_promiscon(p->dlpi_hd, level); | |||
16 | if (retv != DLPI_SUCCESS) { | 15 | if (retv != DLPI_SUCCESS) { | |
17 | if (retv == DL_SYSERR && | |||
18 | (errno == EPERM || errno == EACCES)) |