aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorpascal <pascal@localhost>2012-05-08 19:38:58 +0000
committerpascal <pascal@localhost>2012-05-08 19:38:58 +0000
commit0c4569d9411b279e3b62923ba0a418864ee9cea9 (patch)
treef3cb81495ccc250be05d7a4bacff309c4e796389 /epan
parent7e0c1e3a5a33ec54b6424d48a6169cb4903bc774 (diff)
From Frank Lahm:
Display guids in FPSpotlightRPC AFP packets https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7237 svn path=/trunk/; revision=42515
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-afp.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/epan/dissectors/packet-afp.c b/epan/dissectors/packet-afp.c
index 2b0ad198f5..3155fd3283 100644
--- a/epan/dissectors/packet-afp.c
+++ b/epan/dissectors/packet-afp.c
@@ -693,6 +693,7 @@ static int hf_afp_spotlight_returncode = -1;
static int hf_afp_spotlight_volflags = -1;
static int hf_afp_spotlight_reqlen = -1;
static int hf_afp_spotlight_toc_query_end = -1;
+static int hf_afp_spotlight_uuid = -1;
static const value_string flag_vals[] = {
{0, "Start" },
@@ -3988,6 +3989,7 @@ dissect_query_afp_with_did(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
#define SQ_TYPE_FLOAT 0x8500
#define SQ_TYPE_DATA 0x0700
#define SQ_TYPE_CNIDS 0x8700
+#define SQ_TYPE_UUID 0x0e00
#define SQ_CPX_TYPE_ARRAY 0x0a00
#define SQ_CPX_TYPE_STRING 0x0c00
@@ -4016,6 +4018,25 @@ spotlight_int64(tvbuff_t *tvb, proto_tree *tree, gint offset, guint encoding)
}
static gint
+spotlight_uuid(tvbuff_t *tvb, proto_tree *tree, gint offset, guint encoding)
+{
+ gint count, i;
+ guint64 query_data64;
+
+ query_data64 = spotlight_ntoh64(tvb, offset, encoding);
+ count = query_data64 >> 32;
+ offset += 8;
+
+ i = 0;
+ while (i++ < count) {
+ proto_tree_add_item(tree, hf_afp_spotlight_uuid, tvb, offset, 16, ENC_BIG_ENDIAN);
+ offset += 16;
+ }
+
+ return count;
+}
+
+static gint
spotlight_float(tvbuff_t *tvb, proto_tree *tree, gint offset, guint encoding)
{
gint count, i;
@@ -4198,6 +4219,13 @@ spotlight_dissect_query_loop(tvbuff_t *tvb, proto_tree *tree, gint offset, guint
count -= j;
offset += query_length;
break;
+ case SQ_TYPE_UUID:
+ item_query = proto_tree_add_text(tree, tvb, offset, 8, "UUID");
+ sub_tree = proto_item_add_subtree(item_query, ett_afp_spotlight_query_line);
+ j = spotlight_uuid(tvb, sub_tree, offset, encoding);
+ count -= j;
+ offset += query_length;
+ break;
case SQ_TYPE_FLOAT:
item_query = proto_tree_add_text(tree, tvb, offset, 8, "float");
sub_tree = proto_item_add_subtree(item_query, ett_afp_spotlight_query_line);
@@ -6586,6 +6614,11 @@ proto_register_afp(void)
FT_UINT32, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
+ { &hf_afp_spotlight_uuid,
+ { "UUID", "afp.spotlight.uuid",
+ FT_GUID, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }},
+
{ &hf_afp_unknown,
{ "Unknown parameter", "afp.unknown",
FT_BYTES, BASE_NONE, NULL, 0x0,