Lines Matching refs:hdr
457 if (pSMB->hdr.WordCount < 10) in validate_t2()
473 if (total_size > get_bcc(&pSMB->hdr) || in validate_t2()
492 count = get_bcc(&pSMBr->hdr); in decode_ext_sec_blob()
686 pSMB->hdr.Mid = get_next_mid(server); in CIFSSMBNegotiate()
687 pSMB->hdr.Flags2 |= (SMBFLG2_UNICODE | SMBFLG2_ERR_STATUS); in CIFSSMBNegotiate()
691 pSMB->hdr.Flags2 |= SMBFLG2_EXT_SEC; in CIFSSMBNegotiate()
716 if ((pSMBr->hdr.WordCount < 13) || (server->dialect == BAD_PROT)) { in CIFSSMBNegotiate()
722 } else if (pSMBr->hdr.WordCount == 13) { in CIFSSMBNegotiate()
726 } else if (pSMBr->hdr.WordCount != 17) { in CIFSSMBNegotiate()
754 } else if (pSMBr->hdr.Flags2 & SMBFLG2_EXT_SEC || in CIFSSMBNegotiate()
847 smb->hdr.Flags2 |= SMBFLG2_UNICODE; in CIFSSMBEcho()
850 smb->hdr.Tid = 0xffff; in CIFSSMBEcho()
851 smb->hdr.WordCount = 1; in CIFSSMBEcho()
853 put_bcc(1, &smb->hdr); in CIFSSMBEcho()
898 pSMB->hdr.Mid = get_next_mid(ses->server); in CIFSSMBLogoff()
901 pSMB->hdr.Flags2 |= SMBFLG2_SECURITY_SIGNATURE; in CIFSSMBLogoff()
903 pSMB->hdr.Uid = ses->Suid; in CIFSSMBLogoff()
939 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { in CIFSPOSIXDelFile()
962 pRqD = (struct unlink_psx_rq *)(((char *)&pSMB->hdr.Protocol) + offset); in CIFSPOSIXDelFile()
1010 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { in CIFSSMBDelFile()
1055 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { in CIFSSMBRmDir()
1099 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { in CIFSSMBMkDir()
1147 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { in CIFSPOSIXCreate()
1169 pdata = (OPEN_PSX_REQ *)(((char *)&pSMB->hdr.Protocol) + offset); in CIFSPOSIXCreate()
1199 if (rc || get_bcc(&pSMBr->hdr) < sizeof(OPEN_PSX_RSP)) { in CIFSPOSIXCreate()
1205 psx_rsp = (OPEN_PSX_RSP *)((char *) &pSMBr->hdr.Protocol in CIFSPOSIXCreate()
1220 if (get_bcc(&pSMBr->hdr) < sizeof(OPEN_PSX_RSP) in CIFSPOSIXCreate()
1311 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { in SMBLegacyOpen()
1421 if (req->hdr.Flags2 & SMBFLG2_UNICODE) { in CIFS_open()
1773 smb->hdr.Pid = cpu_to_le16((__u16)rdata->pid); in cifs_async_readv()
1774 smb->hdr.PidHigh = cpu_to_le16((__u16)(rdata->pid >> 16)); in cifs_async_readv()
1846 pSMB->hdr.Pid = cpu_to_le16((__u16)pid); in CIFSSMBRead()
1847 pSMB->hdr.PidHigh = cpu_to_le16((__u16)(pid >> 16)); in CIFSSMBRead()
1872 iov[0].iov_len = be32_to_cpu(pSMB->hdr.smb_buf_length) + 4; in CIFSSMBRead()
1894 pReadData = (char *) (&pSMBr->hdr.Protocol) + in CIFSSMBRead()
1959 pSMB->hdr.Pid = cpu_to_le16((__u16)pid); in CIFSSMBWrite()
1960 pSMB->hdr.PidHigh = cpu_to_le16((__u16)(pid >> 16)); in CIFSSMBWrite()
2295 smb->hdr.Pid = cpu_to_le16((__u16)wdata->pid); in cifs_async_writev()
2296 smb->hdr.PidHigh = cpu_to_le16((__u16)(wdata->pid >> 16)); in cifs_async_writev()
2331 inc_rfc1001_len(&smb->hdr, wdata->bytes + 1); in cifs_async_writev()
2332 put_bcc(wdata->bytes + 1, &smb->hdr); in cifs_async_writev()
2337 inc_rfc1001_len(&smbw->hdr, wdata->bytes + 5); in cifs_async_writev()
2338 put_bcc(wdata->bytes + 5, &smbw->hdr); in cifs_async_writev()
2389 pSMB->hdr.Pid = cpu_to_le16((__u16)pid); in CIFSSMBWrite2()
2390 pSMB->hdr.PidHigh = cpu_to_le16((__u16)(pid >> 16)); in CIFSSMBWrite2()
2411 smb_hdr_len = be32_to_cpu(pSMB->hdr.smb_buf_length) + 1; in CIFSSMBWrite2()
2491 iov[0].iov_len = be32_to_cpu(pSMB->hdr.smb_buf_length) + 4 - in cifs_lockv()
2626 (((char *) &pSMB->hdr.Protocol) + offset); in CIFSSMBPosixLock()
2651 iov[0].iov_len = be32_to_cpu(pSMB->hdr.smb_buf_length) + 4; in CIFSSMBPosixLock()
2666 if (rc || get_bcc(&pSMBr->hdr) < sizeof(*parm_data)) { in CIFSSMBPosixLock()
2677 ((char *)&pSMBr->hdr.Protocol + data_offset); in CIFSSMBPosixLock()
2786 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { in CIFSSMBRename()
2855 data_offset = (char *) (&pSMB->hdr.Protocol) + offset; in CIFSSMBRenameOpenFile()
2872 sprintf(dummy_string, "cifs%x", pSMB->hdr.Mid); in CIFSSMBRenameOpenFile()
2932 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { in CIFSSMBCopy()
2992 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { in CIFSUnixCreateSymLink()
3013 data_offset = (char *) (&pSMB->hdr.Protocol) + offset; in CIFSUnixCreateSymLink()
3014 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { in CIFSUnixCreateSymLink()
3078 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { in CIFSUnixCreateHardLink()
3097 data_offset = (char *) (&pSMB->hdr.Protocol) + offset; in CIFSUnixCreateHardLink()
3098 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { in CIFSUnixCreateHardLink()
3168 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { in CIFSCreateHardLink()
3230 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { in CIFSSMBUnixQuerySymLink()
3274 if (rc || get_bcc(&pSMBr->hdr) < 2) in CIFSSMBUnixQuerySymLink()
3280 data_start = ((char *) &pSMBr->hdr.Protocol) + in CIFSSMBUnixQuerySymLink()
3283 if (pSMBr->hdr.Flags2 & SMBFLG2_UNICODE) in CIFSSMBUnixQuerySymLink()
3362 if (get_bcc(&pSMBr->hdr) < 2 || data_offset > 512) { in CIFSSMBQuerySymLink()
3372 end_of_smb = 2 + get_bcc(&pSMBr->hdr) + (char *)&pSMBr->ByteCount; in CIFSSMBQuerySymLink()
3374 ((char *)&pSMBr->hdr.Protocol + data_offset); in CIFSSMBQuerySymLink()
3414 if (pSMBr->hdr.Flags2 & SMBFLG2_UNICODE) in CIFSSMBQuerySymLink()
3646 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { in CIFSSMBGetPosixACL()
3695 if (rc || get_bcc(&pSMBr->hdr) < 2) in CIFSSMBGetPosixACL()
3701 (char *)&pSMBr->hdr.Protocol+data_offset, in CIFSSMBGetPosixACL()
3732 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { in CIFSSMBSetPosixACL()
3753 parm_data = ((char *) &pSMB->hdr.Protocol) + offset; in CIFSSMBSetPosixACL()
3843 if (rc || get_bcc(&pSMBr->hdr) < 2) in CIFSGetExtAttr()
3858 (data_offset + (char *) &pSMBr->hdr.Protocol); in CIFSGetExtAttr()
3926 bcc = get_bcc(&pSMBr->hdr); in validate_ntransact()
3935 *ppparm = (char *)&pSMBr->hdr.Protocol + parm_offset; in validate_ntransact()
3936 *ppdata = (char *)&pSMBr->hdr.Protocol + data_offset; in validate_ntransact()
3992 iov[0].iov_len = be32_to_cpu(pSMB->hdr.smb_buf_length) + 4; in CIFSSMBGetCIFSACL()
4136 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { in SMBQueryInformation()
4235 else if (get_bcc(&pSMBr->hdr) < 40) in CIFSSMBQFileInfo()
4240 (char *) &pSMBr->hdr.Protocol + in CIFSSMBQFileInfo()
4273 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { in CIFSSMBQPathInfo()
4320 else if (!legacy && get_bcc(&pSMBr->hdr) < 40) in CIFSSMBQPathInfo()
4322 else if (legacy && get_bcc(&pSMBr->hdr) < 24) in CIFSSMBQPathInfo()
4339 memcpy((char *) data, (char *) &pSMBr->hdr.Protocol + in CIFSSMBQPathInfo()
4400 if (rc || get_bcc(&pSMBr->hdr) < sizeof(FILE_UNIX_BASIC_INFO)) { in CIFSSMBUnixQFileInfo()
4406 (char *) &pSMBr->hdr.Protocol + in CIFSSMBUnixQFileInfo()
4440 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { in CIFSSMBUnixQPathInfo()
4482 if (rc || get_bcc(&pSMBr->hdr) < sizeof(FILE_UNIX_BASIC_INFO)) { in CIFSSMBUnixQPathInfo()
4488 (char *) &pSMBr->hdr.Protocol + in CIFSSMBUnixQPathInfo()
4528 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { in CIFSFindFirst()
4613 if (pSMBr->hdr.Flags2 & SMBFLG2_UNICODE) in CIFSFindFirst()
4621 (char *) &pSMBr->hdr.Protocol + in CIFSFindFirst()
4623 parms = (T2_FFIRST_RSP_PARMS *)((char *) &pSMBr->hdr.Protocol + in CIFSFindFirst()
4737 if (pSMBr->hdr.Flags2 & SMBFLG2_UNICODE) in CIFSFindNext()
4741 response_data = (char *) &pSMBr->hdr.Protocol + in CIFSFindNext()
4744 response_data = (char *)&pSMBr->hdr.Protocol + in CIFSFindNext()
4844 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { in CIFSGetSrvInodeNumber()
4888 if (rc || get_bcc(&pSMBr->hdr) < 2) in CIFSGetSrvInodeNumber()
4903 (data_offset + (char *) &pSMBr->hdr.Protocol); in CIFSGetSrvInodeNumber()
4942 pSMB->hdr.Mid = get_next_mid(ses->server); in CIFSGetDFSRefer()
4943 pSMB->hdr.Tid = ses->tcon_ipc->tid; in CIFSGetDFSRefer()
4944 pSMB->hdr.Uid = ses->Suid; in CIFSGetDFSRefer()
4946 pSMB->hdr.Flags2 |= SMBFLG2_ERR_STATUS; in CIFSGetDFSRefer()
4948 pSMB->hdr.Flags2 |= SMBFLG2_DFS; in CIFSGetDFSRefer()
4951 pSMB->hdr.Flags2 |= SMBFLG2_UNICODE; in CIFSGetDFSRefer()
4963 pSMB->hdr.Flags2 |= SMBFLG2_SECURITY_SIGNATURE; in CIFSGetDFSRefer()
4965 pSMB->hdr.Uid = ses->Suid; in CIFSGetDFSRefer()
5000 if (rc || get_bcc(&pSMBr->hdr) < 17) { in CIFSGetDFSRefer()
5006 get_bcc(&pSMBr->hdr), le16_to_cpu(pSMBr->t2.DataOffset)); in CIFSGetDFSRefer()
5013 (pSMBr->hdr.Flags2 & SMBFLG2_UNICODE) != 0); in CIFSGetDFSRefer()
5074 if (rc || get_bcc(&pSMBr->hdr) < 18) in SMBOldQFSInfo()
5079 get_bcc(&pSMBr->hdr), data_offset); in SMBOldQFSInfo()
5082 (((char *) &pSMBr->hdr.Protocol) + data_offset); in SMBOldQFSInfo()
5161 if (rc || get_bcc(&pSMBr->hdr) < 24) in CIFSSMBQFSInfo()
5168 *) (((char *) &pSMBr->hdr.Protocol) + in CIFSSMBQFSInfo()
5248 if (rc || get_bcc(&pSMBr->hdr) < 13) { in CIFSSMBQFSAttributeInfo()
5255 *) (((char *) &pSMBr->hdr.Protocol) + in CIFSSMBQFSAttributeInfo()
5319 if (rc || get_bcc(&pSMBr->hdr) < in CIFSSMBQFSDeviceInfo()
5326 (((char *) &pSMBr->hdr.Protocol) + in CIFSSMBQFSDeviceInfo()
5389 if (rc || get_bcc(&pSMBr->hdr) < 13) { in CIFSSMBQFSUnixInfo()
5395 *) (((char *) &pSMBr->hdr.Protocol) + in CIFSSMBQFSUnixInfo()
5534 if (rc || get_bcc(&pSMBr->hdr) < 13) { in CIFSSMBQFSPosixInfo()
5540 *) (((char *) &pSMBr->hdr.Protocol) + in CIFSSMBQFSPosixInfo()
5606 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { in CIFSSMBSetEOF()
5644 (struct file_end_of_file_info *) (((char *) &pSMB->hdr.Protocol) + in CIFSSMBSetEOF()
5689 pSMB->hdr.Pid = cpu_to_le16((__u16)cfile->pid); in CIFSSMBSetFileSize()
5690 pSMB->hdr.PidHigh = cpu_to_le16((__u16)(cfile->pid >> 16)); in CIFSSMBSetFileSize()
5715 (struct file_end_of_file_info *) (((char *) &pSMB->hdr.Protocol) in CIFSSMBSetFileSize()
5772 pSMB->hdr.Pid = cpu_to_le16((__u16)pid_of_opener); in CIFSSMBSetFileInfo()
5773 pSMB->hdr.PidHigh = cpu_to_le16((__u16)(pid_of_opener >> 16)); in CIFSSMBSetFileInfo()
5837 pSMB->hdr.Pid = cpu_to_le16((__u16)pid_of_opener); in CIFSSMBSetFileDisposition()
5838 pSMB->hdr.PidHigh = cpu_to_le16((__u16)(pid_of_opener >> 16)); in CIFSSMBSetFileDisposition()
5849 data_offset = (char *) (&pSMB->hdr.Protocol) + offset; in CIFSSMBSetFileDisposition()
5900 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { in CIFSSMBSetPathInfo()
5923 data_offset = (char *) (&pSMB->hdr.Protocol) + offset; in CIFSSMBSetPathInfo()
5979 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
6069 pSMB->hdr.Pid = cpu_to_le16((__u16)pid_of_opener); in CIFSSMBUnixSetFileInfo()
6070 pSMB->hdr.PidHigh = cpu_to_le16((__u16)(pid_of_opener >> 16)); in CIFSSMBUnixSetFileInfo()
6140 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { in CIFSSMBUnixSetPathInfo()
6164 (FILE_UNIX_BASIC_INFO *) ((char *) &pSMB->hdr.Protocol + in CIFSSMBUnixSetPathInfo()
6233 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { in CIFSSMBQAllEAs()
6281 if (rc || get_bcc(&pSMBr->hdr) < 4) { in CIFSSMBQAllEAs()
6296 (((char *) &pSMBr->hdr.Protocol) + data_offset); in CIFSSMBQAllEAs()
6309 end_of_smb = (char *)pByteArea(&pSMBr->hdr) + get_bcc(&pSMBr->hdr); in CIFSSMBQAllEAs()
6413 if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) { in CIFSSMBSetEA()