Lines Matching refs:rsp
885 static int smb311_decode_neg_context(struct smb2_negotiate_rsp *rsp,
890 unsigned int offset = le32_to_cpu(rsp->NegotiateContextOffset);
891 unsigned int ctxt_cnt = le16_to_cpu(rsp->NegotiateContextCount);
909 pctx = (struct smb2_neg_context *)(offset + (char *)rsp);
1025 struct smb2_negotiate_rsp *rsp;
1109 rsp = (struct smb2_negotiate_rsp *)rsp_iov.iov_base;
1123 if (rsp->DialectRevision == cpu_to_le16(SMB20_PROT_ID)) {
1127 } else if (rsp->DialectRevision == cpu_to_le16(SMB21_PROT_ID)) {
1131 } else if (rsp->DialectRevision == cpu_to_le16(SMB311_PROT_ID)) {
1138 if (rsp->DialectRevision == cpu_to_le16(SMB20_PROT_ID)) {
1142 } else if (rsp->DialectRevision == cpu_to_le16(SMB21_PROT_ID)) {
1146 } else if (rsp->DialectRevision == cpu_to_le16(SMB311_PROT_ID)) {
1150 } else if (le16_to_cpu(rsp->DialectRevision) !=
1154 le16_to_cpu(rsp->DialectRevision));
1158 cifs_dbg(FYI, "mode 0x%x\n", rsp->SecurityMode);
1160 if (rsp->DialectRevision == cpu_to_le16(SMB20_PROT_ID))
1162 else if (rsp->DialectRevision == cpu_to_le16(SMB21_PROT_ID))
1164 else if (rsp->DialectRevision == cpu_to_le16(SMB30_PROT_ID))
1166 else if (rsp->DialectRevision == cpu_to_le16(SMB302_PROT_ID))
1168 else if (rsp->DialectRevision == cpu_to_le16(SMB311_PROT_ID))
1172 le16_to_cpu(rsp->DialectRevision));
1177 server->dialect = le16_to_cpu(rsp->DialectRevision);
1190 server->maxBuf = min_t(unsigned int, le32_to_cpu(rsp->MaxTransactSize),
1192 server->max_read = le32_to_cpu(rsp->MaxReadSize);
1193 server->max_write = le32_to_cpu(rsp->MaxWriteSize);
1194 server->sec_mode = le16_to_cpu(rsp->SecurityMode);
1198 server->capabilities = le32_to_cpu(rsp->Capabilities);
1210 (struct smb2_hdr *)rsp);
1234 if (rsp->DialectRevision == cpu_to_le16(SMB311_PROT_ID)) {
1235 if (rsp->NegotiateContextCount)
1236 rc = smb311_decode_neg_context(rsp, server,
1242 free_rsp_buf(resp_buftype, rsp);
1585 struct smb2_sess_setup_rsp *rsp = NULL;
1638 rsp = (struct smb2_sess_setup_rsp *)sess_data->iov[0].iov_base;
1641 ses->Suid = le64_to_cpu(rsp->hdr.SessionId);
1642 ses->session_flags = le16_to_cpu(rsp->SessionFlags);
1678 struct smb2_sess_setup_rsp *rsp = NULL;
1715 rsp = (struct smb2_sess_setup_rsp *)sess_data->iov[0].iov_base;
1719 rsp->hdr.Status == STATUS_MORE_PROCESSING_REQUIRED)
1726 le16_to_cpu(rsp->SecurityBufferOffset)) {
1728 le16_to_cpu(rsp->SecurityBufferOffset));
1732 rc = decode_ntlmssp_challenge(rsp->Buffer,
1733 le16_to_cpu(rsp->SecurityBufferLength), ses);
1745 ses->Suid = le64_to_cpu(rsp->hdr.SessionId);
1746 ses->session_flags = le16_to_cpu(rsp->SessionFlags);
1771 struct smb2_sess_setup_rsp *rsp = NULL;
1805 rsp = (struct smb2_sess_setup_rsp *)sess_data->iov[0].iov_base;
1813 ses->Suid = le64_to_cpu(rsp->hdr.SessionId);
1814 ses->session_flags = le16_to_cpu(rsp->SessionFlags);
2001 struct smb2_tree_connect_rsp *rsp = NULL;
2081 rsp = (struct smb2_tree_connect_rsp *)rsp_iov.iov_base;
2083 if ((rc != 0) || (rsp == NULL)) {
2089 switch (rsp->ShareType) {
2102 cifs_server_dbg(VFS, "unknown share type %d\n", rsp->ShareType);
2107 tcon->share_flags = le32_to_cpu(rsp->ShareFlags);
2108 tcon->capabilities = rsp->Capabilities; /* we keep caps little endian */
2109 tcon->maximal_access = le32_to_cpu(rsp->MaximalAccess);
2110 tcon->tid = le32_to_cpu(rsp->hdr.Id.SyncId.TreeId);
2113 if ((rsp->Capabilities & SMB2_SHARE_CAP_DFS) &&
2129 free_rsp_buf(resp_buftype, rsp);
2134 if (rsp && rsp->hdr.Status == STATUS_BAD_NETWORK_NAME)
2299 struct smb2_create_rsp *rsp = rsp_iov->iov_base;
2313 off = le32_to_cpu(rsp->CreateContextsOffset);
2314 rem = le32_to_cpu(rsp->CreateContextsLength);
2317 cc = (struct create_context *)((u8 *)rsp + off);
2365 if (rsp->OplockLevel != SMB2_OPLOCK_LEVEL_LEASE)
2366 *oplock = rsp->OplockLevel;
2773 struct smb2_create_rsp *rsp = NULL;
2904 * Although unlikely to be possible for rsp to be null and rc not set,
2908 rsp = (struct smb2_create_rsp *)rsp_iov.iov_base;
2909 if (rsp == NULL) {
2915 trace_smb3_posix_mkdir_done(xid, rsp->PersistentFileId, tcon->tid, ses->Suid,
2918 SMB2_close(xid, tcon, rsp->PersistentFileId, rsp->VolatileFileId);
2923 free_rsp_buf(resp_buftype, rsp);
3121 struct smb2_create_rsp *rsp = NULL;
3154 rsp = (struct smb2_create_rsp *)rsp_iov.iov_base;
3158 if (err_iov && rsp) {
3162 rsp = NULL;
3172 } else if (rsp == NULL) /* unlikely to happen, but safer to check */
3175 trace_smb3_open_done(xid, rsp->PersistentFileId, tcon->tid, ses->Suid,
3179 oparms->fid->persistent_fid = rsp->PersistentFileId;
3180 oparms->fid->volatile_fid = rsp->VolatileFileId;
3183 oparms->fid->mid = le64_to_cpu(rsp->hdr.MessageId);
3187 buf->CreationTime = rsp->CreationTime;
3188 buf->LastAccessTime = rsp->LastAccessTime;
3189 buf->LastWriteTime = rsp->LastWriteTime;
3190 buf->ChangeTime = rsp->ChangeTime;
3191 buf->AllocationSize = rsp->AllocationSize;
3192 buf->EndOfFile = rsp->EndofFile;
3193 buf->Attributes = rsp->FileAttributes;
3203 free_rsp_buf(resp_buftype, rsp);
3320 struct smb2_ioctl_rsp *rsp = NULL;
3366 rsp = (struct smb2_ioctl_rsp *)rsp_iov.iov_base;
3393 * Although unlikely to be possible for rsp to be null and rc not set,
3397 if (rsp == NULL) {
3402 *plen = le32_to_cpu(rsp->OutputCount);
3414 if (rsp_iov.iov_len - *plen < le32_to_cpu(rsp->OutputOffset)) {
3416 le32_to_cpu(rsp->OutputOffset));
3422 *out_data = kmemdup((char *)rsp + le32_to_cpu(rsp->OutputOffset),
3431 free_rsp_buf(resp_buftype, rsp);
3501 struct smb2_close_rsp *rsp = NULL;
3537 rsp = (struct smb2_close_rsp *)rsp_iov.iov_base;
3549 &rsp->network_open_info,
3556 free_rsp_buf(resp_buftype, rsp);
3689 struct smb2_query_info_rsp *rsp = NULL;
3727 rsp = (struct smb2_query_info_rsp *)rsp_iov.iov_base;
3740 *dlen = le32_to_cpu(rsp->OutputBufferLength);
3755 rc = smb2_validate_and_copy_iov(le16_to_cpu(rsp->OutputBufferOffset),
3756 le32_to_cpu(rsp->OutputBufferLength),
3766 free_rsp_buf(resp_buftype, rsp);
3949 struct smb2_echo_rsp *rsp = (struct smb2_echo_rsp *)mid->resp_buf;
3954 credits.value = le16_to_cpu(rsp->hdr.CreditRequest);
4514 struct smb2_read_rsp *rsp = NULL;
4541 rsp = (struct smb2_read_rsp *)rsp_iov.iov_base;
4566 *nbytes = le32_to_cpu(rsp->DataLength);
4576 memcpy(*buf, (char *)rsp + rsp->DataOffset, *nbytes);
4599 struct smb2_write_rsp *rsp = (struct smb2_write_rsp *)mid->resp_buf;
4608 credits.value = le16_to_cpu(rsp->hdr.CreditRequest);
4614 written = le32_to_cpu(rsp->DataLength);
4634 credits.value = le16_to_cpu(rsp->hdr.CreditRequest);
4843 struct smb2_write_rsp *rsp = NULL;
4897 rsp = (struct smb2_write_rsp *)rsp_iov.iov_base;
4908 *nbytes = le32_to_cpu(rsp->DataLength);
4917 free_rsp_buf(resp_buftype, rsp);
5154 struct smb2_query_directory_rsp *rsp;
5159 rsp = (struct smb2_query_directory_rsp *)rsp_iov->iov_base;
5181 rc = smb2_validate_iov(le16_to_cpu(rsp->OutputBufferOffset),
5182 le32_to_cpu(rsp->OutputBufferLength), rsp_iov,
5197 srch_inf->ntwrk_buf_start = (char *)rsp;
5199 (char *)rsp + le16_to_cpu(rsp->OutputBufferOffset);
5200 end_of_smb = rsp_iov->iov_len + (char *)rsp;
5230 struct smb2_query_directory_rsp *rsp = NULL;
5258 rsp = (struct smb2_query_directory_rsp *)rsp_iov.iov_base;
5262 rsp->hdr.Status == STATUS_NO_MORE_FILES) {
5289 free_rsp_buf(resp_buftype, rsp);
5350 struct smb2_set_info_rsp *rsp = NULL;
5390 rsp = (struct smb2_set_info_rsp *)rsp_iov.iov_base;
5398 free_rsp_buf(resp_buftype, rsp);
5570 struct smb2_query_info_rsp *rsp = NULL;
5601 rsp = (struct smb2_query_info_rsp *)rsp_iov.iov_base;
5604 le16_to_cpu(rsp->OutputBufferOffset) + (char *)rsp);
5605 rc = smb2_validate_iov(le16_to_cpu(rsp->OutputBufferOffset),
5606 le32_to_cpu(rsp->OutputBufferLength), &rsp_iov,
5621 struct smb2_query_info_rsp *rsp = NULL;
5652 rsp = (struct smb2_query_info_rsp *)rsp_iov.iov_base;
5655 le16_to_cpu(rsp->OutputBufferOffset) + (char *)rsp);
5656 rc = smb2_validate_iov(le16_to_cpu(rsp->OutputBufferOffset),
5657 le32_to_cpu(rsp->OutputBufferLength), &rsp_iov,
5672 struct smb2_query_info_rsp *rsp = NULL;
5719 rsp = (struct smb2_query_info_rsp *)rsp_iov.iov_base;
5721 rsp_len = le32_to_cpu(rsp->OutputBufferLength);
5722 offset = le16_to_cpu(rsp->OutputBufferOffset);
5729 + (char *)rsp, min_t(unsigned int,
5733 + (char *)rsp, sizeof(FILE_SYSTEM_DEVICE_INFO));
5736 (offset + (char *)rsp);
5742 (offset + (char *)rsp);