rpms/wireshark/F-10 wireshark-1.0.6-netdump2.patch, NONE, 1.1 .cvsignore, 1.23, 1.24 sources, 1.23, 1.24 wireshark.spec, 1.45, 1.46

Radek Vokál rvokal at fedoraproject.org
Tue Feb 17 09:26:15 UTC 2009


Author: rvokal

Update of /cvs/extras/rpms/wireshark/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv10477

Modified Files:
	.cvsignore sources wireshark.spec 
Added Files:
	wireshark-1.0.6-netdump2.patch 
Log Message:
upgrade to 1.0.6


wireshark-1.0.6-netdump2.patch:

--- NEW FILE wireshark-1.0.6-netdump2.patch ---
diff -up wireshark-1.1.2/epan/dissectors/Makefile.common.netdump wireshark-1.1.2/epan/dissectors/Makefile.common
--- wireshark-1.1.2/epan/dissectors/Makefile.common.netdump	2009-01-15 16:28:20.000000000 +0100
+++ wireshark-1.1.2/epan/dissectors/Makefile.common	2009-02-16 14:26:54.000000000 +0100
@@ -623,6 +623,7 @@ DISSECTOR_SRC = \
 	packet-ndmp.c		\
 	packet-ndps.c		\
 	packet-netbios.c	\
+	packet-netdump.c	\
 	packet-netflow.c	\
 	packet-netsync.c 	\
 	packet-nettl.c		\
diff -up wireshark-1.1.2/epan/dissectors/packet-netdump.c.netdump wireshark-1.1.2/epan/dissectors/packet-netdump.c
--- wireshark-1.1.2/epan/dissectors/packet-netdump.c.netdump	2009-02-16 16:07:31.000000000 +0100
+++ wireshark-1.1.2/epan/dissectors/packet-netdump.c	2009-02-16 14:26:54.000000000 +0100
@@ -0,0 +1,242 @@
+/* packet-netdump.c
+ * Routines for Netdump dissection
+ * Copyright 2009, Neil Horman <nhorman at tuxdriver.com> 
+ *
+ * $Id$
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald at wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
+ * USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <glib.h>
+
+#include <epan/packet.h>
+#include <epan/prefs.h>
+
+/* forward reference */
+void proto_reg_handoff_netdump(void);
+
+/* Initialize the protocol and registered fields */
+static int proto_netdump = -1;
+static dissector_handle_t netdump_handle;
+static int hf_netdump_magic_number = -1;
+static int hf_netdump_seq_nr = -1;
+static int hf_netdump_command = -1;
+static int hf_netdump_from = -1;
+static int hf_netdump_to = -1;
+static int hf_netdump_payload = -1;
+static int hf_netdump_code = -1;
+static int hf_netdump_info = -1;
+static int hf_netdump_version = -1;
+
+/* Global sample port pref */
+static guint gPORT_PREF = 0;
+
+/* Initialize the subtree pointers */
+static gint ett_netdump = -1;
+
+static const value_string command_names[] = {
+	{ 0, "COMM_NONE" },
+	{ 1, "COMM_SEND_MEM" },
+	{ 2, "COMM_EXIT" },
+	{ 3, "COMM_REBOOT" },
+	{ 4, "COMM_HELLO" },
+	{ 5, "COMM_GET_NR_PAGES" },
+	{ 6, "COMM_GET_PAGE_SIZE" },
+	{ 7, "COMM_START_NETDUMP_ACK" },
+	{ 8, "COMM_GET_REGS" },
+	{ 9, "COMM_SHOW_STATE" },
+	{ 0, NULL }
+};
+
+static const value_string reply_code_names[] = {
+	{ 0, "REPLY_NONE" },
+	{ 1, "REPLY_ERROR" },
+	{ 2, "REPLY_LOG" },
+	{ 3, "REPLY_MEM" },
+	{ 4, "REPLY_RESERVED" },
+	{ 5, "REPLY_HELLO" },
+	{ 6, "REPLY_NR_PAGES" },
+	{ 7, "REPLY_PAGE_SIZE" },
+	{ 8, "REPLY_START_NETDUMP" },
+	{ 9, "REPLY_END_NETDUMP" },
+	{ 10, "REPLY_REGS" },
+	{ 11, "REPLY_MAGIC" },
+	{ 12, "REPLY_SHOW_STATE" },
+	{ 0, NULL }
+};
+
+
+void proto_register_netdump(void)
+{
+	module_t *netdump_module;
+
+	/* Setup protocol subtree array */
+	static gint *ett[] = {
+		&ett_netdump
+	};
+
+	static hf_register_info hf[] = {
+		{ &hf_netdump_magic_number,
+			{ "Netdump Magic Number", "netdump.magic",
+			FT_UINT64, BASE_HEX,
+			NULL, 0x0,
+			NULL, HFILL }
+		},
+		{ &hf_netdump_seq_nr,
+			{"Netdump seq number", "netdump.seq_nr",
+			FT_UINT32, BASE_HEX,
+			NULL, 0x0,
+			NULL, HFILL}
+		},
+		{ &hf_netdump_command,
+			{"Netdump command", "netdump.command",
+			FT_UINT32, BASE_DEC,
+			VALS(command_names), 0x0,
+			NULL, HFILL}
+		},
+		{ &hf_netdump_from,
+			{"Netdump from val", "netdump.from",
+			FT_UINT32, BASE_HEX,
+			NULL, 0x0,
+			NULL, HFILL}
+		},
+		{ &hf_netdump_to,
+			{"Netdump to val", "netdump.to",
+			FT_UINT32, BASE_HEX,
+			NULL, 0x0,
+			NULL, HFILL}
+		},
+		{ &hf_netdump_code,
+			{"Netdump code", "netdump.code",
+			FT_UINT32, BASE_DEC,
+			VALS(reply_code_names), 0x0,
+			NULL, HFILL}
+		},
+		{ &hf_netdump_info,
+			{"Netdump info", "netdump.info",
+			FT_UINT32, BASE_HEX,
+			NULL, 0x0,
+			NULL, HFILL}
+		},
+		{ &hf_netdump_payload,
+			{"Netdump payload", "netdump.payload",
+			FT_BYTES, BASE_HEX,
+			NULL, 0x0,
+			NULL, HFILL}
+		},
+		{ &hf_netdump_version,
+			{"Netdump version", "netdump.version",
+			FT_UINT8, BASE_HEX,
+			NULL, 0x0,
+			NULL, HFILL}
+		}
+	};
+
+	if (proto_netdump == -1) {
+		proto_netdump = proto_register_protocol (
+			"Netdump Protocol",	/* name */
+			"Netdump",	/* short name */
+			"netdump"	/* abbrev */
+			);
+	}
+	proto_register_field_array(proto_netdump, hf, array_length(hf));
+	proto_register_subtree_array(ett, array_length(ett));
+
+	netdump_module = prefs_register_protocol(proto_netdump,
+		proto_reg_handoff_netdump);
+
+	/* Register a sample port preference   */
+	prefs_register_uint_preference(netdump_module, "udp.port",
+		"Netdump UDP port",
+		"port if other than the default",
+		10, &gPORT_PREF);
+}
+
+/* Code to actually dissect the packets */
+static void
+dissect_netdump(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+{
+
+	/* Check that there's enough data */
+	if (tvb_reported_length(tvb) == 0)
+		return;
+
+	if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
+		col_set_str(pinfo->cinfo, COL_PROTOCOL, "Netdump");
+	}
+	/* Clear out stuff in the info column */
+	if (check_col(pinfo->cinfo,COL_INFO)) {
+		col_clear(pinfo->cinfo,COL_INFO);
+	}
+
+	if (tree) { /* we are being asked for details */
+		proto_item *ti = NULL;
+		proto_tree *netdump_tree = NULL;
+		ti = proto_tree_add_item(tree, proto_netdump, tvb, 0, -1, FALSE);
+		netdump_tree = proto_item_add_subtree(ti, ett_netdump);
+		if (tvb_reported_length(tvb) == 24) {
+			/* Its a request format packet */
+			proto_tree_add_item(netdump_tree, hf_netdump_magic_number, tvb, 0, 8, FALSE);
+			proto_tree_add_item(netdump_tree, hf_netdump_seq_nr, tvb, 8, 4, FALSE);
+			proto_tree_add_item(netdump_tree, hf_netdump_command, tvb, 12, 4, FALSE);
+			proto_tree_add_item(netdump_tree, hf_netdump_from, tvb, 16, 4, FALSE);
+			proto_tree_add_item(netdump_tree, hf_netdump_to, tvb, 20, 4, FALSE);
+		} else {
+			/* Its a reply packet */
+			proto_tree_add_item(netdump_tree, hf_netdump_version, tvb, 0, 1, FALSE);
+			proto_tree_add_item(netdump_tree, hf_netdump_seq_nr, tvb, 1, 4, FALSE);
+			proto_tree_add_item(netdump_tree, hf_netdump_code, tvb, 5, 4, FALSE);
+			proto_tree_add_item(netdump_tree, hf_netdump_info, tvb, 9, 4, TRUE);
+			proto_tree_add_item(netdump_tree, hf_netdump_payload, tvb, 13, -1, FALSE);
+		}
+	}
+
+}
+void proto_reg_handoff_netdump(void)
+{
+	static gboolean initalized = FALSE;
+	static int CurrentPort;
+
+
+	if (!initalized) {
+		netdump_handle = create_dissector_handle(dissect_netdump,
+				proto_netdump);
+
+		dissector_add_handle("udp.port", netdump_handle); /* For Decode As */
+		initalized = TRUE;
+	} else {
+		if (CurrentPort != 0)
+			dissector_delete("udp.port", CurrentPort, netdump_handle);
+	}
+
+	CurrentPort = gPORT_PREF;
+
+	if (CurrentPort != 0)
+		dissector_add("udp.port", CurrentPort, netdump_handle);
+}
+


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/wireshark/F-10/.cvsignore,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- .cvsignore	15 Dec 2008 13:59:41 -0000	1.23
+++ .cvsignore	17 Feb 2009 09:25:44 -0000	1.24
@@ -1 +1 @@
-wireshark-1.0.5.tar.gz
+wireshark-1.0.6.tar.bz2


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/wireshark/F-10/sources,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- sources	15 Dec 2008 13:59:41 -0000	1.23
+++ sources	17 Feb 2009 09:25:44 -0000	1.24
@@ -1 +1 @@
-99ac9a9d2c1445658039f1f34c89e3f6  wireshark-1.0.5.tar.gz
+f97041ec73e72fc36e39be2588045578  wireshark-1.0.6.tar.bz2


Index: wireshark.spec
===================================================================
RCS file: /cvs/extras/rpms/wireshark/F-10/wireshark.spec,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- wireshark.spec	15 Feb 2009 13:45:37 -0000	1.45
+++ wireshark.spec	17 Feb 2009 09:25:44 -0000	1.46
@@ -5,14 +5,14 @@
 
 Summary: 	Network traffic analyzer
 Name: 		wireshark
-Version:	1.0.5
-Release: 	2%{?dist}
+Version:	1.0.6
+Release: 	1%{?dist}
 License: 	GPL+
 Group: 		Applications/Internet
 %if %{svn_version}
 Source0:	http://wireshark.org/download/prerelease/%{name}-%{version}-SVN-%{svn_version}.tar.gz
 %else
-Source0:	http://wireshark.org/download/src/%{name}-%{version}.tar.gz
+Source0:	http://wireshark.org/download/src/%{name}-%{version}.tar.bz2
 %endif
 Source1:	wireshark.pam
 Source2:	wireshark.console
@@ -25,6 +25,7 @@
 Patch6:		wireshark-nfsv41-layout-updates.patch
 Patch7:		wireshark-rpc-pdu-size.patch
 Patch8:		wireshark-1.0.5-nfs41-backchnl-decode.patch
+Patch9:		wireshark-1.0.6-netdump2.patch
 
 Url: 		http://www.wireshark.org/
 BuildRoot: 	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -79,7 +80,7 @@
 %else
 %setup -q -n %{name}-%{version}
 %endif
-%patch1 -p1 -b .pie
+#%patch1 -p1 -b .pie
 %patch2 -p1 
 %patch3 -p1
 %patch4 -p1
@@ -87,6 +88,7 @@
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
+%patch9 -p1 -b .netdump
 
 %build
 %ifarch s390 s390x sparcv9 sparc64
@@ -96,8 +98,8 @@
 %endif
 # FC5+ automatic -fstack-protector-all switch
 export RPM_OPT_FLAGS=${RPM_OPT_FLAGS//-fstack-protector/-fstack-protector-all}
-export CFLAGS="$RPM_OPT_FLAGS $CPPFLAGS"
-export CXXFLAGS="$RPM_OPT_FLAGS $CPPFLAGS"
+export CFLAGS="$RPM_OPT_FLAGS $CPPFLAGS $PIEFLAGS"
+export CXXFLAGS="$RPM_OPT_FLAGS $CPPFLAGS $PIEFLAGS"
 export LDFLAGS="$LDFLAGS -lm -lcrypto"
 
 %configure \
@@ -212,6 +214,11 @@
 
 
 %changelog
+* Tue Feb 17 2009 Radek Vokal <rvokal at redhat.com> 1.0.6-1
+- add netdump2 support
+- fix SELinux issues, remove pie patch
+- upgrade to 1.0.6
+
 * Sun Feb 15 2009 Steve Dickson <steved at redhat.com> - 1.0.5-2
 - NFSv4.1: Add support for backchannel decoding
 




More information about the fedora-extras-commits mailing list