17868656 Update tcpdump to 4.5.1 s11u1-sru 0.175.1.16.0.3.0 S11.1SRU16.3
authorNorm Jacobs <Norm.Jacobs@Oracle.COM>
Tue, 21 Jan 2014 15:46:30 -0800
branchs11u1-sru
changeset 2909 a4709a200379
parent 2908 8f5c62cdd648
child 2911 afeb242c40b6
17868656 Update tcpdump to 4.5.1
components/tcpdump/Makefile
components/tcpdump/patches/10-arphrd-infiniband.patch
components/tcpdump/tcpdump.license
components/tcpdump/tcpdump.p5m
--- a/components/tcpdump/Makefile	Tue Jan 21 15:46:29 2014 -0800
+++ b/components/tcpdump/Makefile	Tue Jan 21 15:46:30 2014 -0800
@@ -23,20 +23,21 @@
 include ../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		tcpdump
-COMPONENT_VERSION=	4.1.1
+COMPONENT_VERSION=	4.5.1
 COMPONENT_PROJECT_URL=	http://www.tcpdump.org/
 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
 COMPONENT_ARCHIVE_HASH=	\
-    sha256:e6cd4bbd61ec7adbb61ba8352c4b4734f67b8caaa845d88cb826bc0b9f1e7f0a
+    sha256:14ab39657128f3a650aed4cf455f76c7590601087b6101c253d698f6e73f0b96
 COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)release/$(COMPONENT_ARCHIVE)
+COMPONENT_BUGDB=	utility/tcpdump
 
 include ../../make-rules/prep.mk
 include ../../make-rules/configure.mk
 include ../../make-rules/ips.mk
 
-# the default setting of 8s makes us core dump
-studio_ALIGN.sparc.32=
+# fix my alignment issues instead of falling over on sparc
+studio_ALIGN.sparc.64=-xmemalign=16i
 
 # lazyloading (indirectly enabled by -Bdirect) seems to cause problems with
 # libpcap device enumeration.
@@ -48,13 +49,16 @@
 CONFIGURE_OPTIONS += --without-crypto
 
 # common targets
-build:          $(BUILD_32)
+build:          $(BUILD_64)
+
+install:        $(INSTALL_64) 
 
-install:        $(INSTALL_32) 
+COMPONENT_PRE_TEST_ACTION = \
+        ($(CP) -r $(SOURCE_DIR)/tests $(@D)/.)
 
-test:		$(NO_TESTS)
+test:		$(TEST_64)
+
 
 BUILD_PKG_DEPENDENCIES =        $(BUILD_TOOLS)
 
 include ../../make-rules/depend.mk
-
--- a/components/tcpdump/patches/10-arphrd-infiniband.patch	Tue Jan 21 15:46:29 2014 -0800
+++ b/components/tcpdump/patches/10-arphrd-infiniband.patch	Tue Jan 21 15:46:30 2014 -0800
@@ -1,63 +1,65 @@
-diff -uN tcpdump-4.1.1/Makefile.in tcpdump-4.1.1.new/Makefile.in
---- tcpdump-4.1.1/Makefile.in	2010-04-05 18:18:35.000000000 -0700
-+++ tcpdump-4.1.1.new/Makefile.in	2011-07-14 08:43:36.561637014 -0700
[email protected]@ -78,6 +78,7 @@
- 	print-esp.c print-ether.c print-fddi.c print-fr.c \
+#
+# InfiniBand support
+#
+diff -N -u -r tcpdump-4.5.1.orig/interface.h tcpdump-4.5.1/interface.h
+--- tcpdump-4.5.1.orig/interface.h	2013-03-24 16:49:18.000000000 -0500
++++ tcpdump-4.5.1/interface.h	2013-12-02 11:48:13.394398375 -0600
[email protected]@ -205,6 +205,7 @@
+ extern u_int pflog_if_print(const struct pcap_pkthdr *, const u_char *);
+ extern u_int arcnet_if_print(const struct pcap_pkthdr *, const u_char *);
+ extern u_int arcnet_linux_if_print(const struct pcap_pkthdr *, const u_char *);
++extern u_int ipoib_if_print(const struct pcap_pkthdr *, const u_char *);
+ extern u_int token_print(const u_char *, u_int, u_int);
+ extern u_int token_if_print(const struct pcap_pkthdr *, const u_char *);
+ extern void fddi_print(const u_char *, u_int, u_int);
+diff -N -u -r tcpdump-4.5.1.orig/Makefile.in tcpdump-4.5.1/Makefile.in
+--- tcpdump-4.5.1.orig/Makefile.in	2013-03-24 16:49:18.000000000 -0500
++++ tcpdump-4.5.1/Makefile.in	2013-12-02 11:47:25.102106791 -0600
[email protected]@ -83,6 +83,7 @@
+ 	print-esp.c print-ether.c print-fddi.c print-forces.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-ipnet.c \
 +	print-ipoib.c \
  	print-ipx.c print-isoclns.c print-juniper.c print-krb.c \
  	print-l2tp.c print-lane.c print-ldp.c print-lldp.c print-llc.c \
          print-lmp.c print-lspping.c print-lwapp.c \
-diff -uN tcpdump-4.1.1/interface.h tcpdump-4.1.1.new/interface.h
---- tcpdump-4.1.1/interface.h	2010-03-11 17:56:44.000000000 -0800
-+++ tcpdump-4.1.1.new/interface.h	2011-07-14 08:44:55.908614708 -0700
[email protected]@ -192,6 +192,7 @@
- extern void ether_print(const u_char *, u_int, u_int,
-     void (*)(const u_char *), const u_char *);
- extern u_int ether_if_print(const struct pcap_pkthdr *, const u_char *);
+diff -N -u -r tcpdump-4.5.1.orig/netdissect.h tcpdump-4.5.1/netdissect.h
+--- tcpdump-4.5.1.orig/netdissect.h	2013-03-24 16:49:18.000000000 -0500
++++ tcpdump-4.5.1/netdissect.h	2013-12-02 11:48:46.057536548 -0600
[email protected]@ -319,6 +319,7 @@
+ 
+ extern u_int ether_if_print(netdissect_options *,
+                             const struct pcap_pkthdr *,const u_char *);
 +extern u_int ipoib_if_print(const struct pcap_pkthdr *, const u_char *);
- extern u_int token_print(const u_char *, u_int, u_int);
- extern u_int token_if_print(const struct pcap_pkthdr *, const u_char *);
- extern void fddi_print(const u_char *, u_int, u_int);
-Common subdirectories: tcpdump-4.1.1/lbl and tcpdump-4.1.1.new/lbl
-Common subdirectories: tcpdump-4.1.1/missing and tcpdump-4.1.1.new/missing
-diff -uN tcpdump-4.1.1/netdissect.h tcpdump-4.1.1.new/netdissect.h
---- tcpdump-4.1.1/netdissect.h	2010-03-11 17:56:44.000000000 -0800
-+++ tcpdump-4.1.1.new/netdissect.h	2011-07-14 08:44:35.643598462 -0700
[email protected]@ -320,6 +320,7 @@
- 
- extern void arcnet_if_print(u_char*,const struct pcap_pkthdr *,const u_char *);
- extern void ether_if_print(u_char *,const struct pcap_pkthdr *,const u_char *);
-+extern void ipoib_if_print(u_char *,const struct pcap_pkthdr *,const u_char *);
- extern void token_if_print(u_char *,const struct pcap_pkthdr *,const u_char *);
- extern void fddi_if_print(u_char *,const struct pcap_pkthdr *, const u_char *);
- 
-diff -uN tcpdump-4.1.1/print-arp.c tcpdump-4.1.1.new/print-arp.c
---- tcpdump-4.1.1/print-arp.c	2010-03-11 17:56:44.000000000 -0800
-+++ tcpdump-4.1.1.new/print-arp.c	2011-07-14 09:01:08.965396346 -0700
[email protected]@ -62,6 +62,7 @@
+ extern u_int netanalyzer_if_print(netdissect_options *,
+                                   const struct pcap_pkthdr *,const u_char *);
+ extern u_int netanalyzer_transparent_if_print(netdissect_options *,
+diff -N -u -r tcpdump-4.5.1.orig/print-arp.c tcpdump-4.5.1/print-arp.c
+--- tcpdump-4.5.1.orig/print-arp.c	2013-02-20 21:54:34.000000000 -0600
++++ tcpdump-4.5.1/print-arp.c	2013-12-02 11:51:40.229231503 -0600
[email protected]@ -58,6 +58,7 @@
+ #define ARPHRD_ATM2225  19      /* ATM (RFC 2225) */
+ #define ARPHRD_STRIP    23      /* Ricochet Starmode Radio hardware format */
+ #define ARPHRD_IEEE1394 24      /* IEEE 1394 (FireWire) hardware format */
++#define ARPHRD_INFINIBAND 32	/* InfiniBand RFC 4391 */
+         u_short ar_pro;         /* format of protocol address */
          u_char  ar_hln;         /* length of hardware address */
          u_char  ar_pln;         /* length of protocol address */
-         u_short ar_op;          /* one of: */
-+#define ARPHRD_INFINIBAND 32    /* Infiniband RFC 4391 */
- #define ARPOP_REQUEST   1       /* request to resolve address */
- #define ARPOP_REPLY     2       /* response to previous request */
- #define ARPOP_REVREQUEST 3      /* request protocol address given hardware */
 @@ -118,6 +119,7 @@
      { ARPHRD_STRIP, "Strip" },
      { ARPHRD_IEEE1394, "IEEE 1394" },
      { ARPHRD_ATM2225, "ATM" },
-+    { ARPHRD_INFINIBAND, "Infiniband" },
++    { ARPHRD_INFINIBAND, "InfiniBand" },
      { 0, NULL }
  };
  
-diff -uN tcpdump-4.1.1/print-ipoib.c tcpdump-4.1.1.new/print-ipoib.c
---- tcpdump-4.1.1/print-ipoib.c	1969-12-31 16:00:00.000000000 -0800
-+++ tcpdump-4.1.1.new/print-ipoib.c	2011-07-14 08:46:52.029342720 -0700
+diff -N -u -r tcpdump-4.5.1.orig/print-ipoib.c tcpdump-4.5.1/print-ipoib.c
+--- tcpdump-4.5.1.orig/print-ipoib.c	1969-12-31 18:00:00.000000000 -0600
++++ tcpdump-4.5.1/print-ipoib.c	2013-12-02 11:53:24.664773530 -0600
 @@ -0,0 +1,131 @@
 +/*
-+ * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000
++ * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 
++ *	1997, 2000, 2011, 2012
 + *	The Regents of the University of California.  All rights reserved.
 + *
 + * Redistribution and use in source and binary forms, with or without
@@ -77,7 +79,7 @@
 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 + */
 +/*
-+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
 + */
 +#ifndef lint
 +static const char rcsid[] _U_ =
@@ -98,7 +100,7 @@
 +#include "addrtoname.h"
 +
 +extern const struct tok ethertype_values[];
-+extern int ethertype_print(u_short, const u_char *, u_int, u_int );
++extern int ethertype_print(netdissect_options *, u_short, const u_char *, u_int, u_int );
 +
 +#define	IPOIB_HDRLEN	44
 +
@@ -122,7 +124,7 @@
 +}
 +
 +/*
-+ * Print an Infiniband frame.
++ * Print an InfiniBand frame.
 + * This might be encapsulated within another frame; we might be passed
 + * a pointer to a function that can print header information for that
 + * frame's protocol, and an argument to pass to that function.
@@ -153,7 +155,7 @@
 +	ether_type = EXTRACT_16BITS(&p[40]);
 +	p += IPOIB_HDRLEN;
 +
-+	if (ethertype_print(ether_type, p, length, caplen) == 0) {
++	if (ethertype_print(gndo, ether_type, p, length, caplen) == 0) {
 +		/* ether_type not known, print raw packet */
 +		if (!eflag) {
 +			if (print_encap_header != NULL)
@@ -186,11 +188,10 @@
 + * c-basic-offset: 8
 + * End:
 + */
-+
-diff -uN tcpdump-4.1.1/tcpdump.c tcpdump-4.1.1.new/tcpdump.c
---- tcpdump-4.1.1/tcpdump.c	2010-03-11 17:56:44.000000000 -0800
-+++ tcpdump-4.1.1.new/tcpdump.c	2011-07-14 08:44:25.329300635 -0700
[email protected]@ -299,6 +299,9 @@
+diff -N -u -r tcpdump-4.5.1.orig/tcpdump.c tcpdump-4.5.1/tcpdump.c
+--- tcpdump-4.5.1.orig/tcpdump.c	2013-03-24 16:49:18.000000000 -0500
++++ tcpdump-4.5.1/tcpdump.c	2013-12-02 11:52:41.512481340 -0600
[email protected]@ -311,6 +311,9 @@
  #ifdef DLT_IPV6
  	{ raw_if_print,		DLT_IPV6 },
  #endif
--- a/components/tcpdump/tcpdump.license	Tue Jan 21 15:46:29 2014 -0800
+++ b/components/tcpdump/tcpdump.license	Tue Jan 21 15:46:30 2014 -0800
@@ -23,7 +23,7 @@
 Copyright (C) 1990,1996 John Robert LoVersoi
 Copyright (C) 1999-2001 William C. Fenneri
 Copyright (C) 1993 by Digital Equipment Corporation
-Copyright (C) 1998-2004  Michael Richardson <[email protected]>
+Copyright (C) 1998-2012  Michael Richardson <[email protected]>
 Copyright (C) 1993-1994 Jeffrey C. Mogul, Digital Equipment Corporation, Western Research Laboratory
 Copyright (C) 2001 Compaq Computer Corporation
 Copyright (C) 1984 Sun Microsystems, Inc.
--- a/components/tcpdump/tcpdump.p5m	Tue Jan 21 15:46:29 2014 -0800
+++ b/components/tcpdump/tcpdump.p5m	Tue Jan 21 15:46:30 2014 -0800
@@ -18,27 +18,23 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
 #
 
 <transform file path=usr.*/man/.+ -> default mangler.man.stability uncommitted>
 set name=pkg.fmri \
     value=pkg:/diagnostic/[email protected]$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
+set name=pkg.summary value="network traffic sniffer"
 set name=pkg.description \
-    value="A tool for network monitoring and data acquisition"
-set name=pkg.summary value="network traffic sniffer"
+    value="The tcpdump(1) program prints out a description of the contents of packets on a network interface that match a boolean expression. The network packets captured can also be saved to a file for later analysis by the tool."
+set name=com.oracle.info.description value="tcpdump, a network traffic sniffer"
+set name=com.oracle.info.tpno value=16021
 set name=info.classification \
     value=org.opensolaris.category.2008:Applications/Internet
 set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
 set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
-set name=org.opensolaris.arc-caseid \
-    value=PSARC/2009/147
+set name=org.opensolaris.arc-caseid value=PSARC/2009/147
 set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
-dir path=usr
-dir path=usr/sbin
-dir path=usr/share
-dir path=usr/share/man
-dir path=usr/share/man/man1
-file path=usr/sbin/tcpdump
+file usr/sbin/$(MACH64)/tcpdump path=usr/sbin/tcpdump
 file path=usr/share/man/man1/tcpdump.1
 license tcpdump.license license=BSD