Does anybody have a recent copy of the source to libpcap from its CVS repository? The normal site for libpcap (tcpdump.org) appears to have suffered a filesystem crash and CVS is not working. I am looking for a version of libpcap that supports data capture for USB interfaces, the code will probably have references to /dev/usbmon or a pcap-usb-linux.c file for Linux. libpcap0.8_0.9.8-2 is not recent enough. --
Dave put a recent copy up at: git://git.kernel.org/pub/scm/linux/kernel/git/davem/libpcap.git --
Thanks, but that is still version 0.9.8 with no support for usb. It defines DLT_USB and DLT_USB_LINUX but has no code to actually read from /dev/usbmon. I need the CVS version of libpcap. --
From: Keith Owens <kaos@ocs.com.au> Sorry that's the most recent CVS tree Patrick had when I built that GIT repo. --
Thats odd, the version I had has USB support and that one also appears to be missing my VLAN patches that are in current CVS. I'll try to figure out what went wrong and send you both a new tarball. --
From: Patrick McHardy <kaber@trash.net> I just rebuilt the libpcap repo from an updated tarball Patrick sent me. Let me know if it's still screwed up :) --
Comparing git://git.kernel.org/pub/scm/linux/kernel/git/davem/libpcap.git against Patrick's tarball. git is missing some mode and some rcsid lines like this example below, I assume that the removal of these lines in git was deliberate. diff -urp libpcap-0.9-PRE-CVS/fad-getad.c libpcap/fad-getad.c --- libpcap-0.9-PRE-CVS/fad-getad.c 2007-10-18 04:11:49.000000000 +1000 +++ libpcap/fad-getad.c 2008-09-11 09:45:20.144341324 +1000 @@ -1,4 +1,3 @@ -/* -*- Mode: c; tab-width: 8; indent-tabs-mode: 1; c-basic-offset: 8; -*- */ /* * Copyright (c) 1994, 1995, 1996, 1997, 1998 * The Regents of the University of California. All rights reserved. @@ -32,11 +31,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/libpcap/fad-getad.c,v 1.12 2007/09/14 00:44:55 guy Exp $ (LBL)"; -#endif - #ifdef HAVE_CONFIG_H #include "config.h" #endif However the removal of the #ifndef lint lines also removed a copyright notice from the object. The copyright line should be reinstated. diff -urp libpcap-0.9-PRE-CVS/filtertest.c libpcap/filtertest.c --- libpcap-0.9-PRE-CVS/filtertest.c 2007-10-11 16:56:22.000000000 +1000 +++ libpcap/filtertest.c 2008-09-11 09:45:20.148341971 +1000 @@ -19,14 +19,6 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#ifndef lint -static const char copyright[] _U_ = - "@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000\n\ -The Regents of the University of California. All rights reserved.\n"; -static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/libpcap/filtertest.c,v 1.2 2005/08/08 17:50:13 guy Exp $ (LBL)"; -#endif - #ifdef HAVE_CONFIG_H #include "config.h" #endif --
From: Keith Owens <kaos@ocs.com.au> Yes, look at the changesets in the tree, I did it. --
Removing the #ifndef lines also accidentally removed a copyright notice. diff -urp libpcap-0.9-PRE-CVS/filtertest.c libpcap/filtertest.c --- libpcap-0.9-PRE-CVS/filtertest.c 2007-10-11 16:56:22.000000000 +1000 +++ libpcap/filtertest.c 2008-09-11 09:45:20.148341971 +1000 @@ -19,14 +19,6 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#ifndef lint -static const char copyright[] _U_ = - "@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000\n\ -The Regents of the University of California. All rights reserved.\n"; -static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/libpcap/filtertest.c,v 1.2 2005/08/08 17:50:13 guy Exp $ (LBL)"; -#endif - #ifdef HAVE_CONFIG_H #include "config.h" #endif --
From: Keith Owens <kaos@ocs.com.au> No, the copyright is also in the comment right above it. --
