- } in;
- struct {
- /* static body buffer 8 (0x08) bytes */
- /* uint16_t buffer_code; 0x09 = 0x08 +1 */
- uint16_t _pad;
- /* uint16_t secblob_ofs */
- /* uint16_t secblob_size */
-
- /* dynamic body */
- DATA_BLOB secblob;
-
- /* extracted from the SMB2 header */
- uint64_t uid;
- } out;
-};
-
-struct smb2_tree_connect {
- struct {
- /* static body buffer 8 (0x08) bytes */
- /* uint16_t buffer_code; 0x09 = 0x08 + 1 */
- uint16_t unknown1; /* 0x0000 */
- /* uint16_t path_ofs */
- /* uint16_t path_size */
-
- /* dynamic body */
- const char *path; /* as non-terminated UTF-16 on the wire */
- } in;
- struct {
- /* static body buffer 16 (0x10) bytes */
- /* uint16_t buffer_code; 0x10 */
- uint16_t unknown1; /* 0x02 */
- uint32_t unknown2; /* 0x00 */
- uint32_t unknown3; /* 0x00 */
- uint32_t access_mask;
-
- /* extracted from the SMB2 header */
- uint32_t tid;
- } out;
-};
-
-#define SMB2_CREATE_FLAG_REQUEST_OPLOCK 0x0100
-#define SMB2_CREATE_FLAG_REQUEST_EXCLUSIVE_OPLOCK 0x0800
-#define SMB2_CREATE_FLAG_GRANT_OPLOCK 0x0001
-#define SMB2_CREATE_FLAG_GRANT_EXCLUSIVE_OPLOCK 0x0080
-
-struct smb2_create {
- struct {
- /* static body buffer 56 (0x38) bytes */
- /* uint16_t buffer_code; 0x39 = 0x38 + 1 */
- uint16_t oplock_flags; /* SMB2_CREATE_FLAG_* */
- uint32_t impersonation;
- uint32_t unknown3[4];
- uint32_t access_mask;
-
- uint32_t file_attr;
- uint32_t share_access;
- uint32_t open_disposition;
- uint32_t create_options;
-
- /* uint16_t fname_ofs */
- /* uint16_t fname_size */
- /* uint32_t blob_ofs; */
- /* uint32_t blob_size; */
-
- /* dynamic body */
- const char *fname;
-
- /* optional list of extended attributes */
- struct smb_ea_list eas;
- } in;
-
- struct {
- /* static body buffer 88 (0x58) bytes */
- /* uint16_t buffer_code; 0x59 = 0x58 + 1 */
- uint16_t oplock_flags; /* SMB2_CREATE_FLAG_* */
- uint32_t create_action;
- NTTIME create_time;
- NTTIME access_time;
- NTTIME write_time;
- NTTIME change_time;
- uint64_t alloc_size;
- uint64_t size;
- uint32_t file_attr;
- uint32_t _pad;
- struct smb2_handle handle;
- /* uint32_t blob_ofs; */
- /* uint32_t blob_size; */
-
- /* dynamic body */
- DATA_BLOB blob;
- } out;
-};
-
-
-#define SMB2_CLOSE_FLAGS_FULL_INFORMATION (1<<0)
-
-struct smb2_close {
- struct {
- /* static body buffer 24 (0x18) bytes */
- /* uint16_t buffer_code; 0x18 */
- uint16_t flags; /* SMB2_CLOSE_FLAGS_* */
- uint32_t _pad;
- struct smb2_handle handle;
- } in;
-
- struct {
- /* static body buffer 60 (0x3C) bytes */
- /* uint16_t buffer_code; 0x3C */
- uint16_t flags;
- uint32_t _pad;
- NTTIME create_time;
- NTTIME access_time;
- NTTIME write_time;
- NTTIME change_time;
- uint64_t alloc_size;
- uint64_t size;
- uint32_t file_attr;