aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-sll.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2007-12-16 22:46:42 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2007-12-16 22:46:42 +0000
commitf43349a76a6fce6dbdf67a29af32647afaa2ed5c (patch)
tree9394f52b3c4949923ec2ddc16553439d9161d3e8 /epan/dissectors/packet-sll.c
parent54834cfccef50cb859ae79ec98778bcb02fd3fbb (diff)
For captures on a Linux GRE interface, put a field into the protocol
tree with the GRE protocol type value. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23894 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-sll.c')
-rw-r--r--epan/dissectors/packet-sll.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/epan/dissectors/packet-sll.c b/epan/dissectors/packet-sll.c
index 598a2d80a1..54ea07d8a2 100644
--- a/epan/dissectors/packet-sll.c
+++ b/epan/dissectors/packet-sll.c
@@ -36,6 +36,7 @@
#include "packet-ipx.h"
#include "packet-llc.h"
#include "packet-ppp.h"
+#include "packet-gre.h"
#include <epan/addr_resolv.h>
#include <epan/etypes.h>
@@ -47,6 +48,7 @@ static int hf_sll_src_eth = -1;
static int hf_sll_src_ipv4 = -1;
static int hf_sll_src_other = -1;
static int hf_sll_ltype = -1;
+static int hf_sll_gretype = -1;
static int hf_sll_etype = -1;
static int hf_sll_trailer = -1;
@@ -270,6 +272,8 @@ dissect_sll(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
} else {
switch (hatype) {
case ARPHRD_IPGRE:
+ proto_tree_add_uint(fh_tree, hf_sll_gretype, tvb, 14, 2,
+ protocol);
dissector_try_port(gre_dissector_table,
protocol, next_tvb, pinfo, tree);
break;
@@ -318,6 +322,11 @@ proto_register_sll(void)
{ "Protocol", "sll.ltype", FT_UINT16, BASE_HEX,
VALS(ltype_vals), 0x0, "Linux protocol type", HFILL }},
+ /* if the protocol field is a GRE protocol type */
+ { &hf_sll_gretype,
+ { "Protocol", "sll.gretype", FT_UINT16, BASE_HEX,
+ VALS(gre_typevals), 0x0, "GRE protocol type", HFILL }},
+
/* registered here but handled in ethertype.c */
{ &hf_sll_etype,
{ "Protocol", "sll.etype", FT_UINT16, BASE_HEX,