smb2 read bytes read

Amin Azez azez at ufomechanic.net
Tue Oct 2 10:16:11 GMT 2007


To populate the cache when a read has occurred, I need to know
(naturally) how many bytes have been read.

The smb2 variant doesn't appear to have that information available in
the out struct, but the comments seem to indicate that the size of data
being returned is suspected... do we have knowledge of this yet?

	/* SMB2 Read */
	struct smb2_read {
		enum smb_read_level level;
		struct {
			union smb_handle file;

			/* static body buffer 48 (0x30) bytes */
			/* uint16_t buffer_code;  0x31 = 0x30 + 1 */
			uint16_t _pad;
			uint32_t length;
			uint64_t offset;
			/* struct smb2_handle handle; */
			uint64_t unknown1; /* 0x0000000000000000 */
			uint64_t unknown2; /* 0x0000000000000000 */
		} in;
		struct {
			/* static body buffer 16 (0x10) bytes */
			/* uint16_t buffer_code;  0x11 = 0x10 + 1 */
			/* uint16_t data_ofs; */
			/* uint32_t data_size; */
			uint64_t unknown1; /* 0x0000000000000000 */

			/* dynamic body */
			DATA_BLOB data;
		} out;
	} smb2;
};

Sam


More information about the samba-technical mailing list