from Didier Gautheron

The new AFP 3.2 specification used by Apple OS X 10.4


svn path=/trunk/; revision=14694
This commit is contained in:
Luis Ontanon 2005-06-19 00:08:30 +00:00
parent c62e906508
commit 30b7a5866b
3 changed files with 1098 additions and 17 deletions

File diff suppressed because it is too large Load Diff

View File

@ -90,6 +90,7 @@ extern const value_string afp_server_addr_type_vals[];
#define AFPSRVRINFO_SRVRECONNECT (1<<7) /* supports reconnect */
#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_FASTBOZO (1<<15) /* fast copying */

View File

@ -60,6 +60,7 @@
* |reserved field |
* |-------------------------------|
*/
#define INET6_ADDRLEN 16
static int proto_dsi = -1;
static int hf_dsi_flags = -1;
@ -127,6 +128,7 @@ static int hf_dsi_server_flag_notify = -1;
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_fast_copy = -1;
static int hf_dsi_server_signature = -1;
@ -149,6 +151,8 @@ const value_string afp_server_addr_type_vals[] = {
{3, "DDP address" },
{4, "DNS name" },
{5, "IP+port ssh tunnel" },
{6, "IP6 address" },
{7, "IP6+port address" },
{0, NULL } };
/* end status stuff */
@ -298,6 +302,7 @@ dissect_dsi_reply_get_status(tvbuff_t *tvb, proto_tree *tree, gint offset)
proto_tree_add_item(sub_tree, hf_dsi_server_flag_reconnect , tvb, ofs, 2, FALSE);
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_fast_copy , tvb, ofs, 2, FALSE);
proto_tree_add_item(tree, hf_dsi_server_name, tvb, offset +AFPSTATUS_PRELEN, 1, FALSE);
@ -373,7 +378,7 @@ dissect_dsi_reply_get_status(tvbuff_t *tvb, proto_tree *tree, gint offset)
if (adr_ofs) {
proto_tree *adr_tree;
char *tmp;
unsigned char *tmp;
const guint8 *ip;
guint16 net;
guint8 node;
@ -419,6 +424,17 @@ dissect_dsi_reply_get_status(tvbuff_t *tvb, proto_tree *tree, gint offset)
ti = proto_tree_add_text(adr_tree, tvb, ofs, len,"Malformed address type %d", type);
}
break;
case 6: /* IP6 */
ip = tvb_get_ptr(tvb, ofs+2, INET6_ADDRLEN);
ti = proto_tree_add_text(adr_tree, tvb, ofs, len, "ip6: %s",
ip6_to_str((const struct e_in6_addr *)ip));
break;
case 7: /* IP6 + 2bytes port */
ip = tvb_get_ptr(tvb, ofs+2, INET6_ADDRLEN);
port = tvb_get_ntohs(tvb, ofs+ 2+INET6_ADDRLEN);
ti = proto_tree_add_text(adr_tree, tvb, ofs, len, "ip6 %s:%d",
ip6_to_str((const struct e_in6_addr *)ip),port);
break;
default:
ti = proto_tree_add_text(adr_tree, tvb, ofs, len,"Unknow type : %d", type);
break;
@ -736,6 +752,10 @@ proto_register_dsi(void)
{ "Support UTF8 server name", "dsi.server_flag.utf8_name",
FT_BOOLEAN, 16, NULL, AFPSRVRINFO_SRVUTF8,
"Server support UTF8 server name", HFILL }},
{ &hf_dsi_server_flag_uuid,
{ "Support UUIDs", "dsi.server_flag.uuids",
FT_BOOLEAN, 16, NULL, AFPSRVRINFO_UUID,
"Server supports UUIDs", HFILL }},
{ &hf_dsi_server_flag_fast_copy,
{ "Support fast copy", "dsi.server_flag.fast_copy",
FT_BOOLEAN, 16, NULL, AFPSRVRINFO_FASTBOZO,