diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-09-23 17:15:26 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-09-23 17:15:26 +0000 |
commit | c2fbce13fba1484df0a1e92212e0783585ab6254 (patch) | |
tree | af1c76679febaebec06e8096a160c95d566cde3f /epan/dissectors/packet-gre.c | |
parent | a1968b13267acb202c4917314e280804f3001d19 (diff) | |
download | wireshark-c2fbce13fba1484df0a1e92212e0783585ab6254.tar.gz wireshark-c2fbce13fba1484df0a1e92212e0783585ab6254.tar.bz2 wireshark-c2fbce13fba1484df0a1e92212e0783585ab6254.zip |
From packet steve: add a filterable field for the GRE key.
svn path=/trunk/; revision=12069
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, |