diff -u -r -x *.[^ch]|nmake|am ethereal-orig/packet-smb.c ethereal/packet-smb.c
--- ethereal-orig/packet-smb.c	Tue Feb 19 16:59:19 2002
+++ ethereal/packet-smb.c	Thu Feb 21 21:36:12 2002
@@ -538,6 +538,9 @@
 static int hf_smb_fs_attr_vq = -1;
 static int hf_smb_fs_attr_dim = -1;
 static int hf_smb_fs_attr_vic = -1;
+static int hf_smb_quota_flags_deny_disk = -1;
+static int hf_smb_quota_flags_log_limit = -1;
+static int hf_smb_quota_flags_log_warning = -1;
 
 static gint ett_smb = -1;
 static gint ett_smb_hdr = -1;
@@ -605,6 +608,7 @@
 static gint ett_smb_ace = -1;
 static gint ett_smb_ace_flags = -1;
 static gint ett_smb_sec_desc_type = -1;
+static gint ett_smb_quotaflags = -1;
 
 proto_tree *top_tree=NULL;     /* ugly */
 
@@ -8195,6 +8199,7 @@
 	{ 0x01,		"FIND_FIRST2" },
 	{ 0x02,		"FIND_NEXT2" },
 	{ 0x03,		"QUERY_FS_INFORMATION" },
+	{ 0x04,		"QUOTAS" },
 	{ 0x05,		"QUERY_PATH_INFORMATION" },
 	{ 0x06,		"SET_PATH_INFORMATION" },
 	{ 0x07,		"QUERY_FILE_INFORMATION" },
@@ -8286,6 +8291,7 @@
 	{ 0x0103,	"Query FS Size Info"},
 	{ 0x0104,	"Query FS Device Info"},
 	{ 0x0105,	"Query FS Attribute Info"},
+	{ 1006,		"Query FS Quota Info"},
 	{0, NULL}
 };
 
@@ -10859,6 +10865,66 @@
 	return offset;
 }
 
+/* dissect 4 bytes specifying the number of 256 byte blocks for a quota limit */
+static void
+dissect_quota_32bit(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
+		char *str)
+{ 
+	guint32 quota;
+	int i;
+	char *prefix = "KMGTPE";
+
+	quota = tvb_get_letohl(tvb, offset);
+
+	/* divide by four to get number of KB*/
+	quota >>= 2;
+
+	/* divide by 1024 until the result is less than 1024 */
+	i=0;
+	while( quota>1023 ){
+		i++;
+		quota >>= 10;
+	}
+
+	proto_tree_add_text(tree, tvb, offset, 4,
+			"%s is %d%cB",str, quota, prefix[i]);
+}
+
+
+static const true_false_string tfs_quota_flags_deny_disk = {
+	"DENY DISK SPACE for users exceeding quota limit",
+	"Do NOT deny disk space for users exceeding quota limit"
+};
+static const true_false_string tfs_quota_flags_log_limit = {
+	"LOG EVENT when a user exceeds their QUOTA LIMIT",
+	"Do NOT log event when a user exceeds their quota limit"
+};
+static const true_false_string tfs_quota_flags_log_warning = {
+	"LOG EVENT when a user exceeds their WARNING LEVEL",
+	"Do NOT log event when a user exceeds their warning level"
+};
+static void
+dissect_quota_flags(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int offset)
+{
+	guint8 mask;
+	proto_item *item = NULL;
+	proto_tree *tree = NULL;
+
+	mask = tvb_get_guint8(tvb, offset);
+
+	if(parent_tree){
+		item = proto_tree_add_text(parent_tree, tvb, offset, 1,
+			"Quota Flags: 0x%02x", mask);
+		tree = proto_item_add_subtree(item, ett_smb_quotaflags);
+	}
+
+	proto_tree_add_boolean(tree, hf_smb_quota_flags_log_limit,
+		tvb, offset, 1, mask);
+	proto_tree_add_boolean(tree, hf_smb_quota_flags_log_warning,
+		tvb, offset, 1, mask);
+	proto_tree_add_boolean(tree, hf_smb_quota_flags_deny_disk,
+		tvb, offset, 1, mask);
+}
 
 /*dissect the data block for TRANS2_QUERY_FS_INFORMATION*/
 static int
@@ -11013,6 +11079,46 @@
 		COUNT_BYTES_TRANS_SUBR(fn_len);
 
 		break;
+	case 1006:	/* QUERY_FS_QUOTA_INFO */
+		/* first 25 bytes are unknown */
+		CHECK_BYTE_COUNT_TRANS_SUBR(25);
+		proto_tree_add_item(tree, hf_smb_unknown, tvb,
+			    offset, 25, TRUE);
+		COUNT_BYTES_TRANS_SUBR(25);
+
+		/* This really calls for a separate routing, but this will do for testing */
+		/* number of 256byte blocks for WARNING LEVEL, 32bit integer */
+		CHECK_BYTE_COUNT_TRANS_SUBR(4);
+		dissect_quota_32bit(tvb, pinfo, tree, offset, "Default (Soft) Quota Warning Level");
+		COUNT_BYTES_TRANS_SUBR(4);
+
+		/* these 4 bytes are unknown */
+		CHECK_BYTE_COUNT_TRANS_SUBR(4);
+		proto_tree_add_item(tree, hf_smb_unknown, tvb,
+			    offset, 4, TRUE);
+		COUNT_BYTES_TRANS_SUBR(4);
+
+		/* number of 256byte blocks for QUOTA LIMIT, 64bit integer */
+		CHECK_BYTE_COUNT_TRANS_SUBR(4);
+		dissect_quota_32bit(tvb, pinfo, tree, offset, "Default (Hard) Quota Limit");
+		COUNT_BYTES_TRANS_SUBR(4);
+
+		/* these 3 bytes are unknown */
+		CHECK_BYTE_COUNT_TRANS_SUBR(3);
+		proto_tree_add_item(tree, hf_smb_unknown, tvb,
+			    offset, 3, TRUE);
+		COUNT_BYTES_TRANS_SUBR(3);
+
+		/* one byte of quota flags */
+		CHECK_BYTE_COUNT_TRANS_SUBR(1);
+		dissect_quota_flags(tvb, pinfo, tree, offset);
+		COUNT_BYTES_TRANS_SUBR(1);
+
+		/* these 7 bytes are unknown */
+		CHECK_BYTE_COUNT_TRANS_SUBR(7);
+		proto_tree_add_item(tree, hf_smb_unknown, tvb,
+			    offset, 7, TRUE);
+		COUNT_BYTES_TRANS_SUBR(7);
 	}
  
 	return offset;
@@ -15897,6 +16003,18 @@
 		{ "Self Relative", "smb.sec_desc.type.self_relative", FT_BOOLEAN, 16,
 		TFS(&tfs_sec_desc_type_self_relative), 0x8000, "Is this SecDesc self relative?", HFILL }},
 
+	{ &hf_smb_quota_flags_deny_disk,
+		{ "Deny Disk", "smb.quota.flags.deny_disk", FT_BOOLEAN, 8,
+		TFS(&tfs_quota_flags_deny_disk), 0x02, "Is the default quota limit enforced?", HFILL }},
+
+	{ &hf_smb_quota_flags_log_limit,
+		{ "Log Limit", "smb.quota.flags.log_limit", FT_BOOLEAN, 8,
+		TFS(&tfs_quota_flags_log_limit), 0x20, "Should the server log an event when the limit is exceeded?", HFILL }},
+
+	{ &hf_smb_quota_flags_log_warning,
+		{ "Log Warning", "smb.quota.flags.log_warning", FT_BOOLEAN, 8,
+		TFS(&tfs_quota_flags_log_warning), 0x10, "Should the server log an event when the warning level is exceeded?", HFILL }},
+
 	};
 	static gint *ett[] = {
 		&ett_smb,
@@ -15965,6 +16083,7 @@
 		&ett_smb_ace,
 		&ett_smb_ace_flags,
 		&ett_smb_sec_desc_type,
+		&ett_smb_quotaflags,
 	};
 	module_t *smb_module;
 
