diff options
author | Jaap Keuter <jaap.keuter@xs4all.nl> | 2010-05-11 18:04:03 +0000 |
---|---|---|
committer | Jaap Keuter <jaap.keuter@xs4all.nl> | 2010-05-11 18:04:03 +0000 |
commit | 9b6960b21f8b561aef2668f23e0eff2fb72cefac (patch) | |
tree | 24d1a1047610d2aa68d37b311bff08171c5dde3f /epan/dissectors | |
parent | 0fc91157051cbd3013d972cf6c82274ab09ab36c (diff) |
Show version as generated field.
svn path=/trunk/; revision=32756
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-igmp.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/epan/dissectors/packet-igmp.c b/epan/dissectors/packet-igmp.c index 5ac54f2194..cb1429c829 100644 --- a/epan/dissectors/packet-igmp.c +++ b/epan/dissectors/packet-igmp.c @@ -313,16 +313,20 @@ static const value_string mtrace_fwd_code_vals[] = { }; #define PRINT_IGMP_VERSION(version) \ - if (check_col(pinfo->cinfo, COL_INFO)) { \ - col_add_fstr(pinfo->cinfo, COL_INFO, \ - "V%d %s",version,val_to_str(type, commands, \ - "Unknown Type:0x%02x")); \ - } \ - /* version of IGMP protocol */ \ - proto_tree_add_uint(tree, hf_version, tvb, 0, 0, version); \ - /* type of command */ \ - proto_tree_add_uint(tree, hf_type, tvb, offset, 1, type); \ - offset += 1; + do { \ + proto_item *ti; \ + if (check_col(pinfo->cinfo, COL_INFO)) { \ + col_add_fstr(pinfo->cinfo, COL_INFO, \ + "V%d %s",version,val_to_str(type, commands, \ + "Unknown Type:0x%02x")); \ + } \ + /* version of IGMP protocol */ \ + ti = proto_tree_add_uint(tree, hf_version, tvb, 0, 0, version); \ + PROTO_ITEM_SET_GENERATED(ti); \ + /* type of command */ \ + proto_tree_add_uint(tree, hf_type, tvb, offset, 1, type);\ + offset += 1; \ + } while (0); void igmp_checksum(proto_tree *tree, tvbuff_t *tvb, int hf_index, int hf_index_bad, packet_info *pinfo, guint len) |