- Jason R. Thorpe <thorpej@zembu.com>
+ Jason R. Thorpe <thorpej@netbsd.org>
missing/addrinfo.h
missing/addrsize.h
missing/bittypes.h
+missing/dlnames.c
+missing/datalinks.c
missing/getaddrinfo.c
missing/getnameinfo.c
missing/inet_aton.c
ospf6.h
packetdat.awk
parsenfsfh.c
+pcap-missing.h
ppp.h
print-802_11.c
print-ah.c
-@(#) $Header: /tcpdump/master/tcpdump/Attic/INSTALL,v 1.51 2002-10-03 16:00:33 hannes Exp $ (LBL)
+@(#) $Header: /tcpdump/master/tcpdump/Attic/INSTALL,v 1.52 2002-12-19 09:27:55 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-missing.h - declarations of functions possibly missing from libpcap
ppp.h - Point to Point Protocol definitions
print-802_11.c - IEEE 802.11 printer routines
print-ah.c - IPSEC Authentication Header printer routines
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.269 2002-12-13 00:40:34 hannes Exp $ (LBL)
+# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.270 2002-12-19 09:27:55 guy Exp $ (LBL)
#
# Various configurable paths (remember to edit Makefile.in, not Makefile)
@rm -f $@
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
+datalinks.o: $(srcdir)/missing/datalinks.c
+ $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c
+dlnames.o: $(srcdir)/missing/dlnames.c
+ $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/dlnames.c
getnameinfo.o: $(srcdir)/missing/getnameinfo.c
$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/getnameinfo.c
getaddrinfo.o: $(srcdir)/missing/getaddrinfo.c
/* define if libpcap has yydebug */
#undef HAVE_YYDEBUG
+/* define if libpcap has pcap_list_datalinks() */
+#undef HAVE_PCAP_LIST_DATALINKS
+
+/* define if libpcap has pcap_set_datalink() */
+#undef HAVE_PCAP_SET_DATALINK
+
+/* define if libpcap has pcap_datalink_name_to_val() */
+#undef HAVE_PCAP_DATALINK_NAME_TO_VAL
+
/* define if unaligned memory accesses fail */
#undef LBL_ALIGN
-dnl @(#) $Header: /tcpdump/master/tcpdump/aclocal.m4,v 1.90 2002-12-17 09:55:14 guy Exp $ (LBL)
+dnl @(#) $Header: /tcpdump/master/tcpdump/aclocal.m4,v 1.91 2002-12-19 09:27:56 guy Exp $ (LBL)
dnl
dnl Copyright (c) 1995, 1996, 1997, 1998
dnl The Regents of the University of California. All rights reserved.
if test $libpcap = FAIL ; then
AC_MSG_ERROR(see the INSTALL doc for more info)
fi
- #
- # Good old Red Hat Linux puts "pcap.h" in
- # "/usr/include/pcap"; had the LBL folks done so,
- # that would have been a good idea, but for
- # the Red Hat folks to do so just breaks source
- # compatibility with other systems.
- #
- # We work around this by assuming that, as we didn't
- # find a local libpcap, libpcap is in /usr/lib or
- # /usr/local/lib and that the corresponding header
- # file is under one of those directories; if we don't
- # find it in either of those directories, we check to
- # see if it's in a "pcap" subdirectory of them and,
- # if so, add that subdirectory to the "-I" list.
- #
+ dnl
+ dnl Good old Red Hat Linux puts "pcap.h" in
+ dnl "/usr/include/pcap"; had the LBL folks done so,
+ dnl that would have been a good idea, but for
+ dnl the Red Hat folks to do so just breaks source
+ dnl compatibility with other systems.
+ dnl
+ dnl We work around this by assuming that, as we didn't
+ dnl find a local libpcap, libpcap is in /usr/lib or
+ dnl /usr/local/lib and that the corresponding header
+ dnl file is under one of those directories; if we don't
+ dnl find it in either of those directories, we check to
+ dnl see if it's in a "pcap" subdirectory of them and,
+ dnl if so, add that subdirectory to the "-I" list.
+ dnl
AC_MSG_CHECKING(for extraneous pcap header directories)
if ! test \( -r /usr/local/include/pcap.h -o \
-r /usr/include/pcap.h \); then
LIBS="$LIBS -I:$pseexe"
fi
;;
- esac])
+ esac
+
+ dnl
+ dnl Check for "pcap_list_datalinks()", "pcap_set_datalink()",
+ dnl and "pcap_datalink_name_to_val()".
+ dnl
+ AC_CHECK_LIB(pcap, pcap_list_datalinks,
+ AC_DEFINE(HAVE_PCAP_LIST_DATALINKS),
+ LIBOBJS="$LIBOBJS datalinks.o")
+ AC_CHECK_LIB(pcap, pcap_set_datalink,
+ AC_DEFINE(HAVE_PCAP_SET_DATALINK))
+ AC_CHECK_LIB(pcap, pcap_datalink_name_to_val,
+ AC_DEFINE(HAVE_PCAP_DATALINK_NAME_TO_VAL),
+ LIBOBJS="$LIBOBJS dlnames.o")
+])
dnl
dnl Define RETSIGTYPE and RETSIGVAL
/* define if libpcap has yydebug */
#undef HAVE_YYDEBUG
+/* define if libpcap has pcap_list_datalinks() */
+#undef HAVE_PCAP_LIST_DATALINKS
+
+/* define if libpcap has pcap_set_datalink() */
+#undef HAVE_PCAP_SET_DATALINK
+
+/* define if libpcap has pcap_datalink_name_to_val() */
+#undef HAVE_PCAP_DATALINK_NAME_TO_VAL
+
/* define if unaligned memory accesses fail */
#undef LBL_ALIGN
if test $libpcap = FAIL ; then
{ echo "configure: error: see the INSTALL doc for more info" 1>&2; exit 1; }
fi
- #
- # Good old Red Hat Linux puts "pcap.h" in
- # "/usr/include/pcap"; had the LBL folks done so,
- # that would have been a good idea, but for
- # the Red Hat folks to do so just breaks source
- # compatibility with other systems.
- #
- # We work around this by assuming that, as we didn't
- # find a local libpcap, libpcap is in /usr/lib or
- # /usr/local/lib and that the corresponding header
- # file is under one of those directories; if we don't
- # find it in either of those directories, we check to
- # see if it's in a "pcap" subdirectory of them and,
- # if so, add that subdirectory to the "-I" list.
- #
- echo $ac_n "checking for extraneous pcap header directories""... $ac_c" 1>&6
-echo "configure:3939: checking for extraneous pcap header directories" >&5
+ echo $ac_n "checking for extraneous pcap header directories""... $ac_c" 1>&6
+echo "configure:3924: checking for extraneous pcap header directories" >&5
if ! test \( -r /usr/local/include/pcap.h -o \
-r /usr/include/pcap.h \); then
if test -r /usr/local/include/pcap/pcap.h; then
aix*)
pseexe="/lib/pse.exp"
echo $ac_n "checking for $pseexe""... $ac_c" 1>&6
-echo "configure:3973: checking for $pseexe" >&5
+echo "configure:3958: checking for $pseexe" >&5
if test -f $pseexe ; then
echo "$ac_t""yes" 1>&6
LIBS="$LIBS -I:$pseexe"
;;
esac
+ echo $ac_n "checking for pcap_list_datalinks in -lpcap""... $ac_c" 1>&6
+echo "configure:3967: checking for pcap_list_datalinks in -lpcap" >&5
+ac_lib_var=`echo pcap'_'pcap_list_datalinks | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lpcap $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3975 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char pcap_list_datalinks();
+
+int main() {
+pcap_list_datalinks()
+; return 0; }
+EOF
+if { (eval echo configure:3986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define HAVE_PCAP_LIST_DATALINKS 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+LIBOBJS="$LIBOBJS datalinks.o"
+fi
+
+ echo $ac_n "checking for pcap_set_datalink in -lpcap""... $ac_c" 1>&6
+echo "configure:4011: checking for pcap_set_datalink in -lpcap" >&5
+ac_lib_var=`echo pcap'_'pcap_set_datalink | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lpcap $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4019 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char pcap_set_datalink();
+
+int main() {
+pcap_set_datalink()
+; return 0; }
+EOF
+if { (eval echo configure:4030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define HAVE_PCAP_SET_DATALINK 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ echo $ac_n "checking for pcap_datalink_name_to_val in -lpcap""... $ac_c" 1>&6
+echo "configure:4054: checking for pcap_datalink_name_to_val in -lpcap" >&5
+ac_lib_var=`echo pcap'_'pcap_datalink_name_to_val | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lpcap $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4062 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char pcap_datalink_name_to_val();
+
+int main() {
+pcap_datalink_name_to_val()
+; return 0; }
+EOF
+if { (eval echo configure:4073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define HAVE_PCAP_DATALINK_NAME_TO_VAL 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+LIBOBJS="$LIBOBJS dlnames.o"
+fi
+
+
+
for ac_func in pcap_findalldevs
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3984: checking for $ac_func" >&5
+echo "configure:4102: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3989 "configure"
+#line 4107 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:4012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
done
echo $ac_n "checking whether pcap_version is defined by libpcap""... $ac_c" 1>&6
-echo "configure:4037: checking whether pcap_version is defined by libpcap" >&5
+echo "configure:4155: checking whether pcap_version is defined by libpcap" >&5
cat > conftest.$ac_ext <<EOF
-#line 4039 "configure"
+#line 4157 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:4054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_lbl_cv_pcap_version_defined=yes
else
echo "$ac_t""no" 1>&6
fi
echo $ac_n "checking whether pcap_debug is defined by libpcap""... $ac_c" 1>&6
-echo "configure:4074: checking whether pcap_debug is defined by libpcap" >&5
+echo "configure:4192: checking whether pcap_debug is defined by libpcap" >&5
cat > conftest.$ac_ext <<EOF
-#line 4076 "configure"
+#line 4194 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:4091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_lbl_cv_pcap_debug_defined=yes
else
# OK, what about "yydebug"?
#
echo $ac_n "checking whether yydebug is defined by libpcap""... $ac_c" 1>&6
-echo "configure:4113: checking whether yydebug is defined by libpcap" >&5
+echo "configure:4231: checking whether yydebug is defined by libpcap" >&5
cat > conftest.$ac_ext <<EOF
-#line 4115 "configure"
+#line 4233 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:4130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_lbl_cv_yydebug_defined=yes
else
for ac_func in bpf_dump
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4153: checking for $ac_func" >&5
+echo "configure:4271: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4158 "configure"
+#line 4276 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:4181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
fi
echo $ac_n "checking for int8_t using $CC""... $ac_c" 1>&6
-echo "configure:4238: checking for int8_t using $CC" >&5
+echo "configure:4356: checking for int8_t using $CC" >&5
if eval "test \"`echo '$''{'ac_cv_lbl_have_int8_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4243 "configure"
+#line 4361 "configure"
#include "confdefs.h"
# include "confdefs.h"
int8_t i
; return 0; }
EOF
-if { (eval echo configure:4256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_lbl_have_int8_t=yes
else
fi
echo $ac_n "checking for u_int8_t using $CC""... $ac_c" 1>&6
-echo "configure:4276: checking for u_int8_t using $CC" >&5
+echo "configure:4394: checking for u_int8_t using $CC" >&5
if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int8_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4281 "configure"
+#line 4399 "configure"
#include "confdefs.h"
# include "confdefs.h"
u_int8_t i
; return 0; }
EOF
-if { (eval echo configure:4294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_lbl_have_u_int8_t=yes
else
fi
echo $ac_n "checking for int16_t using $CC""... $ac_c" 1>&6
-echo "configure:4314: checking for int16_t using $CC" >&5
+echo "configure:4432: checking for int16_t using $CC" >&5
if eval "test \"`echo '$''{'ac_cv_lbl_have_int16_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4319 "configure"
+#line 4437 "configure"
#include "confdefs.h"
# include "confdefs.h"
int16_t i
; return 0; }
EOF
-if { (eval echo configure:4332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_lbl_have_int16_t=yes
else
fi
echo $ac_n "checking for u_int16_t using $CC""... $ac_c" 1>&6
-echo "configure:4352: checking for u_int16_t using $CC" >&5
+echo "configure:4470: checking for u_int16_t using $CC" >&5
if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int16_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4357 "configure"
+#line 4475 "configure"
#include "confdefs.h"
# include "confdefs.h"
u_int16_t i
; return 0; }
EOF
-if { (eval echo configure:4370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_lbl_have_u_int16_t=yes
else
fi
echo $ac_n "checking for int32_t using $CC""... $ac_c" 1>&6
-echo "configure:4390: checking for int32_t using $CC" >&5
+echo "configure:4508: checking for int32_t using $CC" >&5
if eval "test \"`echo '$''{'ac_cv_lbl_have_int32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4395 "configure"
+#line 4513 "configure"
#include "confdefs.h"
# include "confdefs.h"
int32_t i
; return 0; }
EOF
-if { (eval echo configure:4408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_lbl_have_int32_t=yes
else
fi
echo $ac_n "checking for u_int32_t using $CC""... $ac_c" 1>&6
-echo "configure:4428: checking for u_int32_t using $CC" >&5
+echo "configure:4546: checking for u_int32_t using $CC" >&5
if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4433 "configure"
+#line 4551 "configure"
#include "confdefs.h"
# include "confdefs.h"
u_int32_t i
; return 0; }
EOF
-if { (eval echo configure:4446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_lbl_have_u_int32_t=yes
else
fi
echo $ac_n "checking if sockaddr struct has sa_len member""... $ac_c" 1>&6
-echo "configure:4506: checking if sockaddr struct has sa_len member" >&5
+echo "configure:4624: checking if sockaddr struct has sa_len member" >&5
if eval "test \"`echo '$''{'ac_cv_lbl_sockaddr_has_sa_len'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4511 "configure"
+#line 4629 "configure"
#include "confdefs.h"
# include <sys/types.h>
u_int i = sizeof(((struct sockaddr *)0)->sa_len)
; return 0; }
EOF
-if { (eval echo configure:4520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_lbl_sockaddr_has_sa_len=yes
else
fi
echo $ac_n "checking if unaligned accesses fail""... $ac_c" 1>&6
-echo "configure:4541: checking if unaligned accesses fail" >&5
+echo "configure:4659: checking if unaligned accesses fail" >&5
if eval "test \"`echo '$''{'ac_cv_lbl_unaligned_fail'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking for h_errno""... $ac_c" 1>&6
-echo "configure:4606: checking for h_errno" >&5
+echo "configure:4724: checking for h_errno" >&5
if eval "test \"`echo '$''{'ac_cv_var_h_errno'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4611 "configure"
+#line 4729 "configure"
#include "confdefs.h"
# include <sys/types.h>
int foo = h_errno;
; return 0; }
EOF
-if { (eval echo configure:4620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_var_h_errno=yes
else
else
echo $ac_n "checking for SSLeay""... $ac_c" 1>&6
-echo "configure:4648: checking for SSLeay" >&5
+echo "configure:4766: checking for SSLeay" >&5
ac_cv_ssleay_path=no
incdir=no
for dir in /usr/${host_alias} /usr /usr/local /usr/local/ssl /usr/pkg; do
LIBS="$LIBS -lrsaref"
fi
echo $ac_n "checking for des_cbc_encrypt in -lcrypto""... $ac_c" 1>&6
-echo "configure:4676: checking for des_cbc_encrypt in -lcrypto" >&5
+echo "configure:4794: checking for des_cbc_encrypt in -lcrypto" >&5
ac_lib_var=`echo crypto'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lcrypto $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4684 "configure"
+#line 4802 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
des_cbc_encrypt()
; return 0; }
EOF
-if { (eval echo configure:4695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4729: checking for $ac_hdr" >&5
+echo "configure:4847: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4734 "configure"
+#line 4852 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if test "$ac_cv_header_openssl_cast_h" = "yes"; then
echo $ac_n "checking for buggy CAST128""... $ac_c" 1>&6
-echo "configure:4768: checking for buggy CAST128" >&5
+echo "configure:4886: checking for buggy CAST128" >&5
if eval "test \"`echo '$''{'td_cv_buggy_cast128'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
td_cv_buggy_cast128="cross-compiling, assume yes"
else
cat > conftest.$ac_ext <<EOF
-#line 4776 "configure"
+#line 4894 "configure"
#include "confdefs.h"
#include <openssl/cast.h>
return 1;
}
EOF
-if { (eval echo configure:4795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
td_cv_buggy_cast128=yes
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4829: checking for $ac_hdr" >&5
+echo "configure:4947: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4834 "configure"
+#line 4952 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:4884: checking for a BSD compatible install" >&5
+echo "configure:5002: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
--- /dev/null
+/*
+ * Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998
+ * 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 the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the Computer Systems
+ * Engineering Group at Lawrence Berkeley Laboratory.
+ * 4. Neither the name of the University nor of the Laboratory may be used
+ * to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef lint
+static const char rcsid[] =
+ "@(#) $Header: /tcpdump/master/tcpdump/missing/datalinks.c,v 1.1 2002-12-19 09:27:58 guy Exp $ (LBL)";
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include <pcap.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "pcap-missing.h"
+
+/*
+ * Stub versions for platforms that don't support them.
+ */
+int
+pcap_list_datalinks(pcap_t *p, int **dlt_buffer)
+{
+ /*
+ * This platform doesn't support changing the DLT for an
+ * interface. Return a list of DLTs containing only the
+ * DLT this device supports.
+ */
+ *dlt_buffer = (int*)malloc(sizeof(**dlt_buffer));
+ if (*dlt_buffer == NULL)
+ return (-1);
+ **dlt_buffer = pcap_datalink(p);
+ return (1);
+}
--- /dev/null
+/*
+ * Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998
+ * 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 the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the Computer Systems
+ * Engineering Group at Lawrence Berkeley Laboratory.
+ * 4. Neither the name of the University nor of the Laboratory may be used
+ * to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef lint
+static const char rcsid[] =
+ "@(#) $Header: /tcpdump/master/tcpdump/missing/dlnames.c,v 1.1 2002-12-19 09:27:58 guy Exp $ (LBL)";
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include <pcap.h>
+#include <string.h>
+
+#include "pcap-missing.h"
+
+struct dlt_choice {
+ const char *name;
+ int dlt;
+};
+
+#define DLT_CHOICE(code) { #code, code }
+#define DLT_CHOICE_SENTINEL { NULL, 0 }
+
+static struct dlt_choice dlt_choices[] = {
+ DLT_CHOICE(DLT_ARCNET),
+ DLT_CHOICE(DLT_EN10MB),
+ DLT_CHOICE(DLT_SLIP),
+ DLT_CHOICE(DLT_SLIP_BSDOS),
+ DLT_CHOICE(DLT_NULL),
+#ifdef DLT_LOOP
+ DLT_CHOICE(DLT_LOOP),
+#endif
+ DLT_CHOICE(DLT_PPP),
+#ifdef DLT_C_HDLC
+ DLT_CHOICE(DLT_C_HDLC),
+#endif
+#ifdef DLT_PPP_SERIAL
+ DLT_CHOICE(DLT_PPP_SERIAL),
+#endif
+#ifdef DLT_PPP_ETHER
+ DLT_CHOICE(DLT_PPP_ETHER),
+#endif
+ DLT_CHOICE(DLT_PPP_BSDOS),
+ DLT_CHOICE(DLT_FDDI),
+ DLT_CHOICE(DLT_IEEE802),
+#ifdef DLT_IEEE802_11
+ DLT_CHOICE(DLT_IEEE802_11),
+#endif
+#ifdef DLT_PRISM_HEADER
+ DLT_CHOICE(DLT_PRISM_HEADER),
+#endif
+#ifdef DLT_IEEE802_11_RADIO
+ DLT_CHOICE(DLT_IEEE802_11_RADIO),
+#endif
+ DLT_CHOICE(DLT_ATM_RFC1483),
+#ifdef DLT_ATM_CLIP
+ DLT_CHOICE(DLT_ATM_CLIP),
+#endif
+#ifdef DLT_SUNATM
+ DLT_CHOICE(DLT_SUNATM),
+#endif
+ DLT_CHOICE(DLT_RAW),
+#ifdef DLT_LINUX_SLL
+ DLT_CHOICE(DLT_LINUX_SLL),
+#endif
+#ifdef DLT_LTALK
+ DLT_CHOICE(DLT_LTALK),
+#endif
+#ifdef DLT_IP_OVER_FC
+ DLT_CHOICE(DLT_IP_OVER_FC),
+#endif
+#ifdef DLT_FRELAY
+ DLT_CHOICE(DLT_FRELAY),
+#endif
+
+#ifdef DLT_LANE8023
+ DLT_CHOICE(DLT_LANE8023),
+#endif
+#ifdef DLT_CIP
+ DLT_CHOICE(DLT_CIP),
+#endif
+#ifdef DLT_HDLC
+ DLT_CHOICE(DLT_HDLC),
+#endif
+#ifdef DLT_PFLOG
+ DLT_CHOICE(DLT_PFLOG),
+#endif
+ DLT_CHOICE_SENTINEL
+};
+
+int
+pcap_datalink_name_to_val(const char *name)
+{
+ int i;
+
+ for (i = 0; dlt_choices[i].name != NULL; i++) {
+ if (strcasecmp(dlt_choices[i].name + sizeof("DLT_") - 1,
+ name) == 0)
+ return (dlt_choices[i].dlt);
+ }
+ return (-1);
+}
+
+const char *
+pcap_datalink_val_to_name(int dlt)
+{
+ int i;
+
+ for (i = 0; dlt_choices[i].name != NULL; i++) {
+ if (dlt_choices[i].dlt == dlt)
+ return (dlt_choices[i].name + sizeof("DLT_") - 1);
+ }
+ return (NULL);
+}
--- /dev/null
+/*
+ * Copyright (c) 1988-2002
+ * 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.
+ *
+ * @(#) $Header: /tcpdump/master/tcpdump/pcap-missing.h,v 1.1 2002-12-19 09:27:57 guy Exp $ (LBL)
+ */
+
+#ifndef tcpdump_pcap_missing_h
+#define tcpdump_pcap_missing_h
+
+/*
+ * Declarations of functions that might be missing from libpcap.
+ */
+
+#ifndef HAVE_PCAP_LIST_DATALINKS
+extern int pcap_list_datalinks(pcap_t *, int **);
+#endif
+
+#ifndef HAVE_PCAP_DATALINK_NAME_TO_VAL
+/*
+ * We assume no platform has one but not the other.
+ */
+extern int pcap_datalink_name_to_val(const char *);
+extern const char *pcap_datalink_val_to_name(int);
+#endif
+
+#endif
+
+
+
+
+
+
+
+
+
"@(#) 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[] =
- "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.191 2002-12-19 05:44:47 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.192 2002-12-19 09:27:57 guy Exp $ (LBL)";
#endif
/*
#include <stdlib.h>
#include <string.h>
-
#include "interface.h"
#include "addrtoname.h"
#include "machdep.h"
#include "setsignal.h"
#include "gmt2local.h"
+#include "pcap-missing.h"
int aflag; /* translate network and broadcast addresses */
int dflag; /* print filter code */
int eflag; /* print ethernet header */
int fflag; /* don't translate "foreign" IP address */
+int Lflag; /* list available data link types and exit */
int nflag; /* leave addresses as numbers */
int Nflag; /* remove domains from printed host names */
int Oflag = 1; /* run filter code optimizer */
int Xflag; /* print packet in ascii as well as hex */
off_t Cflag = 0; /* rotate dump files after this many bytes */
int Aflag = 0; /* print packet only in ascii observing LF, CR, TAB, SPACE */
+int dlt = -1; /* if != -1, ask libpcap for the DLT it names */
+
+const char *dlt_name = NULL;
char *espsecret = NULL; /* ESP secret key */
/* Forwards */
static RETSIGTYPE cleanup(int);
static void usage(void) __attribute__((noreturn));
+static void show_dlts_and_exit(pcap_t *pd) __attribute__((noreturn));
static void dump_packet_and_trunc(u_char *, const struct pcap_pkthdr *, const u_char *);
static void dump_packet(u_char *, const struct pcap_pkthdr *, const u_char *);
if (type == p->type)
return p->f;
- error("unknown data link type %d", type);
+ return NULL;
/* NOTREACHED */
}
pcap_dumper_t *p;
};
+static void
+show_dlts_and_exit(pcap_t *pd)
+{
+ int n_dlts;
+ int *dlts = 0;
+ const char *dlt_name;
+
+ n_dlts = pcap_list_datalinks(pd, &dlts);
+ if (n_dlts < 0)
+ error("%s", pcap_geterr(pd));
+ else if (n_dlts == 0 || !dlts)
+ error("No data link types.");
+
+ (void) fprintf(stderr, "Data link types (use option -y to set):\n");
+
+ while (--n_dlts >= 0) {
+ dlt_name = pcap_datalink_val_to_name(dlts[n_dlts]);
+ if (dlt_name != NULL) {
+ (void) fprintf(stderr, " %s", dlt_name);
+
+ /*
+ * OK, does tcpdump handle that type?
+ */
+ if (lookup_printer(dlts[n_dlts]) == NULL)
+ (void) fprintf(stderr, " (not supported)");
+ putchar('\n');
+ } else {
+ (void) fprintf(stderr, " DLT %d (not supported)\n",
+ dlts[n_dlts]);
+ }
+ }
+ free(dlts);
+ exit(0);
+}
+
int
main(int argc, char **argv)
{
register int cnt, op, i;
bpf_u_int32 localnet, netmask;
register char *cp, *infile, *cmdbuf, *device, *RFileName, *WFileName;
+ int type;
pcap_handler printer;
struct bpf_program fcode;
#ifndef WIN32
opterr = 0;
while (
#ifdef WIN32
- (op = getopt(argc, argv, "aAB:c:C:dDeE:fF:i:lm:nNOpqr:Rs:StT:uvw:xXY")) != -1)
+ (op = getopt(argc, argv, "aAB:c:C:dDeE:fF:i:lLm:nNOpqr:Rs:StT:uvw:xXy:Y")) != -1)
#else /* WIN32 */
#ifdef HAVE_PCAP_FINDALLDEVS
- (op = getopt(argc, argv, "aAc:C:dDeE:fF:i:lm:nNOpqr:Rs:StT:uvw:xXY")) != -1)
+ (op = getopt(argc, argv, "aAc:C:dDeE:fF:i:lLm:nNOpqr:Rs:StT:uvw:xXy:Y")) != -1)
#else /* HAVE_PCAP_FINDALLDEVS */
- (op = getopt(argc, argv, "aAc:C:deE:fF:i:lm:nNOpqr:Rs:StT:uvw:xXY")) != -1)
+ (op = getopt(argc, argv, "aAc:C:deE:fF:i:lLm:nNOpqr:Rs:StT:uvw:xXy:Y")) != -1)
#endif /* HAVE_PCAP_FINDALLDEVS */
#endif /* WIN32 */
switch (op) {
++aflag;
break;
- case 'A':
- ++xflag;
- ++Xflag;
- ++Aflag;
- break;
+ case 'A':
+ ++xflag;
+ ++Xflag;
+ ++Aflag;
+ break;
#ifdef WIN32
case 'B':
return 0;
#endif /* HAVE_PCAP_FINDALLDEVS */
+ case 'L':
+ Lflag++;
+ break;
+
case 'e':
++eflag;
break;
++Xflag;
break;
+ case 'y':
+ dlt_name = optarg;
+ dlt = pcap_datalink_name_to_val(dlt_name);
+ if (dlt < 0)
+ error("invalid data link type %s", dlt_name);
+ break;
+
#if defined(HAVE_PCAP_DEBUG) || defined(HAVE_YYDEBUG)
case 'Y':
{
error("%s", pcap_geterr(pd));
}
#endif /* WIN32 */
+ if (Lflag)
+ show_dlts_and_exit(pd);
+ if (dlt >= 0) {
+#ifdef HAVE_PCAP_SET_DATALINK
+ if (pcap_set_datalink(pd, dlt) < 0)
+ error("%s", pcap_geterr(pd));
+#else
+ /*
+ * We don't actually support changing the
+ * data link type, so we only let them
+ * set it to what it already is.
+ */
+ if (dlt != pcap_datalink(pd)) {
+ error("%s is not one of the DLTs supported by this device\n",
+ dlt_name);
+ }
+#endif
+ (void)fprintf(stderr, "%s: data link type %s\n",
+ program_name, dlt_name);
+ (void)fflush(stderr);
+ }
i = pcap_snapshot(pd);
if (snaplen < i) {
warning("snaplen raised from %d to %d", snaplen, i);
pcap_userdata = (u_char *)p;
}
} else {
- printer = lookup_printer(pcap_datalink(pd));
+ type = pcap_datalink(pd);
+ printer = lookup_printer(type);
+ if (printer == NULL) {
+ dlt_name = pcap_datalink_val_to_name(type);
+ if (dlt_name != NULL)
+ error("unsupported data link type %s", dlt_name);
+ else
+ error("unsupported data link type %d", type);
+ }
pcap_userdata = 0;
}
#ifdef SIGINFO
#endif /* WIN32 */
(void)fprintf(stderr,
#ifdef WIN32
-"Usage: %s [-aAdDeflnNOpqRStuvxX] [-B size] [-c count] [ -C file_size ]\n", program_name);
+"Usage: %s [-aAdDeflLnNOpqRStuvxX] [-B size] [-c count] [ -C file_size ]\n", program_name);
#else /* WIN32 */
#ifdef HAVE_PCAP_FINDALLDEVS
-"Usage: %s [-aAdDeflnNOpqRStuvxX] [-c count] [ -C file_size ]\n", program_name);
+"Usage: %s [-aAdDeflLnNOpqRStuvxX] [-c count] [ -C file_size ]\n", program_name);
#else /* HAVE_PCAP_FINDALLDEVS */
-"Usage: %s [-aAdeflnNOpqRStuvxX] [-c count] [ -C file_size ]\n", program_name);
+"Usage: %s [-aAdeflLnNOpqRStuvxX] [-c count] [ -C file_size ]\n", program_name);
#endif /* HAVE_PCAP_FINDALLDEVS */
#endif /* WIN32 */
(void)fprintf(stderr,
-"\t\t[ -F file ] [ -i interface ] [ -r file ] [ -s snaplen ]\n");
+"\t\t[ -E algo:secret ] [ -F file ] [ -i interface ] [ -r file ]\n");
+ (void)fprintf(stderr,
+"\t\t[ -s snaplen ] [ -T type ] [ -w file ] [ -y datalinktype ]\n");
(void)fprintf(stderr,
-"\t\t[ -T type ] [ -w file ] [ -E algo:secret ] [ expression ]\n");
+"\t\t[ expression ]\n");
exit(1);
}