Ethereal-dev: [Ethereal-dev] [Patch] to remove (deprecated) proto_tree_add_item_hidden() from
Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.
From: Martin Mathieson <martin.mathieson@xxxxxxxxxxxx>
Date: Fri, 31 Mar 2006 14:47:56 +0100
Hi, Removes the use of the deprecated proto_tree_add_item_hidden() functionI was adding the 'msmms.command.unknown' field in lots of places (a habit of mine in my own dissectors), but this probably isn't useful.
Regards, Martin
Index: epan/dissectors/packet-ms-mms.c
===================================================================
--- epan/dissectors/packet-ms-mms.c (revision 17780)
+++ epan/dissectors/packet-ms-mms.c (working copy)
@@ -65,7 +65,6 @@
static gint hf_msmms_command_prefix1_error = -1;
static gint hf_msmms_command_prefix1_command_level = -1;
static gint hf_msmms_command_prefix2 = -1;
-static gint hf_msmms_command_unknown = -1;
static gint hf_msmms_command_client_transport_info = -1;
static gint hf_msmms_command_client_player_info = -1;
@@ -398,7 +397,8 @@
}
/* Add hidden filter for "msmms.command" */
- proto_tree_add_item_hidden(tree, hf_msmms_command, tvb, 0, 0, FALSE);
+ ti = proto_tree_add_item(tree, hf_msmms_command, tvb, 0, 0, FALSE);
+ PROTO_ITEM_SET_HIDDEN(ti);
/* Create MSMMS control protocol tree */
if (tree)
@@ -431,7 +431,6 @@
}
/* Format of 1st 4 bytes unknown. May be version... */
- proto_tree_add_item_hidden(msmms_common_command_tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
/* Signature (already verified by main dissection function) */
@@ -682,7 +681,8 @@
}
/* Add hidden filter for "msmms.data" */
- proto_tree_add_item_hidden(tree, hf_msmms_data, tvb, 0, 0, FALSE);
+ proto_tree_add_item(tree, hf_msmms_data, tvb, 0, 0, FALSE);
+ PROTO_ITEM_SET_HIDDEN(ti);
/* Create MSMMS data protocol tree */
if (tree)
@@ -779,11 +779,8 @@
offset += 4;
/* These 12 bytes are not understood */
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
/* Extract and show the string in tree and info column */
@@ -858,21 +855,13 @@
offset += 4;
/* Next 8 words are not understood */
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
@@ -964,7 +953,6 @@
offset += 4;
/* These 4 bytes are not understood */
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
/* Extract and show the string in tree and info column */
@@ -991,25 +979,15 @@
offset += 4;
/* 40 bytes follow the prefixes... */
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
}
@@ -1046,21 +1024,15 @@
/* Number of 4 byte fields in structure */
proto_tree_add_item(tree, hf_msmms_command_number_of_words, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
/* Client ID */
proto_tree_add_item(tree, hf_msmms_command_client_id, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
}
@@ -1076,9 +1048,7 @@
proto_tree_add_item(tree, hf_msmms_command_prefix2, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
/* File path on server */
@@ -1108,9 +1078,7 @@
proto_tree_add_item(tree, hf_msmms_command_result_flags, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
/* Broadcast flags. */
@@ -1119,25 +1087,19 @@
offset += 4;
/* These 8 bytes may be a time field... */
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
/* Media length in seconds */
proto_tree_add_item(tree, hf_msmms_command_recorded_media_length, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- /* Media length in seconds */
+ /* Packet length in bytes */
proto_tree_add_item(tree, hf_msmms_command_media_packet_length, tvb, offset, 4, TRUE);
offset += 4;
}
@@ -1152,9 +1114,7 @@
proto_tree_add_item(tree, hf_msmms_command_prefix2, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
- proto_tree_add_item(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
}
@@ -1222,7 +1182,6 @@
/* Skip 8 unknown words */
for (n=0; n < 8; n++)
{
- proto_tree_add_item_hidden(tree, hf_msmms_command_unknown, tvb, offset, 4, TRUE);
offset += 4;
}
@@ -1495,18 +1454,6 @@
}
},
{
- &hf_msmms_command_unknown,
- {
- "Unknown",
- "msmms.command.unknown",
- FT_UINT32,
- BASE_HEX,
- NULL,
- 0x0,
- "", HFILL
- }
- },
- {
&hf_msmms_command_client_transport_info,
{
"Client transport info",
- Prev by Date: Re: [Ethereal-dev] Update to the NCP dissector
- Next by Date: Re: [Ethereal-dev] Update to the NCP dissector
- Previous by thread: Re: [Ethereal-dev] Update to the NCP dissector
- Index(es):