oui.h
packetdat.awk
parsenfsfh.c
+pcap_dump_ftell.c
pcap-missing.h
pf.h
pmap_prot.h
-@(#) $Header: /tcpdump/master/tcpdump/Attic/INSTALL,v 1.64 2005-05-21 20:18:12 guy Exp $ (LBL)
+@(#) $Header: /tcpdump/master/tcpdump/Attic/INSTALL,v 1.65 2005-06-03 22:08:51 guy Exp $ (LBL)
If you have not built libpcap, do so first. See the README
file in this directory for the ftp location.
ospf6.h - IPv6 Open Shortest Path First definitions
packetdat.awk - TCP chunk summary awk script
parsenfsfh.c - Network File System file parser routines
+pcap_dump_ftell.c - pcap_dump_ftell() implementation, in case libpcap
+ doesn't have it
pcap-missing.h - declarations of functions possibly missing from libpcap
pf.h - OpenBSD PF definitions
pmap_prot.h - definitions for ONC RPC portmapper protocol
/* define if libpcap has pcap_datalink_val_to_description() */
#undef HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION
+/* define if libpcap has pcap_dump_ftell() */
+#undef HAVE_PCAP_DUMP_FTELL
+
/* define if you have getrpcbynumber() */
#undef HAVE_GETRPCBYNUMBER
-dnl @(#) $Header: /tcpdump/master/tcpdump/aclocal.m4,v 1.111 2005-06-03 21:36:41 guy Exp $ (LBL)
+dnl @(#) $Header: /tcpdump/master/tcpdump/aclocal.m4,v 1.112 2005-06-03 22:08:51 guy Exp $ (LBL)
dnl
dnl Copyright (c) 1995, 1996, 1997, 1998
dnl The Regents of the University of California. All rights reserved.
dnl so just define the HAVE_ value if it's there.
dnl
AC_CHECK_FUNCS(pcap_breakloop)
+
+ dnl
+ dnl Check for "pcap_dump_ftell()" and use a substitute version
+ dnl if it's not present.
+ AC_CHECK_FUNC(pcap_dump_ftell,
+ AC_DEFINE(HAVE_PCAP_DUMP_FTELL),
+ [
+ AC_LIBOBJ(pcap_dump_ftell)
+ ])
])
dnl
/* define if libpcap has pcap_datalink_val_to_description() */
#undef HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION
+/* define if libpcap has pcap_dump_ftell() */
+#undef HAVE_PCAP_DUMP_FTELL
+
/* define if you have getrpcbynumber() */
#undef HAVE_GETRPCBYNUMBER
done
+ echo "$as_me:$LINENO: checking for pcap_dump_ftell" >&5
+echo $ECHO_N "checking for pcap_dump_ftell... $ECHO_C" >&6
+if test "${ac_cv_func_pcap_dump_ftell+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define pcap_dump_ftell to an innocuous variant, in case <limits.h> declares pcap_dump_ftell.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define pcap_dump_ftell innocuous_pcap_dump_ftell
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char pcap_dump_ftell (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef pcap_dump_ftell
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char pcap_dump_ftell ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_pcap_dump_ftell) || defined (__stub___pcap_dump_ftell)
+choke me
+#else
+char (*f) () = pcap_dump_ftell;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != pcap_dump_ftell;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_pcap_dump_ftell=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_pcap_dump_ftell=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_pcap_dump_ftell" >&5
+echo "${ECHO_T}$ac_cv_func_pcap_dump_ftell" >&6
+if test $ac_cv_func_pcap_dump_ftell = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_PCAP_DUMP_FTELL 1
+_ACEOF
+
+else
+
+ case $LIBOBJS in
+ "pcap_dump_ftell.$ac_objext" | \
+ *" pcap_dump_ftell.$ac_objext" | \
+ "pcap_dump_ftell.$ac_objext "* | \
+ *" pcap_dump_ftell.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS pcap_dump_ftell.$ac_objext" ;;
+esac
+
+
+fi
+
+
#
# Check for these after AC_LBL_LIBPCAP, so we link with the appropriate
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Header: /tcpdump/master/tcpdump/pcap-missing.h,v 1.2 2003-11-18 23:09:42 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/pcap-missing.h,v 1.3 2005-06-03 22:08:52 guy Exp $ (LBL)
*/
#ifndef tcpdump_pcap_missing_h
extern const char *pcap_datalink_val_to_description(int);
#endif
+#ifndef HAVE_PCAP_DUMP_FTELL
+extern long pcap_dump_ftell(pcap_dumper_t *);
+#endif
+
#endif
--- /dev/null
+/*
+ * Copyright (c) 1993, 1994, 1995, 1996, 1997
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that: (1) source code distributions
+ * retain the above copyright notice and this paragraph in its entirety, (2)
+ * distributions including binary code include the above copyright notice and
+ * this paragraph in its entirety in the documentation or other materials
+ * provided with the distribution, and (3) all advertising materials mentioning
+ * features or use of this software display the following acknowledgement:
+ * ``This product includes software developed by the University of California,
+ * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
+ * the University nor the names of its contributors may be used to endorse
+ * or promote products derived from this software without specific prior
+ * written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+#ifndef lint
+static const char rcsid[] _U_ =
+ "@(#) $Header: /tcpdump/master/tcpdump/pcap_dump_ftell.c,v 1.1 2005-06-03 22:08:52 guy Exp $ (LBL)";
+#endif
+
+#include <stdio.h>
+#include <pcap.h>
+
+#include "pcap-missing.h"
+
+long
+pcap_dump_ftell(pcap_dumper_t *p)
+{
+ return (ftell((FILE *)p));
+}
"@(#) 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/tcpdump/tcpdump.c,v 1.257 2005-05-22 21:19:40 hannes Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.258 2005-06-03 22:08:53 guy Exp $ (LBL)";
#endif
/*
* larger than Cflag - the last packet written to the
* file could put it over Cflag.
*/
- if (ftell((FILE *)dump_info->p) > Cflag) {
+ if (pcap_dump_ftell(dump_info->p) > Cflag) {
/*
* Close the current file and open a new one.
*/