SMB2SRV_CHECK_ASYNC_STATUS_ERR(io, union smb_ioctl);
SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x30, true, 0));
- SSVAL(req->out.body, 0x02, io->smb2.out._pad);
+ SSVAL(req->out.body, 0x02, io->smb2.out.reserved);
SIVAL(req->out.body, 0x04, io->smb2.out.function);
if (io->smb2.level == RAW_IOCTL_SMB2_NO_HANDLE) {
struct smb2_handle h;
}
SMB2SRV_CHECK(smb2_push_o32s32_blob(&req->out, 0x18, io->smb2.out.in));
SMB2SRV_CHECK(smb2_push_o32s32_blob(&req->out, 0x20, io->smb2.out.out));
- SIVAL(req->out.body, 0x28, io->smb2.out.unknown2);
- SIVAL(req->out.body, 0x2C, io->smb2.out.unknown3);
+ SIVAL(req->out.body, 0x28, io->smb2.out.flags);
+ SIVAL(req->out.body, 0x2C, io->smb2.out.reserved2);
smb2srv_send_reply(req);
}
SMB2SRV_SETUP_NTVFS_REQUEST(smb2srv_ioctl_send, NTVFS_ASYNC_STATE_MAY_ASYNC);
/* TODO: avoid the memcpy */
- io->smb2.in._pad = SVAL(req->in.body, 0x02);
+ io->smb2.in.reserved = SVAL(req->in.body, 0x02);
io->smb2.in.function = IVAL(req->in.body, 0x04);
/* file handle ... */
SMB2SRV_CHECK(smb2_pull_o32s32_blob(&req->in, io, req->in.body+0x18, &io->smb2.in.out));
- io->smb2.in.unknown2 = IVAL(req->in.body, 0x20);
+ io->smb2.in.max_input_response = IVAL(req->in.body, 0x20);
SMB2SRV_CHECK(smb2_pull_o32s32_blob(&req->in, io, req->in.body+0x24, &io->smb2.in.in));
- io->smb2.in.max_response_size = IVAL(req->in.body, 0x2C);
- io->smb2.in.flags = BVAL(req->in.body, 0x30);
+ io->smb2.in.max_output_response = IVAL(req->in.body, 0x2C);
+ io->smb2.in.flags = IVAL(req->in.body, 0x30);
+ io->smb2.in.reserved2 = IVAL(req->in.body, 0x34);
smb2_pull_handle(req->in.body + 0x08, &h);
if (h.data[0] == UINT64_MAX && h.data[1] == UINT64_MAX) {
ioctl.smb2.level = RAW_IOCTL_SMB2;
ioctl.smb2.in.file.handle = h;
ioctl.smb2.in.function = FSCTL_SRV_ENUM_SNAPS;
- ioctl.smb2.in.max_response_size = 16;
+ ioctl.smb2.in.max_output_response = 16;
ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL;
status = smb2_ioctl(tree, tmp_ctx, &ioctl.smb2);
ioctl.smb2.level = RAW_IOCTL_SMB2;
ioctl.smb2.in.file.handle = h;
ioctl.smb2.in.function = FSCTL_SRV_REQUEST_RESUME_KEY;
- ioctl.smb2.in.max_response_size = 32;
+ ioctl.smb2.in.max_output_response = 32;
ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL;
status = smb2_ioctl(tree, tmp_ctx, &ioctl.smb2);
ioctl.smb2.level = RAW_IOCTL_SMB2;
ioctl.smb2.in.file.handle = h;
ioctl.smb2.in.function = FSCTL_SRV_REQUEST_RESUME_KEY;
- ioctl.smb2.in.max_response_size = 32;
+ ioctl.smb2.in.max_output_response = 32;
ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL;
status = smb2_ioctl(tree, tmp_ctx, &ioctl.smb2);
ioctl.smb2.level = RAW_IOCTL_SMB2;
ioctl.smb2.in.file.handle = h;
ioctl.smb2.in.function = FSCTL_SRV_REQUEST_RESUME_KEY;
- ioctl.smb2.in.max_response_size = 32;
+ ioctl.smb2.in.max_output_response = 32;
ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL;
status = smb2_ioctl(tree, tmp_ctx, &ioctl.smb2);
ioctl->smb2.in.file.handle = *src_h;
ioctl->smb2.in.function = FSCTL_SRV_REQUEST_RESUME_KEY;
/* Allow for Key + ContextLength + Context */
- ioctl->smb2.in.max_response_size = 32;
+ ioctl->smb2.in.max_output_response = 32;
ioctl->smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL;
status = smb2_ioctl(src_tree, mem_ctx, &ioctl->smb2);
ioctl->smb2.level = RAW_IOCTL_SMB2;
ioctl->smb2.in.file.handle = *dest_h;
ioctl->smb2.in.function = FSCTL_SRV_COPYCHUNK;
- ioctl->smb2.in.max_response_size = sizeof(struct srv_copychunk_rsp);
+ ioctl->smb2.in.max_output_response = sizeof(struct srv_copychunk_rsp);
ioctl->smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL;
ZERO_STRUCTPN(cc_copy);
cc_copy.chunks[0].source_off = 0;
cc_copy.chunks[0].target_off = 0;
cc_copy.chunks[0].length = 4096;
- /* req is valid, but use undersize max_response_size */
- ioctl.smb2.in.max_response_size = sizeof(struct srv_copychunk_rsp) - 1;
+ /* req is valid, but use undersize max_output_response */
+ ioctl.smb2.in.max_output_response = sizeof(struct srv_copychunk_rsp) - 1;
ndr_ret = ndr_push_struct_blob(&ioctl.smb2.in.out, tmp_ctx,
&cc_copy,
ioctl.smb2.level = RAW_IOCTL_SMB2;
ioctl.smb2.in.file.handle = fh;
ioctl.smb2.in.function = FSCTL_GET_COMPRESSION;
- ioctl.smb2.in.max_response_size = sizeof(struct compression_state);
+ ioctl.smb2.in.max_output_response = sizeof(struct compression_state);
ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL;
status = smb2_ioctl(tree, mem_ctx, &ioctl.smb2);
ioctl.smb2.level = RAW_IOCTL_SMB2;
ioctl.smb2.in.file.handle = fh;
ioctl.smb2.in.function = FSCTL_SET_COMPRESSION;
- ioctl.smb2.in.max_response_size = 0;
+ ioctl.smb2.in.max_output_response = 0;
ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL;
cmpr_state.format = compression_fmt;
ioctl.smb2.level = RAW_IOCTL_SMB2;
ioctl.smb2.in.file.handle = fh;
ioctl.smb2.in.function = FSCTL_GET_COMPRESSION;
- ioctl.smb2.in.max_response_size = 0; /* no room for rsp data */
+ ioctl.smb2.in.max_output_response = 0; /* no room for rsp data */
ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL;
status = smb2_ioctl(tree, tmp_ctx, &ioctl.smb2);
fh.data[1] = UINT64_MAX;
ioctl.smb2.in.file.handle = fh;
ioctl.smb2.in.function = FSCTL_QUERY_NETWORK_INTERFACE_INFO;
- ioctl.smb2.in.max_response_size = 0x10000; /* Windows client sets this to 64KiB */
+ ioctl.smb2.in.max_output_response = 0x10000; /* Windows client sets this to 64KiB */
ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL;
status = smb2_ioctl(tree, tmp_ctx, &ioctl.smb2);
ioctl.smb2.level = RAW_IOCTL_SMB2;
ioctl.smb2.in.file.handle = fh;
ioctl.smb2.in.function = FSCTL_SET_SPARSE;
- ioctl.smb2.in.max_response_size = 0;
+ ioctl.smb2.in.max_output_response = 0;
ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL;
set_sparse = (set ? 0xFF : 0x0);
ioctl.smb2.in.out.data = &set_sparse;
ioctl.smb2.level = RAW_IOCTL_SMB2;
ioctl.smb2.in.file.handle = fh;
ioctl.smb2.in.function = FSCTL_SET_SPARSE;
- ioctl.smb2.in.max_response_size = 0;
+ ioctl.smb2.in.max_output_response = 0;
ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL;
/* ioctl.smb2.in.out is zeroed, no SetSparse buffer */
ioctl.smb2.level = RAW_IOCTL_SMB2;
ioctl.smb2.in.file.handle = fh;
ioctl.smb2.in.function = FSCTL_SET_SPARSE;
- ioctl.smb2.in.max_response_size = 0;
+ ioctl.smb2.in.max_output_response = 0;
ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL;
status = smb2_ioctl(tree, tmp_ctx, &ioctl.smb2);
ioctl.smb2.level = RAW_IOCTL_SMB2;
ioctl.smb2.in.file.handle = fh;
ioctl.smb2.in.function = FSCTL_SET_SPARSE;
- ioctl.smb2.in.max_response_size = 0;
+ ioctl.smb2.in.max_output_response = 0;
ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL;
/*
ioctl.smb2.level = RAW_IOCTL_SMB2;
ioctl.smb2.in.file.handle = fh;
ioctl.smb2.in.function = FSCTL_SET_SPARSE;
- ioctl.smb2.in.max_response_size = 0;
+ ioctl.smb2.in.max_output_response = 0;
ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL;
ZERO_ARRAY(buf); /* clear sparse */
ioctl.smb2.level = RAW_IOCTL_SMB2;
ioctl.smb2.in.file.handle = fh;
ioctl.smb2.in.function = FSCTL_QUERY_ALLOCATED_RANGES;
- ioctl.smb2.in.max_response_size = 1024;
+ ioctl.smb2.in.max_output_response = 1024;
ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL;
far_buf.file_off = req_off;
ioctl.smb2.level = RAW_IOCTL_SMB2;
ioctl.smb2.in.file.handle = fh;
ioctl.smb2.in.function = FSCTL_QUERY_ALLOCATED_RANGES;
- ioctl.smb2.in.max_response_size = 0;
+ ioctl.smb2.in.max_output_response = 0;
ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL;
far_buf.file_off = 0;
NT_STATUS_BUFFER_TOO_SMALL, "qar no space");
/* oversize (2x) file_alloced_range_buf in request, should pass */
- ioctl.smb2.in.max_response_size = 1024;
+ ioctl.smb2.in.max_output_response = 1024;
old_len = ioctl.smb2.in.out.length;
ok = data_blob_realloc(tmp_ctx, &ioctl.smb2.in.out,
(ioctl.smb2.in.out.length * 2));
ioctl.smb2.level = RAW_IOCTL_SMB2;
ioctl.smb2.in.file.handle = fh;
ioctl.smb2.in.function = FSCTL_SET_ZERO_DATA;
- ioctl.smb2.in.max_response_size = 0;
+ ioctl.smb2.in.max_output_response = 0;
ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL;
zdata_info.file_off = off;
ioctl.smb2.level = RAW_IOCTL_SMB2;
ioctl.smb2.in.file.handle = fh;
ioctl.smb2.in.function = FSCTL_QUERY_ALLOCATED_RANGES;
- ioctl.smb2.in.max_response_size = 1024;
+ ioctl.smb2.in.max_output_response = 1024;
ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL;
/* off + length wraps around to 511 */
ioctl->smb2.level = RAW_IOCTL_SMB2;
ioctl->smb2.in.file.handle = *fh;
ioctl->smb2.in.function = FSCTL_FILE_LEVEL_TRIM;
- ioctl->smb2.in.max_response_size
+ ioctl->smb2.in.max_output_response
= sizeof(struct fsctl_file_level_trim_rsp);
ioctl->smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL;
ioctl->smb2.level = RAW_IOCTL_SMB2;
ioctl->smb2.in.file.handle = *dest_h;
ioctl->smb2.in.function = FSCTL_DUP_EXTENTS_TO_FILE;
- ioctl->smb2.in.max_response_size = 0;
+ ioctl->smb2.in.max_output_response = 0;
ioctl->smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL;
ZERO_STRUCTPN(dup_ext_buf);