Lines Matching refs:pSMBr
348 decode_ext_sec_blob(struct cifs_ses *ses, NEGOTIATE_RSP *pSMBr)
352 char *guid = pSMBr->u.extended_response.GUID;
355 count = get_bcc(&pSMBr->hdr);
376 pSMBr->u.extended_response.SecurityBlob, count, server);
407 NEGOTIATE_RSP *pSMBr;
419 (void **) &pSMB, (void **) &pSMBr);
446 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
450 server->dialect = le16_to_cpu(pSMBr->DialectIndex);
453 if ((pSMBr->hdr.WordCount <= 13) || (server->dialect == BAD_PROT)) {
459 } else if (pSMBr->hdr.WordCount != 17) {
466 server->sec_mode = pSMBr->SecurityMode;
472 server->maxReq = min_t(unsigned int, le16_to_cpu(pSMBr->MaxMpxCount),
476 server->maxBuf = le32_to_cpu(pSMBr->MaxBufferSize);
479 server->max_rw = le32_to_cpu(pSMBr->MaxRawSize);
481 server->capabilities = le32_to_cpu(pSMBr->Capabilities);
482 server->timeAdj = (int)(__s16)le16_to_cpu(pSMBr->ServerTimeZone);
485 if (pSMBr->EncryptionKeyLength == CIFS_CRYPTO_KEY_SIZE) {
487 memcpy(ses->server->cryptkey, pSMBr->u.EncryptionKey,
489 } else if (pSMBr->hdr.Flags2 & SMBFLG2_EXT_SEC ||
492 rc = decode_ext_sec_blob(ses, pSMBr);
668 TRANSACTION2_SPI_RSP *pSMBr = NULL;
678 (void **) &pSMBr);
726 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
744 DELETE_FILE_RSP *pSMBr = NULL;
752 (void **) &pSMBr);
771 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
788 DELETE_DIRECTORY_RSP *pSMBr = NULL;
797 (void **) &pSMBr);
815 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
833 CREATE_DIRECTORY_RSP *pSMBr = NULL;
841 (void **) &pSMBr);
859 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
878 TRANSACTION2_SPI_RSP *pSMBr = NULL;
889 (void **) &pSMBr);
937 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
944 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
946 if (rc || get_bcc(&pSMBr->hdr) < sizeof(OPEN_PSX_RSP)) {
952 psx_rsp = (OPEN_PSX_RSP *)((char *) &pSMBr->hdr.Protocol
953 + le16_to_cpu(pSMBr->t2.DataOffset));
967 if (get_bcc(&pSMBr->hdr) < sizeof(OPEN_PSX_RSP)
1045 OPENX_RSP *pSMBr = NULL;
1052 (void **) &pSMBr);
1101 (struct smb_hdr *)pSMBr, &bytes_returned, 0);
1108 /* *pOplock = pSMBr->OplockLevel; */ /* BB take from action field*/
1110 *netfid = pSMBr->Fid; /* cifs fid stays in le */
1114 /* if (cpu_to_le32(FILE_CREATE) == pSMBr->CreateAction)
1124 cpu_to_le32(le16_to_cpu(pSMBr->FileAttributes));
1127 cpu_to_le64(le32_to_cpu(pSMBr->EndOfFile));
1386 READ_RSP *pSMBr = NULL;
1445 pSMBr = (READ_RSP *)rsp_iov.iov_base;
1449 int data_length = le16_to_cpu(pSMBr->DataLengthHigh);
1451 data_length += le16_to_cpu(pSMBr->DataLength);
1462 pReadData = (char *) (&pSMBr->hdr.Protocol) +
1463 le16_to_cpu(pSMBr->DataOffset);
1496 WRITE_RSP *pSMBr = NULL;
1523 (void **) &pSMBr);
1585 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
1590 *nbytes = le16_to_cpu(pSMBr->CountHigh);
1592 *nbytes += le16_to_cpu(pSMBr->Count);
1828 WRITE_RSP *pSMBr = (WRITE_RSP *)rsp_iov.iov_base;
1829 *nbytes = le16_to_cpu(pSMBr->CountHigh);
1831 *nbytes += le16_to_cpu(pSMBr->Count);
1904 /* LOCK_RSP *pSMBr = NULL; */ /* No response data other than rc to parse */
1972 struct smb_com_transaction2_sfi_rsp *pSMBr = NULL;
1989 pSMBr = (struct smb_com_transaction2_sfi_rsp *)pSMB;
2038 (struct smb_hdr *) pSMBr, &bytes_returned);
2044 pSMBr = (struct smb_com_transaction2_sfi_rsp *)rsp_iov.iov_base;
2054 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
2056 if (rc || get_bcc(&pSMBr->hdr) < sizeof(*parm_data)) {
2060 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
2061 data_count = le16_to_cpu(pSMBr->t2.DataCount);
2067 ((char *)&pSMBr->hdr.Protocol + data_offset);
2159 RENAME_RSP *pSMBr = NULL;
2168 (void **) &pSMBr);
2204 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
2222 struct smb_com_transaction2_sfi_rsp *pSMBr = NULL;
2233 (void **) &pSMBr);
2286 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
2307 COPY_RSP *pSMBr = NULL;
2315 (void **) &pSMBr);
2350 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
2353 rc, le16_to_cpu(pSMBr->CopyCount));
2369 TRANSACTION2_SPI_RSP *pSMBr = NULL;
2380 (void **) &pSMBr);
2436 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
2456 TRANSACTION2_SPI_RSP *pSMBr = NULL;
2467 (void **) &pSMBr);
2520 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
2541 RENAME_RSP *pSMBr = NULL;
2551 (void **) &pSMBr);
2591 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
2610 TRANSACTION2_QPI_RSP *pSMBr = NULL;
2621 (void **) &pSMBr);
2661 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
2667 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
2669 if (rc || get_bcc(&pSMBr->hdr) < 2)
2673 u16 count = le16_to_cpu(pSMBr->t2.DataCount);
2675 data_start = ((char *) &pSMBr->hdr.Protocol) +
2676 le16_to_cpu(pSMBr->t2.DataOffset);
2678 if (pSMBr->hdr.Flags2 & SMBFLG2_UNICODE)
2797 struct smb_com_transaction_ioctl_rsp *pSMBr;
2801 (void **) &pSMBr);
2830 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
3026 TRANSACTION2_QPI_RSP *pSMBr = NULL;
3036 (void **) &pSMBr);
3080 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
3087 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
3089 if (rc || get_bcc(&pSMBr->hdr) < 2)
3092 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
3093 __u16 count = le16_to_cpu(pSMBr->t2.DataCount);
3095 (char *)&pSMBr->hdr.Protocol+data_offset,
3116 struct smb_com_transaction2_spi_rsp *pSMBr = NULL;
3126 (void **) &pSMBr);
3174 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
3208 struct smb_t2_qfi_rsp *pSMBr = NULL;
3218 (void **) &pSMBr);
3249 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
3254 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
3256 if (rc || get_bcc(&pSMBr->hdr) < 2)
3261 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
3262 __u16 count = le16_to_cpu(pSMBr->t2.DataCount);
3271 (data_offset + (char *) &pSMBr->hdr.Protocol);
3328 struct smb_com_ntransact_rsp *pSMBr;
3337 pSMBr = (struct smb_com_ntransact_rsp *)buf;
3339 bcc = get_bcc(&pSMBr->hdr);
3341 (char *)&pSMBr->ByteCount;
3343 data_offset = le32_to_cpu(pSMBr->DataOffset);
3344 data_count = le32_to_cpu(pSMBr->DataCount);
3345 parm_offset = le32_to_cpu(pSMBr->ParameterOffset);
3346 parm_count = le32_to_cpu(pSMBr->ParameterCount);
3348 *ppparm = (char *)&pSMBr->hdr.Protocol + parm_offset;
3349 *ppdata = (char *)&pSMBr->hdr.Protocol + data_offset;
3364 end_of_smb, pSMBr);
3417 struct smb_com_ntransact_rsp *pSMBr;
3425 pSMBr = (struct smb_com_ntransact_rsp *)rsp_iov.iov_base;
3428 pSMBr, parm, *acl_inf);
3430 if (le32_to_cpu(pSMBr->ParameterCount) != 4) {
3474 void *pSMBr;
3477 rc = smb_init(SMB_COM_NT_TRANSACT, 19, tcon, (void **) &pSMB, &pSMBr);
3507 memcpy((char *)pSMBr + offsetof(struct smb_hdr, Protocol) +
3514 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
3537 QUERY_INFORMATION_RSP *pSMBr;
3545 (void **) &pSMBr);
3565 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
3570 __u32 time = le32_to_cpu(pSMBr->last_write_time);
3582 cpu_to_le64(le32_to_cpu(pSMBr->size));
3585 cpu_to_le32(le16_to_cpu(pSMBr->attr));
3602 struct smb_t2_qfi_rsp *pSMBr = NULL;
3609 (void **) &pSMBr);
3640 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
3644 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
3648 else if (get_bcc(&pSMBr->hdr) < 40)
3651 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
3653 (char *) &pSMBr->hdr.Protocol +
3673 TRANSACTION2_QPI_RSP *pSMBr = NULL;
3682 (void **) &pSMBr);
3725 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
3729 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
3733 else if (!legacy && get_bcc(&pSMBr->hdr) < 40)
3735 else if (legacy && get_bcc(&pSMBr->hdr) < 24)
3740 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
3752 memcpy((char *) data, (char *) &pSMBr->hdr.Protocol +
3769 struct smb_t2_qfi_rsp *pSMBr = NULL;
3776 (void **) &pSMBr);
3807 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
3811 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
3813 if (rc || get_bcc(&pSMBr->hdr) < sizeof(FILE_UNIX_BASIC_INFO)) {
3817 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
3819 (char *) &pSMBr->hdr.Protocol +
3840 TRANSACTION2_QPI_RSP *pSMBr = NULL;
3849 (void **) &pSMBr);
3889 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
3893 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
3895 if (rc || get_bcc(&pSMBr->hdr) < sizeof(FILE_UNIX_BASIC_INFO)) {
3899 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
3901 (char *) &pSMBr->hdr.Protocol +
3922 TRANSACTION2_FFIRST_RSP *pSMBr = NULL;
3935 (void **) &pSMBr);
4007 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
4027 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
4033 psrch_inf->unicode = !!(pSMBr->hdr.Flags2 & SMBFLG2_UNICODE);
4034 psrch_inf->ntwrk_buf_start = (char *)pSMBr;
4036 psrch_inf->srch_entries_start = (char *)&pSMBr->hdr.Protocol +
4037 le16_to_cpu(pSMBr->t2.DataOffset);
4039 parms = (T2_FFIRST_RSP_PARMS *)((char *)&pSMBr->hdr.Protocol +
4040 le16_to_cpu(pSMBr->t2.ParameterOffset));
4063 TRANSACTION2_FNEXT_RSP *pSMBr = NULL;
4078 (void **) &pSMBr);
4125 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
4140 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
4146 psrch_inf->unicode = !!(pSMBr->hdr.Flags2 & SMBFLG2_UNICODE);
4147 response_data = (char *)&pSMBr->hdr.Protocol +
4148 le16_to_cpu(pSMBr->t2.ParameterOffset);
4150 response_data = (char *)&pSMBr->hdr.Protocol +
4151 le16_to_cpu(pSMBr->t2.DataOffset);
4224 TRANSACTION2_QPI_RSP *pSMBr = NULL;
4234 (void **) &pSMBr);
4275 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
4280 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
4282 if (rc || get_bcc(&pSMBr->hdr) < 2)
4287 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
4288 __u16 count = le16_to_cpu(pSMBr->t2.DataCount);
4297 (data_offset + (char *) &pSMBr->hdr.Protocol);
4316 TRANSACTION2_GET_DFS_REFER_RSP *pSMBr = NULL;
4335 (void **)&pSMB, (void **)&pSMBr);
4391 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
4396 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
4399 if (rc || get_bcc(&pSMBr->hdr) < 17) {
4405 get_bcc(&pSMBr->hdr), le16_to_cpu(pSMBr->t2.DataOffset));
4408 rc = parse_dfs_referrals(&pSMBr->dfs_data,
4409 le16_to_cpu(pSMBr->t2.DataCount),
4412 (pSMBr->hdr.Flags2 & SMBFLG2_UNICODE) != 0);
4430 TRANSACTION2_QFSI_RSP *pSMBr = NULL;
4439 (void **) &pSMBr);
4467 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
4471 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
4473 if (rc || get_bcc(&pSMBr->hdr) < 18)
4476 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
4478 get_bcc(&pSMBr->hdr), data_offset);
4481 (((char *) &pSMBr->hdr.Protocol) + data_offset);
4517 TRANSACTION2_QFSI_RSP *pSMBr = NULL;
4526 (void **) &pSMBr);
4554 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
4558 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
4560 if (rc || get_bcc(&pSMBr->hdr) < 24)
4563 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
4567 *) (((char *) &pSMBr->hdr.Protocol) +
4603 TRANSACTION2_QFSI_RSP *pSMBr = NULL;
4612 (void **) &pSMBr);
4641 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
4645 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
4647 if (rc || get_bcc(&pSMBr->hdr) < 13) {
4651 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
4654 *) (((char *) &pSMBr->hdr.Protocol) +
4673 TRANSACTION2_QFSI_RSP *pSMBr = NULL;
4682 (void **) &pSMBr);
4712 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
4716 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
4718 if (rc || get_bcc(&pSMBr->hdr) <
4722 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
4725 (((char *) &pSMBr->hdr.Protocol) +
4744 TRANSACTION2_QFSI_RSP *pSMBr = NULL;
4753 (void **) &pSMB, (void **) &pSMBr);
4782 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
4786 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
4788 if (rc || get_bcc(&pSMBr->hdr) < 13) {
4791 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
4794 *) (((char *) &pSMBr->hdr.Protocol) +
4814 TRANSACTION2_SETFSI_RSP *pSMBr = NULL;
4823 (void **) &pSMB, (void **) &pSMBr);
4865 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
4869 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
4889 TRANSACTION2_QFSI_RSP *pSMBr = NULL;
4898 (void **) &pSMBr);
4927 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
4931 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
4933 if (rc || get_bcc(&pSMBr->hdr) < 13) {
4936 __u16 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
4939 *) (((char *) &pSMBr->hdr.Protocol) +
4989 struct smb_com_transaction2_spi_rsp *pSMBr = NULL;
5001 (void **) &pSMBr);
5060 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
5318 TRANSACTION2_SPI_RSP *pSMBr = NULL;
5330 (void **) &pSMBr);
5378 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
5514 TRANSACTION2_SPI_RSP *pSMBr = NULL;
5524 (void **) &pSMBr);
5572 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
5600 TRANSACTION2_QPI_RSP *pSMBr = NULL;
5616 (void **) &pSMBr);
5656 (struct smb_hdr *) pSMBr, &bytes_returned, 0);
5667 rc = validate_t2((struct smb_t2_rsp *)pSMBr);
5668 if (rc || get_bcc(&pSMBr->hdr) < 4) {
5681 data_offset = le16_to_cpu(pSMBr->t2.DataOffset);
5683 (((char *) &pSMBr->hdr.Protocol) + data_offset);
5696 end_of_smb = (char *)pByteArea(&pSMBr->hdr) + get_bcc(&pSMBr->hdr);
5785 struct smb_com_transaction2_spi_rsp *pSMBr = NULL;
5796 (void **) &pSMBr);
5869 (struct smb_hdr *) pSMBr, &bytes_returned, 0);