diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-09-23 17:15:26 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-09-23 17:15:26 +0000 |
commit | 649b9efe68554590f026f5f2599241b5c3eb86b8 (patch) | |
tree | af1c76679febaebec06e8096a160c95d566cde3f /epan/dissectors/packet-gre.c | |
parent | cd4285856953c4e305ecea848159658f3b48b3f1 (diff) |
From packet steve: add a filterable field for the GRE key.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12069 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-gre.c')
-rw-r--r-- | epan/dissectors/packet-gre.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/epan/dissectors/packet-gre.c b/epan/dissectors/packet-gre.c index b7a29f575c..3b8b8a8fcd 100644 --- a/epan/dissectors/packet-gre.c +++ b/epan/dissectors/packet-gre.c @@ -47,6 +47,7 @@ static int proto_gre = -1; static int hf_gre_proto = -1; +static int hf_gre_key = -1; static gint ett_gre = -1; static gint ett_gre_flags = -1; @@ -203,10 +204,8 @@ dissect_gre(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset += 2; } else { - if (tree) { - proto_tree_add_text(gre_tree, tvb, offset, 4, - "Key: %u", tvb_get_ntohl(tvb, offset)); - } + if (tree) + proto_tree_add_item(gre_tree, hf_gre_key, tvb, offset, 4, FALSE); offset += 4; } } @@ -360,6 +359,10 @@ proto_register_gre(void) { "Protocol Type", "gre.proto", FT_UINT16, BASE_HEX, VALS(typevals), 0x0, "The protocol that is GRE encapsulated", HFILL } }, + { &hf_gre_key, + { "Key", "gre.key", FT_UINT32, BASE_HEX, NULL, 0x0, + "", HFILL } + }, }; static gint *ett[] = { &ett_gre, |