• Home
  • Raw
  • Download

Lines Matching refs:rsp

680 static int smb311_decode_neg_context(struct smb2_negotiate_rsp *rsp,  in smb311_decode_neg_context()  argument
685 unsigned int offset = le32_to_cpu(rsp->NegotiateContextOffset); in smb311_decode_neg_context()
686 unsigned int ctxt_cnt = le16_to_cpu(rsp->NegotiateContextCount); in smb311_decode_neg_context()
707 pctx = (struct smb2_neg_context *)(offset + (char *)rsp); in smb311_decode_neg_context()
818 struct smb2_negotiate_rsp *rsp; in SMB2_negotiate() local
896 rsp = (struct smb2_negotiate_rsp *)rsp_iov.iov_base; in SMB2_negotiate()
911 if (rsp->DialectRevision == cpu_to_le16(SMB20_PROT_ID)) { in SMB2_negotiate()
915 } else if (rsp->DialectRevision == cpu_to_le16(SMB21_PROT_ID)) { in SMB2_negotiate()
922 if (rsp->DialectRevision == cpu_to_le16(SMB20_PROT_ID)) { in SMB2_negotiate()
926 } else if (rsp->DialectRevision == cpu_to_le16(SMB21_PROT_ID)) { in SMB2_negotiate()
930 } else if (rsp->DialectRevision == cpu_to_le16(SMB311_PROT_ID)) { in SMB2_negotiate()
934 } else if (le16_to_cpu(rsp->DialectRevision) != in SMB2_negotiate()
938 le16_to_cpu(rsp->DialectRevision)); in SMB2_negotiate()
942 cifs_dbg(FYI, "mode 0x%x\n", rsp->SecurityMode); in SMB2_negotiate()
944 if (rsp->DialectRevision == cpu_to_le16(SMB20_PROT_ID)) in SMB2_negotiate()
946 else if (rsp->DialectRevision == cpu_to_le16(SMB21_PROT_ID)) in SMB2_negotiate()
948 else if (rsp->DialectRevision == cpu_to_le16(SMB30_PROT_ID)) in SMB2_negotiate()
950 else if (rsp->DialectRevision == cpu_to_le16(SMB302_PROT_ID)) in SMB2_negotiate()
952 else if (rsp->DialectRevision == cpu_to_le16(SMB311_PROT_ID)) in SMB2_negotiate()
956 le16_to_cpu(rsp->DialectRevision)); in SMB2_negotiate()
960 server->dialect = le16_to_cpu(rsp->DialectRevision); in SMB2_negotiate()
973 server->maxBuf = min_t(unsigned int, le32_to_cpu(rsp->MaxTransactSize), in SMB2_negotiate()
975 server->max_read = le32_to_cpu(rsp->MaxReadSize); in SMB2_negotiate()
976 server->max_write = le32_to_cpu(rsp->MaxWriteSize); in SMB2_negotiate()
977 server->sec_mode = le16_to_cpu(rsp->SecurityMode); in SMB2_negotiate()
981 server->capabilities = le32_to_cpu(rsp->Capabilities); in SMB2_negotiate()
993 (struct smb2_sync_hdr *)rsp); in SMB2_negotiate()
1017 if (rsp->DialectRevision == cpu_to_le16(SMB311_PROT_ID)) { in SMB2_negotiate()
1018 if (rsp->NegotiateContextCount) in SMB2_negotiate()
1019 rc = smb311_decode_neg_context(rsp, server, in SMB2_negotiate()
1025 free_rsp_buf(resp_buftype, rsp); in SMB2_negotiate()
1330 struct smb2_sess_setup_rsp *rsp = NULL; in SMB2_auth_kerberos() local
1376 rsp = (struct smb2_sess_setup_rsp *)sess_data->iov[0].iov_base; in SMB2_auth_kerberos()
1377 ses->Suid = rsp->sync_hdr.SessionId; in SMB2_auth_kerberos()
1379 ses->session_flags = le16_to_cpu(rsp->SessionFlags); in SMB2_auth_kerberos()
1408 struct smb2_sess_setup_rsp *rsp = NULL; in SMB2_sess_auth_rawntlmssp_negotiate() local
1449 rsp = (struct smb2_sess_setup_rsp *)sess_data->iov[0].iov_base; in SMB2_sess_auth_rawntlmssp_negotiate()
1453 rsp->sync_hdr.Status == STATUS_MORE_PROCESSING_REQUIRED) in SMB2_sess_auth_rawntlmssp_negotiate()
1460 le16_to_cpu(rsp->SecurityBufferOffset)) { in SMB2_sess_auth_rawntlmssp_negotiate()
1462 le16_to_cpu(rsp->SecurityBufferOffset)); in SMB2_sess_auth_rawntlmssp_negotiate()
1466 rc = decode_ntlmssp_challenge(rsp->Buffer, in SMB2_sess_auth_rawntlmssp_negotiate()
1467 le16_to_cpu(rsp->SecurityBufferLength), ses); in SMB2_sess_auth_rawntlmssp_negotiate()
1474 ses->Suid = rsp->sync_hdr.SessionId; in SMB2_sess_auth_rawntlmssp_negotiate()
1475 ses->session_flags = le16_to_cpu(rsp->SessionFlags); in SMB2_sess_auth_rawntlmssp_negotiate()
1498 struct smb2_sess_setup_rsp *rsp = NULL; in SMB2_sess_auth_rawntlmssp_authenticate() local
1530 rsp = (struct smb2_sess_setup_rsp *)sess_data->iov[0].iov_base; in SMB2_sess_auth_rawntlmssp_authenticate()
1532 ses->Suid = rsp->sync_hdr.SessionId; in SMB2_sess_auth_rawntlmssp_authenticate()
1533 ses->session_flags = le16_to_cpu(rsp->SessionFlags); in SMB2_sess_auth_rawntlmssp_authenticate()
1695 struct smb2_tree_connect_rsp *rsp = NULL; in SMB2_tcon() local
1767 rsp = (struct smb2_tree_connect_rsp *)rsp_iov.iov_base; in SMB2_tcon()
1777 switch (rsp->ShareType) { in SMB2_tcon()
1790 cifs_server_dbg(VFS, "unknown share type %d\n", rsp->ShareType); in SMB2_tcon()
1795 tcon->share_flags = le32_to_cpu(rsp->ShareFlags); in SMB2_tcon()
1796 tcon->capabilities = rsp->Capabilities; /* we keep caps little endian */ in SMB2_tcon()
1797 tcon->maximal_access = le32_to_cpu(rsp->MaximalAccess); in SMB2_tcon()
1800 tcon->tid = rsp->sync_hdr.TreeId; in SMB2_tcon()
1803 if ((rsp->Capabilities & SMB2_SHARE_CAP_DFS) && in SMB2_tcon()
1816 free_rsp_buf(resp_buftype, rsp); in SMB2_tcon()
1821 if (rsp && rsp->sync_hdr.Status == STATUS_BAD_NETWORK_NAME) { in SMB2_tcon()
1934 struct smb2_create_rsp *rsp, in smb2_parse_contexts() argument
1945 data_offset = (char *)rsp + le32_to_cpu(rsp->CreateContextsOffset); in smb2_parse_contexts()
1946 remaining = le32_to_cpu(rsp->CreateContextsLength); in smb2_parse_contexts()
1970 if (rsp->OplockLevel != SMB2_OPLOCK_LEVEL_LEASE) in smb2_parse_contexts()
1971 *oplock = rsp->OplockLevel; in smb2_parse_contexts()
2284 struct smb2_create_rsp *rsp = NULL; in smb311_posix_mkdir() local
2408 rsp = (struct smb2_create_rsp *)rsp_iov.iov_base; in smb311_posix_mkdir()
2409 trace_smb3_posix_mkdir_done(xid, rsp->PersistentFileId, tcon->tid, in smb311_posix_mkdir()
2413 SMB2_close(xid, tcon, rsp->PersistentFileId, rsp->VolatileFileId); in smb311_posix_mkdir()
2418 free_rsp_buf(resp_buftype, rsp); in smb311_posix_mkdir()
2609 struct smb2_create_rsp *rsp = NULL; in SMB2_open() local
2642 rsp = (struct smb2_create_rsp *)rsp_iov.iov_base; in SMB2_open()
2646 if (err_iov && rsp) { in SMB2_open()
2650 rsp = NULL; in SMB2_open()
2661 trace_smb3_open_done(xid, rsp->PersistentFileId, tcon->tid, in SMB2_open()
2666 oparms->fid->persistent_fid = rsp->PersistentFileId; in SMB2_open()
2667 oparms->fid->volatile_fid = rsp->VolatileFileId; in SMB2_open()
2670 oparms->fid->mid = le64_to_cpu(rsp->sync_hdr.MessageId); in SMB2_open()
2674 memcpy(buf, &rsp->CreationTime, 32); in SMB2_open()
2675 buf->AllocationSize = rsp->AllocationSize; in SMB2_open()
2676 buf->EndOfFile = rsp->EndofFile; in SMB2_open()
2677 buf->Attributes = rsp->FileAttributes; in SMB2_open()
2683 smb2_parse_contexts(server, rsp, &oparms->fid->epoch, in SMB2_open()
2687 free_rsp_buf(resp_buftype, rsp); in SMB2_open()
2803 struct smb2_ioctl_rsp *rsp = NULL; in SMB2_ioctl() local
2847 rsp = (struct smb2_ioctl_rsp *)rsp_iov.iov_base; in SMB2_ioctl()
2873 *plen = le32_to_cpu(rsp->OutputCount); in SMB2_ioctl()
2885 if (rsp_iov.iov_len - *plen < le32_to_cpu(rsp->OutputOffset)) { in SMB2_ioctl()
2887 le32_to_cpu(rsp->OutputOffset)); in SMB2_ioctl()
2893 *out_data = kmemdup((char *)rsp + le32_to_cpu(rsp->OutputOffset), in SMB2_ioctl()
2902 free_rsp_buf(resp_buftype, rsp); in SMB2_ioctl()
2965 struct smb2_close_rsp *rsp = NULL; in SMB2_close() local
2992 rsp = (struct smb2_close_rsp *)rsp_iov.iov_base; in SMB2_close()
3009 free_rsp_buf(resp_buftype, rsp); in SMB2_close()
3129 struct smb2_query_info_rsp *rsp = NULL; in query_info() local
3165 rsp = (struct smb2_query_info_rsp *)rsp_iov.iov_base; in query_info()
3178 *dlen = le32_to_cpu(rsp->OutputBufferLength); in query_info()
3193 rc = smb2_validate_and_copy_iov(le16_to_cpu(rsp->OutputBufferOffset), in query_info()
3194 le32_to_cpu(rsp->OutputBufferLength), in query_info()
3204 free_rsp_buf(resp_buftype, rsp); in query_info()
3339 struct smb2_echo_rsp *rsp = (struct smb2_echo_rsp *)mid->resp_buf; in smb2_echo_callback() local
3344 credits.value = le16_to_cpu(rsp->sync_hdr.CreditRequest); in smb2_echo_callback()
3794 struct smb2_read_rsp *rsp = NULL; in SMB2_read() local
3817 rsp = (struct smb2_read_rsp *)rsp_iov.iov_base; in SMB2_read()
3841 *nbytes = le32_to_cpu(rsp->DataLength); in SMB2_read()
3851 memcpy(*buf, (char *)rsp + rsp->DataOffset, *nbytes); in SMB2_read()
3874 struct smb2_write_rsp *rsp = (struct smb2_write_rsp *)mid->resp_buf; in smb2_writev_callback() local
3879 credits.value = le16_to_cpu(rsp->sync_hdr.CreditRequest); in smb2_writev_callback()
3885 written = le32_to_cpu(rsp->DataLength); in smb2_writev_callback()
3905 credits.value = le16_to_cpu(rsp->sync_hdr.CreditRequest); in smb2_writev_callback()
4092 struct smb2_write_rsp *rsp = NULL; in SMB2_write() local
4141 rsp = (struct smb2_write_rsp *)rsp_iov.iov_base; in SMB2_write()
4151 *nbytes = le32_to_cpu(rsp->DataLength); in SMB2_write()
4159 free_rsp_buf(resp_buftype, rsp); in SMB2_write()
4218 struct smb2_query_directory_rsp *rsp = NULL; in SMB2_query_directory() local
4298 rsp = (struct smb2_query_directory_rsp *)rsp_iov.iov_base; in SMB2_query_directory()
4302 rsp->sync_hdr.Status == STATUS_NO_MORE_FILES) { in SMB2_query_directory()
4315 rc = smb2_validate_iov(le16_to_cpu(rsp->OutputBufferOffset), in SMB2_query_directory()
4316 le32_to_cpu(rsp->OutputBufferLength), &rsp_iov, in SMB2_query_directory()
4332 srch_inf->ntwrk_buf_start = (char *)rsp; in SMB2_query_directory()
4334 (char *)rsp + le16_to_cpu(rsp->OutputBufferOffset); in SMB2_query_directory()
4335 end_of_smb = rsp_iov.iov_len + (char *)rsp; in SMB2_query_directory()
4355 free_rsp_buf(resp_buftype, rsp); in SMB2_query_directory()
4415 struct smb2_set_info_rsp *rsp = NULL; in send_set_info() local
4452 rsp = (struct smb2_set_info_rsp *)rsp_iov.iov_base; in send_set_info()
4460 free_rsp_buf(resp_buftype, rsp); in send_set_info()
4621 struct smb2_query_info_rsp *rsp = NULL; in SMB311_posix_qfs_info() local
4649 rsp = (struct smb2_query_info_rsp *)rsp_iov.iov_base; in SMB311_posix_qfs_info()
4652 le16_to_cpu(rsp->OutputBufferOffset) + (char *)rsp); in SMB311_posix_qfs_info()
4653 rc = smb2_validate_iov(le16_to_cpu(rsp->OutputBufferOffset), in SMB311_posix_qfs_info()
4654 le32_to_cpu(rsp->OutputBufferLength), &rsp_iov, in SMB311_posix_qfs_info()
4669 struct smb2_query_info_rsp *rsp = NULL; in SMB2_QFS_info() local
4697 rsp = (struct smb2_query_info_rsp *)rsp_iov.iov_base; in SMB2_QFS_info()
4700 le16_to_cpu(rsp->OutputBufferOffset) + (char *)rsp); in SMB2_QFS_info()
4701 rc = smb2_validate_iov(le16_to_cpu(rsp->OutputBufferOffset), in SMB2_QFS_info()
4702 le32_to_cpu(rsp->OutputBufferLength), &rsp_iov, in SMB2_QFS_info()
4717 struct smb2_query_info_rsp *rsp = NULL; in SMB2_QFS_attr() local
4761 rsp = (struct smb2_query_info_rsp *)rsp_iov.iov_base; in SMB2_QFS_attr()
4763 rsp_len = le32_to_cpu(rsp->OutputBufferLength); in SMB2_QFS_attr()
4764 offset = le16_to_cpu(rsp->OutputBufferOffset); in SMB2_QFS_attr()
4771 + (char *)rsp, min_t(unsigned int, in SMB2_QFS_attr()
4775 + (char *)rsp, sizeof(FILE_SYSTEM_DEVICE_INFO)); in SMB2_QFS_attr()
4778 (offset + (char *)rsp); in SMB2_QFS_attr()
4784 (offset + (char *)rsp); in SMB2_QFS_attr()