if we get the error BUTTER_TOO_SMALL coming back in a getinfo reply the data will...
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>
Sat, 12 Nov 2005 21:14:17 +0000 (21:14 -0000)
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>
Sat, 12 Nov 2005 21:14:17 +0000 (21:14 -0000)
svn path=/trunk/; revision=16493

epan/dissectors/packet-smb2.c

index 65dfb7fb848d9433eb4244bf7568e3698cce89db..1dee74f0c090b76ab6ccfcd9bc50ddc2d0f7933a 100644 (file)
@@ -87,6 +87,7 @@ static int hf_smb2_server_guid = -1;
 static int hf_smb2_class = -1;
 static int hf_smb2_infolevel = -1;
 static int hf_smb2_max_response_size = -1;
+static int hf_smb2_required_buffer_size = -1;
 static int hf_smb2_response_size = -1;
 static int hf_smb2_file_info_12 = -1;
 static int hf_smb2_file_info_22 = -1;
@@ -904,6 +905,16 @@ dissect_smb2_getinfo_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
        proto_tree_add_item(tree, hf_smb2_response_size, tvb, offset, 4, TRUE);
        offset += 4;
 
+       /* if we get BUFFET_TOO_SMALL there will not be any data there, only
+        * a guin32 specifying how big the buffer needs to be
+        */
+       if(si->status==0xc0000023){
+               proto_tree_add_item(tree, hf_smb2_required_buffer_size, tvb, offset, 4, TRUE);
+               offset += 4;
+
+               return offset;
+       }
+
        /* data */
        dissect_smb2_infolevel(tvb, pinfo, tree, offset, si, class, infolevel);
        offset += response_size;
@@ -2221,6 +2232,9 @@ proto_register_smb2(void)
        { &hf_smb2_response_size,
                { "Response Size", "smb2.response_size", FT_UINT32, BASE_DEC,
                NULL, 0, "SMB2 response size", HFILL }},
+       { &hf_smb2_required_buffer_size,
+               { "Required Buffer Size", "smb2.required_size", FT_UINT32, BASE_DEC,
+               NULL, 0, "SMB2 required buffer size", HFILL }},
        { &hf_smb2_pid,
                { "Process Id", "smb2.pid", FT_UINT32, BASE_HEX,
                NULL, 0, "SMB2 Process Id", HFILL }},