Lines Matching refs:pSMBr

408 decode_ext_sec_blob(struct cifs_ses *ses, NEGOTIATE_RSP *pSMBr)
412 char *guid = pSMBr->u.extended_response.GUID;
415 count = get_bcc(&pSMBr->hdr);
436 pSMBr->u.extended_response.SecurityBlob, count, server);
492 decode_lanman_negprot_rsp(struct TCP_Server_Info *server, NEGOTIATE_RSP *pSMBr)
495 struct lanman_neg_rsp *rsp = (struct lanman_neg_rsp *)pSMBr;
566 decode_lanman_negprot_rsp(struct TCP_Server_Info *server, NEGOTIATE_RSP *pSMBr)
594 NEGOTIATE_RSP *pSMBr;
607 (void **) &pSMB, (void **) &pSMBr);
634 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
638 server->dialect = le16_to_cpu(pSMBr->DialectIndex);
641 if ((pSMBr->hdr.WordCount < 13) || (server->dialect == BAD_PROT)) {
647 } else if (pSMBr->hdr.WordCount == 13) {
649 rc = decode_lanman_negprot_rsp(server, pSMBr);
651 } else if (pSMBr->hdr.WordCount != 17) {
658 server->sec_mode = pSMBr->SecurityMode;
664 server->maxReq = min_t(unsigned int, le16_to_cpu(pSMBr->MaxMpxCount),
668 server->maxBuf = le32_to_cpu(pSMBr->MaxBufferSize);
671 server->max_rw = le32_to_cpu(pSMBr->MaxRawSize);
673 server->capabilities = le32_to_cpu(pSMBr->Capabilities);
674 server->timeAdj = (int)(__s16)le16_to_cpu(pSMBr->ServerTimeZone);
677 if (pSMBr->EncryptionKeyLength == CIFS_CRYPTO_KEY_SIZE) {
679 memcpy(ses->server->cryptkey, pSMBr->u.EncryptionKey,
681 } else if (pSMBr->hdr.Flags2 & SMBFLG2_EXT_SEC ||
684 rc = decode_ext_sec_blob(ses, pSMBr);
852 TRANSACTION2_SPI_RSP *pSMBr = NULL;
862 (void **) &pSMBr);
907 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
925 DELETE_FILE_RSP *pSMBr = NULL;
933 (void **) &pSMBr);
952 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
969 DELETE_DIRECTORY_RSP *pSMBr = NULL;
978 (void **) &pSMBr);
996 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
1014 CREATE_DIRECTORY_RSP *pSMBr = NULL;
1022 (void **) &pSMBr);
1040 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
1059 TRANSACTION2_SPI_RSP *pSMBr = NULL;
1070 (void **) &pSMBr);
1117 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
1124 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
1126 if (rc || get_bcc(&pSMBr->hdr) < sizeof(OPEN_PSX_RSP)) {
1132 psx_rsp = (OPEN_PSX_RSP *)((char *) &pSMBr->hdr.Protocol
1133 + le16_to_cpu(pSMBr->t2.DataOffset));
1147 if (get_bcc(&pSMBr->hdr) < sizeof(OPEN_PSX_RSP)
1225 OPENX_RSP *pSMBr = NULL;
1232 (void **) &pSMBr);
1281 (struct smb_hdr *)pSMBr, &bytes_returned, 0);
1288 /* *pOplock = pSMBr->OplockLevel; */ /* BB take from action field*/
1290 *netfid = pSMBr->Fid; /* cifs fid stays in le */
1294 /* if (cpu_to_le32(FILE_CREATE) == pSMBr->CreateAction)
1304 cpu_to_le32(le16_to_cpu(pSMBr->FileAttributes));
1307 cpu_to_le64(le32_to_cpu(pSMBr->EndOfFile));
1745 READ_RSP *pSMBr = NULL;
1804 pSMBr = (READ_RSP *)rsp_iov.iov_base;
1808 int data_length = le16_to_cpu(pSMBr->DataLengthHigh);
1810 data_length += le16_to_cpu(pSMBr->DataLength);
1821 pReadData = (char *) (&pSMBr->hdr.Protocol) +
1822 le16_to_cpu(pSMBr->DataOffset);
1855 WRITE_RSP *pSMBr = NULL;
1882 (void **) &pSMBr);
1944 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
1949 *nbytes = le16_to_cpu(pSMBr->CountHigh);
1951 *nbytes += le16_to_cpu(pSMBr->Count);
2366 WRITE_RSP *pSMBr = (WRITE_RSP *)rsp_iov.iov_base;
2367 *nbytes = le16_to_cpu(pSMBr->CountHigh);
2369 *nbytes += le16_to_cpu(pSMBr->Count);
2442 /* LOCK_RSP *pSMBr = NULL; */ /* No response data other than rc to parse */
2510 struct smb_com_transaction2_sfi_rsp *pSMBr = NULL;
2527 pSMBr = (struct smb_com_transaction2_sfi_rsp *)pSMB;
2575 (struct smb_hdr *) pSMBr, &bytes_returned);
2581 pSMBr = (struct smb_com_transaction2_sfi_rsp *)rsp_iov.iov_base;
2591 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
2593 if (rc || get_bcc(&pSMBr->hdr) < sizeof(*parm_data)) {
2597 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
2598 data_count = le16_to_cpu(pSMBr->t2.DataCount);
2604 ((char *)&pSMBr->hdr.Protocol + data_offset);
2695 RENAME_RSP *pSMBr = NULL;
2704 (void **) &pSMBr);
2740 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
2758 struct smb_com_transaction2_sfi_rsp *pSMBr = NULL;
2769 (void **) &pSMBr);
2821 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
2842 COPY_RSP *pSMBr = NULL;
2850 (void **) &pSMBr);
2885 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
2888 rc, le16_to_cpu(pSMBr->CopyCount));
2904 TRANSACTION2_SPI_RSP *pSMBr = NULL;
2915 (void **) &pSMBr);
2970 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
2990 TRANSACTION2_SPI_RSP *pSMBr = NULL;
3001 (void **) &pSMBr);
3053 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
3073 RENAME_RSP *pSMBr = NULL;
3083 (void **) &pSMBr);
3123 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
3142 TRANSACTION2_QPI_RSP *pSMBr = NULL;
3153 (void **) &pSMBr);
3193 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
3199 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
3201 if (rc || get_bcc(&pSMBr->hdr) < 2)
3205 u16 count = le16_to_cpu(pSMBr->t2.DataCount);
3207 data_start = ((char *) &pSMBr->hdr.Protocol) +
3208 le16_to_cpu(pSMBr->t2.DataOffset);
3210 if (pSMBr->hdr.Flags2 & SMBFLG2_UNICODE)
3246 struct smb_com_transaction_ioctl_rsp *pSMBr;
3257 (void **) &pSMBr);
3281 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
3287 data_offset = le32_to_cpu(pSMBr->DataOffset);
3288 data_count = le32_to_cpu(pSMBr->DataCount);
3289 if (get_bcc(&pSMBr->hdr) < 2 || data_offset > 512) {
3299 end_of_smb = 2 + get_bcc(&pSMBr->hdr) + (char *)&pSMBr->ByteCount;
3301 ((char *)&pSMBr->hdr.Protocol + data_offset);
3341 if (pSMBr->hdr.Flags2 & SMBFLG2_UNICODE)
3368 struct smb_com_transaction_ioctl_rsp *pSMBr;
3372 (void **) &pSMBr);
3401 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
3559 TRANSACTION2_QPI_RSP *pSMBr = NULL;
3569 (void **) &pSMBr);
3613 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
3620 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
3622 if (rc || get_bcc(&pSMBr->hdr) < 2)
3625 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
3626 __u16 count = le16_to_cpu(pSMBr->t2.DataCount);
3628 (char *)&pSMBr->hdr.Protocol+data_offset,
3646 struct smb_com_transaction2_spi_rsp *pSMBr = NULL;
3656 (void **) &pSMBr);
3704 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
3722 struct smb_t2_qfi_rsp *pSMBr = NULL;
3732 (void **) &pSMBr);
3763 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
3768 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
3770 if (rc || get_bcc(&pSMBr->hdr) < 2)
3775 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
3776 __u16 count = le16_to_cpu(pSMBr->t2.DataCount);
3785 (data_offset + (char *) &pSMBr->hdr.Protocol);
3842 struct smb_com_ntransact_rsp *pSMBr;
3851 pSMBr = (struct smb_com_ntransact_rsp *)buf;
3853 bcc = get_bcc(&pSMBr->hdr);
3855 (char *)&pSMBr->ByteCount;
3857 data_offset = le32_to_cpu(pSMBr->DataOffset);
3858 data_count = le32_to_cpu(pSMBr->DataCount);
3859 parm_offset = le32_to_cpu(pSMBr->ParameterOffset);
3860 parm_count = le32_to_cpu(pSMBr->ParameterCount);
3862 *ppparm = (char *)&pSMBr->hdr.Protocol + parm_offset;
3863 *ppdata = (char *)&pSMBr->hdr.Protocol + data_offset;
3878 end_of_smb, pSMBr);
3931 struct smb_com_ntransact_rsp *pSMBr;
3939 pSMBr = (struct smb_com_ntransact_rsp *)rsp_iov.iov_base;
3942 pSMBr, parm, *acl_inf);
3944 if (le32_to_cpu(pSMBr->ParameterCount) != 4) {
3988 void *pSMBr;
3991 rc = smb_init(SMB_COM_NT_TRANSACT, 19, tcon, (void **) &pSMB, &pSMBr);
4021 memcpy((char *)pSMBr + offsetof(struct smb_hdr, Protocol) +
4028 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
4051 QUERY_INFORMATION_RSP *pSMBr;
4059 (void **) &pSMBr);
4079 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
4084 __u32 time = le32_to_cpu(pSMBr->last_write_time);
4096 cpu_to_le64(le32_to_cpu(pSMBr->size));
4099 cpu_to_le32(le16_to_cpu(pSMBr->attr));
4116 struct smb_t2_qfi_rsp *pSMBr = NULL;
4123 (void **) &pSMBr);
4154 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
4158 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
4162 else if (get_bcc(&pSMBr->hdr) < 40)
4165 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
4167 (char *) &pSMBr->hdr.Protocol +
4187 TRANSACTION2_QPI_RSP *pSMBr = NULL;
4196 (void **) &pSMBr);
4239 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
4243 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
4247 else if (!legacy && get_bcc(&pSMBr->hdr) < 40)
4249 else if (legacy && get_bcc(&pSMBr->hdr) < 24)
4254 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
4266 memcpy((char *) data, (char *) &pSMBr->hdr.Protocol +
4283 struct smb_t2_qfi_rsp *pSMBr = NULL;
4290 (void **) &pSMBr);
4321 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
4325 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
4327 if (rc || get_bcc(&pSMBr->hdr) < sizeof(FILE_UNIX_BASIC_INFO)) {
4331 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
4333 (char *) &pSMBr->hdr.Protocol +
4354 TRANSACTION2_QPI_RSP *pSMBr = NULL;
4363 (void **) &pSMBr);
4403 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
4407 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
4409 if (rc || get_bcc(&pSMBr->hdr) < sizeof(FILE_UNIX_BASIC_INFO)) {
4413 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
4415 (char *) &pSMBr->hdr.Protocol +
4436 TRANSACTION2_FFIRST_RSP *pSMBr = NULL;
4448 (void **) &pSMBr);
4520 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
4536 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
4540 if (pSMBr->hdr.Flags2 & SMBFLG2_UNICODE)
4545 psrch_inf->ntwrk_buf_start = (char *)pSMBr;
4548 (char *) &pSMBr->hdr.Protocol +
4549 le16_to_cpu(pSMBr->t2.DataOffset);
4550 parms = (T2_FFIRST_RSP_PARMS *)((char *) &pSMBr->hdr.Protocol +
4551 le16_to_cpu(pSMBr->t2.ParameterOffset));
4587 TRANSACTION2_FNEXT_RSP *pSMBr = NULL;
4601 (void **) &pSMBr);
4648 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
4658 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
4664 if (pSMBr->hdr.Flags2 & SMBFLG2_UNICODE)
4668 response_data = (char *) &pSMBr->hdr.Protocol +
4669 le16_to_cpu(pSMBr->t2.ParameterOffset);
4671 response_data = (char *)&pSMBr->hdr.Protocol +
4672 le16_to_cpu(pSMBr->t2.DataOffset);
4757 TRANSACTION2_QPI_RSP *pSMBr = NULL;
4767 (void **) &pSMBr);
4808 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
4813 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
4815 if (rc || get_bcc(&pSMBr->hdr) < 2)
4820 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
4821 __u16 count = le16_to_cpu(pSMBr->t2.DataCount);
4830 (data_offset + (char *) &pSMBr->hdr.Protocol);
4849 TRANSACTION2_GET_DFS_REFER_RSP *pSMBr = NULL;
4868 (void **)&pSMB, (void **)&pSMBr);
4924 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
4929 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
4932 if (rc || get_bcc(&pSMBr->hdr) < 17) {
4938 get_bcc(&pSMBr->hdr), le16_to_cpu(pSMBr->t2.DataOffset));
4941 rc = parse_dfs_referrals(&pSMBr->dfs_data,
4942 le16_to_cpu(pSMBr->t2.DataCount),
4945 (pSMBr->hdr.Flags2 & SMBFLG2_UNICODE) != 0);
4963 TRANSACTION2_QFSI_RSP *pSMBr = NULL;
4972 (void **) &pSMBr);
5000 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
5004 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
5006 if (rc || get_bcc(&pSMBr->hdr) < 18)
5009 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
5011 get_bcc(&pSMBr->hdr), data_offset);
5014 (((char *) &pSMBr->hdr.Protocol) + data_offset);
5050 TRANSACTION2_QFSI_RSP *pSMBr = NULL;
5059 (void **) &pSMBr);
5087 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
5091 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
5093 if (rc || get_bcc(&pSMBr->hdr) < 24)
5096 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
5100 *) (((char *) &pSMBr->hdr.Protocol) +
5136 TRANSACTION2_QFSI_RSP *pSMBr = NULL;
5145 (void **) &pSMBr);
5174 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
5178 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
5180 if (rc || get_bcc(&pSMBr->hdr) < 13) {
5184 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
5187 *) (((char *) &pSMBr->hdr.Protocol) +
5206 TRANSACTION2_QFSI_RSP *pSMBr = NULL;
5215 (void **) &pSMBr);
5245 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
5249 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
5251 if (rc || get_bcc(&pSMBr->hdr) <
5255 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
5258 (((char *) &pSMBr->hdr.Protocol) +
5277 TRANSACTION2_QFSI_RSP *pSMBr = NULL;
5286 (void **) &pSMB, (void **) &pSMBr);
5315 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
5319 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
5321 if (rc || get_bcc(&pSMBr->hdr) < 13) {
5324 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
5327 *) (((char *) &pSMBr->hdr.Protocol) +
5347 TRANSACTION2_SETFSI_RSP *pSMBr = NULL;
5356 (void **) &pSMB, (void **) &pSMBr);
5398 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
5402 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
5422 TRANSACTION2_QFSI_RSP *pSMBr = NULL;
5431 (void **) &pSMBr);
5460 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
5464 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
5466 if (rc || get_bcc(&pSMBr->hdr) < 13) {
5469 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
5472 *) (((char *) &pSMBr->hdr.Protocol) +
5522 struct smb_com_transaction2_spi_rsp *pSMBr = NULL;
5534 (void **) &pSMBr);
5593 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
5849 TRANSACTION2_SPI_RSP *pSMBr = NULL;
5861 (void **) &pSMBr);
5909 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
5935 SETATTR_RSP *pSMBr = NULL;
5944 (void **) &pSMBr);
5962 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
6095 TRANSACTION2_SPI_RSP *pSMBr = NULL;
6105 (void **) &pSMBr);
6154 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
6182 TRANSACTION2_QPI_RSP *pSMBr = NULL;
6198 (void **) &pSMBr);
6238 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
6249 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
6250 if (rc || get_bcc(&pSMBr->hdr) < 4) {
6263 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
6265 (((char *) &pSMBr->hdr.Protocol) + data_offset);
6278 end_of_smb = (char *)pByteArea(&pSMBr->hdr) + get_bcc(&pSMBr->hdr);
6367 struct smb_com_transaction2_spi_rsp *pSMBr = NULL;
6378 (void **) &pSMBr);
6451 (struct smb_hdr *) pSMBr, &bytes_returned, 0);