Hello community,

here is the log from the commit of package perl-Net-Pcap for openSUSE:Factory 
checked in at 2018-11-14 14:42:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Net-Pcap (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Net-Pcap.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Net-Pcap"

Wed Nov 14 14:42:55 2018 rev:8 rq:648751 version:0.18

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Net-Pcap/perl-Net-Pcap.changes      
2013-08-07 20:50:13.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Net-Pcap.new/perl-Net-Pcap.changes 
2018-11-14 14:43:48.538653148 +0100
@@ -1,0 +2,46 @@
+Tue Nov 13 14:43:31 UTC 2018 - Pedro Monreal Gonzalez 
<pmonrealgonza...@suse.com>
+
+- Cleaned with spec-cleaner
+
+-------------------------------------------------------------------
+Fri Nov  9 17:22:28 UTC 2018 - Pedro Monreal Gonzalez 
<pmonrealgonza...@suse.com>
+
+- updated to 0.18
+  [Bugfixes]
+  - CPAN RT #77807: Net::Pcap is no longer limited to one callback function,
+    thanks to a patch by James Rouzier.
+  - CPAN RT #55163: Typo in eg/pcapdump (Iain Arnell and Jose Pedro Oliveira).
+  - CPAN RT #83842: Typo in Net:Pcap (Xavier Guimard).
+ 
+  [API]
+  - Added pcap_offline_filter() (Martijn Lievaart).
+ 
+  [Code]
+  - use warnings (David Farrell).
+ 
+  [Documentation]
+  - Moved HISTORY from README to main documentation.
+  - Rewrote AUTHORS to acknowledge all contributors.
+  - Updated copyright years.
+ 
+  [Tests]
+  - Added timeouts to prevent tests from hanging (Patrice Auffret).
+  - t/17-lib_version.t: adjust regexp to match Apple builds (David Farrell).
+  - t/50-poe-component-pcap.t: small improvments.
+  - Added t/50-net-pcap-easy.t to test with Net::Pcap::Easy.
+  - Added t/50-anyevent-pcap.t to test with AnyEvent::Pcap.
+  - Make t/50-* pass with old versions of Test::More
+ 
+  [Distribution]
+  - Converted the Changes file to CPAN::Changes::Spec format.
+  - Makefile.PL: append CCFLAGS to $Config{ccflags} instead of overriding it.
+  - Makefile.PL: now dies when libpcap isn't found.
+  - Makefile.PL: declare minimum Perl version (David Farrell).
+
+- Removed patch perl-Net-Pcap-fix_libpcap_detection.patch
+
+- Added patch to avoid a redefinition of the pcap_rmtauth struct
+  already defined in libpcap >= 1.9.0
+  * perl-Net-Pcap-avoid-pcap_rmtauth-redefinition.patch         
+
+-------------------------------------------------------------------

Old:
----
  Net-Pcap-0.17.tar.gz
  perl-Net-Pcap-fix_libpcap_detection.patch

New:
----
  Net-Pcap-0.18.tar.gz
  perl-Net-Pcap-avoid-pcap_rmtauth-redefinition.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Net-Pcap.spec ++++++
--- /var/tmp/diff_new_pack.FrXxJt/_old  2018-11-14 14:43:49.602651891 +0100
+++ /var/tmp/diff_new_pack.FrXxJt/_new  2018-11-14 14:43:49.606651886 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-Net-Pcap
 #
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,23 +12,19 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 Name:           perl-Net-Pcap
-Version:        0.17
+Version:        0.18
 Release:        0
 Summary:        Interface to pcap LBL packet capture library
-License:        Artistic-1.0 or GPL-1.0+
+License:        Artistic-1.0 OR GPL-1.0-or-later
 Group:          Development/Libraries/Perl
-Source:         
http://search.cpan.org/CPAN/authors/id/S/SA/SAPER/Net-Pcap-%{version}.tar.gz
-# pbleser: fix libpcap detection on >= 12.1 (i586) as for some reason, using 
-Wwrite-strings causes
-#          it to fail -- bnc#711611
-Patch1:         perl-Net-Pcap-fix_libpcap_detection.patch
-Url:            http://search.cpan.org/dist/Net-Pcap
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-%{perl_requires}
+URL:            https://metacpan.org/release/Net-Pcap
+Source:         
https://cpan.metacpan.org/authors/id/S/SA/SAPER/Net-Pcap-%{version}.tar.gz
+Patch1:         perl-Net-Pcap-avoid-pcap_rmtauth-redefinition.patch
 BuildRequires:  gcc
 BuildRequires:  make
 BuildRequires:  perl-macros
@@ -38,15 +34,17 @@
 BuildRequires:  perl(Sys::Hostname)
 BuildRequires:  perl(Test::More) >= 0.45
 BuildRequires:  perl(XSLoader)
+Requires:       perl(Carp)
+Requires:       perl(Socket)
+Requires:       perl(Sys::Hostname)
+Requires:       perl(Test::More) >= 0.45
+Requires:       perl(XSLoader)
+%{perl_requires}
 %if 0%{?suse_version} == 0 || 0%{?suse_version} >= 1030
 BuildRequires:  libpcap-devel
 %else
 BuildRequires:  libpcap
 %endif
-Requires:       perl(Carp)
-Requires:       perl(Socket)
-Requires:       perl(Sys::Hostname)
-Requires:       perl(XSLoader)
 
 %description
 Net::Pcap is a Perl binding to the LBL pcap(3) library. The README for libpcap
@@ -77,28 +75,27 @@
 
 %prep
 %setup -q -n "Net-Pcap-%{version}"
+
+if pkg-config --atleast-version=1.9.0 libpcap; then
 %patch1 -p1
+fi
 
-%__sed -i '/^auto_install/d' Makefile.PL
+sed -i '/^auto_install/d' Makefile.PL
 
 %build
-%__perl Makefile.PL PREFIX="%{_prefix}"
-%__make %{?_smp_mflags} \
+perl Makefile.PL PREFIX="%{_prefix}"
+make %{?_smp_mflags} \
     CCFLAGS="-Wall -Wextra -I/usr/include/pcap" \
-    CC="%__cc"
+    CC="gcc"
 
 %install
 %perl_make_install
-%__install -D -m0755 eg/pcapdump "%{buildroot}%{_bindir}/pcapdump"
+install -D -m0755 eg/pcapdump "%{buildroot}%{_bindir}/pcapdump"
 %perl_process_packlist
 
 # make test is just borked when not running as root
 
-%clean
-%{?buildroot:%__rm -rf "%{buildroot}"}
-
 %files
-%defattr(-,root,root)
 %doc Changes README
 %dir %{perl_vendorarch}/Net
 %{perl_vendorarch}/Net/Pcap.pm
@@ -107,12 +104,10 @@
 %doc %{perl_man3dir}/Net::Pcap.%{perl_man3ext}%{ext_man}
 
 %files -n pcapdump
-%defattr(-,root,root)
 %{_bindir}/pcapdump
 
 %files -n pcapinfo
-%defattr(-,root,root)
 %{_bindir}/pcapinfo
-%doc %{_mandir}/man1/pcapinfo.1%{ext_man}
+%{_mandir}/man1/pcapinfo.1%{?ext_man}
 
 %changelog

++++++ Net-Pcap-0.17.tar.gz -> Net-Pcap-0.18.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-Pcap-0.17/Changes new/Net-Pcap-0.18/Changes
--- old/Net-Pcap-0.17/Changes   2012-11-28 00:16:33.000000000 +0100
+++ new/Net-Pcap-0.18/Changes   2016-05-15 15:40:42.000000000 +0200
@@ -1,192 +1,350 @@
 The revision history for Net-Pcap
 
-2012.11.28 - 0.17 - Sebastien Aperghis-Tramoni (SAPER)
-  - [BUGFIX] CPAN-RT#43308: Net::Pcap no longer enables immediate
-    (unsafe) signals delivery.
-  - [BUGFIX] Fix allocated size in pcap_open(), pcap_createsrcstr()
-    and pcap_parsesrcstr(). 
-  - [API] Now make the C-like API available by default. Added the
+0.18 - 2016-05-15 - Sebastien Aperghis-Tramoni (SAPER)
+
+  [Bugfixes]
+  - CPAN RT #77807: Net::Pcap is no longer limited to one callback function,
+    thanks to a patch by James Rouzier.
+  - CPAN RT #55163: Typo in eg/pcapdump (Iain Arnell and Jose Pedro Oliveira).
+  - CPAN RT #83842: Typo in Net:Pcap (Xavier Guimard).
+
+  [API]
+  - Added pcap_offline_filter() (Martijn Lievaart).
+
+  [Code]
+  - use warnings (David Farrell).
+
+  [Documentation]
+  - Moved HISTORY from README to main documentation.
+  - Rewrote AUTHORS to acknowledge all contributors.
+  - Updated copyright years.
+
+  [Tests]
+  - Added timeouts to prevent tests from hanging (Patrice Auffret).
+  - t/17-lib_version.t: adjust regexp to match Apple builds (David Farrell).
+  - t/50-poe-component-pcap.t: small improvments.
+  - Added t/50-net-pcap-easy.t to test with Net::Pcap::Easy.
+  - Added t/50-anyevent-pcap.t to test with AnyEvent::Pcap.
+  - Make t/50-* pass with old versions of Test::More
+
+  [Distribution]
+  - Converted the Changes file to CPAN::Changes::Spec format.
+  - Makefile.PL: append CCFLAGS to $Config{ccflags} instead of overriding it.
+  - Makefile.PL: now dies when libpcap isn't found.
+  - Makefile.PL: declare minimum Perl version (David Farrell).
+
+
+0.17 - 2012-11-28 - Sebastien Aperghis-Tramoni (SAPER)
+
+  [Bugfixes]
+  - CPAN RT #43308: Net::Pcap no longer enables immediate (unsafe)
+    signals delivery.
+  - Fix allocated size in pcap_open(), pcap_createsrcstr() and
+    pcap_parsesrcstr().
+
+  [API]
+  - Now made the C-like API available by default. Added the
     pcap_perl_settings() function and UNSAFE_SIGNALS pseudo-bloc.
-  - [CODE] Replaced all occurrences of safemalloc() with Newx().
-  - [CODE] Silenced some warnings.
-  - [DOC] Added a long note about Net::Pcap and signals delivery.
-  - [DOC] Improved README.
-  - [DOC] Mention Net::Pcap::Easy.
-  - [TESTS] Fixed t/17-lib_version.t to handle two digits versions.
-  - [TESTS] CPAN-RT#44448: Fixed t/17-lib_version.t to handle
-    versions from the CVS, thanks to Craig Davison.
-  - [TESTS] Refactored t/01-api.t and added checks for the new API.
-
-2008.01.01 - 0.16 - Sebastien Aperghis-Tramoni (SAPER)
-  - [BUGFIX] A typo prevented the new function names from working.
-  - [TESTS] Added new tests: 21-next_ex.t, 22-open.t, 23-srcstr.t, 
+
+  [Code]
+  - Replaced all occurrences of safemalloc() with Newx().
+  - Silenced some warnings.
+
+  [Documentation]
+  - Added a long note about Net::Pcap and signals delivery.
+  - Improved README.
+  - Mention Net::Pcap::Easy.
+
+  [Tests]
+  - Fixed t/17-lib_version.t to handle two digits versions.
+  - CPAN RT #44448: Fixed t/17-lib_version.t to handle versions from CVS,
+    thanks to Craig Davison.
+  - Refactored t/01-api.t and added checks for the new API.
+  - Replaced the fragile error check in t/03-openlive.t by a simpler and
+    more robust one.
+
+
+0.16 - 2008-01-01 - Sebastien Aperghis-Tramoni (SAPER)
+
+  [Bugfixes]
+  - A typo prevented the new function names from working.
+
+  [Tests]
+  - Added new tests: 21-next_ex.t, 22-open.t, 23-srcstr.t,
     50-poe-component-pcap.t
-  - [TESTS] Added support for user prefered device. See README.
-  - [TESTS] Improved small bits of the tests here and there.
+  - Added support for user prefered device. See README.
+  - Improved small bits of the tests here and there.
+
+
+0.15 - 2007-12-02 - Sebastien Aperghis-Tramoni (SAPER)
+
+  [Bugfixes]
+  - CPAN RT #30745: Fix WinPcap support.
+  - CPAN RT #25076: Fix next_ex().
 
-2007.12.02 - 0.15 - Sebastien Aperghis-Tramoni (SAPER)
-  - [BUGFIX] CPAN-RT#30745: Fix WinPcap support.
-  - [BUGFIX] CPAN-RT#25076: Fix next_ex().
-  - [API] Now providing "pcap_"-prefixed aliases for all functions.
+  [API]
+  - Now providing "pcap_"-prefixed aliases for all functions.
     Documentation was changed to use these names instead of the old ones.
-  - [CMD] pcapinfo(1) no longer need IO::Interface.
-  - [TESTS] CPAN-RT#30903: Fix t/03-openlive.t failure on Linux.
-  - [DOC] CPAN-RT#27369: Several documentation fixes.
-  - [DOC] CPAN-RT#31111: Document that pcap_stats() does not work 
-    on savefiles.
-
-2006.09.11 - 0.15_01 - Sebastien Aperghis-Tramoni (SAPER)
-  - [DIST] Rewrote the functions detection code using DynaLoader.
-  - [TESTS] Fixed small typo in warning message from t/podcover.t. Thanks
-    to "Ani" on FreeNode.
-  - [DOC] Improved documentation.
-  - [EG] Added example script eg/pktdump.pl
-
-2006.09.05 - 0.14 - Sebastien Aperghis-Tramoni (SAPER)
-  - [DIST] RT#21219: Now use a default flag.
-  - [TESTS] Bumped the required version of Test::Pod::Coverage up to 1.08.
-
-2006.08.29 - 0.13 - Sebastien Aperghis-Tramoni (SAPER)
-  - [CODE] Cleaned the typemap. Thanks to "Ani" on FreeNode for pointing.
-  - [DIST] Fixed compile option to use -Wall only for gcc. Thanks to 
-    Wolf-Dietrich Fromm for pointing.
-  - [DIST] Detection code can now handle IBM compiler. Thanks to Wolf-Dietrich 
+
+  [Commands]
+  - pcapinfo(1) no longer need IO::Interface.
+
+  [Documentation]
+  - CPAN RT #27369: Several documentation fixes.
+  - CPAN RT #31111: Document that pcap_stats() does not work on savefiles.
+
+  [Tests]
+  - CPAN RT #30903: Fix t/03-openlive.t failure on Linux.
+
+
+0.15_01 - 2006-09-11 - Sebastien Aperghis-Tramoni (SAPER)
+
+  [Documentation]
+  - Improved documentation.
+
+  [Tests]
+  - Fixed small typo in warning message from t/podcover.t. Thanks to "Ani"
+    on FreeNode.
+
+  [Distribution]
+  - Rewrote the functions detection code using DynaLoader.
+  - Added example script eg/pktdump.pl
+
+
+0.14 - 2006-09-05 - Sebastien Aperghis-Tramoni (SAPER)
+
+  [Tests]
+  - Bumped the required version of Test::Pod::Coverage up to 1.08.
+
+  [Distribution]
+  - CPAN RT #21219: Now use a default flag.
+
+
+0.13 - 2006-08-29 - Sebastien Aperghis-Tramoni (SAPER)
+
+  [Code]
+  - Cleaned the typemap. Thanks to "Ani" on FreeNode for pointing.
+
+  [Documentation]
+  - Fixed small typo in README. Thanks to "Ani" on FreeNode.
+  - Fixed small error in open_live() example. Thanks to Cindy Teel and
+    Doug Baker.
+
+  [Tests]
+  - Fixed 05-dump.t, 10-fileno.t. Thanks to "Ani" on FreeNode.
+
+  [Distribution]
+  - Fixed compile option to use -Wall only for gcc. Thanks to Wolf-Dietrich
+    Fromm for pointing.
+  - Detection code can now handle IBM compiler. Thanks to Wolf-Dietrich
     Fromm for the help.
-  - [TESTS] Fixed 05-dump.t, 10-fileno.t. Thanks to "Ani" on FreeNode.
-  - [DOC] Fixed small typo in README. Thanks to "Ani" on FreeNode.
-  - [DOC] Fixed small error in open_live() example. Thanks to Cindy Teel 
-    and Doug Baker.
-
-2006.03.19 - 0.12 - Sebastien Aperghis-Tramoni (SAPER)
-  - [BUGFIX] Fixed stub for pcap_list_datalinks().
-  - [BUGFIX] Merged Jean-Louis Morel patch for Win32 and Cygwin.
-  - [FEATURE] Added wrappers for compile_nopcap(), get_selectable_fd(), 
next_ex()
-  - [FEATURE] Merged wrappers from Net::Pcap 0.04.02 for WinPcap functions 
-    createsrcstr(), parsesrcstr(), getevent(), open(), sendpacket(), 
-    sendqueue_alloc(), sendqueue_queue(), sendqueue_transmit(), setbuff(), 
+
+
+0.12 - 2006-03-19 - Sebastien Aperghis-Tramoni (SAPER)
+
+  [Bugfixes]
+  - Fixed stub for pcap_list_datalinks().
+  - Merged Jean-Louis Morel patch for Win32 and Cygwin.
+
+  [Features]
+  - Added wrappers for compile_nopcap(), get_selectable_fd(), next_ex()
+  - Merged wrappers from Net::Pcap 0.04.02 for WinPcap functions
+    createsrcstr(), parsesrcstr(), getevent(), open(), sendpacket(),
+    sendqueue_alloc(), sendqueue_queue(), sendqueue_transmit(), setbuff(),
     setmintocopy(), setmode().
-  - [FEATURE] Added wrapper for WinPcap function setuserbuffer().
-  - [CODE] Added missing short names for compile(), set_filter(), freecode()
-  - [DIST] Fixed Makefile.PL so that pcapinfo is installed.
-  - [TESTS] Rewrote t/20-constants.t because future versions of 
ExtUtils::Constant 
+  - Added wrapper for WinPcap function setuserbuffer().
+
+  [Code]
+  - Added missing short names for compile(), set_filter(), freecode()
+
+  [Tests]
+  - Rewrote t/20-constants.t because future versions of ExtUtils::Constant
     will prevent the constant() function from being directly called.
-  - [TESTS] Added t/22-open.t, t/23-strsrc.t
-  - [TESTS] Updated t/03-openlive.t with diagnostics for FreeBSD and OpenBSD.
+  - Added t/22-open.t, t/23-strsrc.t
+  - Updated t/03-openlive.t with diagnostics for FreeBSD and OpenBSD.
+
+  [Distribution]
+  - Fixed Makefile.PL so that pcapinfo is installed.
+
+
+0.11 - 2005-11-28 - Sebastien Aperghis-Tramoni (SAPER)
+
+  [Commands]
+  - Added the pcapinfo command.
+
+  [Documentation]
+  - Corrected a few typos thanks to Test::Spelling.
+  - Small documentation nits.
+
+  [Tests]
+  - Improved the whole test suite to make it use the best device it can find
+    (was needed for Cygwin & Win32).
 
-2005.11.28 - 0.11 - Sebastien Aperghis-Tramoni (SAPER)
-  - [CMD] Added the pcapinfo command.
-  - [DIST] Cygwin installation was simplified and should now Just Work.
-  - [TESTS] Improved the whole test suite to make it use the best device
-    it can find (was needed for Cygwin & Win32).
-  - [DOC] Corrected a few typos thanks to Test::Spelling.
-  - [DOC] Small documentation nits.
-
-2005.11.xx - 0.10 - Sebastien Aperghis-Tramoni (SAPER)
-  - [BUGFIX] lookupnet() wasn't exported by :functions.
-  - [BUGFIX] Fixed findalldevs() emulation.
-  - [BUGFIX] Replaced several newSViv() with newSVuv() to respect the actual 
-    unsigned nature of several fields.
-  - [TESTS] Fixed 03-openlive.t for Darwin/Mac OS X.
-  - [TESTS] RT#15342: lookupnet() fails if the device returned by lookupdev() 
-    has no IP configured. Thanks to 
-  - [TESTS] RT#15343: warnings when running t/14-datalink.t
-  - [TESTS] Fixed another corner case in t/02-lookup.t thanks to Rafael 
Garcia-Suarez.
-  - [TESTS] t/Utils.pm now sets the environment locale to C. Thanks to Karl Y. 
Pradene.
-
-2005.10.26 - 0.09 - Sebastien Aperghis-Tramoni (SAPER)
-  - [BUGFIX] Restored compatibility with older versions of libpcap, namely the 
-    traditional ones founds on BSD systems. 
-  - [FEATURE] Added Microsoft Visual C++ 7 compatibility, thanks to Max 
Maischen 
+  [Distribution]
+  - Cygwin installation was simplified and should now Just Work.
+
+
+0.10 - 2005.11.01 - Sebastien Aperghis-Tramoni (SAPER)
+
+  [Bugfixes]
+  - lookupnet() wasn't exported by :functions.
+  - Fixed findalldevs() emulation.
+  - Replaced several newSViv() with newSVuv() to respect the actual unsigned
+    nature of several fields.
+
+  [Tests]
+  - Fixed 03-openlive.t for Darwin/Mac OS X.
+  - CPAN RT #15342: lookupnet() fails if the device returned by lookupdev()
+    has no IP configured. Thanks to
+  - CPAN RT #15343: warnings when running t/14-datalink.t
+  - Fixed another corner case in t/02-lookup.t thanks to Rafael Garcia-Suarez.
+  - t/Utils.pm now sets the environment locale to C. Thanks to Karl Y. Pradene.
+
+
+0.09 - 2005-10-26 - Sebastien Aperghis-Tramoni (SAPER)
+
+  [Bugfixes]
+  - Restored compatibility with older versions of libpcap, namely the
+    traditional ones founds on BSD systems.
+
+  [Features]
+  - Added Microsoft Visual C++ 7 compatibility, thanks to Max Maischen
     and Jean-Louis Morel.
-  - [CODE] Added new detection routines for looking which functions are 
actually 
+
+  [Code]
+  - Added new detection routines for looking which functions are actually
     available on the host system.
-  - [CODE] Upgraded to Devel::PPPort 3.06_03
-  - [TESTS] Renamed t/CheckAuth.pm to t/Utils.pm, added function 
is_available().
-  - [TESTS] Changed the way the test utility module is loaded.
-  - [TESTS] Updated several test files so they skip the tests that depend on 
-    a function that may be unavailable.
-  - [TESTS] Fixes several corner cases thanks to the benevolent testing of 
+  - Upgraded to Devel::PPPort 3.06_03
+
+  [Tests]
+  - Renamed t/CheckAuth.pm to t/Utils.pm, added function is_available().
+  - Changed the way the test utility module is loaded.
+  - Updated several test files so they skip the tests that depend on a
+    function that may be unavailable.
+  - Fixes several corner cases thanks to the benevolent testing of
     Philippe Bruhat, David Morel and Scott Lanning.
 
-2005.10.05 - 0.08 - Sebastien Aperghis-Tramoni (SAPER)
-  - [BUGFIX] RT#6320: loop() conflicts with alarm(). Thanks to Rafa�l 
Garcia-Suarez 
+
+0.08 - 2005-10-05 - Sebastien Aperghis-Tramoni (SAPER)
+
+  [Bugfixes]
+  - CPAN RT #6320: loop() conflicts with alarm(). Thanks to Rafa�l 
Garcia-Suarez
     for the patch. Also applied to dispatch() and next().
-  - [BUGFIX] setnonblock() and getnonblock() now checks that $err is a 
reference. 
-  - [BUGFIX] Merged Jean-Louis Morel patch: modification of the detection code 
in 
-    Makefile.PL for Win32; fixes for compiling with Microsoft compiler; 
+  - setnonblock() and getnonblock() now checks that $err is a reference.
+  - Merged Jean-Louis Morel patch: modification of the detection code in
+    Makefile.PL for Win32; fixes for compiling with Microsoft compiler;
     simplification of lookupdev().
-  - [BUGFIX] Restored compatibility with Perl 5.6, 5.5 and 5.4
-  - [BUGFIX] Fixed memory leak in lookupdev().
-  - [BUGFIX] Some XS wrappers (compile(), dispatch(), stats()) now resets the 
error
+  - Restored compatibility with Perl 5.6, 5.5 and 5.4
+  - Fixed memory leak in lookupdev().
+  - Some XS wrappers (compile(), dispatch(), stats()) now resets the error
     string before calling the underlying functions.
-  - [FEATURE] Now tries to use XSLoader if available, then falls back to 
DynaLoader. 
-  - [FEATURE] Improved findalldevs(). See documentation.
-  - [FEATURE] Added wrapper for freecode(), dump_flush(), dump_file().
-  - [DIST] Improved detection code in Makefile.PL.
-  - [TESTS] Updated t/05-dump.t, t/12-next.t in order to increase code 
coverage (94%). 
-    What remains uncovered is cargo-cult defensive, hence untestable, code. 
-  - [TESTS] Updated t/01-api.t, t/05-dump.t, t/08-filter.t, t/10-fileno.t, 
+
+  [Features]
+  - Now tries to use XSLoader if available, then falls back to DynaLoader.
+  - Improved findalldevs(). See documentation.
+  - Added wrapper for freecode(), dump_flush(), dump_file().
+
+  [Tests]
+  - Updated t/05-dump.t, t/12-next.t in order to increase code coverage (94%).
+    What remains uncovered is cargo-cult defensive, hence untestable, code.
+  - Updated t/01-api.t, t/05-dump.t, t/08-filter.t, t/10-fileno.t,
     t/13-dispatch.t, t/16-setnonblock.t
-  - [TESTS] Updated all test scripts in order to suppress warnings.
-  - [TESTS] Moved the the check whether pcap can be used in t/CheckAuth.pm and 
+  - Updated all test scripts in order to suppress warnings.
+  - Moved the the check whether pcap can be used in t/CheckAuth.pm and
     added Win32 specific code, supplied by Jean-Louis Morel.
-  - [TESTS] Added t/rt-6320.t for checking the bugfix of RT#6320.
-  - [TESTS] Added t/distchk.t
+  - Added t/rt-6320.t for checking the bugfix of CPAN RT #6320.
+  - Added t/distchk.t
+
+  [Distribution]
+  - Improved detection code in Makefile.PL.
+
 
-2005.09.23 - 0.07 - Sebastien Aperghis-Tramoni (SAPER)
-  - [BUGFIX] RT#7455: Memory corruption when using Net::Pcap::Compile()
-  - [BUGFIX] Merged Win32 fix to pcap_lookupdev() from JLM/0.04.02
-  - [FEATURE] Added wrappers for lib_version(), open_dead(), set_datalink(), 
+0.07 - 2005-09-23 - Sebastien Aperghis-Tramoni (SAPER)
+
+  [Bugfixes]
+  - CPAN RT #7455: Memory corruption when using Net::Pcap::Compile()
+  - Merged Win32 fix to pcap_lookupdev() from JLM/0.04.02
+
+  [Features]
+  - Added wrappers for lib_version(), open_dead(), set_datalink(),
     datalink_name_to_val(), datalink_val_to_name(), 
datalink_val_to_description()
-  - [FEATURE] Added support for all DLT_*, MODE_*, PCAP_* and useful BPF_* 
+  - Added support for all DLT_*, MODE_*, PCAP_* and useful BPF_*
     numeric macros using ExtUtils::Constant.
-  - [FEATURE] Added const qualifiers when appropriate.
-  - [FEATURE] Added ppport.h
-  - [DIST] Added libpcap detection using have_library() from 
XML::LibXML::Common
-  - [TESTS] Fixed scripts t/10-fileno.t, 
-  - [TESTS] Added t/17-lib_version.t, t/18-open_dead.t, 19-breakloop.t
-  - [TESTS] Updated t/14-datalink.t
-  - [DOC] Updated documentation.
+  - Added const qualifiers when appropriate.
+  - Added ppport.h
+
+  [Tests]
+  - Fixed scripts t/10-fileno.t,
+  - Added t/17-lib_version.t, t/18-open_dead.t, 19-breakloop.t
+  - Updated t/14-datalink.t
+
+  [Documentation]
+  - Updated documentation.
 
-2005.09.15 - 0.06 - Sebastien Aperghis-Tramoni (SAPER)
-  - [FEATURE] RT#7594: added pcap_setnonblock() and pcap_getnonblock(). Thanks 
+  [Distribution]
+  - Added libpcap detection using have_library() from XML::LibXML::Common
+
+
+0.06 - 2005-09-15 - Sebastien Aperghis-Tramoni (SAPER)
+
+  [Features]
+  - CPAN RT #7594: added pcap_setnonblock() and pcap_getnonblock(). Thanks
     to Ernesto Domat for the patch.
-  - [FEATURE] Changed the warning returned by stats() in order to be uniform 
-    with other similar warnings
-  - [TESTS] Completely rewrote the tests suite using Test::More and better 
-    (and portable) methods to skip tests when appropriate. 
-  - [TESTS] Added t/podcover.t, t/pod.t, t/portfs.t
-  - [TESTS] Added t/15-is_swapped.t, t/16-setnonblock.t
-  - [DIST] Updated Makefile.PL
-  - [DOC] RT#7671: documentation typo
-  - [DOC] Updated the documentation.
+  - Changed the warning returned by stats() in order to be uniform with
+    other similar warnings
+
+  [Documentation]
+  - CPAN RT #7671: documentation typo
+  - Updated the documentation.
+
+  [Tests]
+  - Completely rewrote the tests suite using Test::More and better
+    (and portable) methods to skip tests when appropriate.
+  - Added t/podcover.t, t/pod.t, t/portfs.t
+  - Added t/15-is_swapped.t, t/16-setnonblock.t
+
+  [Distribution]
+  - Updated Makefile.PL
+
+
+0.04.02 - 2003-09-03 - Jean-Louis Morel (JLMOREL) [based on 0.04, not released 
on CPAN]
 
-2003.09.03 - 0.04.02 - Jean-Louis Morel (JLMOREL) [BASED ON 0.04, NOT RELEASED 
ON CPAN]
   - includes fixes for WinPcap
   - added wrappers for several new libpcap functions
   - added several WinPcap specific functions
 
-2003.06.16 - 0.05 - Marco Carnut (KCARNUT)
+
+0.05 - 2003-06-16 - Marco Carnut (KCARNUT)
+
   - includes fixes for Cygwin and WinPcap (see http://winpcap.polito.it/
     and install the SDK)
   - added wrapper for findalldevs()
   - lookupdev() returns the first item from findalldevs()
   - tests now pass under Cygwin by disabling the root user check
 
-2000.05.17 - 0.04 - Tim Potter (TIMPOTTER)
+
+0.04 - 2000-05-17 - Tim Potter (TIMPOTTER)
+
   - now compiles and works with Perl 5.6.0
 
-1999.03.24 - 0.03 - Tim Potter (TIMPOTTER)
+
+0.03 - 1999.03.24 - Tim Potter (TIMPOTTER)
+
   - complete rewrite using XS
   - all pcap library functions fully implemented
   - packet header and statistical information passed as Perl hashes
   - added Pod documentation
 
-1998.12.06 - 0.02 - Bo Adler (BOADLER) [NOT RELEASED ON CPAN]
+
+0.02 - 1998.12.06 - Bo Adler (BOADLER) [NOT RELEASED ON CPAN]
+
   - update to make it work with libpcap 0.4
   - fixed problem in stats() method call
-  - changed the arguments of the loop()/dispatch() callback to include 
+  - changed the arguments of the loop()/dispatch() callback to include
     the pcap_hdr struct
 
-1997.08.27 - 0.01 - Peter Lister (PLISTER)
+
+0.01 - 1997.08.27 - Peter Lister (PLISTER)
+
   - initial implementation using SWIG
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-Pcap-0.17/MANIFEST new/Net-Pcap-0.18/MANIFEST
--- old/Net-Pcap-0.17/MANIFEST  2012-11-28 00:17:10.000000000 +0100
+++ new/Net-Pcap-0.18/MANIFEST  2016-05-15 15:41:37.000000000 +0200
@@ -38,6 +38,8 @@
 t/21-next_ex.t
 t/22-open.t
 t/23-srcstr.t
+t/50-anyevent-pcap.t
+t/50-net-pcap-easy.t
 t/50-poe-component-pcap.t
 t/distchk.t
 t/podcover.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-Pcap-0.17/META.json new/Net-Pcap-0.18/META.json
--- old/Net-Pcap-0.17/META.json 2012-11-28 00:17:10.000000000 +0100
+++ new/Net-Pcap-0.18/META.json 2016-05-15 15:41:37.000000000 +0200
@@ -1,10 +1,10 @@
 {
-   "abstract" : "Interface to pcap(3) LBL packet capture library",
+   "abstract" : "Interface to the pcap(3) LBL packet capture library",
    "author" : [
       "Sebastien Aperghis-Tramoni <sebast...@aperghis.net>"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter 
version 2.120921",
+   "generated_by" : "ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter 
version 2.150005",
    "license" : [
       "perl_5"
    ],
@@ -36,7 +36,8 @@
             "Socket" : "0",
             "Sys::Hostname" : "0",
             "Test::More" : "0.45",
-            "XSLoader" : "0"
+            "XSLoader" : "0",
+            "perl" : "5.006001"
          }
       }
    },
@@ -46,5 +47,6 @@
          "url" : "https://github.com/maddingue/Net-Pcap";
       }
    },
-   "version" : "0.17"
+   "version" : "0.18",
+   "x_serialization_backend" : "JSON::PP version 2.27300"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-Pcap-0.17/META.yml new/Net-Pcap-0.18/META.yml
--- old/Net-Pcap-0.17/META.yml  2012-11-28 00:17:10.000000000 +0100
+++ new/Net-Pcap-0.18/META.yml  2016-05-15 15:41:37.000000000 +0200
@@ -1,28 +1,30 @@
 ---
-abstract: 'Interface to pcap(3) LBL packet capture library'
+abstract: 'Interface to the pcap(3) LBL packet capture library'
 author:
   - 'Sebastien Aperghis-Tramoni <sebast...@aperghis.net>'
 build_requires:
-  ExtUtils::MakeMaker: 0
+  ExtUtils::MakeMaker: '0'
 configure_requires:
-  ExtUtils::MakeMaker: 0
+  ExtUtils::MakeMaker: '0'
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 
2.120921'
+generated_by: 'ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter 
version 2.150005'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
-  version: 1.4
+  version: '1.4'
 name: Net-Pcap
 no_index:
   directory:
     - t
     - inc
 requires:
-  Carp: 0
-  Socket: 0
-  Sys::Hostname: 0
-  Test::More: 0.45
-  XSLoader: 0
+  Carp: '0'
+  Socket: '0'
+  Sys::Hostname: '0'
+  Test::More: '0.45'
+  XSLoader: '0'
+  perl: '5.006001'
 resources:
   repository: https://github.com/maddingue/Net-Pcap
-version: 0.17
+version: '0.18'
+x_serialization_backend: 'CPAN::Meta::YAML version 0.012'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-Pcap-0.17/Makefile.PL 
new/Net-Pcap-0.18/Makefile.PL
--- old/Net-Pcap-0.17/Makefile.PL       2012-11-28 00:06:02.000000000 +0100
+++ new/Net-Pcap-0.18/Makefile.PL       2016-05-09 23:23:13.000000000 +0200
@@ -22,7 +22,7 @@
     cygwin_pcap_headers();
 }
 else {
-    $options{CCFLAGS} = "-Wall -Wwrite-strings"
+    $options{CCFLAGS} = "$Config{ccflags} -Wall -Wwrite-strings"
         if $Config{ccname} eq "gcc" and $] >= 5.006;
     $options{LIBS}    = '-lpcap';
 }
@@ -39,7 +39,7 @@
 #      in recent version and is the only function that can be called 
 #      with no argument.
 if ($has_Win32) { # ActivePerl, Cygwin
-    warn <<"REASON" and exit unless have_library('wpcap', 'blank', 'pcap');
+    die <<"REASON" unless have_library('wpcap', 'blank', 'pcap');
         - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 The WinPcap driver is not installed on this machine. \a
 
@@ -48,7 +48,7 @@
         - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 REASON
 
-    warn <<"REASON" unless have_library('wpcap', 'pcap_lib_version', 'pcap');
+    die <<"REASON" unless have_library('wpcap', 'pcap_lib_version', 'pcap');
         - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 You appear to lack the WinPcap developer pack. \a
 
@@ -64,7 +64,7 @@
 REASON
 
 } else { # other systems (Unix)
-    warn <<"REASON" and exit unless have_library('pcap');
+    die <<"REASON" unless have_library('pcap');
         - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 You appear to lack the pcap(3) library. \a
 
@@ -79,7 +79,7 @@
         - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 REASON
 
-    warn <<"REASON" unless have_library('pcap', 'pcap_lib_version');
+    die <<"REASON" unless have_library('pcap', 'pcap_lib_version');
         - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 You appear to have an old version of the pcap library. \a
 
@@ -119,6 +119,7 @@
     DISTNAME        => 'Net-Pcap',
     VERSION_FROM    => 'Pcap.pm',
     ABSTRACT_FROM   => 'Pcap.pm',
+    MIN_PERL_VERSION=> 5.6.1,
     PL_FILES        => {}, 
     EXE_FILES       => [ 'bin/pcapinfo' ], 
     PREREQ_PM       => {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-Pcap-0.17/Pcap.pm new/Net-Pcap-0.18/Pcap.pm
--- old/Net-Pcap-0.17/Pcap.pm   2011-06-13 15:29:04.000000000 +0200
+++ new/Net-Pcap-0.18/Pcap.pm   2016-05-15 15:24:03.000000000 +0200
@@ -15,6 +15,7 @@
 #
 package Net::Pcap;
 use strict;
+use warnings;
 use Exporter ();
 use Carp;
 
@@ -24,7 +25,7 @@
     lookupdev  findalldevs  lookupnet
     open_live  open_dead  open_offline  loop  breakloop  close  dispatch
     next  next_ex  compile  compile_nopcap  setfilter  freecode
-    setnonblock  getnonblock
+    offline_filter  setnonblock  getnonblock
     dump_open  dump  dump_file  dump_flush  dump_close
     datalink  set_datalink  datalink_name_to_val  datalink_val_to_name
     datalink_val_to_description
@@ -49,7 +50,7 @@
 
 {
     no strict "vars";
-    $VERSION = '0.17';
+    $VERSION = '0.18';
 
     @ISA = qw(Exporter);
 
@@ -101,6 +102,7 @@
             open_live  open_dead  open_offline
             dump_open  dump_close  dump_file  dump_flush
             compile  compile_nopcap  setfilter  freecode
+            offline_filter  setnonblock  getnonblock
             dispatch  next_ex  loop  breakloop
             datalink  set_datalink  datalink_name_to_val  
             datalink_val_to_name  datalink_val_to_description
@@ -202,13 +204,15 @@
 
 __END__
 
+=encoding UTF-8
+
 =head1 NAME
 
-Net::Pcap - Interface to pcap(3) LBL packet capture library
+Net::Pcap - Interface to the pcap(3) LBL packet capture library
 
 =head1 VERSION
 
-Version 0.17
+Version 0.18
 
 =head1 SYNOPSIS
 
@@ -263,7 +267,7 @@
 itself, but provides facilities so the user has full control of how
 signals are delivered.
 
-First, there C<pcap_perl_settings()> function allows to select how
+First, the C<pcap_perl_settings()> function allows one to select how
 signals are handled:
 
     pcap_perl_settings(PERL_SIGNALS_UNSAFE);
@@ -626,6 +630,12 @@
 by C<pcap_compile()>. 
 
 
+=item B<pcap_offline_filter($filter, \%header, $packet)>
+
+Check whether C<$filter> matches the packet described by header C<%header>
+and packet data C<$packet>. Returns true if the packet matches.
+
+
 =item B<pcap_setnonblock($pcap, $mode, \$err)>
 
 Set the I<non-blocking> mode of a live capture descriptor, depending on the 
@@ -1145,21 +1155,6 @@
 
 =back
 
-
-=head1 LIMITATIONS
-
-The following limitations apply to this version of C<Net::Pcap>.
-
-=over
-
-=item *
-
-At present, only one callback function and user data scalar can be
-current at any time as they are both stored in global variables.
-
-=back
-
-
 =head1 BUGS
 
 Please report any bugs or feature requests to
@@ -1207,15 +1202,19 @@
 
 =head2 Perl Modules
 
+the L<NetPacket> or L<Net::Frame> modules to assemble and disassemble packets.
+
 L<Net::Pcap::Reassemble> for reassembly of TCP/IP fragments.
 
 L<POE::Component::Pcap> for using C<Net::Pcap> within POE-based programs.
 
+L<AnyEvent::Pcap> for using C<Net::Pcap> within AnyEvent-based programs.
+
 L<Net::Packet> or L<NetPacket> for decoding and creating network packets.
 
 L<Net::Pcap::Easy> is a module which provides an easier, more Perl-ish
 API than C<Net::Pcap> and integrates some facilities from L<Net::Netmask>
-and C<NetPacket>.
+and L<NetPacket>.
 
 =head2 Base Libraries
 
@@ -1237,46 +1236,80 @@
 
 =head1 AUTHORS
 
-Current maintainer is SE<eacute>bastien Aperghis-Tramoni (SAPER) 
-E<lt>sebast...@aperghis.nete<gt> with the help of Jean-Louis Morel (JLMOREL) 
-E<lt>jl_mo...@bribes.orge<gt> for WinPcap support. 
+Current maintainer is Sébastien Aperghis-Tramoni (SAPER) with the help
+of Tim Wilde (TWILDE).
 
-Previous authors & maintainers: 
+Complete list of authors & contributors:
 
 =over
 
-=item *
+=item * Bo Adler (BOADLER) E<lt>thumper (at) alumni.caltech.eduE<gt>
 
-Marco Carnut (KCARNUT) E<lt>k...@tempest.com.bre<gt>
+=item * Craig Davison
 
-=item *
+=item * David Farrell
 
-Tim Potter (TIMPOTTER) E<lt>t...@frungy.orge<gt>
+=item * David N. Blank-Edelman E<lt>dnb (at) ccs.neu.eduE<gt>
 
-=item *
+=item * James Rouzier (ROUZIER)
 
-Bo Adler (BOADLER) E<lt>thum...@alumni.caltech.edue<gt>
+=item * Jean-Louis Morel (JLMOREL) E<lt>jl_morel (at) bribes.orgE<gt>
 
-=item *
+=item * Marco Carnut (KCARNUT) E<lt>kiko (at) tempest.com.brE<gt>
+
+=item * Patrice Auffret (GOMOR)
+
+=item * Peter Lister (PLISTER) E<lt>p.lister (at) cranfield.ac.ukE<gt>
+
+=item * Rafaël Garcia-Suarez (RGARCIA)
+
+=item * Sébastien Aperghis-Tramoni (SAPER) E<lt>sebastien (at) 
aperghis.netE<gt>
+
+=item * Tim Potter (TIMPOTTER) E<lt>tpot (at) frungy.orgE<gt>
 
-Peter Lister (PLISTER) E<lt>p.lis...@cranfield.ac.uke<gt>
+=item * Tim Wilde (TWILDE)
 
 =back
 
 
+=head1 HISTORY
+
+The original version of C<Net::Pcap>, version 0.01, was written by
+Peter Lister using SWIG.
+
+Version 0.02 was created by Bo Adler with a few bugfixes but not
+uploaded to CPAN. It could be found at:
+L<http://www.buttsoft.com/~thumper/software/perl/Net-Pcap/>
+
+Versions 0.03 and 0.04 were created by Tim Potter who entirely
+rewrote C<Net::Pcap> using XS and wrote the documentation, with
+the help of David N. Blank-Edelman for testing and general polishing.
+
+Version 0.05 was released by Marco Carnut with fixes to make it
+work with Cygwin and WinPcap.
+
+Version 0.04.02 was independantly created by Jean-Louis Morel
+but not uploaded on the CPAN. It can be found here:
+L<http://www.bribes.org/perl/wnetpcap.html>
+
+Based on Tim Potter's version 0.04, it included fixes for WinPcap
+and added wrappers for several new libpcap functions as well as
+WinPcap specific functions.
+
+
 =head1 ACKNOWLEDGEMENTS
 
-To Paul Johnson for his module C<Devel::Cover> and his patience for 
-helping me using it with XS code, which revealed very useful for 
-writing more tests. 
+To Paul Johnson for his module L<Devel::Cover> and his patience for
+helping me using it with XS code, which revealed very useful for
+writing more tests.
 
-To the beta-testers: Jean-Louis Morel, Max Maischen, Philippe Bruhat, 
+To the beta-testers: Jean-Louis Morel, Max Maischen, Philippe Bruhat,
 David Morel, Scott Lanning, Rafael Garcia-Suarez, Karl Y. Pradene.
 
 
 =head1 COPYRIGHT & LICENSE
 
-Copyright (C) 2005, 2006, 2007, 2008, 2009 SE<eacute>bastien Aperghis-Tramoni.
+Copyright (C) 2005-2016 Sébastien Aperghis-Tramoni and contributors.
 All rights reserved. 
 
 Copyright (C) 2003 Marco Carnut. All rights reserved. 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-Pcap-0.17/Pcap.xs new/Net-Pcap-0.18/Pcap.xs
--- old/Net-Pcap-0.17/Pcap.xs   2009-03-26 02:14:19.000000000 +0100
+++ new/Net-Pcap-0.18/Pcap.xs   2016-05-15 03:23:37.000000000 +0200
@@ -49,14 +49,20 @@
 
 typedef struct bpf_program  pcap_bpf_program_t;
 
-/* Wrapper for callback function */
+/* A struct for holding the user context and callback information*/
+typedef struct User_Callback {
+    SV *callback_fn;
+    SV *user;
+} User_Callback;
+
 
-SV *callback_fn;
+/* Wrapper for callback function */
 
 void callback_wrapper(u_char *user, const struct pcap_pkthdr *h, const u_char 
*pkt) {
-    SV *packet  = newSVpv((u_char *)pkt, h->caplen);
+    SV *packet  = newSVpvn((char *)pkt, h->caplen);
     HV *hdr     = newHV();
     SV *ref_hdr = newRV_inc((SV*)hdr);
+    User_Callback* user_callback = (User_Callback*) user;
 
     /* Fill the hash fields */
     hv_store(hdr, "tv_sec",  strlen("tv_sec"),  newSViv(h->ts.tv_sec),  0);
@@ -67,13 +73,13 @@
     /* Push arguments onto stack */
     dSP;
     PUSHMARK(sp);
-    XPUSHs((SV*)user);
+    XPUSHs((SV*)user_callback->user);
     XPUSHs(ref_hdr);
     XPUSHs(packet);
     PUTBACK;
 
     /* Call perl function */
-    call_sv (callback_fn, G_DISCARD);
+    call_sv (user_callback->callback_fn, G_DISCARD);
 
     /* Decrement refcount to temp SVs */
     SvREFCNT_dec(packet);
@@ -389,16 +395,17 @@
        SV *user
 
        CODE:
+    User_Callback user_callback;
     {
-               callback_fn = newSVsv(callback);
-               user = newSVsv(user);
+               user_callback.callback_fn = newSVsv(callback);
+               user_callback.user = newSVsv(user);
 
                *(pcap_geterr(p)) = '\0';   /* reset error string */
 
-               RETVAL = pcap_dispatch(p, cnt, callback_wrapper, (u_char 
*)user);
+               RETVAL = pcap_dispatch(p, cnt, callback_wrapper, (u_char 
*)&user_callback);
 
-               SvREFCNT_dec(user);
-               SvREFCNT_dec(callback_fn);
+               SvREFCNT_dec(user_callback.user);
+               SvREFCNT_dec(user_callback.callback_fn);
     }  
        OUTPUT:
                RETVAL
@@ -412,14 +419,15 @@
        SV *user
 
        CODE:
+    User_Callback user_callback;
     {
-               callback_fn = newSVsv(callback);
-               user = newSVsv(user);
+               user_callback.callback_fn = newSVsv(callback);
+               user_callback.user = newSVsv(user);
 
-               RETVAL = pcap_loop(p, cnt, callback_wrapper, (u_char *)user);
+               RETVAL = pcap_loop(p, cnt, callback_wrapper, (u_char 
*)&user_callback);
 
-               SvREFCNT_dec(user);
-               SvREFCNT_dec(callback_fn);
+               SvREFCNT_dec(user_callback.user);
+               SvREFCNT_dec(user_callback.callback_fn);
     }
        OUTPUT:
                RETVAL
@@ -486,7 +494,7 @@
                 hv_store(hv, "caplen",  strlen("caplen"),  
newSVuv(header->caplen),     0);
                 hv_store(hv, "len",     strlen("len"),     
newSVuv(header->len),        0);    
 
-                sv_setpvn((SV *)SvRV(pkt_data), data, header->caplen);
+                sv_setpvn((SV *)SvRV(pkt_data), (char *) data, header->caplen);
             }
 
         } else {
@@ -601,6 +609,56 @@
         RETVAL
 
 
+int
+pcap_offline_filter(fp, header, p)
+    pcap_bpf_program_t *fp
+    SV *header
+    SV *p
+
+    CODE:
+        /* Check that header is a hashref */
+        if (SvROK(header) && (SvTYPE(SvRV(header)) == SVt_PVHV)) {
+            struct pcap_pkthdr real_h;
+            char *real_p;
+            HV *hv;
+            SV **sv;
+
+            memset(&real_h, '\0', sizeof(real_h));
+
+            /* Copy from hash to pcap_pkthdr */
+            hv = (HV *)SvRV(header);
+
+            sv = hv_fetch(hv, "tv_sec", strlen("tv_sec"), 0);
+            if (sv != NULL) {
+                real_h.ts.tv_sec = SvIV(*sv);
+            }
+
+            sv = hv_fetch(hv, "tv_usec", strlen("tv_usec"), 0);
+            if (sv != NULL) {
+                real_h.ts.tv_usec = SvIV(*sv);
+            }
+
+            sv = hv_fetch(hv, "caplen", strlen("caplen"), 0);
+            if (sv != NULL) {
+                real_h.caplen = SvIV(*sv);
+            }
+
+            sv = hv_fetch(hv, "len", strlen("len"), 0);
+            if (sv != NULL) {
+                real_h.len = SvIV(*sv);
+            }
+
+            real_p = SvPV(p, PL_na);
+
+            RETVAL = pcap_offline_filter(fp, &real_h, (unsigned char *) 
real_p);
+
+        } else
+            croak("arg2 not a hash ref");
+
+    OUTPUT:
+        RETVAL
+
+
 int 
 pcap_setfilter(p, fp)
        pcap_t *p
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-Pcap-0.17/README new/Net-Pcap-0.18/README
--- old/Net-Pcap-0.17/README    2009-01-01 23:17:19.000000000 +0100
+++ new/Net-Pcap-0.18/README    2016-05-10 01:16:22.000000000 +0200
@@ -101,34 +101,10 @@
     examples/ subdirectory.
 
 
-HISTORY
-
-    The original version of Net::Pcap, version 0.01, was written by 
-    Peter Lister <p.lis...@cranfield.ac.uk> using SWIG.
-
-    Version 0.02 was created by Bo Adler <thum...@alumni.caltech.edu> 
-    with a few bugfixes but not uploaded to CPAN.  It can be found at:
-        http://www.buttsoft.com/~thumper/software/perl/Net-Pcap/
-
-    Versions 0.03 and 0.04 were created by Tim Potter (TIMPOTTER) who 
-    entirely rewrote Net::Pcap using XS and wrote the documentation, 
-    with the help of David N. Blank-Edelman <d...@ccs.neu.edu> for 
-    testing and general polishing.
-
-    Version 0.05 was released by Marco Carnut (KCARNUT) with fixes 
-    to make it work with Cygwin and WinPcap. 
-
-    Version 0.04.02 was independantly created by Jean-Louis Morel 
-    (JLMOREL) but not uploaded on the CPAN. It can be found here: 
-        http://www.bribes.org/perl/wnetpcap.html
-    Based on Tim Potter's version 0.04, it included fixes for WinPcap
-    and added wrappers for several new libpcap functions as well as 
-    WinPcap specific functions. 
-
-
 COPYRIGHT AND LICENCE
 
-    Copyright (C) 2005-2009 Sebastien Aperghis-Tramoni. All rights reserved.
+    Copyright (C) 2005-2016 Sebastien Aperghis-Tramoni and contributors.
+    All rights reserved.
     Copyright (C) 2003 Marco Carnut. All rights reserved. 
     Copyright (C) 1999-2000 Tim Potter. All rights reserved. 
     Copyright (C) 1998 Bo Adler. All rights reserved. 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-Pcap-0.17/bin/pcapinfo 
new/Net-Pcap-0.18/bin/pcapinfo
--- old/Net-Pcap-0.17/bin/pcapinfo      2009-01-01 23:17:53.000000000 +0100
+++ new/Net-Pcap-0.18/bin/pcapinfo      2016-05-09 22:57:08.000000000 +0200
@@ -1,5 +1,6 @@
 #!/usr/bin/perl
 use strict;
+use warnings;
 use Net::Pcap ':functions';
 use Sys::Hostname;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-Pcap-0.17/eg/pcapdump 
new/Net-Pcap-0.18/eg/pcapdump
--- old/Net-Pcap-0.17/eg/pcapdump       2009-01-01 23:18:01.000000000 +0100
+++ new/Net-Pcap-0.18/eg/pcapdump       2012-11-28 21:58:14.000000000 +0100
@@ -129,7 +129,7 @@
         }
         elsif ($ipframe->{proto} == IP_PROTO_UDP) {
             my $udpframe = NetPacket::UDP->decode($ipframe->{data});
-            $proto     = "TCP";
+            $proto     = "UDP";
             $src_port  = $udpframe->{src_port};
             $dest_port = $udpframe->{dest_port};
             $payload   = $udpframe->{data};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-Pcap-0.17/t/01-api.t new/Net-Pcap-0.18/t/01-api.t
--- old/Net-Pcap-0.17/t/01-api.t        2009-03-26 00:59:19.000000000 +0100
+++ new/Net-Pcap-0.18/t/01-api.t        2016-05-10 20:59:12.000000000 +0200
@@ -11,7 +11,7 @@
     lookupdev  findalldevs  lookupnet
     open_live  open_dead  open_offline  loop  breakloop  close  dispatch
     next  next_ex  compile  compile_nopcap  setfilter  freecode
-    setnonblock  getnonblock
+    offline_filter  setnonblock  getnonblock
     dump_open  dump  dump_file  dump_flush  dump_close
     datalink  set_datalink  datalink_name_to_val  datalink_val_to_name
     datalink_val_to_description
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-Pcap-0.17/t/04-loop.t 
new/Net-Pcap-0.18/t/04-loop.t
--- old/Net-Pcap-0.17/t/04-loop.t       2008-01-01 04:32:11.000000000 +0100
+++ new/Net-Pcap-0.18/t/04-loop.t       2012-11-29 22:12:20.000000000 +0100
@@ -17,7 +17,7 @@
 
 # Find a device and open it
 $dev = find_network_device();
-$pcap = Net::Pcap::open_live($dev, 1024, 1, 0, \$err);
+$pcap = Net::Pcap::open_live($dev, 1024, 1, 100, \$err);
 
 # Testing error messages
 SKIP: {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-Pcap-0.17/t/05-dump.t 
new/Net-Pcap-0.18/t/05-dump.t
--- old/Net-Pcap-0.17/t/05-dump.t       2007-12-22 20:47:16.000000000 +0100
+++ new/Net-Pcap-0.18/t/05-dump.t       2012-11-29 22:12:20.000000000 +0100
@@ -17,7 +17,7 @@
 
 # Find a device and open it
 $dev = find_network_device();
-$pcap = Net::Pcap::open_live($dev, 1024, 1, 0, \$err);
+$pcap = Net::Pcap::open_live($dev, 1024, 1, 100, \$err);
 
 # Testing error messages
 SKIP: {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-Pcap-0.17/t/06-offline.t 
new/Net-Pcap-0.18/t/06-offline.t
--- old/Net-Pcap-0.17/t/06-offline.t    2008-01-01 04:32:11.000000000 +0100
+++ new/Net-Pcap-0.18/t/06-offline.t    2012-11-29 22:12:20.000000000 +0100
@@ -17,7 +17,7 @@
 
 # Find a device and open it
 $dev = find_network_device();
-$pcap = Net::Pcap::open_live($dev, 1024, 1, 0, \$err);
+$pcap = Net::Pcap::open_live($dev, 1024, 1, 100, \$err);
 
 # Testing error messages
 SKIP: {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-Pcap-0.17/t/07-stats.t 
new/Net-Pcap-0.18/t/07-stats.t
--- old/Net-Pcap-0.17/t/07-stats.t      2007-12-22 20:47:24.000000000 +0100
+++ new/Net-Pcap-0.18/t/07-stats.t      2012-11-29 22:12:20.000000000 +0100
@@ -17,7 +17,7 @@
 
 # Find a device and open it
 $dev = find_network_device();
-$pcap = Net::Pcap::open_live($dev, 1024, 1, 0, \$err);
+$pcap = Net::Pcap::open_live($dev, 1024, 1, 100, \$err);
 
 # Testing error messages
 SKIP: {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-Pcap-0.17/t/08-filter.t 
new/Net-Pcap-0.18/t/08-filter.t
--- old/Net-Pcap-0.17/t/08-filter.t     2008-05-11 13:59:57.000000000 +0200
+++ new/Net-Pcap-0.18/t/08-filter.t     2012-11-29 22:17:30.000000000 +0100
@@ -50,7 +50,7 @@
     skip "no network device available", 22 unless find_network_device();
 
     # Open the device
-    $pcap = Net::Pcap::open_live($dev, 1024, 1, 0, \$err);
+    $pcap = Net::Pcap::open_live($dev, 1024, 1, 100, \$err);
 
     # Testing error messages
     SKIP: {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-Pcap-0.17/t/10-fileno.t 
new/Net-Pcap-0.18/t/10-fileno.t
--- old/Net-Pcap-0.17/t/10-fileno.t     2007-12-22 20:46:50.000000000 +0100
+++ new/Net-Pcap-0.18/t/10-fileno.t     2012-11-29 22:18:21.000000000 +0100
@@ -57,7 +57,7 @@
 
     # Find a device and open it
     $dev = find_network_device();
-    $pcap = Net::Pcap::open_live($dev, 1024, 1, 0, \$err);
+    $pcap = Net::Pcap::open_live($dev, 1024, 1, 100, \$err);
     isa_ok( $pcap, 'pcap_tPtr', "\$pcap" );
 
     # Testing file()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-Pcap-0.17/t/11-snapshot.t 
new/Net-Pcap-0.18/t/11-snapshot.t
--- old/Net-Pcap-0.17/t/11-snapshot.t   2007-12-22 20:47:48.000000000 +0100
+++ new/Net-Pcap-0.18/t/11-snapshot.t   2012-11-29 22:18:26.000000000 +0100
@@ -36,7 +36,7 @@
 
 for my $size (@sizes) {
     # Open the device
-    $pcap = Net::Pcap::open_live($dev, $size, 1, 0, \$err);
+    $pcap = Net::Pcap::open_live($dev, $size, 1, 100, \$err);
 
     # Testing snapshot()
     $snapshot = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-Pcap-0.17/t/12-next.t 
new/Net-Pcap-0.18/t/12-next.t
--- old/Net-Pcap-0.17/t/12-next.t       2007-12-22 20:47:53.000000000 +0100
+++ new/Net-Pcap-0.18/t/12-next.t       2012-11-29 22:18:32.000000000 +0100
@@ -20,7 +20,7 @@
 # Find a device and open it
 $dev = find_network_device();
 Net::Pcap::lookupnet($dev, \$net, \$mask, \$err);
-$pcap = Net::Pcap::open_live($dev, 1024, 1, 0, \$err);
+$pcap = Net::Pcap::open_live($dev, 1024, 1, 100, \$err);
 
 # Testing error messages
 SKIP: {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-Pcap-0.17/t/13-dispatch.t 
new/Net-Pcap-0.18/t/13-dispatch.t
--- old/Net-Pcap-0.17/t/13-dispatch.t   2007-12-22 20:47:58.000000000 +0100
+++ new/Net-Pcap-0.18/t/13-dispatch.t   2012-11-29 22:12:20.000000000 +0100
@@ -17,7 +17,7 @@
 
 # Find a device and open it
 $dev = find_network_device();
-$pcap = Net::Pcap::open_live($dev, 1024, 1, 0, \$err);
+$pcap = Net::Pcap::open_live($dev, 1024, 1, 100, \$err);
 
 # Testing error messages
 SKIP: {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-Pcap-0.17/t/14-datalink.t 
new/Net-Pcap-0.18/t/14-datalink.t
--- old/Net-Pcap-0.17/t/14-datalink.t   2007-12-22 20:48:05.000000000 +0100
+++ new/Net-Pcap-0.18/t/14-datalink.t   2012-11-29 22:18:44.000000000 +0100
@@ -94,7 +94,7 @@
 
     # Find a device and open it
     $dev = find_network_device();
-    $pcap = Net::Pcap::open_live($dev, 1024, 1, 0, \$err);
+    $pcap = Net::Pcap::open_live($dev, 1024, 1, 100, \$err);
     isa_ok( $pcap, 'pcap_tPtr', "\$pcap" );
 
     # Testing datalink()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-Pcap-0.17/t/16-setnonblock.t 
new/Net-Pcap-0.18/t/16-setnonblock.t
--- old/Net-Pcap-0.17/t/16-setnonblock.t        2007-12-22 20:48:12.000000000 
+0100
+++ new/Net-Pcap-0.18/t/16-setnonblock.t        2012-11-29 22:19:31.000000000 
+0100
@@ -47,7 +47,7 @@
 
     # Find a device and open it
     $dev = find_network_device();
-    $pcap = Net::Pcap::open_live($dev, 1024, 1, 0, \$err);
+    $pcap = Net::Pcap::open_live($dev, 1024, 1, 100, \$err);
     isa_ok( $pcap, 'pcap_tPtr', "\$pcap" );
 
     for my $state (0, 1) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-Pcap-0.17/t/17-lib_version.t 
new/Net-Pcap-0.18/t/17-lib_version.t
--- old/Net-Pcap-0.17/t/17-lib_version.t        2009-03-24 23:36:42.000000000 
+0100
+++ new/Net-Pcap-0.18/t/17-lib_version.t        2016-05-09 22:57:08.000000000 
+0200
@@ -14,8 +14,8 @@
     like( $version, '/^WinPcap version \d\.\d+/', " - checking version string 
($version)" );
 }
 else {
-    like( $version, 
-            '/^libpcap version (?:\d+\.\d+(?:\.\d+|[^\d.\s]+)?|unknown \(pre 
0\.8\))$/', 
+    like( $version,
+            '/^libpcap version (?:\d+\.\d+(?:\.\d+|[^\d.\s]+)?|unknown \(pre 
0\.8\))/',
             " - checking version string ($version)"
     );
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-Pcap-0.17/t/19-breakloop.t 
new/Net-Pcap-0.18/t/19-breakloop.t
--- old/Net-Pcap-0.17/t/19-breakloop.t  2007-12-22 20:48:31.000000000 +0100
+++ new/Net-Pcap-0.18/t/19-breakloop.t  2012-11-29 22:12:20.000000000 +0100
@@ -18,7 +18,7 @@
 
 # Find a device and open it
 $dev = find_network_device();
-$pcap = Net::Pcap::open_live($dev, 1024, 1, 0, \$err);
+$pcap = Net::Pcap::open_live($dev, 1024, 1, 100, \$err);
 
 # Testing error messages
 SKIP: {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-Pcap-0.17/t/21-next_ex.t 
new/Net-Pcap-0.18/t/21-next_ex.t
--- old/Net-Pcap-0.17/t/21-next_ex.t    2007-12-22 20:48:46.000000000 +0100
+++ new/Net-Pcap-0.18/t/21-next_ex.t    2012-11-29 22:22:37.000000000 +0100
@@ -21,7 +21,7 @@
 # Find a device and open it
 $dev = find_network_device();
 Net::Pcap::lookupnet($dev, \$net, \$mask, \$err);
-$pcap = Net::Pcap::open_live($dev, 1024, 1, 0, \$err);
+$pcap = Net::Pcap::open_live($dev, 1024, 1, 100, \$err);
 
 # Testing error messages
 SKIP: {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-Pcap-0.17/t/50-anyevent-pcap.t 
new/Net-Pcap-0.18/t/50-anyevent-pcap.t
--- old/Net-Pcap-0.17/t/50-anyevent-pcap.t      1970-01-01 01:00:00.000000000 
+0100
+++ new/Net-Pcap-0.18/t/50-anyevent-pcap.t      2016-05-15 15:29:42.000000000 
+0200
@@ -0,0 +1,69 @@
+#!perl -Tw
+use strict;
+use Test::More;
+use Net::Pcap;
+use lib 't';
+use Utils;
+
+
+BEGIN {
+    *note = sub { print "# @_\n" } unless defined &note;
+}
+
+# first check that AnyEvent is available
+plan skip_all => "AnyEvent is not available" unless eval "use AnyEvent; 1";
+
+# then check that AnyEvent::Pcap is available
+eval "use AnyEvent::Pcap";
+my $error = $@;
+plan skip_all => "AnyEvent::Pcap is not available"
+    if $error =~ /^Can't locate/;
+
+plan tests => 18;
+is $error, "", "use AnyEvent::Pcap";
+
+my $dev = find_network_device();
+
+SKIP: {
+    skip "must be run as root", 17 unless is_allowed_to_use_pcap();
+    skip "no network device available", 17 unless $dev;
+
+    my $ae_pcap;
+    my $cv = AnyEvent->condvar;
+
+    note "\$ae_pcap = AnyEvent::Pcap->new(device => $dev, ...)";
+    $ae_pcap = AnyEvent::Pcap->new(
+        device  => $dev,
+        packet_handler => sub {
+            process_packet(@_);
+            $cv->send;
+        },
+    );
+
+    note '$ae_pcap->run';
+    $ae_pcap->run;
+
+    note '$cv->recv';
+    $cv->recv;
+}
+
+sub process_packet {
+    note "> process_packet";
+    my ($header, $packet) = @_;
+
+    ok( defined $header,        " - header is defined" );
+    isa_ok( $header, 'HASH',    " - header" );
+
+    for my $field (qw(len caplen tv_sec tv_usec)) {
+        ok( exists $header->{$field}, "    - field '$field' is present" );
+        ok( defined $header->{$field}, "    - field '$field' is defined" );
+        like( $header->{$field}, '/^\d+$/', "    - field '$field' is a number" 
);
+    }
+
+    ok( $header->{caplen} <= $header->{len}, 
+        "    - coherency check: packet length (caplen <= len)" );
+
+    ok( defined $packet,        " - packet is defined" );
+    is( length $packet, $header->{caplen}, " - packet has the advertised size" 
);
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-Pcap-0.17/t/50-net-pcap-easy.t 
new/Net-Pcap-0.18/t/50-net-pcap-easy.t
--- old/Net-Pcap-0.17/t/50-net-pcap-easy.t      1970-01-01 01:00:00.000000000 
+0100
+++ new/Net-Pcap-0.18/t/50-net-pcap-easy.t      2016-05-15 15:29:36.000000000 
+0200
@@ -0,0 +1,64 @@
+#!perl -Tw
+use strict;
+use Test::More;
+use Net::Pcap;
+use lib 't';
+use Utils;
+
+
+BEGIN {
+    *note = sub { print "# @_\n" } unless defined &note;
+}
+
+# check that Net::Pcap::Easy is available
+eval "use Net::Pcap::Easy";
+my $error = $@;
+plan skip_all => "Net::Pcap::Easy is not available"
+    if $error =~ /^Can't locate/;
+
+plan tests => 18;
+is $error, "", "use Net::Pcap::Easy";
+
+my $dev = find_network_device();
+my $done = 0;
+
+SKIP: {
+    skip "must be run as root", 17 unless is_allowed_to_use_pcap();
+    skip "no network device available", 17 unless $dev;
+
+    my $npe = Net::Pcap::Easy->new(
+        dev                 => $dev,
+        packets_per_loop    => 1,
+        bytes_to_capture    => 1024,
+        tcp_callback        => \&process_tcp_packet,
+    );
+
+    $npe->loop until $done;
+}
+
+sub process_tcp_packet {
+    note "> process_tcp_packet";
+    my ($npe, $ether, $ip, $tcp, $header ) = @_;
+
+    my $xmit = localtime $header->{tv_sec};
+    note "$xmit TCP: $ip->{src_ip}:$tcp->{src_port}"
+       . " -> $ip->{dest_ip}:$tcp->{dest_port}";
+
+    ok( defined $header,        " - header is defined" );
+    isa_ok( $header, 'HASH',    " - header" );
+
+    for my $field (qw(len caplen tv_sec tv_usec)) {
+        ok( exists $header->{$field}, "    - field '$field' is present" );
+        ok( defined $header->{$field}, "    - field '$field' is defined" );
+        like( $header->{$field}, '/^\d+$/', "    - field '$field' is a number" 
);
+    }
+
+    ok( $header->{caplen} <= $header->{len}, 
+        "    - coherency check: packet length (caplen <= len)" );
+
+    my $packet = $ether->{_frame};
+    ok( defined $packet,        " - packet is defined" );
+    is( length $packet, $header->{caplen}, " - packet has the advertised size" 
);
+    $done = 1;
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-Pcap-0.17/t/50-poe-component-pcap.t 
new/Net-Pcap-0.18/t/50-poe-component-pcap.t
--- old/Net-Pcap-0.17/t/50-poe-component-pcap.t 2008-01-01 04:32:11.000000000 
+0100
+++ new/Net-Pcap-0.18/t/50-poe-component-pcap.t 2016-05-15 15:28:15.000000000 
+0200
@@ -6,13 +6,18 @@
 use Utils;
 
 
-# first check than POE is available
+BEGIN {
+    *note = sub { print "# @_\n" } unless defined &note;
+}
+
+# first check that POE is available
 plan skip_all => "POE is not available" unless eval "use POE; 1";
 
-# then check than POE::Component::Pcap is available
-plan skip_all => "POE::Component::Pcap is not available"
-    unless eval "use POE::Component::Pcap; 1";
+# then check that POE::Component::Pcap is available
+eval "use POE::Component::Pcap";
 my $error = $@;
+plan skip_all => "POE::Component::Pcap is not available"
+    if $error =~ /^Can't locate/;
 
 plan tests => 18;
 is( $error, '', "use POE::Component::Pcap" );
@@ -23,7 +28,7 @@
     skip "must be run as root", 17 unless is_allowed_to_use_pcap();
     skip "no network device available", 17 unless $dev;
 
-    #diag "[POE] create";
+    note "[POE] create";
     POE::Session->create(
         inline_states => {
             _start      => \&start,
@@ -32,13 +37,15 @@
         },
     );
 
-    #diag "[POE] run";
+    note "[POE] run";
     POE::Kernel->run;
 }
 
 
 sub start {
-    #diag "[POE:start] spawning new Pcap session ", $_[&SESSION]->ID, " on 
device $dev";
+    note "[POE:start] spawning new Pcap session ", $_[&SESSION]->ID,
+        " on device $dev";
+
     POE::Component::Pcap->spawn(
         Alias => 'pcap',  Device => $dev,
         Dispatch => 'got_packet',  Session => $_[&SESSION],
@@ -49,12 +56,12 @@
 }
 
 sub stop {
-    #diag "[POE:stop]";
+    note "[POE:stop]";
     $_[&KERNEL]->post(pcap => 'shutdown');
 }
 
 sub got_packet {
-    #diag "[POE:got_packet]";
+    note "[POE:got_packet]";
     my $packets = $_[&ARG0];
 
     # process the first packet only
@@ -65,7 +72,7 @@
 }
 
 sub process_packet {
-    #diag "[POE:process_packet]";
+    note "[POE:process_packet]";
     my ($header, $packet) = @_;
 
     ok( defined $header,        " - header is defined" );

++++++ perl-Net-Pcap-avoid-pcap_rmtauth-redefinition.patch ++++++
--- ./Makefile.PL       2018-09-21 10:32:09.165570705 +0200
+++ ./Makefile.PL       2018-09-21 10:45:39.096591301 +0200
@@ -106,7 +106,7 @@ REASON
 # We also store the list of available functions in a file for skipping the 
 # corresponding tests. 
 my @funcs = have_functions(find_functions());
-$options{DEFINE} .= cpp_defines(@funcs);
+$options{DEFINE} .= cpp_defines(@funcs). "-DHAVE_PCAP_SETSAMPLING";
 open(FUNCS, '>funcs.txt') or warn "warning: can't write 'funcs.txt': $!\n";
 print FUNCS join("\n", @funcs), "\n";
 close(FUNCS);
--- ./stubs.inc 2018-09-21 10:30:08.653034412 +0200
+++ ./stubs.inc 2018-09-21 10:46:41.339897943 +0200
@@ -354,11 +354,6 @@ int pcap_parsesrcstr(const char *source,
 #ifdef _MSC_VER
 #pragma message( "Warning: the function pcap_open() is not available" )
 #endif
-struct pcap_rmtauth {
-    int type;
-    char *username;
-    char *password;
-};
 
 pcap_t * pcap_open(const char *source, int snaplen, int flags, int 
read_timeout, struct pcap_rmtauth *auth, char *err);
 pcap_t * pcap_open(const char *source, int snaplen, int flags, int 
read_timeout, struct pcap_rmtauth *auth, char *err) {
@@ -511,6 +511,7 @@ HANDLE pcap_getevent(pcap_t *p) {
 #ifdef _MSC_VER
 #pragma message( "Warning: the function pcap_setsampling() is not available" )
 #endif
+#if 0
 struct pcap_samp {
     int method;
     int value;
@@ -522,6 +523,7 @@ struct pcap_samp *pcap_setsampling(pcap_
     return NULL;
 }
 #endif
+#endif
 
 
 /*

Reply via email to