Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/tcpdump build and import glue.
details: https://anonhg.NetBSD.org/src/rev/f803c54ed73f
branches: trunk
changeset: 759284:f803c54ed73f
user: christos <christos%NetBSD.org@localhost>
date: Sun Dec 05 05:14:00 2010 +0000
description:
build and import glue.
diffstat:
external/bsd/tcpdump/Makefile | 5 +
external/bsd/tcpdump/bin/Makefile | 92 +++++++++++++++++++++++++++
external/bsd/tcpdump/dist/tcpdump2netbsd | 102 +++++++++++++++++++++++++++++++
3 files changed, 199 insertions(+), 0 deletions(-)
diffs (211 lines):
diff -r f82b5a83702a -r f803c54ed73f external/bsd/tcpdump/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/tcpdump/Makefile Sun Dec 05 05:14:00 2010 +0000
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.1 2010/12/05 05:14:00 christos Exp $
+
+SUBDIR= bin lib
+
+.include <bsd.subdir.mk>
diff -r f82b5a83702a -r f803c54ed73f external/bsd/tcpdump/bin/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/tcpdump/bin/Makefile Sun Dec 05 05:14:00 2010 +0000
@@ -0,0 +1,92 @@
+# $NetBSD: Makefile,v 1.1 2010/12/05 05:14:00 christos Exp $
+
+WARNS?= 1 # XXX: need to cleanup later
+
+.include <bsd.own.mk>
+
+USE_FORT?= yes # network client
+
+SRCDIR= ${.CURDIR}/../dist
+.PATH: ${SRCDIR}
+
+PROG= tcpdump
+MAN= tcpdump.8
+
+SRCS= addrtoname.c cpack.c gmpls.c gmt2local.c machdep.c oui.c parsenfsfh.c \
+ pf_print_state.c \
+ print-802_11.c print-ah.c print-aodv.c print-ap1394.c print-arcnet.c \
+ print-arp.c \
+ print-ascii.c print-atalk.c print-atm.c print-bfd.c print-bgp.c \
+ print-bootp.c print-beep.c print-cdp.c print-chdlc.c \
+ print-cip.c print-cnfp.c print-decnet.c print-domain.c \
+ print-dvmrp.c print-egp.c print-enc.c print-esp.c print-ether.c \
+ print-fddi.c print-fr.c print-gre.c print-hsrp.c print-icmp.c \
+ print-igmp.c print-igrp.c print-ip.c print-ipcomp.c print-ipfc.c \
+ print-ipx.c print-isakmp.c print-isoclns.c print-krb.c \
+ print-l2tp.c print-lane.c print-ldp.c print-llc.c print-lwres.c \
+ print-msdp.c print-mobile.c print-mobility.c print-mpls.c print-nfs.c \
+ print-ntp.c print-null.c print-ospf.c print-pflog.c print-pfsync.c \
+ print-pim.c print-ppp.c print-pppoe.c print-pptp.c \
+ print-radius.c print-raw.c print-rip.c print-rsvp.c print-rx.c \
+ print-sctp.c print-sl.c print-sll.c print-smb.c print-snmp.c \
+ print-stp.c print-sunatm.c print-sunrpc.c print-tcp.c \
+ print-telnet.c print-tftp.c print-timed.c print-token.c \
+ print-udp.c print-vjc.c print-vrrp.c print-wb.c print-zephyr.c \
+ setsignal.c smbutil.c tcpdump.c util.c checksum.c signature.c
+SRCS+= print-eigrp.c l2vpn.c print-slow.c print-eap.c nlpid.c print-dccp.c \
+ print-pgm.c ipproto.c print-syslog.c print-sip.c print-lmp.c \
+ print-lspping.c print-symantec.c print-juniper.c af.c print-olsr.c \
+ print-sflow.c print-vqp.c print-lwapp.c print-ipnet.c print-forces.c \
+ print-vtp.c print-udld.c print-dtp.c print-rrcp.c print-mpcp.c \
+ print-lldp.c print-cfm.c
+
+
+SRCS+= bpf_dump.c
+
+SRCS+= version.c
+
+# disabled for now
+#SRCS+= print-smb.c smbutil.c
+
+version.c: VERSION
+ ${_MKTARGET_CREATE}
+ ${TOOL_SED} -e 's/.*/char version[] = "&";/' ${.ALLSRC} > ${.TARGET}
+
+LDADD+= -lpcap -ll
+DPADD+= ${LIBPCAP} ${LIBL}
+
+CPPFLAGS+= -I${.CURDIR}/../include -I${.CURDIR} -I${SRCDIR}
+CPPFLAGS+= -I${NETBSDSRCDIR}/dist/pf/sbin/pfctl \
+ -I${NETBSDSRCDIR}/sys/dist/pf
+
+AWKS= atime.awk packetdat.awk stime.awk send-ack.awk
+
+CPPFLAGS+=-DHAVE_CONFIG_H -D_U_="__attribute__((__unused__))"
+
+.if (${USE_INET6} != "no")
+SRCS+= print-ip6.c print-ip6opts.c print-ripng.c print-icmp6.c print-frag6.c \
+ print-rt6.c print-ospf6.c print-dhcp6.c
+
+CPPFLAGS+=-DINET6=1 -DHAVE_RES_USE_INET6=1
+.endif
+
+.if (${MKCRYPTO} != "no")
+CPPFLAGS+=-DHAVE_LIBCRYPTO=1
+LDADD+= -lcrypto -lcrypt
+DPADD+= ${LIBCRYPTO} ${LIBCRYPT}
+.endif
+
+#.if (defined(HAVE_GCC) && ${HAVE_GCC} == 4) || defined(HAVE_PCC)
+#COPTS+= -fno-strict-aliasing
+#.for f in print-802_11 print-esp print-fr print-radius print-telnet tcpdump util
+#COPTS.${f}.c+= -Wno-pointer-sign
+#.endfor
+#.endif
+
+CLEANFILES+= version.c tcpdump.8
+
+tcpdump.8: tcpdump.1.in
+ @rm -f ${.TARGET}
+ cp ${.ALLSRC} ${.TARGET}
+
+.include <bsd.prog.mk>
diff -r f82b5a83702a -r f803c54ed73f external/bsd/tcpdump/dist/tcpdump2netbsd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/tcpdump/dist/tcpdump2netbsd Sun Dec 05 05:14:00 2010 +0000
@@ -0,0 +1,102 @@
+#! /bin/sh
+#
+# $NetBSD: tcpdump2netbsd,v 1.1 2010/12/05 05:14:00 christos Exp $
+#
+# Copyright (c) 2000 The NetBSD Foundation, Inc.
+# 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.
+#
+# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+#
+# amd2netbsd: convert an amd source tree into a
+# netbsd amd source tree, under src/dist,
+# based on bind2netbsd by Bernd Ernesti and changes by Simon Burge
+#
+# Rough instructions for importing new amd release:
+#
+# $ cd /some/where/temporary
+# $ tar xpfz /new/amd/release/tar/file
+# $ sh /usr/src/external/bsd/tcpdump/dist/tcpdump2netbsd tcpdump-4.1.1 `pwd`
+# $ cd src/dist/am-utils
+# $ cvs -d cvs.netbsd.org:/cvsroot import -m "Import tcpdump 4.1.1" src/external/bsd/tcpdump/dist TCPDUMP tcpdump-4_1_1
+# $ cd ../../../tcpdump-4.1.1
+# $ run ./configure
+# copy newly generated config.h with /usr/src/external/bsd/tcpdump/include/config.h
+# - check makefiles to see if any extra sources have been added.
+# - update distrib/sets if necessary.
+
+if [ $# -ne 2 ]; then echo "tcpdump2netbsd src dest"; exit 1; fi
+
+r=$1
+d=$2/src/external/bsd/tcpdump/dist
+
+case "$d" in
+ /*)
+ ;;
+ *)
+ d=`/bin/pwd`/$d
+ ;;
+esac
+
+case "$r" in
+ /*)
+ ;;
+ *)
+ r=`/bin/pwd`/$r
+ ;;
+esac
+
+echo preparing directory $d
+rm -rf $d
+mkdir -p $d
+
+### Copy the files and directories
+echo copying $r to $d
+cd $r
+pax -rw * $d
+
+### Remove the $'s around RCS tags
+find $d -type f -print | xargs egrep -l '\$(Id|Created|Header)' | while read f; do
+ sed -e 's/\$\(Id.*\) \$/\1/' \
+ -e 's/\$\(Created.*\) \$/\1/' \
+ -e 's/\$\(Header.*\) \$/\1/' \
+ < $f > /tmp/amd1f$$ && mv /tmp/amd1f$$ $f && \
+ echo removed \$RCS tag from $f
+done
+
+### Clean up any CVS directories that might be around.
+echo "cleaning up CVS residue."
+(
+ cd $d
+ find . -type d -name "CVS" -print | xargs rm -r
+)
+echo done
+
+### Fixing file and directory permissions.
+echo "Fixing file/directory permissions."
+(
+ cd $d
+ find . -type f -print | xargs chmod u+rw,go+r
+ find . -type d -print | xargs chmod u+rwx,go+rx
+)
+echo done
+
+exit 0
Home |
Main Index |
Thread Index |
Old Index