Ethereal-dev: [Ethereal-dev] SMB Interest level 1003 and 1007 decodes
Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.
From: Andrew Esh <root@xxxxxxxxxxxxxxxxx>
Date: Wed, 15 May 2002 10:56:34 -0500
This patch will add interest level 1003 (same as 0x0103) and interest level 1007 (Query Full FS Size Info) to packet-smb.c. I found this while investigating a problem with the reporting to Windows XP of file system size info by Samba. I was unable to see the packet info with Ethereal, but was able to get the Samba code working anyway. Samba has the response right, now, so with this change, Ethereal can also display it. Also noticed level 1003 is treated the same in Smaba as 0x0103, so I added that too. Base version is tip, as of right now. -- Andrew C. Esh mail:Andrew.Esh@xxxxxxxxxxx Tricord Systems, Inc. 2905 Northwest Blvd., Suite 20 763-557-9005 (main) Plymouth, MN 55441-2644 USA 763-551-6418 (direct) http://www.tricord.com - Tricord Home Page Index: packet-smb.c =================================================================== RCS file: /cvsroot/ethereal/packet-smb.c,v retrieving revision 1.257 diff -a -u -c -r1.257 packet-smb.c cvs server: conflicting specifications of output style *** packet-smb.c 2002/05/10 22:09:24 1.257 --- packet-smb.c 2002/05/15 15:50:28 *************** *** 523,528 **** --- 523,530 ---- static int hf_smb_volume_label_len = -1; static int hf_smb_volume_label = -1; static int hf_smb_free_alloc_units64 = -1; + static int hf_smb_caller_free_alloc_units64 = -1; + static int hf_smb_actual_free_alloc_units64 = -1; static int hf_smb_max_name_len = -1; static int hf_smb_fs_name_len = -1; static int hf_smb_fs_name = -1; *************** *** 8647,8653 **** --- 8649,8657 ---- { 0x0103, "Query FS Size Info"}, { 0x0104, "Query FS Device Info"}, { 0x0105, "Query FS Attribute Info"}, + { 1003, "Query FS Size Info"}, { 1006, "Query FS Quota Info"}, + { 1007, "Query Full FS Size Info"}, {0, NULL} }; *************** *** 11461,11466 **** --- 11465,11471 ---- break; case 0x0103: /* SMB_QUERY_FS_SIZE_INFO */ + case 1003: /* SMB_FS_SIZE_INFORMATION */ /* allocation size */ CHECK_BYTE_COUNT_TRANS_SUBR(8); proto_tree_add_item(tree, hf_smb_alloc_size64, tvb, offset, 8, TRUE); *************** *** 11522,11527 **** --- 11527,11559 ---- break; case 1006: /* QUERY_FS_QUOTA_INFO */ offset = dissect_nt_quota(tvb, tree, offset, bcp); + break; + case 1007: /* SMB_FS_FULL_SIZE_INFORMATION */ + /* allocation size */ + CHECK_BYTE_COUNT_TRANS_SUBR(8); + proto_tree_add_item(tree, hf_smb_alloc_size64, tvb, offset, 8, TRUE); + COUNT_BYTES_TRANS_SUBR(8); + + /* caller free allocation units */ + CHECK_BYTE_COUNT_TRANS_SUBR(8); + proto_tree_add_item(tree, hf_smb_caller_free_alloc_units64, tvb, offset, 8, TRUE); + COUNT_BYTES_TRANS_SUBR(8); + + /* actual free allocation units */ + CHECK_BYTE_COUNT_TRANS_SUBR(8); + proto_tree_add_item(tree, hf_smb_actual_free_alloc_units64, tvb, offset, 8, TRUE); + COUNT_BYTES_TRANS_SUBR(8); + + /* sectors per unit */ + CHECK_BYTE_COUNT_TRANS_SUBR(4); + proto_tree_add_item(tree, hf_smb_sector_unit, tvb, offset, 4, TRUE); + COUNT_BYTES_TRANS_SUBR(4); + + /* bytes per sector */ + CHECK_BYTE_COUNT_TRANS_SUBR(4); + proto_tree_add_item(tree, hf_smb_fs_sector, tvb, offset, 4, TRUE); + COUNT_BYTES_TRANS_SUBR(4); + break; } return offset; *************** *** 16401,16406 **** --- 16433,16446 ---- { &hf_smb_free_alloc_units64, { "Free Units", "smb.free_alloc_units", FT_UINT64, BASE_DEC, NULL, 0, "Number of free allocation units", HFILL }}, + + { &hf_smb_caller_free_alloc_units64, + { "Caller Free Units", "smb.caller_free_alloc_units", FT_UINT64, BASE_DEC, + NULL, 0, "Number of caller free allocation units", HFILL }}, + + { &hf_smb_actual_free_alloc_units64, + { "Actual Free Units", "smb.actual_free_alloc_units", FT_UINT64, BASE_DEC, + NULL, 0, "Number of actual free allocation units", HFILL }}, { &hf_smb_soft_quota_limit, { "(Soft) Quota Treshold", "smb.quota.soft.default", FT_UINT64, BASE_DEC,
- Follow-Ups:
- Re: [Ethereal-dev] SMB Interest level 1003 and 1007 decodes
- From: Guy Harris
- Re: [Ethereal-dev] SMB Interest level 1003 and 1007 decodes
- Prev by Date: [Ethereal-dev] DFS.IDL ?
- Next by Date: [Ethereal-dev] iscsi draft 12 patch
- Previous by thread: [Ethereal-dev] DFS.IDL ?
- Next by thread: Re: [Ethereal-dev] SMB Interest level 1003 and 1007 decodes
- Index(es):