From owner-svn-src-all@FreeBSD.ORG Tue Jan 31 17:22:08 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81C7D106566C; Tue, 31 Jan 2012 17:22:08 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6DFFE8FC12; Tue, 31 Jan 2012 17:22:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0VHM8tA046738; Tue, 31 Jan 2012 17:22:08 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0VHM80m046723; Tue, 31 Jan 2012 17:22:08 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201201311722.q0VHM80m046723@svn.freebsd.org> From: "George V. Neville-Neil" Date: Tue, 31 Jan 2012 17:22:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230828 - in vendor/libpcap/dist: . Win32/Include Win32/Prj Win32/Src bpf/net packaging pcap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2012 17:22:08 -0000 Author: gnn Date: Tue Jan 31 17:22:07 2012 New Revision: 230828 URL: http://svn.freebsd.org/changeset/base/230828 Log: Update sources to 1.2.1 Submitted by: wxs@ Modified: vendor/libpcap/dist/CHANGES vendor/libpcap/dist/CREDITS vendor/libpcap/dist/Makefile.in vendor/libpcap/dist/README vendor/libpcap/dist/README.linux vendor/libpcap/dist/VERSION vendor/libpcap/dist/Win32/Include/bittypes.h vendor/libpcap/dist/Win32/Prj/libpcap.dsp vendor/libpcap/dist/Win32/Src/gai_strerror.c vendor/libpcap/dist/Win32/Src/getaddrinfo.c vendor/libpcap/dist/aclocal.m4 vendor/libpcap/dist/bpf/net/bpf_filter.c vendor/libpcap/dist/config.h.in vendor/libpcap/dist/configure vendor/libpcap/dist/configure.in vendor/libpcap/dist/ethertype.h vendor/libpcap/dist/fad-getad.c vendor/libpcap/dist/gencode.c vendor/libpcap/dist/gencode.h vendor/libpcap/dist/grammar.y vendor/libpcap/dist/inet.c vendor/libpcap/dist/packaging/pcap.spec.in vendor/libpcap/dist/pcap-bpf.c vendor/libpcap/dist/pcap-bt-linux.c vendor/libpcap/dist/pcap-common.c vendor/libpcap/dist/pcap-config.in vendor/libpcap/dist/pcap-dag.c vendor/libpcap/dist/pcap-dlpi.c vendor/libpcap/dist/pcap-filter.manmisc.in vendor/libpcap/dist/pcap-int.h vendor/libpcap/dist/pcap-libdlpi.c vendor/libpcap/dist/pcap-linktype.manmisc.in vendor/libpcap/dist/pcap-linux.c vendor/libpcap/dist/pcap-stdinc.h vendor/libpcap/dist/pcap-usb-linux.c vendor/libpcap/dist/pcap-win32.c vendor/libpcap/dist/pcap.3pcap.in vendor/libpcap/dist/pcap.c vendor/libpcap/dist/pcap/bpf.h vendor/libpcap/dist/pcap/pcap.h vendor/libpcap/dist/pcap_activate.3pcap vendor/libpcap/dist/pcap_can_set_rfmon.3pcap vendor/libpcap/dist/pcap_compile.3pcap.in vendor/libpcap/dist/pcap_datalink.3pcap.in vendor/libpcap/dist/pcap_datalink_name_to_val.3pcap vendor/libpcap/dist/pcap_datalink_val_to_name.3pcap vendor/libpcap/dist/pcap_fileno.3pcap vendor/libpcap/dist/pcap_findalldevs.3pcap vendor/libpcap/dist/pcap_free_datalinks.3pcap vendor/libpcap/dist/pcap_freealldevs.3pcap vendor/libpcap/dist/pcap_get_selectable_fd.3pcap vendor/libpcap/dist/pcap_list_datalinks.3pcap.in vendor/libpcap/dist/pcap_loop.3pcap vendor/libpcap/dist/pcap_major_version.3pcap vendor/libpcap/dist/pcap_next_ex.3pcap vendor/libpcap/dist/pcap_open_live.3pcap vendor/libpcap/dist/pcap_set_datalink.3pcap vendor/libpcap/dist/savefile.c vendor/libpcap/dist/scanner.l vendor/libpcap/dist/sf-pcap-ng.c vendor/libpcap/dist/sf-pcap.c Modified: vendor/libpcap/dist/CHANGES ============================================================================== --- vendor/libpcap/dist/CHANGES Tue Jan 31 15:53:54 2012 (r230827) +++ vendor/libpcap/dist/CHANGES Tue Jan 31 17:22:07 2012 (r230828) @@ -1,3 +1,77 @@ +Friday December 9, 2011. guy@alum.mit.edu. +Summary for 1.2.1 libpcap release + Update README file. + Fix typoes in README.linux file. + Clean up some compiler warnings. + Fix Linux compile problems and tests for ethtool.h. + Treat Debian/kFreeBSD and GNU/Hurd as systems with GNU + toolchains. + Support 802.1 QinQ as a form of VLAN in filters. + Treat "carp" as equivalent to "vrrp" in filters. + Fix code generated for "ip6 protochain". + Add some new link-layer header types. + Support capturing NetFilter log messages on Linux. + Clean up some error messages. + Turn off monitor mode on exit for mac80211 interfaces on Linux. + Fix problems turning monitor mode on for non-mac80211 interfaces + on Linux. + Properly fail if /sys/class/net or /proc/net/dev exist but can't + be opened. + Fail if pcap_activate() is called on an already-activated + pcap_t, and add a test program for that. + Fix filtering in pcap-ng files. + Don't build for PowerPC on Mac OS X Lion. + Simplify handling of new DLT_/LINKTYPE_ values. + Expand pcap(3PCAP) man page. + +Sunday July 24, 2011. mcr@sandelman.ca. +Summary for 1.2 libpcap release + All of the changes listed below for 1.1.1 and 1.1.2. + Changes to error handling for pcap_findalldevs(). + Fix the calculation of the frame size in memory-mapped captures. + Add a link-layer header type for STANAG 5066 D_PDUs. + Add a link-layer type for a variant of 3GPP TS 27.010. + Noted real nature of LINKTYPE_ARCNET. + Add a link-layer type for DVB-CI. + Fix configure-script discovery of VLAN acceleration support. + see http://netoptimizer.blogspot.com/2010/09/tcpdump-vs-vlan-tags.html + Linux, HP-UX, AIX, NetBSD and OpenBSD compilation/conflict fixes. + Protect against including AIX 5.x's having been included. + Add DLT_DBUS, for raw D-Bus messages. + Treat either EPERM or EACCES as "no soup for you". + Changes to permissions on DLPI systems. + Add DLT_IEEE802_15_4_NOFCS for 802.15.4 interfaces. + +Fri. August 6, 2010. guy@alum.mit.edu. +Summary for 1.1.2 libpcap release + Return DLT_ values, not raw LINKTYPE_ values from + pcap_datalink() when reading pcap-ng files + Add support for "wlan ra" and "wlan ta", to check the RA and TA + of WLAN frames that have them + Don't crash if "wlan addr{1,2,3,4}" are used without 802.11 + headers + Do filtering on USB and Bluetooth capturing + On FreeBSD/SPARC64, use -fPIC - it's apparently necessary + Check for valid port numbers (fit in a 16-bit unsigned field) in + "port" filters + Reject attempts to put savefiles into non-blocking mode + Check for "no such device" for the "get the media types" ioctl + in *BSD + Improve error messages from bpf_open(), and let it do the error + handling + Return more specific errors from pcap_can_set_rfmon(); fix + documentation + Update description fetching code for FreeBSD, fix code for + OpenBSD + Ignore /sys/net/dev files if we get ENODEV for them, not just + ENXIO; fixes handling of bonding devices on Linux + Fix check for a constant 0 argument to BPF_DIV + Use the right version of ar when cross-building + Free any filter set on a savefile when the savefile is closed + Include the CFLAGS setting when configure was run in the + compiler flags + Add support for 802.15.4 interfaces on Linux + Thu. April 1, 2010. guy@alum.mit.edu. Summary for 1.1.1 libpcap release Update CHANGES to reflect more of the changes in 1.1.0. Modified: vendor/libpcap/dist/CREDITS ============================================================================== --- vendor/libpcap/dist/CREDITS Tue Jan 31 15:53:54 2012 (r230827) +++ vendor/libpcap/dist/CREDITS Tue Jan 31 17:22:07 2012 (r230828) @@ -1,145 +1,154 @@ This file lists people who have contributed to libpcap: The current maintainers: - Bill Fenner - Fulvio Risso - Guy Harris - Hannes Gredler - Michael Richardson + Bill Fenner + Fulvio Risso + Guy Harris + Hannes Gredler + Michael Richardson Additional people who have contributed patches: - Alan Bawden - Albert Chin - Alexander 'Leo' Bergolth - Alexey Kuznetsov - Alon Bar-Lev - Andrew Brown - Antti Kantee - Arien Vijn - Arkadiusz Miskiewicz - Armando L. Caro Jr. - Assar Westerlund - Brian Ginsbach - Charles M. Hannum - Chris G. Demetriou - Chris Lightfoot - Chris Maynard - Chris Pepper - Christian Bell - Christian Peron - Daniele Orlandi - Darren Reed - David Kaelbling - David Young - Dean Gaudet - Don Ebright - Dug Song - Dustin Spicuzza - Eric Anderson - Erik de Castro Lopo - Felix Obenhuber - Florent Drouin - Franz Schaefer - Fulko Hew - Fumiyuki Shimizu - Gianluca Varenni - Gilbert Hoyek - Gisle Vanem - Graeme Hewson - Greg Stark - Greg Troxel - Gregor Maier - Guillaume Pelat - Hagen Paul Pfeifer - Hyung Sik Yoon - Igor Khristophorov - Jan-Philip Velders - Jason R. Thorpe - Javier Achirica - Jean Tourrilhes - Jean-Louis Charton - Jefferson Ogata - Jesper Peterson - Joerg Mayer - John Bankier - Jon Lindgren - Jon Smirl - Juergen Schoenwaelder - Jung-uk Kim - Kazushi Sugyo - Klaus Klein - Koryn Grant - Kris Katterjohn - Krzysztof Halasa - Lorenzo Cavallaro - Loris Degioanni - Love Hörnquist-Åstrand - Luis Martin Garcia - Maciej W. Rozycki - Marcus Felipe Pereira - Mark C. Brown - Mark Pizzolato - Markus Mayer - Martin Husemann - Márton Németh - Matthew Luckie - Max Laier - Mike Frysinger - Mike Kershaw - Mike Wiacek - Monroe Williams - N. Leiten - Nicolas Dade - Octavian Cerna - Olaf Kirch - Ollie Wild - Onno van der Linden - Paolo Abeni - Patrick Marie - Patrick McHardy - Paul Mundt - Pavel Kankovsky - Pawel Pokrywka - Peter Fales - Peter Jeremy - Peter Volkov - Phil Wood - Rafal Maszkowski - - Richard Stearn - Rick Jones - Robert Edmonds - Roberto Mariani - Romain Francoise - Sagun Shakya - Scott Barron - Scott Gifford - Sebastian Krahmer - Sebastien Roy - Sepherosa Ziehau - Shaun Clowes - Solomon Peachy - Stefan Hudson - Stephen Donnelly - Takashi Yamamoto - Tanaka Shin-ya - Tobias Poschwatta - Tony Li - Torsten Landschoff - Uns Lider - Uwe Girlich - Wesley Shields - Xianjie Zhang - Xin Li - Yen Yen Lim - Yvan Vanhullebus - Yoann Vandoorselaere + Alan Bawden + Albert Chin + Alexander 'Leo' Bergolth + Alexey Kuznetsov + Alon Bar-Lev + Andrew Brown + + Antti Kantee + Arien Vijn + Arkadiusz Miskiewicz + Armando L. Caro Jr. + Assar Westerlund + Brian Ginsbach + Charles M. Hannum + Chris G. Demetriou + Chris Lightfoot + Chris Maynard + Chris Pepper + Christian Bell + Christian Peron + Daniele Orlandi + Darren Reed + David Kaelbling + David Young + Dean Gaudet + Don Ebright + Dug Song + Dustin Spicuzza + Eric Anderson + Erik de Castro Lopo + Felix Obenhuber + Florent Drouin + Franz Schaefer + frederich + Fulko Hew + Fumiyuki Shimizu + Garrett Cooper + Gianluca Varenni + Gilbert Hoyek + Gisle Vanem + Graeme Hewson + Greg Stark + Greg Troxel + Gregor Maier + Guillaume Pelat + Hagen Paul Pfeifer + Henri Doreau + Hyung Sik Yoon + Igor Khristophorov + Jan-Philip Velders + Jason R. Thorpe + Javier Achirica + Jean Tourrilhes + Jean-Louis Charton + Jefferson Ogata + Jesper Dangaard Brouer + Jesper Peterson + Joerg Mayer + John Bankier + Jon Lindgren + Jon Smirl + Juergen Schoenwaelder + Julien Moutinho + Jung-uk Kim + Kazushi Sugyo + Klaus Klein + Koryn Grant + Kris Katterjohn + Krzysztof Halasa + Lorenzo Cavallaro + Loris Degioanni + Love Hörnquist-Åstrand + Luis MartinGarcia + Maciej W. Rozycki + Marcus Felipe Pereira + Mark C. Brown + Mark Pizzolato + Markus Mayer + Martin Husemann + Márton Németh + Matthew Luckie + Max Laier + Mike Frysinger + Mike Kershaw + Mike Wiacek + Miroslav Lichvar + Monroe Williams + + N. Leiten + Nicolas Dade + Octavian Cerna + Olaf Kirch + Ollie Wild + Onno van der Linden + Paolo Abeni + Patrick Marie + Patrick McHardy + Paul Mundt + Pavel Kankovsky + Pawel Pokrywka + Peter Fales + Peter Jeremy + Peter Volkov + Phil Wood + Rafal Maszkowski + + Richard Stearn + Rick Jones + Robert Edmonds + Roberto Mariani + Romain Francoise + Sagun Shakya + Scott Barron + Scott Gifford + Scott Mcmillan + Sebastian Krahmer + Sebastien Roy + Sepherosa Ziehau + Shaun Clowes + Solomon Peachy + Stefan Hudson + Stephen Donnelly + Takashi Yamamoto + Tanaka Shin-ya + Tobias Poschwatta + Tony Li + Torsten Landschoff + Uns Lider + Uwe Girlich + Wesley Shields + Xianjie Zhang + Xin Li + Yen Yen Lim + Yvan Vanhullebus + Yoann Vandoorselaere The original LBL crew: - Steve McCanne - Craig Leres - Van Jacobson + Steve McCanne + Craig Leres + Van Jacobson Past maintainers: - Jun-ichiro itojun Hagino + Jun-ichiro itojun Hagino Modified: vendor/libpcap/dist/Makefile.in ============================================================================== --- vendor/libpcap/dist/Makefile.in Tue Jan 31 15:53:54 2012 (r230827) +++ vendor/libpcap/dist/Makefile.in Tue Jan 31 17:22:07 2012 (r230828) @@ -46,19 +46,21 @@ VPATH = @srcdir@ LD = /usr/bin/ld CC = @CC@ +AR = @AR@ CCOPT = @V_CCOPT@ INCLS = -I. @V_INCLS@ DEFS = @DEFS@ @V_DEFS@ ADDLOBJS = @ADDLOBJS@ ADDLARCHIVEOBJS = @ADDLARCHIVEOBJS@ LIBS = @LIBS@ +CFLAGS = @CFLAGS@ LDFLAGS = @LDFLAGS@ DYEXT = @DYEXT@ V_RPATH_OPT = @V_RPATH_OPT@ PROG=libpcap # Standard CFLAGS -CFLAGS = $(CCOPT) $(INCLS) $(DEFS) +FULL_CFLAGS = $(CCOPT) $(INCLS) $(DEFS) $(CFLAGS) INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -78,9 +80,9 @@ YACC = @V_YACC@ # problem if you don't own the file but can write to the directory. .c.o: @rm -f $@ - $(CC) $(CFLAGS) -c $(srcdir)/$*.c + $(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c -PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @CAN_SRC@ +PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @CAN_SRC@ @NETFILTER_SRC@ FSRC = fad-@V_FINDALLDEVS@.c SSRC = @SSRC@ CSRC = pcap.c inet.c gencode.c optimize.c nametoaddr.c etherent.c \ @@ -123,14 +125,29 @@ HDR = $(PUBHDR) \ sf-pcap-ng.h \ sunatmpos.h +TESTS = \ + filtertest \ + findalldevstest \ + nonblocktest \ + opentest \ + selpolltest + +TESTS_SRC = \ + tests/filtertest.c \ + tests/findalldevstest.c \ + tests/nonblocktest.c \ + tests/opentest.c \ + tests/reactivatetest.c \ + tests/selpolltest.c + GENHDR = \ scanner.h tokdefs.h version.h TAGFILES = \ $(SRC) $(HDR) -CLEANFILES = $(OBJ) libpcap.* filtertest findalldevstest selpolltest \ - opentest $(PROG)-`cat $(srcdir)/VERSION`.tar.gz $(GENSRC) $(GENHDR) \ +CLEANFILES = $(OBJ) libpcap.* $(TESTS) \ + $(PROG)-`cat $(srcdir)/VERSION`.tar.gz $(GENSRC) $(GENHDR) \ lex.yy.c pcap-config MAN1 = pcap-config.1 @@ -141,8 +158,10 @@ MAN3PCAP_EXPAND = \ pcap_datalink.3pcap.in \ pcap_dump_open.3pcap.in \ pcap_list_datalinks.3pcap.in \ + pcap_list_tstamp_types.3pcap.in \ pcap_open_dead.3pcap.in \ - pcap_open_offline.3pcap.in + pcap_open_offline.3pcap.in \ + pcap_set_tstamp_type.3pcap.in MAN3PCAP_NOEXPAND = \ pcap_activate.3pcap \ @@ -160,9 +179,7 @@ MAN3PCAP_NOEXPAND = \ pcap_file.3pcap \ pcap_fileno.3pcap \ pcap_findalldevs.3pcap \ - pcap_freealldevs.3pcap \ pcap_freecode.3pcap \ - pcap_free_datalinks.3pcap \ pcap_get_selectable_fd.3pcap \ pcap_geterr.3pcap \ pcap_inject.3pcap \ @@ -187,7 +204,9 @@ MAN3PCAP_NOEXPAND = \ pcap_snapshot.3pcap \ pcap_stats.3pcap \ pcap_statustostr.3pcap \ - pcap_strerror.3pcap + pcap_strerror.3pcap \ + pcap_tstamp_type_name_to_val.3pcap \ + pcap_tstamp_type_val_to_name.3pcap MAN3PCAP = $(MAN3PCAP_NOEXPAND) $(MAN3PCAP_EXPAND:.in=) @@ -196,9 +215,11 @@ MANFILE = \ MANMISC = \ pcap-filter.manmisc.in \ - pcap-linktype.manmisc.in + pcap-linktype.manmisc.in \ + pcap-tstamp.manmisc.in EXTRA_DIST = \ + $(TESTS_SRC) \ CHANGES \ ChmodBPF/ChmodBPF \ ChmodBPF/StartupParameters.plist \ @@ -237,8 +258,6 @@ EXTRA_DIST = \ fad-null.c \ fad-sita.c \ fad-win32.c \ - filtertest.c \ - findalldevstest.c \ grammar.y \ install-sh \ lbl/os-aix4.h \ @@ -263,7 +282,6 @@ EXTRA_DIST = \ msdos/pktdrvr.c \ msdos/pktdrvr.h \ msdos/readme.dos \ - opentest.c \ org.tcpdump.chmod_bpf.plist \ packaging/pcap.spec.in \ pcap-bpf.c \ @@ -282,6 +300,8 @@ EXTRA_DIST = \ pcap-libdlpi.c \ pcap-linux.c \ pcap-namedb.h \ + pcap-netfilter-linux.c \ + pcap-netfilter-linux.h \ pcap-nit.c \ pcap-null.c \ pcap-pf.c \ @@ -299,7 +319,6 @@ EXTRA_DIST = \ pcap-win32.c \ runlex.sh \ scanner.l \ - selpolltest.c \ Win32/Include/Gnuc.h \ Win32/Include/addrinfo.h \ Win32/Include/bittypes.h \ @@ -328,7 +347,7 @@ all: libpcap.a shared pcap-config libpcap.a: $(OBJ) @rm -f $@ - ar rc $@ $(OBJ) $(ADDLARCHIVEOBJS) + $(AR) rc $@ $(OBJ) $(ADDLARCHIVEOBJS) $(RANLIB) $@ shared: libpcap.$(DYEXT) @@ -401,7 +420,7 @@ libpcap.sl: $(OBJ) libpcap.shareda: $(OBJ) @rm -f $@ shr.o $(CC) @V_SHLIB_OPT@ -o shr.o $(OBJ) $(ADDLOBJS) $(LDFLAGS) $(LIBS) - ar rc $@ shr.o + $(AR) rc $@ shr.o # # For platforms that don't support shared libraries (or on which we @@ -414,7 +433,7 @@ scanner.c: $(srcdir)/scanner.l $(srcdir)/runlex.sh $(LEX) -o$@ $< scanner.o: scanner.c tokdefs.h - $(CC) $(CFLAGS) -c scanner.c + $(CC) $(FULL_CFLAGS) -c scanner.c pcap.o: version.h @@ -427,13 +446,13 @@ grammar.c: $(srcdir)/grammar.y grammar.o: grammar.c @rm -f $@ - $(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c + $(CC) $(FULL_CFLAGS) -Dyylval=pcap_lval -c grammar.c version.o: version.c - $(CC) $(CFLAGS) -c version.c + $(CC) $(FULL_CFLAGS) -c version.c snprintf.o: $(srcdir)/missing/snprintf.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c + $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c version.c: $(srcdir)/VERSION @rm -f $@ @@ -467,35 +486,47 @@ bpf_filter.c: $(srcdir)/bpf/net/bpf_filt ln -s $(srcdir)/bpf/net/bpf_filter.c bpf_filter.c bpf_filter.o: bpf_filter.c - $(CC) $(CFLAGS) -c bpf_filter.c + $(CC) $(FULL_CFLAGS) -c bpf_filter.c # # Generate the pcap-config script. # -pcap-config: $(srcdir)/pcap-config.in +# Some Makes, e.g. AIX Make and Solaris Make, can't handle "--file=$@.tmp:$<"; +# for example, the Solaris 9 make man page says +# +# Because make assigns $< and $* as it would for implicit rules +# (according to the suffixes list and the directory contents), +# they may be unreliable when used within explicit target entries. +# +# and this is an explicit target entry. +# +# Therefore, instead of using $<, we explicitly put in $(srcdir)/pcap-config.in. +# +pcap-config: $(srcdir)/pcap-config.in ./config.status @rm -f $@ $@.tmp - sed -e 's|@includedir[@]|$(includedir)|g' \ - -e 's|@libdir[@]|$(libdir)|g' \ - -e 's|@LIBS[@]|$(LIBS)|g' \ - -e 's|@V_RPATH_OPT[@]|$(V_RPATH_OPT)|g' \ - $(srcdir)/pcap-config.in >$@.tmp + ./config.status --file=$@.tmp:$(srcdir)/pcap-config.in mv $@.tmp $@ chmod a+x $@ # # Test programs - not built by default, and not installed. # -filtertest: filtertest.c libpcap.a - $(CC) $(CFLAGS) -I. -L. -o filtertest $(srcdir)/filtertest.c libpcap.a $(LIBS) +tests: $(TESTS) + +filtertest: tests/filtertest.c libpcap.a + $(CC) $(FULL_CFLAGS) -I. -L. -o filtertest $(srcdir)/tests/filtertest.c libpcap.a $(LIBS) + +findalldevstest: tests/findalldevstest.c libpcap.a + $(CC) $(FULL_CFLAGS) -I. -L. -o findalldevstest $(srcdir)/tests/findalldevstest.c libpcap.a $(LIBS) -findalldevstest: findalldevstest.c libpcap.a - $(CC) $(CFLAGS) -I. -L. -o findalldevstest $(srcdir)/findalldevstest.c libpcap.a $(LIBS) +nonblocktest: tests/nonblocktest.c libpcap.a + $(CC) $(FULL_CFLAGS) -I. -L. -o nonblocktest $(srcdir)/tests/nonblocktest.c libpcap.a $(LIBS) -selpolltest: selpolltest.c libpcap.a - $(CC) $(CFLAGS) -I. -L. -o selpolltest $(srcdir)/selpolltest.c libpcap.a $(LIBS) +opentest: tests/opentest.c libpcap.a + $(CC) $(FULL_CFLAGS) -I. -L. -o opentest $(srcdir)/tests/opentest.c libpcap.a $(LIBS) -opentest: opentest.c libpcap.a - $(CC) $(CFLAGS) -I. -L. -o opentest $(srcdir)/opentest.c libpcap.a $(LIBS) +selpolltest: tests/selpolltest.c libpcap.a + $(CC) $(FULL_CFLAGS) -I. -L. -o selpolltest $(srcdir)/tests/selpolltest.c libpcap.a $(LIBS) install: install-shared install-archive pcap-config [ -d $(DESTDIR)$(libdir) ] || \ @@ -533,12 +564,21 @@ install: install-shared install-archive rm -f $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap ln $(DESTDIR)$(mandir)/man3/pcap_dump_open.3pcap \ $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap + rm -f $(DESTDIR)$(mandir)/man3/pcap_freealldevs.3pcap + ln $(DESTDIR)$(mandir)/man3/pcap_findalldevs.3pcap \ + $(DESTDIR)$(mandir)/man3/pcap_freealldevs.3pcap rm -f $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap ln $(DESTDIR)$(mandir)/man3/pcap_geterr.3pcap \ $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap rm -f $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap ln $(DESTDIR)$(mandir)/man3/pcap_inject.3pcap \ $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap + rm -f $(DESTDIR)$(mandir)/man3/pcap_free_datalinks.3pcap + ln $(DESTDIR)$(mandir)/man3/pcap_list_datalinks.3pcap \ + $(DESTDIR)$(mandir)/man3/pcap_free_datalinks.3pcap + rm -f $(DESTDIR)$(mandir)/man3/pcap_free_tstamp_types.3pcap + ln $(DESTDIR)$(mandir)/man3/pcap_list_tstamp_types.3pcap \ + $(DESTDIR)$(mandir)/man3/pcap_free_tstamp_types.3pcap rm -f $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap ln $(DESTDIR)$(mandir)/man3/pcap_loop.3pcap \ $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap @@ -622,8 +662,11 @@ uninstall: uninstall-shared rm -f $(DESTDIR)$(mandir)/man3/$$i; done rm -f $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap rm -f $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap + rm -f $(DESTDIR)$(mandir)/man3/pcap_freealldevs.3pcap rm -f $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap rm -f $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap + rm -f $(DESTDIR)$(mandir)/man3/pcap_free_datalinks.3pcap + rm -f $(DESTDIR)$(mandir)/man3/pcap_free_tstamp_types.3pcap rm -f $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap rm -f $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap rm -f $(DESTDIR)$(mandir)/man3/pcap_next.3pcap @@ -660,7 +703,7 @@ clean: distclean: clean rm -f Makefile config.cache config.log config.status \ - config.h gnuc.h os-proto.h bpf_filter.c pcap-config \ + config.h gnuc.h net os-proto.h bpf_filter.c pcap-config \ stamp-h stamp-h.in rm -f $(MAN3PCAP_EXPAND:.in=) $(MANFILE:.in=) $(MANMISC:.in=) rm -rf autom4te.cache Modified: vendor/libpcap/dist/README ============================================================================== --- vendor/libpcap/dist/README Tue Jan 31 15:53:54 2012 (r230827) +++ vendor/libpcap/dist/README Tue Jan 31 17:22:07 2012 (r230828) @@ -63,13 +63,14 @@ added overhead (especially, for selectiv would translate BPF filters into a filter program that is compatible with the underlying kernel subsystem, but this is not yet implemented. -BPF is standard in 4.4BSD, BSD/OS, NetBSD, FreeBSD, and OpenBSD. DEC -OSF/1/Digital UNIX/Tru64 UNIX uses the packetfilter interface but has -been extended to accept BPF filters (which libpcap utilizes). Also, you -can add BPF filter support to Ultrix using the kernel source and/or -object patches available in: +BPF is standard in 4.4BSD, BSD/OS, NetBSD, FreeBSD, OpenBSD, DragonFly +BSD, and Mac OS X; an older, modified and undocumented version is +standard in AIX. {DEC OSF/1, Digital UNIX, Tru64 UNIX} uses the +packetfilter interface but has been extended to accept BPF filters +(which libpcap utilizes). Also, you can add BPF filter support to +Ultrix using the kernel source and/or object patches available in: - ftp://gatekeeper.dec.com/pub/DEC/net/bpfext42.tar.Z. + http://www.tcpdump.org/other/bpfext42.tar.Z Linux, in the 2.2 kernel and later kernels, has a "Socket Filter" mechanism that accepts BPF filters; see the README.linux file for Modified: vendor/libpcap/dist/README.linux ============================================================================== --- vendor/libpcap/dist/README.linux Tue Jan 31 15:53:54 2012 (r230827) +++ vendor/libpcap/dist/README.linux Tue Jan 31 17:22:07 2012 (r230828) @@ -97,12 +97,12 @@ reported by pcap_stats on Linux are as f 2.2.x ===== ps_recv Number of packets that were accepted by the pcap filter -ps_drops Always 0, this statistic is not gatherd on this platform +ps_drop Always 0, this statistic is not gatherd on this platform 2.4.x ===== -ps_rec Number of packets that were accepted by the pcap filter -ps_drops Number of packets that had passed filtering but were not +ps_recv Number of packets that were accepted by the pcap filter +ps_drop Number of packets that had passed filtering but were not passed on to pcap due to things like buffer shortage, etc. - This is useful because these are packets you are interested in - but won't be reported by, for example, tcpdump output. + This is useful because these are packets you are interested in + but won't be reported by, for example, tcpdump output. Modified: vendor/libpcap/dist/VERSION ============================================================================== --- vendor/libpcap/dist/VERSION Tue Jan 31 15:53:54 2012 (r230827) +++ vendor/libpcap/dist/VERSION Tue Jan 31 17:22:07 2012 (r230828) @@ -1 +1 @@ -1.1.1 +1.2.1 Modified: vendor/libpcap/dist/Win32/Include/bittypes.h ============================================================================== --- vendor/libpcap/dist/Win32/Include/bittypes.h Tue Jan 31 15:53:54 2012 (r230827) +++ vendor/libpcap/dist/Win32/Include/bittypes.h Tue Jan 31 17:22:07 2012 (r230828) @@ -30,78 +30,28 @@ #define _BITTYPES_H #ifndef HAVE_U_INT8_T - -#if SIZEOF_CHAR == 1 typedef unsigned char u_int8_t; typedef signed char int8_t; -#elif SIZEOF_INT == 1 -typedef unsigned int u_int8_t; -typedef signed int int8_t; -#else /* XXX */ -#error "there's no appropriate type for u_int8_t" -#endif -#define HAVE_U_INT8_T 1 -#define HAVE_INT8_T 1 - #endif /* HAVE_U_INT8_T */ #ifndef HAVE_U_INT16_T - -#if SIZEOF_SHORT == 2 typedef unsigned short u_int16_t; typedef signed short int16_t; -#elif SIZEOF_INT == 2 -typedef unsigned int u_int16_t; -typedef signed int int16_t; -#elif SIZEOF_CHAR == 2 -typedef unsigned char u_int16_t; -typedef signed char int16_t; -#else /* XXX */ -#error "there's no appropriate type for u_int16_t" -#endif -#define HAVE_U_INT16_T 1 -#define HAVE_INT16_T 1 - #endif /* HAVE_U_INT16_T */ #ifndef HAVE_U_INT32_T - -#if SIZEOF_INT == 4 typedef unsigned int u_int32_t; typedef signed int int32_t; -#elif SIZEOF_LONG == 4 -typedef unsigned long u_int32_t; -typedef signed long int32_t; -#elif SIZEOF_SHORT == 4 -typedef unsigned short u_int32_t; -typedef signed short int32_t; -#else /* XXX */ -#error "there's no appropriate type for u_int32_t" -#endif -#define HAVE_U_INT32_T 1 -#define HAVE_INT32_T 1 - #endif /* HAVE_U_INT32_T */ #ifndef HAVE_U_INT64_T -#if SIZEOF_LONG_LONG == 8 -typedef unsigned long long u_int64_t; -typedef long long int64_t; -#elif defined(_MSC_EXTENSIONS) +#ifdef _MSC_EXTENSIONS typedef unsigned _int64 u_int64_t; typedef _int64 int64_t; -#elif SIZEOF_INT == 8 -typedef unsigned int u_int64_t; -#elif SIZEOF_LONG == 8 -typedef unsigned long u_int64_t; -#elif SIZEOF_SHORT == 8 -typedef unsigned short u_int64_t; -#else /* XXX */ -#error "there's no appropriate type for u_int64_t" -#endif -#define HAVE_U_INT64_T 1 -#define HAVE_INT64_T 1 - +#else /* _MSC_EXTENSIONS */ +typedef unsigned long long u_int64_t; +typedef long long int64_t; +#endif /* _MSC_EXTENSIONS */ #endif /* HAVE_U_INT64_T */ #ifndef PRId64 Modified: vendor/libpcap/dist/Win32/Prj/libpcap.dsp ============================================================================== --- vendor/libpcap/dist/Win32/Prj/libpcap.dsp Tue Jan 31 15:53:54 2012 (r230827) +++ vendor/libpcap/dist/Win32/Prj/libpcap.dsp Tue Jan 31 17:22:07 2012 (r230828) @@ -41,7 +41,7 @@ RSC=rc.exe # PROP Intermediate_Dir "Release" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "NDEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "NDEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /YX /FD /c # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe @@ -64,7 +64,7 @@ LIB32=link.exe -lib # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "_DEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../" /I "../../lbl/" /I "../../bpf/" /I "../include/" /I "../../../../common" /I "../../../../dag/include" /I "../../../../dag/drv/windows" /D "_DEBUG" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D "_MBCS" /D "HAVE_ADDRINFO" /D "WIN32" /D _U_= /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /YX /FD /GZ /c # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe Modified: vendor/libpcap/dist/Win32/Src/gai_strerror.c ============================================================================== --- vendor/libpcap/dist/Win32/Src/gai_strerror.c Tue Jan 31 15:53:54 2012 (r230827) +++ vendor/libpcap/dist/Win32/Src/gai_strerror.c Tue Jan 31 17:22:07 2012 (r230828) @@ -80,4 +80,4 @@ WSAAPI gai_strerrorA(int ecode) return "Unknown error"; } -#endif /* gai_strerror */ \ No newline at end of file +#endif /* gai_strerror */ Modified: vendor/libpcap/dist/Win32/Src/getaddrinfo.c ============================================================================== --- vendor/libpcap/dist/Win32/Src/getaddrinfo.c Tue Jan 31 15:53:54 2012 (r230827) +++ vendor/libpcap/dist/Win32/Src/getaddrinfo.c Tue Jan 31 17:22:07 2012 (r230828) @@ -45,6 +45,12 @@ * in ai_flags? */ +/* + * Mingw64 has its own implementation of getaddrinfo, mingw32 no + */ +#ifndef __MINGW64__ + + #ifdef HAVE_CONFIG_H #include #endif @@ -85,7 +91,7 @@ static const char rcsid[] _U_ = #ifdef NEED_ADDRINFO_H #include "addrinfo.h" #ifdef WIN32 -#include "IP6_misc.h" +#include "ip6_misc.h" #endif #endif @@ -1118,3 +1124,6 @@ find_afd(af) } return NULL; } + + +#endif /*__MING64__*/ Modified: vendor/libpcap/dist/aclocal.m4 ============================================================================== --- vendor/libpcap/dist/aclocal.m4 Tue Jan 31 15:53:54 2012 (r230827) +++ vendor/libpcap/dist/aclocal.m4 Tue Jan 31 17:22:07 2012 (r230828) @@ -245,7 +245,24 @@ AC_DEFUN(AC_LBL_SHLIBS_INIT, # or accepts command-line arguments like # those the GNU linker accepts. # - V_CCOPT="$V_CCOPT -fpic" + # Some instruction sets require -fPIC on some + # operating systems. Check for them. If you + # have a combination that requires it, add it + # here. + # + PIC_OPT=-fpic + case "$host_cpu" in + + sparc64*) + case "$host_os" in + + freebsd*) + PIC_OPT=-fPIC + ;; + esac + ;; + esac + V_CCOPT="$V_CCOPT $PIC_OPT" V_SONAME_OPT="-Wl,-soname," V_RPATH_OPT="-Wl,-rpath," ;; @@ -978,8 +995,9 @@ dnl code that would use that member, or dnl AC_DEFUN(AC_LBL_LINUX_TPACKET_AUXDATA_TP_VLAN_TCI, [AC_MSG_CHECKING(if tpacket_auxdata struct has tp_vlan_tci member) - AC_CACHE_VAL(ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1, + AC_CACHE_VAL(ac_cv_lbl_linux_tpacket_auxdata_tp_vlan_tci, AC_TRY_COMPILE([ +# include # include ], [u_int i = sizeof(((struct tpacket_auxdata *)0)->tp_vlan_tci)], ac_cv_lbl_linux_tpacket_auxdata_tp_vlan_tci=yes, Modified: vendor/libpcap/dist/bpf/net/bpf_filter.c ============================================================================== --- vendor/libpcap/dist/bpf/net/bpf_filter.c Tue Jan 31 15:53:54 2012 (r230827) +++ vendor/libpcap/dist/bpf/net/bpf_filter.c Tue Jan 31 17:22:07 2012 (r230828) @@ -405,7 +405,18 @@ bpf_filter(pc, p, wirelen, buflen) continue; case BPF_JMP|BPF_JA: +#if defined(KERNEL) || defined(_KERNEL) + /* + * No backward jumps allowed. + */ pc += pc->k; +#else + /* + * XXX - we currently implement "ip6 protochain" + * with backward jumps, so sign-extend pc->k. + */ + pc += (bpf_int32)pc->k; +#endif continue; case BPF_JMP|BPF_JGT|BPF_K: @@ -608,7 +619,7 @@ bpf_validate(f, len) /* * Check for constant division by 0. */ - if (BPF_RVAL(p->code) == BPF_K && p->k == 0) + if (BPF_SRC(p->code) == BPF_K && p->k == 0) return 0; break; default: Modified: vendor/libpcap/dist/config.h.in ============================================================================== --- vendor/libpcap/dist/config.h.in Tue Jan 31 15:53:54 2012 (r230827) +++ vendor/libpcap/dist/config.h.in Tue Jan 31 17:22:07 2012 (r230828) @@ -18,6 +18,9 @@ /* define if you have streams capable DAG API */ #undef HAVE_DAG_STREAMS_API +/* define if you have vdag_set_device_info() */ +#undef HAVE_DAG_VDAG + /* Define to 1 if you have the declaration of `ether_hostton', and to 0 if you don't. */ #undef HAVE_DECL_ETHER_HOSTTON @@ -52,12 +55,30 @@ /* if libnl exists */ #undef HAVE_LIBNL +/* if libnl exists and is version 2.x */ +#undef HAVE_LIBNL_2_x + /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_COMPILER_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_ETHTOOL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_IF_PACKET_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_NET_TSTAMP_H + /* if tp_vlan_tci exists */ #undef HAVE_LINUX_TPACKET_AUXDATA_TP_VLAN_TCI +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_TYPES_H + /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_USBDEVICE_FS_H @@ -73,6 +94,12 @@ /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IF_ETHER_H +/* Define to 1 if you have the header file. */ +#undef HAVE_NETPACKET_IF_PACKET_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NETPACKET_PACKET_H + /* Define to 1 if you have the header file. */ #undef HAVE_NET_IF_MEDIA_H @@ -217,6 +244,9 @@ /* target host supports CAN sniffing */ #undef PCAP_SUPPORT_CAN +/* target host supports netfilter sniffing */ +#undef PCAP_SUPPORT_NETFILTER + /* target host supports USB sniffing */ #undef PCAP_SUPPORT_USB *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***