aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2009-11-19 15:30:06 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2009-11-19 15:30:06 +0000
commit005049bebbd86341066dcdc99541dbcc9b8eedac (patch)
treeb96244019a8c917319025a4451aec294c2066ef1
parenta1c8cdcc7c1d443fee1a072107889432856f59c8 (diff)
Changed hf_ip_proto to use ipproto_val[].
Removed some unneeded includes. svn path=/trunk/; revision=31017
-rw-r--r--epan/dissectors/packet-ip.c5
-rw-r--r--epan/ipproto.c4
-rw-r--r--epan/ipproto.h1
-rw-r--r--gtk/decode_as_ber.c1
-rw-r--r--gtk/decode_as_dcerpc.c1
-rw-r--r--gtk/decode_as_dlg.c1
-rw-r--r--gtk/firewall_dlg.c1
-rw-r--r--gtk/follow_ssl.c1
-rw-r--r--gtk/tcp_graph.c3
9 files changed, 6 insertions, 12 deletions
diff --git a/epan/dissectors/packet-ip.c b/epan/dissectors/packet-ip.c
index 0ddb403649..d5d07fa962 100644
--- a/epan/dissectors/packet-ip.c
+++ b/epan/dissectors/packet-ip.c
@@ -1474,8 +1474,7 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
iph->ip_p = tvb_get_guint8(tvb, offset + 9);
if (tree) {
- proto_tree_add_uint_format(ip_tree, hf_ip_proto, tvb, offset + 9, 1, iph->ip_p,
- "Protocol: %s (0x%02x)", ipprotostr(iph->ip_p), iph->ip_p);
+ proto_tree_add_item(ip_tree, hf_ip_proto, tvb, offset + 9, 1, FALSE);
}
iph->ip_sum = tvb_get_ntohs(tvb, offset + 10);
@@ -1895,7 +1894,7 @@ proto_register_ip(void)
NULL, HFILL }},
{ &hf_ip_proto,
- { "Protocol", "ip.proto", FT_UINT8, BASE_HEX, NULL, 0x0,
+ { "Protocol", "ip.proto", FT_UINT8, BASE_HEX, VALS(ipproto_val), 0x0,
NULL, HFILL }},
{ &hf_ip_checksum,
diff --git a/epan/ipproto.c b/epan/ipproto.c
index aa49c03a71..289530f088 100644
--- a/epan/ipproto.c
+++ b/epan/ipproto.c
@@ -32,13 +32,13 @@
#include <glib.h>
-#include <epan/ipproto.h>
#include <epan/packet.h>
+#include <epan/ipproto.h>
#include <epan/addr_resolv.h>
#include <epan/dissectors/packet-ip.h>
#include <epan/strutil.h>
-static const value_string ipproto_val[] = {
+const value_string ipproto_val[] = {
#if 0
{ IP_PROTO_IP, "IPv4" },
#endif
diff --git a/epan/ipproto.h b/epan/ipproto.h
index 50ac589e92..f0b7b925a9 100644
--- a/epan/ipproto.h
+++ b/epan/ipproto.h
@@ -190,6 +190,7 @@
#define IP_PROTO_AX4000 173 /* AX/4000 Testblock - non IANA */
#define IP_PROTO_NCS_HEARTBEAT 224 /* Novell NCS Heartbeat - http://support.novell.com/cgi-bin/search/searchtid.cgi?/10071158.htm */
+extern const value_string ipproto_val[];
extern const char *ipprotostr(int proto);
#endif /* ipproto.h */
diff --git a/gtk/decode_as_ber.c b/gtk/decode_as_ber.c
index 789e36a7d0..87b3121c9d 100644
--- a/gtk/decode_as_ber.c
+++ b/gtk/decode_as_ber.c
@@ -29,7 +29,6 @@
#include <gtk/gtk.h>
#include <epan/packet.h>
-#include <epan/ipproto.h>
#include <epan/epan_dissect.h>
#include <epan/dissectors/packet-ber.h>
diff --git a/gtk/decode_as_dcerpc.c b/gtk/decode_as_dcerpc.c
index 7592fa1e48..21037b3b0b 100644
--- a/gtk/decode_as_dcerpc.c
+++ b/gtk/decode_as_dcerpc.c
@@ -29,7 +29,6 @@
#include <gtk/gtk.h>
#include <epan/packet.h>
-#include <epan/ipproto.h>
#include <epan/epan_dissect.h>
#include <epan/dissectors/packet-dcerpc.h>
diff --git a/gtk/decode_as_dlg.c b/gtk/decode_as_dlg.c
index 7842222b7a..eddd4bc803 100644
--- a/gtk/decode_as_dlg.c
+++ b/gtk/decode_as_dlg.c
@@ -31,7 +31,6 @@
#include <gdk/gdkkeysyms.h>
#include <epan/packet.h>
-#include <epan/ipproto.h>
#include <epan/epan_dissect.h>
#include "../globals.h"
diff --git a/gtk/firewall_dlg.c b/gtk/firewall_dlg.c
index 64bb82e92e..0f3fc9964c 100644
--- a/gtk/firewall_dlg.c
+++ b/gtk/firewall_dlg.c
@@ -59,7 +59,6 @@
#include <epan/charsets.h>
#include <epan/epan_dissect.h>
#include <epan/filesystem.h>
-#include <epan/ipproto.h>
#include <epan/dissectors/packet-ipv6.h>
#include <../globals.h>
diff --git a/gtk/follow_ssl.c b/gtk/follow_ssl.c
index 16d147d39e..9e9f5f8bb7 100644
--- a/gtk/follow_ssl.c
+++ b/gtk/follow_ssl.c
@@ -44,7 +44,6 @@
#include <epan/addr_resolv.h>
#include <epan/epan_dissect.h>
#include <epan/filesystem.h>
-#include <epan/ipproto.h>
#include <epan/tap.h>
#include <../color.h>
diff --git a/gtk/tcp_graph.c b/gtk/tcp_graph.c
index 78a82944c8..f666027591 100644
--- a/gtk/tcp_graph.c
+++ b/gtk/tcp_graph.c
@@ -35,9 +35,8 @@
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
-#include <epan/ipproto.h>
-
#include <epan/packet.h>
+#include <epan/ipproto.h>
#include <epan/etypes.h>
#include <epan/ppptypes.h>
#include <epan/epan_dissect.h>