Lines Matching refs:req
679 assemble_neg_contexts(struct smb2_negotiate_req *req,
699 pneg_ctxt = (*total_len) + (char *)req;
700 req->NegotiateContextOffset = cpu_to_le32(*total_len);
752 req->NegotiateContextCount = cpu_to_le16(neg_context_count);
1024 struct smb2_negotiate_req *req;
1043 (void **) &req, &total_len);
1047 req->hdr.SessionId = 0;
1054 req->Dialects[0] = cpu_to_le16(SMB30_PROT_ID);
1055 req->Dialects[1] = cpu_to_le16(SMB302_PROT_ID);
1056 req->Dialects[2] = cpu_to_le16(SMB311_PROT_ID);
1057 req->DialectCount = cpu_to_le16(3);
1061 req->Dialects[0] = cpu_to_le16(SMB21_PROT_ID);
1062 req->Dialects[1] = cpu_to_le16(SMB30_PROT_ID);
1063 req->Dialects[2] = cpu_to_le16(SMB302_PROT_ID);
1064 req->Dialects[3] = cpu_to_le16(SMB311_PROT_ID);
1065 req->DialectCount = cpu_to_le16(4);
1069 req->Dialects[0] = cpu_to_le16(server->vals->protocol_id);
1070 req->DialectCount = cpu_to_le16(1);
1076 req->SecurityMode = cpu_to_le16(SMB2_NEGOTIATE_SIGNING_REQUIRED);
1078 req->SecurityMode = cpu_to_le16(SMB2_NEGOTIATE_SIGNING_ENABLED);
1080 req->SecurityMode = 0;
1082 req->Capabilities = cpu_to_le32(server->vals->req_capabilities);
1084 req->Capabilities |= cpu_to_le32(SMB2_GLOBAL_CAP_MULTI_CHANNEL);
1088 memset(req->ClientGUID, 0, SMB2_CLIENT_GUID_SIZE);
1090 memcpy(req->ClientGUID, server->client_guid,
1097 assemble_neg_contexts(req, server, &total_len);
1099 iov[0].iov_base = (char *)req;
1108 cifs_small_buf_release(req);
1433 struct smb2_sess_setup_req *req;
1438 (void **) &req,
1448 req->hdr.SessionId = cpu_to_le64(ses->Suid);
1449 req->hdr.Flags |= SMB2_FLAGS_SIGNED;
1450 req->PreviousSessionId = 0;
1451 req->Flags = SMB2_SESSION_REQ_FLAG_BINDING;
1455 req->hdr.SessionId = 0;
1460 req->PreviousSessionId = cpu_to_le64(sess_data->previous_session);
1461 req->Flags = 0; /* MBZ */
1468 req->hdr.CreditRequest = cpu_to_le16(0);
1470 req->hdr.CreditRequest = cpu_to_le16(
1476 req->SecurityMode = SMB2_NEGOTIATE_SIGNING_REQUIRED;
1478 req->SecurityMode = SMB2_NEGOTIATE_SIGNING_ENABLED;
1480 req->SecurityMode = 0;
1483 req->Capabilities = cpu_to_le32(SMB2_GLOBAL_CAP_DFS);
1485 req->Capabilities = 0;
1488 req->Channel = 0; /* MBZ */
1490 sess_data->iov[0].iov_base = (char *)req;
1520 struct smb2_sess_setup_req *req = sess_data->iov[0].iov_base;
1524 req->SecurityBufferOffset =
1526 req->SecurityBufferLength = cpu_to_le16(sess_data->iov[1].iov_len);
1770 struct smb2_sess_setup_req *req;
1781 req = (struct smb2_sess_setup_req *) sess_data->iov[0].iov_base;
1782 req->hdr.SessionId = cpu_to_le64(ses->Suid);
1922 struct smb2_logoff_req *req; /* response is also trivial struct */
1947 (void **) &req, &total_len);
1952 req->hdr.SessionId = cpu_to_le64(ses->Suid);
1957 req->hdr.Flags |= SMB2_FLAGS_SIGNED;
1961 iov[0].iov_base = (char *)req;
1970 cifs_small_buf_release(req);
2000 struct smb2_tree_connect_req *req;
2035 (void **) &req, &total_len);
2044 iov[0].iov_base = (char *)req;
2049 req->PathOffset = cpu_to_le16(sizeof(struct smb2_tree_connect_req));
2050 req->PathLength = cpu_to_le16(unc_path_len);
2055 * 3.11 tcon req must be signed if not encrypted. See MS-SMB2 3.2.4.1.1
2064 req->hdr.Flags |= SMB2_FLAGS_SIGNED;
2072 req->hdr.CreditRequest = cpu_to_le16(0);
2074 req->hdr.CreditRequest = cpu_to_le16(
2080 cifs_small_buf_release(req);
2143 struct smb2_tree_disconnect_req *req; /* response is trivial */
2169 (void **) &req,
2179 iov[0].iov_base = (char *)req;
2188 cifs_small_buf_release(req);
2373 struct smb2_create_req *req,
2383 req->RequestedOplockLevel = SMB2_OPLOCK_LEVEL_LEASE;
2772 struct smb2_create_req *req;
2804 (void **) &req, &total_len);
2812 req->ImpersonationLevel = IL_IMPERSONATION;
2813 req->DesiredAccess = cpu_to_le32(FILE_WRITE_ATTRIBUTES);
2815 req->FileAttributes = cpu_to_le32(file_attributes);
2816 req->ShareAccess = FILE_SHARE_ALL_LE;
2817 req->CreateDisposition = cpu_to_le32(FILE_CREATE);
2818 req->CreateOptions = cpu_to_le32(CREATE_NOT_FILE);
2820 iov[0].iov_base = (char *)req;
2824 req->NameOffset = cpu_to_le16(sizeof(struct smb2_create_req));
2837 req->hdr.Flags |= SMB2_FLAGS_DFS_OPERATIONS;
2844 req->NameLength = cpu_to_le16(name_len * 2);
2852 req->NameLength = cpu_to_le16(uni_path_len - 2);
2871 req->RequestedOplockLevel = SMB2_OPLOCK_LEVEL_NONE;
2878 req->CreateContextsOffset = cpu_to_le32(
2926 cifs_small_buf_release(req);
2937 struct smb2_create_req *req;
2948 (void **) &req, &total_len);
2952 iov[0].iov_base = (char *)req;
2961 req->ImpersonationLevel = IL_IMPERSONATION;
2962 req->DesiredAccess = cpu_to_le32(oparms->desired_access);
2964 req->FileAttributes = cpu_to_le32(file_attributes);
2965 req->ShareAccess = FILE_SHARE_ALL_LE;
2967 req->CreateDisposition = cpu_to_le32(oparms->disposition);
2968 req->CreateOptions = cpu_to_le32(oparms->create_options & CREATE_OPTIONS_MASK);
2969 req->NameOffset = cpu_to_le16(sizeof(struct smb2_create_req));
2982 req->hdr.Flags |= SMB2_FLAGS_DFS_OPERATIONS;
2988 req->NameLength = cpu_to_le16(name_len * 2);
2994 req->NameLength = cpu_to_le16(uni_path_len - 2);
3013 req->RequestedOplockLevel = *oplock;
3016 req->RequestedOplockLevel = *oplock; /* no srv lease support */
3018 rc = add_lease_context(server, req, iov, &n_iov,
3076 req->CreateContextsOffset = cpu_to_le32(
3079 req->CreateContextsLength = 0;
3088 le32_add_cpu(&req->CreateContextsLength, len);
3090 le32_add_cpu(&req->CreateContextsLength,
3214 struct smb2_ioctl_req *req;
3221 (void **) &req, &total_len);
3232 cifs_small_buf_release(req);
3237 req->CtlCode = cpu_to_le32(opcode);
3238 req->PersistentFileId = persistent_fid;
3239 req->VolatileFileId = volatile_fid;
3241 iov[0].iov_base = (char *)req;
3251 req->InputCount = cpu_to_le32(indatalen);
3253 req->InputOffset =
3264 req->OutputOffset = 0;
3265 req->OutputCount = 0; /* MBZ */
3282 req->MaxOutputResponse = cpu_to_le32(max_response_size);
3283 req->hdr.CreditCharge =
3287 req->Flags = cpu_to_le32(SMB2_0_IOCTL_IS_FSCTL);
3291 req->hdr.Flags |= SMB2_FLAGS_SIGNED;
3466 struct smb2_close_req *req;
3472 (void **) &req, &total_len);
3476 req->PersistentFileId = persistent_fid;
3477 req->VolatileFileId = volatile_fid;
3479 req->Flags = SMB2_CLOSE_FLAG_POSTQUERY_ATTRIB;
3481 req->Flags = 0;
3482 iov[0].iov_base = (char *)req;
3640 struct smb2_query_info_req *req;
3646 if (unlikely(check_add_overflow(input_len, sizeof(*req), &len) ||
3651 (void **) &req, &total_len);
3655 req->InfoType = info_type;
3656 req->FileInfoClass = info_class;
3657 req->PersistentFileId = persistent_fid;
3658 req->VolatileFileId = volatile_fid;
3659 req->AdditionalInformation = cpu_to_le32(additional_info);
3661 req->OutputBufferLength = cpu_to_le32(output_len);
3663 req->InputBufferLength = cpu_to_le32(input_len);
3665 req->InputBufferOffset = cpu_to_le16(total_len - 1);
3666 memcpy(req->Buffer, input, input_len);
3669 iov[0].iov_base = (char *)req;
3833 struct smb2_change_notify_req *req;
3839 (void **) &req, &total_len);
3843 req->PersistentFileId = persistent_fid;
3844 req->VolatileFileId = volatile_fid;
3846 req->OutputBufferLength =
3848 req->CompletionFilter = cpu_to_le32(completion_filter);
3850 req->Flags = cpu_to_le16(SMB2_WATCH_TREE);
3852 req->Flags = 0;
3854 iov[0].iov_base = (char *)req;
4098 struct smb2_echo_req *req;
4118 (void **)&req, &total_len);
4122 req->hdr.CreditRequest = cpu_to_le16(1);
4125 iov[0].iov_base = (char *)req;
4132 cifs_small_buf_release(req);
4148 struct smb2_flush_req *req;
4154 (void **) &req, &total_len);
4158 req->PersistentFileId = persistent_fid;
4159 req->VolatileFileId = volatile_fid;
4161 iov[0].iov_base = (char *)req;
4255 struct smb2_read_req *req = NULL;
4260 (void **) &req, total_len);
4267 shdr = &req->hdr;
4270 req->PersistentFileId = io_parms->persistent_fid;
4271 req->VolatileFileId = io_parms->volatile_fid;
4272 req->ReadChannelInfoOffset = 0; /* reserved */
4273 req->ReadChannelInfoLength = 0; /* reserved */
4274 req->Channel = 0; /* reserved */
4275 req->MinimumCount = 0;
4276 req->Length = cpu_to_le32(io_parms->length);
4277 req->Offset = cpu_to_le64(io_parms->offset);
4297 req->Channel = SMB2_CHANNEL_RDMA_V1_INVALIDATE;
4299 req->Channel = SMB2_CHANNEL_RDMA_V1;
4300 req->ReadChannelInfoOffset =
4302 req->ReadChannelInfoLength =
4304 v1 = (struct smbd_buffer_descriptor_v1 *) &req->Buffer[0];
4327 req->PersistentFileId = (u64)-1;
4328 req->VolatileFileId = (u64)-1;
4332 req->RemainingBytes = cpu_to_le32(remaining_bytes);
4334 req->RemainingBytes = 0;
4336 *buf = req;
4513 struct smb2_read_req *req = NULL;
4525 rc = smb2_new_read_req((void **)&req, &total_len, io_parms, NULL, 0, 0);
4532 iov[0].iov_base = (char *)req;
4548 req->PersistentFileId,
4553 trace_smb3_read_done(xid, req->PersistentFileId, io_parms->tcon->tid,
4556 cifs_small_buf_release(req);
4560 req->PersistentFileId,
4564 cifs_small_buf_release(req);
4680 struct smb2_write_req *req = NULL;
4710 (void **) &req, &total_len);
4717 shdr = (struct smb2_hdr *)req;
4720 req->PersistentFileId = io_parms->persistent_fid;
4721 req->VolatileFileId = io_parms->volatile_fid;
4722 req->WriteChannelInfoOffset = 0;
4723 req->WriteChannelInfoLength = 0;
4724 req->Channel = SMB2_CHANNEL_NONE;
4725 req->Offset = cpu_to_le64(io_parms->offset);
4726 req->DataOffset = cpu_to_le16(
4728 req->RemainingBytes = 0;
4753 req->Length = 0;
4754 req->DataOffset = 0;
4755 req->RemainingBytes = cpu_to_le32(data_size);
4756 req->Channel = SMB2_CHANNEL_RDMA_V1_INVALIDATE;
4758 req->Channel = SMB2_CHANNEL_RDMA_V1;
4759 req->WriteChannelInfoOffset =
4761 req->WriteChannelInfoLength =
4763 v1 = (struct smbd_buffer_descriptor_v1 *) &req->Buffer[0];
4770 iov[0].iov_base = (char *)req;
4786 req->Length = cpu_to_le32(io_parms->length);
4788 req->Length = cpu_to_le32(io_parms->length);
4826 cifs_small_buf_release(req);
4842 struct smb2_write_req *req = NULL;
4862 (void **) &req, &total_len);
4869 req->hdr.Id.SyncId.ProcessId = cpu_to_le32(io_parms->pid);
4871 req->PersistentFileId = io_parms->persistent_fid;
4872 req->VolatileFileId = io_parms->volatile_fid;
4873 req->WriteChannelInfoOffset = 0;
4874 req->WriteChannelInfoLength = 0;
4875 req->Channel = 0;
4876 req->Length = cpu_to_le32(io_parms->length);
4877 req->Offset = cpu_to_le64(io_parms->offset);
4878 req->DataOffset = cpu_to_le16(
4880 req->RemainingBytes = 0;
4886 iov[0].iov_base = (char *)req;
4901 req->PersistentFileId,
4910 req->PersistentFileId,
4916 cifs_small_buf_release(req);
5075 struct smb2_query_directory_req *req;
5086 (void **) &req, &total_len);
5092 req->FileInformationClass = FILE_DIRECTORY_INFORMATION;
5095 req->FileInformationClass = FILEID_FULL_DIRECTORY_INFORMATION;
5098 req->FileInformationClass = SMB_FIND_FILE_POSIX_INFO;
5101 req->FileInformationClass = FILE_FULL_DIRECTORY_INFORMATION;
5109 req->FileIndex = cpu_to_le32(index);
5110 req->PersistentFileId = persistent_fid;
5111 req->VolatileFileId = volatile_fid;
5114 bufptr = req->Buffer;
5117 req->FileNameOffset =
5119 req->FileNameLength = cpu_to_le16(len);
5126 req->OutputBufferLength = cpu_to_le32(output_size);
5128 iov[0].iov_base = (char *)req;
5132 iov[1].iov_base = (char *)(req->Buffer);
5300 struct smb2_set_info_req *req;
5306 (void **) &req, &total_len);
5310 req->hdr.Id.SyncId.ProcessId = cpu_to_le32(pid);
5311 req->InfoType = info_type;
5312 req->FileInfoClass = info_class;
5313 req->PersistentFileId = persistent_fid;
5314 req->VolatileFileId = volatile_fid;
5315 req->AdditionalInformation = cpu_to_le32(additional_info);
5317 req->BufferOffset = cpu_to_le16(sizeof(struct smb2_set_info_req));
5318 req->BufferLength = cpu_to_le32(*size);
5320 memcpy(req->Buffer, *data, *size);
5323 iov[0].iov_base = (char *)req;
5328 le32_add_cpu(&req->BufferLength, size[i]);
5450 struct smb2_oplock_break *req = NULL;
5461 (void **) &req, &total_len);
5468 req->VolatileFid = volatile_fid;
5469 req->PersistentFid = persistent_fid;
5470 req->OplockLevel = oplock_level;
5471 req->hdr.CreditRequest = cpu_to_le16(1);
5475 iov[0].iov_base = (char *)req;
5484 cifs_small_buf_release(req);
5532 struct smb2_query_info_req *req;
5541 (void **) &req, &total_len);
5545 req->InfoType = SMB2_O_INFO_FILESYSTEM;
5546 req->FileInfoClass = level;
5547 req->PersistentFileId = persistent_fid;
5548 req->VolatileFileId = volatile_fid;
5550 req->InputBufferOffset =
5552 req->OutputBufferLength = cpu_to_le32(
5555 iov->iov_base = (char *)req;
5759 struct smb2_lock_req *req = NULL;
5771 (void **) &req, &total_len);
5778 req->hdr.Id.SyncId.ProcessId = cpu_to_le32(pid);
5779 req->LockCount = cpu_to_le16(num_lock);
5781 req->PersistentFileId = persist_fid;
5782 req->VolatileFileId = volatile_fid;
5786 iov[0].iov_base = (char *)req;
5800 cifs_small_buf_release(req);
5834 struct smb2_lease_ack *req = NULL;
5847 (void **) &req, &total_len);
5854 req->hdr.CreditRequest = cpu_to_le16(1);
5855 req->StructureSize = cpu_to_le16(36);
5858 memcpy(req->LeaseKey, lease_key, 16);
5859 req->LeaseState = lease_state;
5863 iov[0].iov_base = (char *)req;
5872 cifs_small_buf_release(req);