diff options
| author | cvs2svn <cvs2svn@FreeBSD.org> | 2005-05-29 18:24:22 +0000 | 
|---|---|---|
| committer | cvs2svn <cvs2svn@FreeBSD.org> | 2005-05-29 18:24:22 +0000 | 
| commit | c1ae789aecef81386d03fb3a32e4f14abc4ab533 (patch) | |
| tree | 1669e829c8fd69d5f370ae14db7cece7e1dffe13 /contrib/tcpdump | |
| parent | d93a098204d2761ce4b0e968398f610c16362e07 (diff) | |
Diffstat (limited to 'contrib/tcpdump')
| -rw-r--r-- | contrib/tcpdump/acsite.m4 | 505 | ||||
| -rw-r--r-- | contrib/tcpdump/dhcp6.h | 200 | ||||
| -rw-r--r-- | contrib/tcpdump/dhcp6opt.h | 81 | ||||
| -rw-r--r-- | contrib/tcpdump/lbl/gnuc.h | 43 | ||||
| -rw-r--r-- | contrib/tcpdump/missing/cdecl_ext.h | 37 | ||||
| -rw-r--r-- | contrib/tcpdump/nfsv2.h | 262 | ||||
| -rw-r--r-- | contrib/tcpdump/print-bxxp.c | 82 | ||||
| -rw-r--r-- | contrib/tcpdump/print-lcp.c | 216 | ||||
| -rw-r--r-- | contrib/tcpdump/savestr.c | 68 | ||||
| -rw-r--r-- | contrib/tcpdump/savestr.h | 24 | 
10 files changed, 0 insertions, 1518 deletions
diff --git a/contrib/tcpdump/acsite.m4 b/contrib/tcpdump/acsite.m4 deleted file mode 100644 index 746faf1e1a4f..000000000000 --- a/contrib/tcpdump/acsite.m4 +++ /dev/null @@ -1,505 +0,0 @@ -dnl @(#) $Header: acsite.m4,v 1.41 96/11/29 15:30:40 leres Exp $ (LBL) -dnl -dnl Copyright (c) 1995, 1996 -dnl	The Regents of the University of California.  All rights reserved. -dnl -dnl Redistribution and use in source and binary forms, with or without -dnl modification, are permitted provided that: (1) source code distributions -dnl retain the above copyright notice and this paragraph in its entirety, (2) -dnl distributions including binary code include the above copyright notice and -dnl this paragraph in its entirety in the documentation or other materials -dnl provided with the distribution, and (3) all advertising materials mentioning -dnl features or use of this software display the following acknowledgement: -dnl ``This product includes software developed by the University of California, -dnl Lawrence Berkeley Laboratory and its contributors.'' Neither the name of -dnl the University nor the names of its contributors may be used to endorse -dnl or promote products derived from this software without specific prior -dnl written permission. -dnl THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED -dnl WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF -dnl MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -dnl -dnl LBL autoconf macros -dnl - -dnl -dnl Determine which compiler we're using (cc or gcc) -dnl If using gcc, determine the version number -dnl If using cc, require that it support ansi prototypes -dnl If using gcc, use -O2 (otherwise use -O) -dnl If using cc, explicitly specify /usr/local/include -dnl -dnl usage: -dnl -dnl	AC_LBL_C_INIT(copt, incls) -dnl -dnl results: -dnl -dnl	$1 (copt set) -dnl	$2 (incls set) -dnl	CC -dnl	ac_cv_gcc_vers -dnl	LBL_CFLAGS -dnl -dnl XXX need to add test to make sure ac_prog_cc hasn't been called -AC_DEFUN(AC_LBL_C_INIT, -    [AC_PREREQ(2.12) -    $1=-O -    $2="" -    if test "${CFLAGS+set}" = set; then -	    LBL_CFLAGS="$CFLAGS" -    fi -    if test -z "$CC" ; then -	    case "$target_os" in - -	    bsdi*) -		    AC_CHECK_PROG(SHLICC2, shlicc2, yes, no) -		    if test $SHLICC2 = yes ; then -			    CC=shlicc2 -			    export CC -		    fi -		    ;; -	    esac -    fi -    AC_PROG_CC -    if test $ac_cv_prog_gcc = yes ; then -	    if test "$SHLICC2" = yes ; then -		    ac_cv_gcc_vers=2 -		    $1=-O2 -	    else -		    AC_MSG_CHECKING(gcc version) -		    AC_CACHE_VAL(ac_cv_gcc_vers, -			ac_cv_gcc_vers=`$CC -v 2>&1 | \ -			    sed -n -e '$s/.* //' -e '$s/\..*//p'`) -		    AC_MSG_RESULT($ac_cv_gcc_vers) -		    if test $ac_cv_gcc_vers -gt 1 ; then -			    $1=-O2 -		    fi -	    fi -    else -	    AC_MSG_CHECKING(that $CC handles ansi prototypes) -	    AC_CACHE_VAL(ac_cv_cc_ansi_prototypes, -		AC_TRY_COMPILE( -		    [#include <sys/types.h>], -		    [int frob(int, char *)], -		    ac_cv_cc_ansi_prototypes=yes, -		    ac_cv_cc_ansi_prototypes=no)) -	    AC_MSG_RESULT($ac_cv_cc_ansi_prototypes) -	    if test $ac_cv_cc_ansi_prototypes = no ; then -		    case "$target_os" in - -		    hpux*) -			    AC_MSG_CHECKING(for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)) -			    savedcflags="$CFLAGS" -			    CFLAGS="-Aa -D_HPUX_SOURCE $CFLAGS" -			    AC_CACHE_VAL(ac_cv_cc_hpux_cc_aa, -				AC_TRY_COMPILE( -				    [#include <sys/types.h>], -				    [int frob(int, char *)], -				    ac_cv_cc_hpux_cc_aa=yes, -				    ac_cv_cc_hpux_cc_aa=no)) -			    AC_MSG_RESULT($ac_cv_cc_hpux_cc_aa) -			    if test $ac_cv_cc_hpux_cc_aa = no ; then -				    AC_MSG_ERROR(see the INSTALL for more info) -			    fi -			    CFLAGS="$savedcflags" -			    V_CCOPT="-Aa $V_CCOPT" -			    AC_DEFINE(_HPUX_SOURCE) -			    ;; - -		    *) -			    AC_MSG_ERROR(see the INSTALL for more info) -			    ;; -		    esac -	    fi -	    $2=-I/usr/local/include - -	    case "$target_os" in - -	    irix*) -		    V_CCOPT="$V_CCOPT -xansi -signed -g3" -		    ;; - -	    osf*) -		    V_CCOPT="$V_CCOPT -g3" -		    ;; - -	    ultrix*) -		    AC_MSG_CHECKING(that Ultrix $CC hacks const in prototypes) -		    AC_CACHE_VAL(ac_cv_cc_const_proto, -			AC_TRY_COMPILE( -			    [#include <sys/types.h>], -			    [struct a { int b; }; -			    void c(const struct a *)], -			    ac_cv_cc_const_proto=yes, -			    ac_cv_cc_const_proto=no)) -		    AC_MSG_RESULT($ac_cv_cc_const_proto) -		    if test $ac_cv_cc_const_proto = no ; then -			    AC_DEFINE(const,) -		    fi -		    ;; -	    esac -    fi -]) - -dnl -dnl Use pfopen.c if available and pfopen() not in standard libraries -dnl Require libpcap -dnl Look for libpcap in .. -dnl Use the installed libpcap if there is no local version -dnl -dnl usage: -dnl -dnl	AC_LBL_LIBPCAP(pcapdep, incls) -dnl -dnl results: -dnl -dnl	$1 (pcapdep set) -dnl	$2 (incls appended) -dnl	LIBS -dnl -AC_DEFUN(AC_LBL_LIBPCAP, -    [pfopen=/usr/examples/packetfilter/pfopen.c -    if test -f $pfopen ; then -	    AC_CHECK_FUNCS(pfopen) -	    if test $ac_cv_func_pfopen = "no" ; then -		    AC_MSG_RESULT(Using $pfopen) -		    LIBS="$LIBS $pfopen" -	    fi -    fi -    AC_MSG_CHECKING(for local pcap library) -    libpcap=FAIL -    lastdir=FAIL -    places=`ls .. | sed -e 's,/$,,' -e 's,^,../,' | \ -	egrep '/libpcap-[[0-9]]*\.[[0-9]]*(\.[[0-9]]*)?([[ab]][[0-9]]*)?$'` -    for dir in $places ../libpcap libpcap ; do -	    basedir=`echo $dir | sed -e 's/[[ab]][[0-9]]*$//'` -	    if test $lastdir = $basedir ; then -		    dnl skip alphas when an actual release is present -		    continue; -	    fi -	    lastdir=$dir -	    if test -r $dir/pcap.c ; then -		    libpcap=$dir/libpcap.a -		    d=$dir -		    dnl continue and select the last one that exists -	    fi -    done -    if test $libpcap = FAIL ; then -	    AC_MSG_RESULT(not found) -	    AC_CHECK_LIB(pcap, main, libpcap="-lpcap") -	    if test $libpcap = FAIL ; then -		    AC_MSG_ERROR(see the INSTALL doc for more info) -	    fi -    else -	    $1=$libpcap -	    $2="-I$d $$2" -	    AC_MSG_RESULT($libpcap) -    fi -    LIBS="$libpcap $LIBS"]) - -dnl -dnl Define RETSIGTYPE and RETSIGVAL -dnl -dnl usage: -dnl -dnl	AC_LBL_TYPE_SIGNAL -dnl -dnl results: -dnl -dnl	RETSIGTYPE (defined) -dnl	RETSIGVAL (defined) -dnl -AC_DEFUN(AC_LBL_TYPE_SIGNAL, -    [AC_TYPE_SIGNAL -    if test "$ac_cv_type_signal" = void ; then -	    AC_DEFINE(RETSIGVAL,) -    else -	    AC_DEFINE(RETSIGVAL,(0)) -    fi -    case "$target_os" in - -    irix*) -	    AC_DEFINE(_BSD_SIGNALS) -	    ;; - -    *) -	    AC_CHECK_FUNCS(sigset) -	    if test $ac_cv_func_sigset = yes ; then -		    AC_DEFINE(signal, sigset) -	    fi -	    ;; -    esac]) - -dnl -dnl If using gcc, see if fixincludes should be run -dnl -dnl usage: -dnl -dnl	AC_LBL_FIXINCLUDES -dnl -AC_DEFUN(AC_LBL_FIXINCLUDES, -    [if test $ac_cv_prog_gcc = yes ; then -	    AC_MSG_CHECKING(if fixincludes is needed) -	    AC_CACHE_VAL(ac_cv_gcc_fixincludes, -		AC_TRY_COMPILE( -		    [/* -		     * This generates a "duplicate case value" when fixincludes -		     * has not be run. -		     */ -#		include <sys/types.h> -#		include <sys/time.h> -#		include <sys/ioctl.h> -#		ifdef HAVE_SYS_IOCCOM_H -#		include <sys/ioccom.h> -#		endif], -		    [switch (0) { -		    case _IO('A', 1):; -		    case _IO('B', 1):; -		    }], -		    ac_cv_gcc_fixincludes=yes, -		    ac_cv_gcc_fixincludes=no)) -	    AC_MSG_RESULT($ac_cv_gcc_fixincludes) -	    if test $ac_cv_gcc_fixincludes = no ; then -		    # Don't cache failure -		    unset ac_cv_gcc_fixincludes -		    AC_MSG_ERROR(see the INSTALL for more info) -	    fi -    fi]) - -dnl -dnl Check for flex, default to lex -dnl Require flex 2.4 or higher -dnl Check for bison, default to yacc -dnl Default to lex/yacc if both flex and bison are not available -dnl Define the yy prefix string if using flex and bison -dnl -dnl usage: -dnl -dnl	AC_LBL_LEX_AND_YACC(lex, yacc, yyprefix) -dnl -dnl results: -dnl -dnl	$1 (lex set) -dnl	$2 (yacc appended) -dnl	$3 (optional flex and bison -P prefix) -dnl -AC_DEFUN(AC_LBL_LEX_AND_YACC, -    [AC_CHECK_PROGS($1, flex, lex) -    if test "$$1" = flex ; then -	    # The -V flag was added in 2.4 -	    AC_MSG_CHECKING(for flex 2.4 or higher) -	    AC_CACHE_VAL(ac_cv_flex_v24, -		if flex -V >/dev/null 2>&1; then -			ac_cv_flex_v24=yes -		else -			ac_cv_flex_v24=no -		fi) -	    AC_MSG_RESULT($ac_cv_flex_v24) -	    if test $ac_cv_flex_v24 = no ; then -		    s="2.4 or higher required" -		    AC_MSG_WARN(ignoring obsolete flex executable ($s)) -		    $1=lex -	    fi -    fi -    AC_CHECK_PROGS($2, bison, yacc) -    if test "$$2" = bison ; then -	    $2="$$2 -y" -    fi -    if test "$$1" != lex -a "$$2" = yacc -o "$$1" = lex -a "$$2" != yacc ; then -	    AC_MSG_WARN(don't have both flex and bison; reverting to lex/yacc) -	    $1=lex -	    $2=yacc -    fi -    if test "$$1" = flex -a -n "$3" ; then -	    $1="$$1 -P$3" -	    $2="$$2 -p $3" -    fi]) - -dnl -dnl Checks to see if union wait is used with WEXITSTATUS() -dnl -dnl usage: -dnl -dnl	AC_LBL_UNION_WAIT -dnl -dnl results: -dnl -dnl	DECLWAITSTATUS (defined) -dnl -AC_DEFUN(AC_LBL_UNION_WAIT, -    [AC_MSG_CHECKING(if union wait is used) -    AC_CACHE_VAL(ac_cv_union_wait, -	AC_TRY_COMPILE([ -#	include <sys/types.h> -#	include <sys/wait.h>], -	    [int status; -	    u_int i = WEXITSTATUS(status); -	    u_int j = waitpid(0, &status, 0);], -	    ac_cv_union_wait=no, -	    ac_cv_union_wait=yes)) -    AC_MSG_RESULT($ac_cv_union_wait) -    if test $ac_cv_union_wait = yes ; then -	    AC_DEFINE(DECLWAITSTATUS,union wait) -    else -	    AC_DEFINE(DECLWAITSTATUS,int) -    fi]) - -dnl -dnl Checks to see if the sockaddr struct has the 4.4 BSD sa_len member -dnl -dnl usage: -dnl -dnl	AC_LBL_SOCKADDR_SA_LEN -dnl -dnl results: -dnl -dnl	HAVE_SOCKADDR_SA_LEN (defined) -dnl -AC_DEFUN(AC_LBL_SOCKADDR_SA_LEN, -    [AC_MSG_CHECKING(if sockaddr struct has sa_len member) -    AC_CACHE_VAL(ac_cv_sockaddr_has_sa_len, -	AC_TRY_COMPILE([ -#	include <sys/types.h> -#	include <sys/socket.h>], -	[u_int i = sizeof(((struct sockaddr *)0)->sa_len)], -	ac_cv_sockaddr_has_sa_len=yes, -	ac_cv_sockaddr_has_sa_len=no)) -    AC_MSG_RESULT($ac_cv_sockaddr_has_sa_len) -    if test $ac_cv_sockaddr_has_sa_len = yes ; then -	    AC_DEFINE(HAVE_SOCKADDR_SA_LEN) -    fi]) - -dnl -dnl Checks to see if -R is used -dnl -dnl usage: -dnl -dnl	AC_LBL_HAVE_RUN_PATH -dnl -dnl results: -dnl -dnl	ac_cv_have_run_path (yes or no) -dnl -AC_DEFUN(AC_LBL_HAVE_RUN_PATH, -    [AC_MSG_CHECKING(for ${CC-cc} -R) -    AC_CACHE_VAL(ac_cv_have_run_path, -	[echo 'main(){}' > conftest.c -	${CC-cc} -o conftest conftest.c -R/a1/b2/c3 >conftest.out 2>&1 -	if test ! -s conftest.out ; then -		ac_cv_have_run_path=yes -	else -		ac_cv_have_run_path=no -	fi -	rm -f conftest*]) -    AC_MSG_RESULT($ac_cv_have_run_path) -    ]) - -dnl -dnl Checks to see if unaligned memory accesses fail -dnl -dnl usage: -dnl -dnl	AC_LBL_UNALIGNED_ACCESS -dnl -dnl results: -dnl -dnl	LBL_ALIGN (DEFINED) -dnl -AC_DEFUN(AC_LBL_UNALIGNED_ACCESS, -    [AC_MSG_CHECKING(if unaligned accesses fail) -    AC_CACHE_VAL(ac_cv_unaligned_fail, -	[case "$target_cpu" in - -	alpha|hp*|mips|sparc) -		ac_cv_unaligned_fail=yes -		;; - -	*) -		cat >conftest.c <<EOF -#		include <sys/types.h> -#		include <sys/wait.h> -#		include <stdio.h> -		unsigned char a[[5]] = { 1, 2, 3, 4, 5 }; -		main() { -		unsigned int i; -		pid_t pid; -		int status; -		/* avoid "core dumped" message */ -		pid = fork(); -		if (pid <  0) -			exit(2); -		if (pid > 0) { -			/* parent */ -			pid = waitpid(pid, &status, 0); -			if (pid < 0) -				exit(3); -			exit(!WIFEXITED(status)); -		} -		/* child */ -		i = *(unsigned int *)&a[[1]]; -		printf("%d\n", i); -		exit(0); -		} -EOF -		${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS \ -		    conftest.c $LIBS >/dev/null 2>&1 -		if test ! -x conftest ; then -			dnl failed to compile for some reason -			ac_cv_unaligned_fail=yes -		else -			./conftest >conftest.out -			if test ! -s conftest.out ; then -				ac_cv_unaligned_fail=yes -			else -				ac_cv_unaligned_fail=no -			fi -		fi -		rm -f conftest* core core.conftest -		;; -	esac]) -    AC_MSG_RESULT($ac_cv_unaligned_fail) -    if test $ac_cv_unaligned_fail = yes ; then -	    AC_DEFINE(LBL_ALIGN) -    fi]) - -dnl -dnl If using gcc and the file .devel exists: -dnl	Compile with -g (if supported) and -Wall -dnl	If using gcc 2, do extra prototype checking -dnl	If an os prototype include exists, symlink os-proto.h to it -dnl -dnl usage: -dnl -dnl	AC_LBL_DEVEL(copt) -dnl -dnl results: -dnl -dnl	$1 (copt appended) -dnl	HAVE_OS_PROTO_H (defined) -dnl	os-proto.h (symlinked) -dnl -AC_DEFUN(AC_LBL_DEVEL, -    [rm -f os-proto.h -    if test "${LBL_CFLAGS+set}" = set; then -	    $1="$$1 ${LBL_CFLAGS}" -    fi -    if test $ac_cv_prog_gcc = yes -a -f .devel ; then -	    if test "${LBL_CFLAGS+set}" != set; then -		    if test "$ac_cv_prog_cc_g" = yes ; then -			    $1="-g $$1" -		    fi -		    $1="$$1 -Wall" -		    if test $ac_cv_gcc_vers -gt 1 ; then -			    $1="$$1 -Wmissing-prototypes -Wstrict-prototypes" -		    fi -	    fi -	    os=`echo $target_os | sed -e 's/\([[0-9]][[0-9]]*\)[[^0-9]].*$/\1/'` -	    name="lbl/os-$os.h" -	    if test -f $name ; then -		    ln -s $name os-proto.h -		    AC_DEFINE(HAVE_OS_PROTO_H) -	    else -		    AC_MSG_WARN(can't find $name) -	    fi -    fi]) diff --git a/contrib/tcpdump/dhcp6.h b/contrib/tcpdump/dhcp6.h deleted file mode 100644 index 8381b11f9195..000000000000 --- a/contrib/tcpdump/dhcp6.h +++ /dev/null @@ -1,200 +0,0 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/Attic/dhcp6.h,v 1.4 2000/12/17 23:07:48 guy Exp $ (LBL) */ -/* - * Copyright (C) 1998 and 1999 WIDE Project. - * 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. Neither the name of the project 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 BY THE PROJECT 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 PROJECT 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. - */ -/* - * draft-ietf-dhc-dhcpv6-15 - */ - -#ifndef __DHCP6_H_DEFINED -#define __DHCP6_H_DEFINED - -/* Error Values */ -#define DH6ERR_FAILURE		16 -#define DH6ERR_AUTHFAIL		17 -#define DH6ERR_POORLYFORMED	18 -#define DH6ERR_UNAVAIL		19 -#define DH6ERR_NOBINDING	20 -#define DH6ERR_INVALIDSOURCE	21 -#define DH6ERR_NOSERVER		23 -#define DH6ERR_ICMPERROR	64 - -/* Message type */ -#define DH6_SOLICIT	1 -#define DH6_ADVERT	2 -#define DH6_REQUEST	3 -#define DH6_REPLY	4 -#define DH6_RELEASE	5 -#define DH6_RECONFIG	6 - -/* Predefined addresses */ -#define DH6ADDR_ALLAGENT	"ff02::1:2" -#define DH6ADDR_ALLSERVER	"ff05::1:3" -#define DH6ADDR_ALLRELAY	"ff05::1:4" -#define DH6PORT_DOWNSTREAM	"546" -#define DH6PORT_UPSTREAM	"547" - -/* Protocol constants */ -#define ADV_CLIENT_WAIT		2	/* sec */ -#define DEFAULT_SOLICIT_HOPCOUNT	4 -#define SERVER_MIN_ADV_DELAY	100	/* msec */ -#define SERVER_MAX_ADV_DELAY	1000	/* msec */ -#define REPLY_MSG_TIMEOUT	2	/* sec */ -#define REQUEST_MSG_MIN_RETRANS	10	/* retransmissions */ -#define RECONF_MSG_MIN_RETRANS	10	/* retransmissions */ -#define RECONF_MSG_RETRANS_INTERVAL	12	/* sec */ -#define RECONF_MMSG_MIN_RESP	2	/* sec */ -#define RECONF_MMSG_MAX_RESP	10	/* sec */ -#define RECONF_MULTICAST_REQUEST_WAIT	120	/* sec */ -#define MIN_SOLICIT_DELAY	1	/* sec */ -#define MAX_SOLICIT_DELAY	5	/* sec */ -#define XID_TIMEOUT		600	/* sec */ - -/* DHCP6 base packet format */ -struct dhcp6_solicit { -	u_int8_t dh6sol_msgtype;		/* DH6_SOLICIT */ -	u_int8_t dh6sol_flags; -#define DH6SOL_CLOSE	0x80 -#define DH6SOL_PREFIX	0x40 -	/* XXX: solicit-ID is a 9-bit field...ugly! */ -#define DH6SOL_SOLICIT_ID_MASK 0x01ff -#define DH6SOL_SOLICIT_ID_SHIFT 0 -#define DH6SOL_SOLICIT_ID(x) \ -    (((x) & DH6SOL_SOLICIT_ID_MASK) >> DH6SOL_SOLICIT_ID_SHIFT) -#define DH6SOL_SOLICIT_PLEN_MASK 0xfe00 -#define DH6SOL_SOLICIT_PLEN_SHIFT 9 -#define DH6SOL_SOLICIT_PLEN(x) \ -    (((x) & DH6SOL_SOLICIT_PLEN_MASK) >> DH6SOL_SOLICIT_PLEN_SHIFT) -	u_int16_t dh6sol_plen_id; /* prefix-len and solict-ID */ -	struct in6_addr dh6sol_cliaddr;	/* client's lladdr */ -	struct in6_addr dh6sol_relayaddr; /* relay agent's lladdr */ -}; - -struct dhcp6_advert { -	u_int8_t dh6adv_msgtype;		/* DH6_ADVERT */ -	u_int8_t dh6adv_rsv_id;	/* reserved and uppermost bit of ID */ -	u_int8_t dh6adv_solcit_id; /* lower 8 bits of solicit-ID */ -	u_int8_t dh6adv_pref; -	struct in6_addr dh6adv_cliaddr;	/* client's link-local addr */ -	struct in6_addr dh6adv_relayaddr; /* relay agent's (non-ll) addr */ -	struct in6_addr dh6adv_serveraddr; /* server's addr */ -	/* extensions */ -}; - -struct dhcp6_request { -	u_int8_t dh6req_msgtype;		/* DH6_REQUEST */ -	u_int8_t dh6req_flags; -#define DH6REQ_CLOSE		0x80 -#define DH6REQ_REBOOT		0x40 -	u_int16_t dh6req_xid;		/* transaction-ID */ -	struct in6_addr dh6req_cliaddr;	/* client's lladdr */ -	struct in6_addr dh6req_relayaddr; /* relay agent's (non-ll) addr */ -	struct in6_addr dh6req_serveraddr; /* server's addr */ -	/* extensions */ -}; - -struct dhcp6_reply { -	u_int8_t dh6rep_msgtype;		/* DH6_REPLY */ -	u_int8_t dh6rep_flagandstat; -#define DH6REP_RELAYPRESENT	0x80 -#define DH6REP_STATMASK		0x7f -	u_int16_t dh6rep_xid;		/* transaction-ID */ -	struct in6_addr dh6rep_cliaddr;	/* client's lladdr */ -	/* struct in6_addr dh6rep_relayaddr; optional: relay address */ -	/* extensions */ -}; - -/* XXX: followings are based on older drafts */ -struct dhcp6_release { -	u_int8_t dh6rel_msgtype;		/* DH6_RELEASE */ -	u_int8_t dh6rel_flags; -#define DH6REL_DIRECT	0x80 -	u_int16_t dh6rel_xid;		/* transaction-ID */ -	struct in6_addr dh6rel_cliaddr;	/* client's lladdr */ -	struct in6_addr dh6rel_relayaddr; /* relay agent's (non-ll) addr */ -	struct in6_addr dh6rel_reladdr; /* server's addr to be released */ -	/* extensions */ -}; - -struct dhcp6_reconfig { -	u_int8_t dh6cfg_msgtype;		/* DH6_RECONFIG */ -	u_int8_t dh6cfg_flags; -#define DH6REP_NOREPLY	0x80 -	u_int16_t dh6cfg_xid;		/* transaction-ID */ -	struct in6_addr dh6cfg_servaddr; /* server's addr */ -	/* extensions */ -}; - -union dhcp6 { -	u_int8_t dh6_msgtype; -	struct dhcp6_solicit dh6_sol; -	struct dhcp6_advert dh6_adv; -	struct dhcp6_request dh6_req; -	struct dhcp6_reply dh6_rep; -	struct dhcp6_release dh6_rel; -	struct dhcp6_reconfig dh6_cfg; -}; - -/* DHCP6 extension */ -struct dhcp6e_ipaddr { -	u_int16_t dh6eip_type; -	u_int16_t dh6eip_len; -	u_int8_t dh6eip_status; -#define DH6EX_IP_SUCCESS	0	/* request granted, no errors */ -#define DH6EX_IP_SECFAIL	18	/* Security parameters failed */ -#define DH6EX_IP_AAAAFAIL	20	/* AAAA Record Parameter Problem */ -#define DH6EX_IP_PTRFAIL	21	/* PTR Record Parameter Problem */ -#define DH6EX_IP_PARAMFAIL	22	/* Unable to honor required params */ -#define DH6EX_IP_DNSNAMEFAIL	23	/* DNS name string error */ -#define DH6EX_IP_NODYNDNS	24	/* dynDNS Not Implemented */ -#define DH6EX_IP_NOAUTHDNS	25	/* Authoritative DNS Server not found */ -#define DH6EX_IP_DNSFORMFAIL	33	/* DNS format error */ -#define DH6EX_IP_SERVFAIL	34	/* dynDNS unavailable at this time */ -#define DH6EX_IP_NXDOMAIN	35	/* name does not exist */ -#define DH6EX_IP_NOTIMP		36	/* DNS does not support the Opcode */ -#define DH6EX_IP_REFUSED	37	/* DNS refuses specified operation */ -#define DH6EX_IP_YXDOMAIN	38	/* name does not exist */ -#define DH6EX_IP_YXRRSET	39	/* RRset does not exist */ -#define DH6EX_IP_NXRRSET	40	/* RRset does not exist */ -#define DH6EX_IP_NOTAUTH	41	/* non authoritative name server */ -#define DH6EX_IP_NOTZONE	42	/* prerequisite out of zone */ -	u_int8_t dh6eip_flags; -#define DH6EX_IP_CLIANTADDR	0x80	/* C: cliant's addr */ -#define DH6EX_IP_LIFETIME	0x40	/* L: preferred/valid lifetime */ -#define DH6EX_IP_FORCEOPTS	0x20	/* Q: options are mandatory */ -#define DH6EX_IP_AAAA		0x10	/* A: DNS dynamic update for AAAA */ -#define DH6EX_IP_PTR		0x08	/* P: DNS dynamic update for PTR*/ -	u_int8_t dh6eip_pad; -	u_int8_t dh6eip_prefixlen; -	/* struct in6_addr: client's address (if C bit = 1) */ -	/* u_int: preferred lifetime (if L bit = 1) */ -	/* u_int: valid lifetime (if L bit = 1) */ -	/* string: DNS name */ -}; - -#endif /*__DHCP6_H_DEFINED*/ diff --git a/contrib/tcpdump/dhcp6opt.h b/contrib/tcpdump/dhcp6opt.h deleted file mode 100644 index fc6534dd1bb9..000000000000 --- a/contrib/tcpdump/dhcp6opt.h +++ /dev/null @@ -1,81 +0,0 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/Attic/dhcp6opt.h,v 1.4 2001/09/17 21:57:51 fenner Exp $ (LBL) */ -/* - * Copyright (C) 1998 and 1999 WIDE Project. - * 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. Neither the name of the project 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 BY THE PROJECT 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 PROJECT 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. - */ - -/* - * draft-ietf-dhc-v6exts-11 - */ - -#ifndef __DHCP6OPT_H_DEFINED -#define __DHCP6OPT_H_DEFINED - -#define OL6_N	-1 -#define OL6_16N	-2 -#define OL6_Z	-3 - -#define OT6_NONE	0 -#define OT6_V6		1 -#define OT6_STR		2 -#define OT6_NUM		3 - -struct dhcp6_opt { -	u_int code; -	int len; -	const char *name; -	int type; -}; - -/* index to parameters */ -#define DH6T_CLIENT_ADV_WAIT		1	/* milliseconds */ -#define DH6T_DEFAULT_SOLICIT_HOPCOUNT	2	/* times */ -#define DH6T_SERVER_MIN_ADV_DELAY	3	/* milliseconds */ -#define DH6T_SERVER_MAX_ADV_DELAY	4	/* milliseconds */ -#define DH6T_REQUEST_MSG_MIN_RETRANS	5	/* retransmissions */ -#define DH6T_REPLY_MSG_TIMEOUT		6	/* milliseconds */ -#define DH6T_REPLY_MSG_RETRANS_INTERVAL	7	/* milliseconds */ -#define DH6T_RECONF_MSG_TIMEOUT		8	/* milliseconds */ -#define DH6T_RECONF_MSG_MIN_RETRANS	9	/* retransmissions */ -#define DH6T_RECONF_MSG_RETRANS_INTERVAL 10	/* milliseconds */ -#define DH6T_RECONF_MMSG_MIN_RESP	11	/* milliseconds */ -#define DH6T_RECONF_MMSG_MAX_RESP	12	/* milliseconds */ -#define DH6T_MIN_SOLICIT_DELAY		13	/* milliseconds */ -#define DH6T_MAX_SOLICIT_DELAY		14	/* milliseconds */ -#define DH6T_XID_TIMEOUT		15	/* milliseconds */ -#define DH6T_RECONF_MULTICAST_REQUEST_WAIT 16	/* milliseconds */ - -#if 0 -extern struct dhcp6_opt *dh6o_pad; -extern struct dhcp6_opt *dh6o_end; -extern int dhcp6_param[]; -extern void dhcp6opttab_init (void); -extern struct dhcp6_opt *dhcp6opttab_byname (char *); -extern struct dhcp6_opt *dhcp6opttab_bycode (u_int); -#endif - -#endif /*__DHCP6OPT_H_DEFINED*/ diff --git a/contrib/tcpdump/lbl/gnuc.h b/contrib/tcpdump/lbl/gnuc.h deleted file mode 100644 index 1615d437675f..000000000000 --- a/contrib/tcpdump/lbl/gnuc.h +++ /dev/null @@ -1,43 +0,0 @@ -/* @(#) $Header: /tcpdump/master/tcpdump/lbl/gnuc.h,v 1.3.1.1 1999/10/07 23:47:13 mcr Exp $ (LBL) */ - -/* Define __P() macro, if necessary */ -#ifndef __P -#if __STDC__ -#define __P(protos) protos -#else -#define __P(protos) () -#endif -#endif - -/* inline foo */ -#ifdef __GNUC__ -#define inline __inline -#else -#define inline -#endif - -/* - * Handle new and old "dead" routine prototypes - * - * For example: - * - *	__dead void foo(void) __attribute__((volatile)); - * - */ -#ifdef __GNUC__ -#ifndef __dead -#define __dead volatile -#endif -#if __GNUC__ < 2  || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) -#ifndef __attribute__ -#define __attribute__(args) -#endif -#endif -#else -#ifndef __dead -#define __dead -#endif -#ifndef __attribute__ -#define __attribute__(args) -#endif -#endif diff --git a/contrib/tcpdump/missing/cdecl_ext.h b/contrib/tcpdump/missing/cdecl_ext.h deleted file mode 100644 index 9591db264574..000000000000 --- a/contrib/tcpdump/missing/cdecl_ext.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 1999 WIDE Project. - * 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. Neither the name of the project 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 BY THE PROJECT 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 PROJECT 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 HAVE_PORTABLE_PROTOTYPE - -#if defined(__STDC__) || defined(__cplusplus) -#define	__P(protos)	protos		/* full-blown ANSI C */ -#else -#define	__P(protos)	()		/* traditional C preprocessor */ -#endif - -#endif /* !HAVE_PORTABLE_PROTOTYPE */ diff --git a/contrib/tcpdump/nfsv2.h b/contrib/tcpdump/nfsv2.h deleted file mode 100644 index b2c0ff9929e4..000000000000 --- a/contrib/tcpdump/nfsv2.h +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Copyright (c) 1994, 1995, 1996 - *	The Regents of the University of California.  All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Rick Macklem at The University of Guelph. - * - * 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 University of - *	California, Berkeley and its contributors. - * 4. 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 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. - * - *	@(#)nfsv2.h	7.11 (Berkeley) 9/30/92 - */ - -/* - * nfs definitions as per the version 2 specs - */ - -/* - * Constants as defined in the Sun NFS Version 2 spec. - * "NFS: Network File System Protocol Specification" RFC1094 - */ - -#define NFS_PORT	2049 -#define	NFS_PROG	100003 -#define NFS_VER2	2 -#define	NFS_MAXDGRAMDATA 8192 -#define	NFS_MAXDATA	32768 -#define	NFS_MAXPATHLEN	1024 -#define	NFS_MAXNAMLEN	255 -#define	NFS_FHSIZE	32 -#define	NFS_MAXPKTHDR	404 -#define NFS_MAXPACKET	(NFS_MAXPKTHDR+NFS_MAXDATA) -#define	NFS_MINPACKET	20 -#define	NFS_FABLKSIZE	512	/* Size in bytes of a block wrt fa_blocks */ - -/* Stat numbers for rpc returns */ -#define	NFS_OK		0 -#define	NFSERR_PERM	1 -#define	NFSERR_NOENT	2 -#define	NFSERR_IO	5 -#define	NFSERR_NXIO	6 -#define	NFSERR_ACCES	13 -#define	NFSERR_EXIST	17 -#define	NFSERR_NODEV	19 -#define	NFSERR_NOTDIR	20 -#define	NFSERR_ISDIR	21 -#define	NFSERR_FBIG	27 -#define	NFSERR_NOSPC	28 -#define	NFSERR_ROFS	30 -#define	NFSERR_NAMETOL	63 -#define	NFSERR_NOTEMPTY	66 -#define	NFSERR_DQUOT	69 -#define	NFSERR_STALE	70 -#define	NFSERR_WFLUSH	99 - -/* Sizes in bytes of various nfs rpc components */ -#define	NFSX_FH		32 -#define	NFSX_UNSIGNED	4 -#define	NFSX_NFSFATTR	68 -#define	NFSX_NQFATTR	92 -#define	NFSX_NFSSATTR	32 -#define	NFSX_NQSATTR	44 -#define	NFSX_COOKIE	4 -#define NFSX_NFSSTATFS	20 -#define	NFSX_NQSTATFS	28 -#define	NFSX_FATTR(isnq)	((isnq) ? NFSX_NQFATTR : NFSX_NFSFATTR) -#define	NFSX_SATTR(isnq)	((isnq) ? NFSX_NQSATTR : NFSX_NFSSATTR) -#define	NFSX_STATFS(isnq)	((isnq) ? NFSX_NQSTATFS : NFSX_NFSSTATFS) - -/* nfs rpc procedure numbers */ -#define	NFSPROC_NULL		0 -#define	NFSPROC_GETATTR		1 -#define	NFSPROC_SETATTR		2 -#define	NFSPROC_NOOP		3 -#define	NFSPROC_ROOT		NFSPROC_NOOP	/* Obsolete */ -#define	NFSPROC_LOOKUP		4 -#define	NFSPROC_READLINK	5 -#define	NFSPROC_READ		6 -#define	NFSPROC_WRITECACHE	NFSPROC_NOOP	/* Obsolete */ -#define	NFSPROC_WRITE		8 -#define	NFSPROC_CREATE		9 -#define	NFSPROC_REMOVE		10 -#define	NFSPROC_RENAME		11 -#define	NFSPROC_LINK		12 -#define	NFSPROC_SYMLINK		13 -#define	NFSPROC_MKDIR		14 -#define	NFSPROC_RMDIR		15 -#define	NFSPROC_READDIR		16 -#define	NFSPROC_STATFS		17 - -/* NQ nfs numbers */ -#define	NQNFSPROC_READDIRLOOK	18 -#define	NQNFSPROC_GETLEASE	19 -#define	NQNFSPROC_VACATED	20 -#define	NQNFSPROC_EVICTED	21 -#define	NQNFSPROC_ACCESS	22 - -#define	NFS_NPROCS		23 -/* Conversion macros */ -extern int		vttoif_tab[]; -#define	vtonfs_mode(t,m) \ -		txdr_unsigned(((t) == VFIFO) ? MAKEIMODE(VCHR, (m)) : \ -				MAKEIMODE((t), (m))) -#define	nfstov_mode(a)	(fxdr_unsigned(u_short, (a))&07777) -#define	vtonfs_type(a)	txdr_unsigned(nfs_type[((int32_t)(a))]) -#define	nfstov_type(a)	ntov_type[fxdr_unsigned(u_int32_t,(a))&0x7] - -/* File types */ -typedef enum { -    NFNON=0, NFREG=1, NFDIR=2, NFBLK=3, NFCHR=4, NFLNK=5 -} tcpdump_nfstype; - -/* Structs for common parts of the rpc's */ -struct nfsv2_time { -	u_int32_t nfs_sec; -	u_int32_t nfs_usec; -}; - -struct nqnfs_time { -	u_int32_t nq_sec; -	u_int32_t nq_nsec; -}; - -/* - * File attributes and setable attributes. These structures cover both - * NFS version 2 and the NQNFS protocol. Note that the union is only - * used to that one pointer can refer to both variants. These structures - * go out on the wire and must be densely packed, so no quad data types - * are used. (all fields are int32_t or u_int32_t's or structures of same) - * NB: You can't do sizeof(struct nfsv2_fattr), you must use the - *     NFSX_FATTR(isnq) macro. - */ -struct nfsv2_fattr { -	u_int32_t fa_type; -	u_int32_t fa_mode; -	u_int32_t fa_nlink; -	u_int32_t fa_uid; -	u_int32_t fa_gid; -	union { -		struct { -			u_int32_t nfsfa_size; -			u_int32_t nfsfa_blocksize; -			u_int32_t nfsfa_rdev; -			u_int32_t nfsfa_blocks; -			u_int32_t nfsfa_fsid; -			u_int32_t nfsfa_fileid; -			struct nfsv2_time nfsfa_atime; -			struct nfsv2_time nfsfa_mtime; -			struct nfsv2_time nfsfa_ctime; -		} fa_nfsv2; -		struct { -			struct { -				u_int32_t nqfa_qsize[2]; -			} nqfa_size; -			u_int32_t nqfa_blocksize; -			u_int32_t nqfa_rdev; -			struct { -				u_int32_t	nqfa_qbytes[2]; -			} nqfa_bytes; -			u_int32_t nqfa_fsid; -			u_int32_t nqfa_fileid; -			struct nqnfs_time nqfa_atime; -			struct nqnfs_time nqfa_mtime; -			struct nqnfs_time nqfa_ctime; -			u_int32_t nqfa_flags; -			u_int32_t nqfa_gen; -			struct { -				u_int32_t nqfa_qfilerev[2]; -			} nqfa_filerev; -		} fa_nqnfs; -	} fa_un; -}; - -/* and some ugly defines for accessing union components */ -#define	fa_nfssize		fa_un.fa_nfsv2.nfsfa_size -#define	fa_nfsblocksize		fa_un.fa_nfsv2.nfsfa_blocksize -#define	fa_nfsrdev		fa_un.fa_nfsv2.nfsfa_rdev -#define	fa_nfsblocks		fa_un.fa_nfsv2.nfsfa_blocks -#define	fa_nfsfsid		fa_un.fa_nfsv2.nfsfa_fsid -#define	fa_nfsfileid		fa_un.fa_nfsv2.nfsfa_fileid -#define	fa_nfsatime		fa_un.fa_nfsv2.nfsfa_atime -#define	fa_nfsmtime		fa_un.fa_nfsv2.nfsfa_mtime -#define	fa_nfsctime		fa_un.fa_nfsv2.nfsfa_ctime -#define	fa_nqsize		fa_un.fa_nqnfs.nqfa_size -#define	fa_nqblocksize		fa_un.fa_nqnfs.nqfa_blocksize -#define	fa_nqrdev		fa_un.fa_nqnfs.nqfa_rdev -#define	fa_nqbytes		fa_un.fa_nqnfs.nqfa_bytes -#define	fa_nqfsid		fa_un.fa_nqnfs.nqfa_fsid -#define	fa_nqfileid		fa_un.fa_nqnfs.nqfa_fileid -#define	fa_nqatime		fa_un.fa_nqnfs.nqfa_atime -#define	fa_nqmtime		fa_un.fa_nqnfs.nqfa_mtime -#define	fa_nqctime		fa_un.fa_nqnfs.nqfa_ctime -#define	fa_nqflags		fa_un.fa_nqnfs.nqfa_flags -#define	fa_nqgen		fa_un.fa_nqnfs.nqfa_gen -#define	fa_nqfilerev		fa_un.fa_nqnfs.nqfa_filerev - -struct nfsv2_sattr { -	u_int32_t sa_mode; -	u_int32_t sa_uid; -	u_int32_t sa_gid; -	union { -		struct { -			u_int32_t nfssa_size; -			struct nfsv2_time nfssa_atime; -			struct nfsv2_time nfssa_mtime; -		} sa_nfsv2; -		struct { -			struct { -				u_int32_t nqsa_qsize[2]; -			} nqsa_size; -			struct nqnfs_time nqsa_atime; -			struct nqnfs_time nqsa_mtime; -			u_int32_t nqsa_flags; -			u_int32_t nqsa_rdev; -		} sa_nqnfs; -	} sa_un; -}; - -/* and some ugly defines for accessing the unions */ -#define	sa_nfssize		sa_un.sa_nfsv2.nfssa_size -#define	sa_nfsatime		sa_un.sa_nfsv2.nfssa_atime -#define	sa_nfsmtime		sa_un.sa_nfsv2.nfssa_mtime -#define	sa_nqsize		sa_un.sa_nqnfs.nqsa_size -#define	sa_nqatime		sa_un.sa_nqnfs.nqsa_atime -#define	sa_nqmtime		sa_un.sa_nqnfs.nqsa_mtime -#define	sa_nqflags		sa_un.sa_nqnfs.nqsa_flags -#define	sa_nqrdev		sa_un.sa_nqnfs.nqsa_rdev - -struct nfsv2_statfs { -	u_int32_t sf_tsize; -	u_int32_t sf_bsize; -	u_int32_t sf_blocks; -	u_int32_t sf_bfree; -	u_int32_t sf_bavail; -	u_int32_t sf_files;	/* Nqnfs only */ -	u_int32_t sf_ffree;	/* ditto      */ -}; diff --git a/contrib/tcpdump/print-bxxp.c b/contrib/tcpdump/print-bxxp.c deleted file mode 100644 index 56be54fc17f9..000000000000 --- a/contrib/tcpdump/print-bxxp.c +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (C) 2000, Richard Sharpe - * - * This software may be distributed either under the terms of the  - * BSD-style licence that accompanies tcpdump or under the GNU GPL  - * version 2 or later. - * - * print-bxxp.c - * - */ - -#ifndef lint -static const char rcsid[] = -  "@(#) $Header: /tcpdump/master/tcpdump/print-bxxp.c,v 1.3 2000/10/05 04:10:01 itojun Exp $"; -#endif - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <sys/param.h> -#include <sys/time.h> - -#ifdef HAVE_MEMORY_H -#include <memory.h> -#endif -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> - -#include "interface.h" -#include "extract.h" - -/* Check for a string but not go beyond length - * Return TRUE on match, FALSE otherwise - *  - * Looks at the first few chars up to tl1 ... - */ - -int l_strnstart(const u_char *, u_int, const u_char *, u_int); - -int -l_strnstart(register const u_char *tstr1, register u_int tl1, -	  register const u_char *str2, register u_int l2) -{ - -  if (tl1 > l2) -    return 0; -   -  return (strncmp(tstr1, str2, tl1) == 0 ? 1 : 0); - -} - -void -bxxp_print(register const u_char *bp, register u_int length) -{ - -  if (l_strnstart("REQ ", 4, bp, length)) { /* A REQuest */ - -    printf(" BXXP REQ"); - -  }  -  else if (l_strnstart("RSP ", 4, bp, length)) { - -    printf(" BXXP RSP"); - -  } -  else if (l_strnstart("SEQ ", 4, bp, length)) { - -    printf(" BXXP SEQ"); - -  } -  else if (l_strnstart("END", 4, bp, length)) { - -    printf(" BXXP END"); - -  } -  else  -    printf(" BXXP (payload or undecoded)"); - -} diff --git a/contrib/tcpdump/print-lcp.c b/contrib/tcpdump/print-lcp.c deleted file mode 100644 index ddea9c6053c7..000000000000 --- a/contrib/tcpdump/print-lcp.c +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Copyright (c) 1988, 1989, 1990, 1991, 1992, 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[] = -"@(#) $Header: /tcpdump/master/tcpdump/print-lcp.c,v 1.9 2000/10/06 04:23:12 guy Exp $ (LBL)"; -#endif - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <sys/param.h> -#include <sys/time.h> -#include <sys/socket.h> - -#include <netinet/in.h> - -#include <stdio.h> -#include <string.h> - -#include "interface.h" -#include "addrtoname.h" -#include "extract.h"			/* must come after interface.h */ -#include "ppp.h" - -/* Codes */ -enum {  -  LCP_CONFREQ = 1, -  LCP_CONFACK = 2, -  LCP_CONFNAK = 3, -  LCP_CONFREJ = 4, -  LCP_TERMREQ = 5, -  LCP_TERMACK = 6, -  LCP_CODEREJ = 7, -  LCP_PROTREJ = 8, -  LCP_ECHOREQ = 9, -  LCP_ECHOREP = 10, -  LCP_DISCARD = 11 -}; - -static struct tok lcpcode2str[] = { -  { LCP_CONFREQ, "ConfReq" }, -  { LCP_CONFACK, "ConfAck" }, -  { LCP_CONFNAK, "ConfNak" }, -  { LCP_CONFREJ, "ConfRej" }, -  { LCP_TERMREQ, "TermReq" }, -  { LCP_TERMACK, "TermAck" }, -  { LCP_CODEREJ, "CodeRej" }, -  { LCP_PROTREJ, "ProtRej" }, -  { LCP_ECHOREQ, "EchoReq" }, -  { LCP_ECHOREP, "EchoRep" }, -  { LCP_DISCARD, "Discard" }, -  { 0, NULL } -}; - - -enum { -  LCP_RESERVED  = 0, -  LCP_MRU 	= 1, -  LCP_ASYNCMAP  = 2, -  LCP_AUTHPROTO = 3, -  LCP_QUALPROTO = 4, -  LCP_MAGICNUM  = 5, -  LCP_PCOMP 	= 7, -  LCP_ACFCOMP 	= 8, -  LCP_CALLBACK  = 13 -}; - -static struct tok lcpoption2str[] = { -  { LCP_RESERVED, "reserved"}, -  { LCP_MRU, "mru"}, -  { LCP_ASYNCMAP, "asyncmap"}, -  { LCP_AUTHPROTO, "auth"}, -  { LCP_QUALPROTO, "qual"}, -  { LCP_MAGICNUM, "magic"}, -  { LCP_PCOMP, "pcomp"}, -  { LCP_ACFCOMP, "acfcomp"}, -  { LCP_CALLBACK, "callback"}, -  { 0, NULL } -}; - -static struct tok lcpauth2str[] = { -  {0xc023, "PAP"}, -  {0xc223, "CHAP"}, -  { 0, NULL } -}; - -static struct tok lcpqual2str[] = { -  {0xc025, "LQR"}, -  { 0, NULL } -}; - -static struct tok lcpchap2str[] = { -  {0x05, "MD5"}, -  {0x80, "MS"}, -  { 0, NULL } -}; - -void -lcp_print(register const u_char *bp, u_int length) -{ -  u_short lcp_code, lcp_id, lcp_length; -  const u_char *lcp_data; - -  lcp_data = bp+4; -	 -  if (snapend < lcp_data) { -    printf(" [LCP|]"); -    return; -  } -   -  lcp_code  = bp[0]; -  lcp_id    = bp[1]; -  lcp_length = EXTRACT_16BITS(bp+2); - -  printf("LCP %s id=0x%x", tok2str(lcpcode2str, "LCP-#%d", lcp_code), lcp_id); -   -  switch (lcp_code) { -  case LCP_CONFREQ: -  case LCP_CONFACK: -  case LCP_CONFNAK: -  case LCP_CONFREJ: -    /* Print Options */ -    { -      u_char lcpopt_type, lcpopt_length; -      const u_char *p=lcp_data; -      while (p+2 < lcp_data+lcp_length && p+2 < snapend) { -	lcpopt_type = p[0]; -	lcpopt_length = p[1]; -	p+=2; -	printf(" <%s ",tok2str(lcpoption2str, "option-#%d", lcpopt_type)); -	if (lcpopt_length) -	  switch (lcpopt_type) { -	  case LCP_MRU: -	    if (snapend < p+2) return; -	    printf("%d",ntohs(*(u_short*)p)); -	    if (lcpopt_length != 4) printf(" len=%d!",lcpopt_length); -	    break; -	  case LCP_AUTHPROTO: -	    if (snapend < p+2) return; -	    printf("%s",tok2str(lcpauth2str, "AUTH-%#x", ntohs(*(u_short*)p))); -	    if (lcpopt_length < 4) printf(" len=%d!",lcpopt_length); -	    if (lcpopt_length >= 5 && p < snapend)  -	      printf(" %s",tok2str(lcpchap2str, "%#x", p[0])); -	    break; -	  case LCP_QUALPROTO: -	    if (snapend < p+2) return; -	    printf("%s",tok2str(lcpqual2str, "QUAL-%#x", ntohs(*(u_short*)p))); -	    if (lcpopt_length < 4) printf(" len=%d!",lcpopt_length); -	    /* Print data field of auth? */ -	    break; -	  case LCP_ASYNCMAP: -	  case LCP_MAGICNUM: -	    if (snapend < p+4) return; -	    printf("%#x", (unsigned)ntohl(*(u_long*)p)); -	    if (lcpopt_length != 6) printf(" len=%d!",lcpopt_length); -	    break; -	  case LCP_PCOMP: -	  case LCP_ACFCOMP: -	  case LCP_RESERVED: -	    if (lcpopt_length != 2) printf(" len=%d!",lcpopt_length); -	    break; -	  default: -	    if (lcpopt_length != 2) printf(" len=%d",lcpopt_length); -	    break; -	  } -	printf(">"); -	p+=lcpopt_length-2; -      } -    } -    break; -  case LCP_ECHOREQ: -  case LCP_ECHOREP: -  case LCP_DISCARD: -    if (snapend < lcp_data+4) return; -    printf(" magic=%#x", (unsigned)ntohl(*(u_long *) lcp_data)); -    lcp_data +=4; -    break; -  case LCP_PROTREJ: -    if (snapend < lcp_data+2) return; -    printf(" prot=%s", tok2str(ppptype2str, "PROT-%#x", ntohs(*(u_short *) lcp_data))); -    /* TODO print rejected packet too ? */ -    break; -  case LCP_CODEREJ: -    if (snapend < lcp_data+4) return; -    printf(" "); -    lcp_print(lcp_data, (lcp_length+lcp_data > snapend ? snapend-lcp_data : lcp_length)); -    break; -  case LCP_TERMREQ: -  case LCP_TERMACK: -    break; -  default: -    break; -  } -   -  return; -} diff --git a/contrib/tcpdump/savestr.c b/contrib/tcpdump/savestr.c deleted file mode 100644 index a81227c9e6d0..000000000000 --- a/contrib/tcpdump/savestr.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 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[] = -    "@(#) $Header: /tcpdump/master/tcpdump/Attic/savestr.c,v 1.6 2000/07/11 00:49:02 assar Exp $ (LBL)"; -#endif - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <sys/types.h> - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#ifdef HAVE_OS_PROTO_H -#include "os-proto.h" -#endif - -#include "savestr.h" - -/* A replacement for strdup() that cuts down on malloc() overhead */ -char * -savestr(register const char *str) -{ -	register u_int size; -	register char *p; -	static char *strptr = NULL; -	static u_int strsize = 0; - -	size = strlen(str) + 1; -	if (size > strsize) { -		strsize = 1024; -		if (strsize < size) -			strsize = size; -		strptr = (char *)malloc(strsize); -		if (strptr == NULL) { -			fprintf(stderr, "savestr: malloc\n"); -			exit(1); -		} -	} -	(void)strcpy(strptr, str); -	p = strptr; -	strptr += size; -	strsize -= size; -	return (p); -} diff --git a/contrib/tcpdump/savestr.h b/contrib/tcpdump/savestr.h deleted file mode 100644 index 8fe995eb21fb..000000000000 --- a/contrib/tcpdump/savestr.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 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. - * - * @(#) $Header: /tcpdump/master/tcpdump/Attic/savestr.h,v 1.1.1.1 1999/10/07 23:47:12 mcr Exp $ (LBL) - */ - -extern char *savestr(const char *);  | 
