summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2009-09-10 06:07:31 +0000
committerAnders Broman <anders.broman@ericsson.com>2009-09-10 06:07:31 +0000
commit213c607443d92f68091b59c7fb75450813271059 (patch)
tree520410b265118ca0df4c4bd71d25c8084fa94a3d
parent8a23b29c91d1e57c5c6b18a8a767ed77a1cc081b (diff)
downloadwireshark-213c607443d92f68091b59c7fb75450813271059.tar.gz
From Alex deVries:
DSI/AFP dissectors need support for AFP 3.3 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3995 svn path=/trunk/; revision=29836
-rw-r--r--epan/dissectors/packet-afp.c19
-rw-r--r--epan/dissectors/packet-afp.h1
-rw-r--r--epan/dissectors/packet-dsi.c62
3 files changed, 62 insertions, 20 deletions
diff --git a/epan/dissectors/packet-afp.c b/epan/dissectors/packet-afp.c
index 90f5201b9d..5eaff3e53c 100644
--- a/epan/dissectors/packet-afp.c
+++ b/epan/dissectors/packet-afp.c
@@ -58,10 +58,11 @@ http://developer.apple.com/DOCUMENTATION/macos8/pdf/ASAppleTalkFiling2.1_2.2.pdf
http://developer.apple.com/documentation/Networking/Conceptual/AFP/index.html
- AFP 3.1 specification, in HTML form, at
-
-http://developer.apple.com/documentation/Networking/Reference/AFP_Reference/index.html
+ AFP 3.3 specfication in HTML form, at
+http://developer.apple.com/mac/library/documentation/Networking/Conceptual/AFP/Introduction/Introduction.html
+
+
The netatalk source code by Wesley Craig & Adrian Sun
http://netatalk.sf.net
*/
@@ -162,6 +163,7 @@ http://developer.apple.com/documentation/Networking/Reference/AFP_Reference/inde
#define AFP_ACCESS 75
/* AFP 3.2 calls added in 10.5 */
+#define AFP_SPOTLIGHTRPC 76
#define AFP_SYNCDIR 78
#define AFP_SYNCFORK 79
@@ -428,6 +430,7 @@ const value_string CommandCode_vals[] = {
{AFP_GETACL, "FPGetACL" },
{AFP_SETACL, "FPSetACL" },
{AFP_ACCESS, "FPAccess" },
+ {AFP_SPOTLIGHTRPC, "FPSpotlightRPC" },
{AFP_SYNCFORK, "FPSyncFork" },
{AFP_SYNCDIR, "FPSyncDir" },
{0, NULL }
@@ -580,6 +583,7 @@ static int hf_afp_vol_attribute_DefaultPrivsFromParent = -1;
static int hf_afp_vol_attribute_NoExchangeFiles = -1;
static int hf_afp_vol_attribute_SupportsExtAttrs = -1;
static int hf_afp_vol_attribute_SupportsACLs = -1;
+static int hf_afp_vol_attribute_CaseSensitive = -1;
static int hf_afp_dir_bitmap_Attributes = -1;
static int hf_afp_dir_bitmap_ParentDirID = -1;
@@ -713,6 +717,7 @@ static const value_string map_id_reply_type_vals[] = {
#define kNoExchangeFiles (1 << 9)
#define kSupportsExtAttrs (1 << 10)
#define kSupportsACLs (1 << 11)
+#define kCaseSensitive (1 << 12)
/*
directory bitmap from Apple AFP3.1.pdf
@@ -1064,6 +1069,7 @@ decode_vol_attribute (proto_tree *tree, tvbuff_t *tvb, gint offset)
proto_tree_add_item(sub_tree, hf_afp_vol_attribute_NoExchangeFiles ,tvb, offset, 2,FALSE);
proto_tree_add_item(sub_tree, hf_afp_vol_attribute_SupportsExtAttrs ,tvb, offset, 2,FALSE);
proto_tree_add_item(sub_tree, hf_afp_vol_attribute_SupportsACLs ,tvb, offset, 2,FALSE);
+ proto_tree_add_item(sub_tree, hf_afp_vol_attribute_CaseSensitive ,tvb, offset, 2,FALSE);
}
return bitmap;
@@ -4585,8 +4591,13 @@ proto_register_afp(void)
{ &hf_afp_vol_attribute_SupportsACLs,
{ "ACLs", "afp.vol_attribute.acls",
+ FT_BOOLEAN, 16, NULL, kSupportsACLs,
+ "Supports access control lists", HFILL }},
+
+ { &hf_afp_vol_attribute_CaseSensitive,
+ { "CaseSensitive", "afp.vol_attribute.acls",
FT_BOOLEAN, 16, NULL, kSupportsACLs,
- "Supports access control lists", HFILL }},
+ "Is case sensitive", HFILL }},
{ &hf_afp_vol_bitmap_Signature,
{ "Signature", "afp.vol_bitmap.signature",
diff --git a/epan/dissectors/packet-afp.h b/epan/dissectors/packet-afp.h
index 632ed73d76..fe41f9c4b1 100644
--- a/epan/dissectors/packet-afp.h
+++ b/epan/dissectors/packet-afp.h
@@ -92,6 +92,7 @@ extern const value_string afp_server_addr_type_vals[];
#define AFPSRVRINFO_SRVDIRECTORY (1<<8) /* supports directory services */
#define AFPSRVRINFO_SRVUTF8 (1<<9) /* supports UTF8 names AFP 3.1 */
#define AFPSRVRINFO_UUID (1<<10) /* supports UUIDs AFP 3.2 */
+#define AFPSRVRINFO_EXT_SLEEP (1<<11) /* supports extended sleep, AFP 3.3 */
#define AFPSRVRINFO_FASTBOZO (1<<15) /* fast copying */
diff --git a/epan/dissectors/packet-dsi.c b/epan/dissectors/packet-dsi.c
index a006bc3c85..727cf2e9bb 100644
--- a/epan/dissectors/packet-dsi.c
+++ b/epan/dissectors/packet-dsi.c
@@ -50,6 +50,9 @@ http://developer.apple.com/DOCUMENTATION/macos8/pdf/ASAppleTalkFiling2.1_2.2.pdf
http://developer.apple.com/documentation/Networking/Conceptual/AFPClient/AFPClient-6.html
(no longer available, apparently)
+
+ Also, AFP 3.3 documents parts of DSI at:
+ http://developer.apple.com/mac/library/documentation/Networking/Conceptual/AFP/Introduction/Introduction.html
* What a Data Stream Interface packet looks like:
* 0 32
@@ -79,6 +82,7 @@ static gint ett_dsi = -1;
static int hf_dsi_open_type = -1;
static int hf_dsi_open_len = -1;
static int hf_dsi_open_quantum = -1;
+static int hf_dsi_replay_cache_size = -1;
static int hf_dsi_open_option = -1;
static int hf_dsi_attn_flag = -1;
@@ -108,6 +112,7 @@ static const value_string dsi_attn_flag_vals[] = {
static const value_string dsi_open_type_vals[] = {
{0, "Server quantum" },
{1, "Attention quantum" },
+ {2, "Replay cache size" },
{0, NULL } };
/* status stuff same for asp and afp */
@@ -132,6 +137,7 @@ static int hf_dsi_server_flag_reconnect = -1;
static int hf_dsi_server_flag_directory = -1;
static int hf_dsi_server_flag_utf8_name = -1;
static int hf_dsi_server_flag_uuid = -1;
+static int hf_dsi_server_flag_ext_sleep = -1;
static int hf_dsi_server_flag_fast_copy = -1;
static int hf_dsi_server_signature = -1;
@@ -201,7 +207,7 @@ static const value_string func_vals[] = {
{0, NULL } };
static gint
-dissect_dsi_open_session(tvbuff_t *tvb, proto_tree *dsi_tree, gint offset)
+dissect_dsi_open_session(tvbuff_t *tvb, proto_tree *dsi_tree, gint offset, gint dsi_length)
{
proto_tree *tree;
proto_item *ti;
@@ -210,19 +216,33 @@ dissect_dsi_open_session(tvbuff_t *tvb, proto_tree *dsi_tree, gint offset)
ti = proto_tree_add_text(dsi_tree, tvb, offset, -1, "Open Session");
tree = proto_item_add_subtree(ti, ett_dsi_open);
- type = tvb_get_guint8(tvb, offset);
- proto_tree_add_item(tree, hf_dsi_open_type, tvb, offset, 1, FALSE);
- offset++;
- len = tvb_get_guint8(tvb, offset);
- proto_tree_add_item(tree, hf_dsi_open_len, tvb, offset, 1, FALSE);
- offset++;
- if (type <= 1) {
- proto_tree_add_item(tree, hf_dsi_open_quantum, tvb, offset, 4, FALSE);
- }
- else {
- proto_tree_add_item(tree, hf_dsi_open_option, tvb, offset, len, FALSE);
+
+ while( dsi_length >2 ) {
+
+ type = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(tree, hf_dsi_open_type, tvb, offset, 1, FALSE);
+ offset++;
+ len = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(tree, hf_dsi_open_len, tvb, offset, 1, FALSE);
+ offset++;
+ switch (type) {
+ case 0:
+ proto_tree_add_item(tree, hf_dsi_open_quantum, tvb, offset, 4, FALSE);
+ break;
+ case 1:
+ proto_tree_add_item(tree, hf_dsi_open_quantum, tvb, offset, 4, FALSE);
+ break;
+ case 2:
+ proto_tree_add_item(tree, hf_dsi_replay_cache_size, tvb, offset, 4, FALSE);
+ break;
+ default:
+ proto_tree_add_item(tree, hf_dsi_open_option, tvb, offset, len, FALSE);
+ }
+
+ dsi_length -= len + 2;
+
+ offset += len;
}
- offset += len;
return offset;
}
@@ -306,6 +326,7 @@ dissect_dsi_reply_get_status(tvbuff_t *tvb, proto_tree *tree, gint offset)
proto_tree_add_item(sub_tree, hf_dsi_server_flag_directory , tvb, ofs, 2, FALSE);
proto_tree_add_item(sub_tree, hf_dsi_server_flag_utf8_name , tvb, ofs, 2, FALSE);
proto_tree_add_item(sub_tree, hf_dsi_server_flag_uuid , tvb, ofs, 2, FALSE);
+ proto_tree_add_item(sub_tree, hf_dsi_server_flag_ext_sleep , tvb, ofs, 2, FALSE);
proto_tree_add_item(sub_tree, hf_dsi_server_flag_fast_copy , tvb, ofs, 2, FALSE);
proto_tree_add_item(tree, hf_dsi_server_name, tvb, offset +AFPSTATUS_PRELEN, 1, FALSE);
@@ -485,7 +506,7 @@ dissect_dsi_reply_get_status(tvbuff_t *tvb, proto_tree *tree, gint offset)
static void
dissect_dsi_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- proto_tree *dsi_tree;
+ proto_tree *dsi_tree;
proto_item *ti;
guint8 dsi_flags,dsi_command;
guint16 dsi_requestid;
@@ -551,7 +572,7 @@ dissect_dsi_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
switch (dsi_command) {
case DSIFUNC_OPEN:
if (tree) {
- dissect_dsi_open_session(tvb, dsi_tree, DSI_BLOCKSIZ);
+ dissect_dsi_open_session(tvb, dsi_tree, DSI_BLOCKSIZ, dsi_length);
}
break;
case DSIFUNC_ATTN:
@@ -759,6 +780,10 @@ proto_register_dsi(void)
{ "Support UUIDs", "dsi.server_flag.uuids",
FT_BOOLEAN, 16, NULL, AFPSRVRINFO_UUID,
"Server supports UUIDs", HFILL }},
+ { &hf_dsi_server_flag_ext_sleep,
+ { "Support extended sleep", "dsi.server_flag.ext_sleep",
+ FT_BOOLEAN, 16, NULL, AFPSRVRINFO_EXT_SLEEP,
+ "Server supports extended sleep", HFILL }},
{ &hf_dsi_server_flag_fast_copy,
{ "Support fast copy", "dsi.server_flag.fast_copy",
FT_BOOLEAN, 16, NULL, AFPSRVRINFO_FASTBOZO,
@@ -781,7 +806,7 @@ proto_register_dsi(void)
"Address value", HFILL }},
{ &hf_dsi_open_type,
- { "Flags", "dsi.open_type",
+ { "Option", "dsi.open_type",
FT_UINT8, BASE_DEC, VALS(dsi_open_type_vals), 0x0,
"Open session option type.", HFILL }},
@@ -795,6 +820,11 @@ proto_register_dsi(void)
FT_UINT32, BASE_DEC, NULL, 0x0,
"Server/Attention quantum", HFILL }},
+ { &hf_dsi_replay_cache_size,
+ { "Replay", "dsi.replay_cache",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "Replay cache size", HFILL }},
+
{ &hf_dsi_open_option,
{ "Option", "dsi.open_option",
FT_BYTES, BASE_NONE, NULL, 0x0,