• Home
  • Raw
  • Download

Lines Matching refs:hdr

82 smb2_hdr_assemble(struct smb2_hdr *hdr, __le16 smb2_cmd /* command */ ,  in smb2_hdr_assemble()  argument
85 struct smb2_pdu *pdu = (struct smb2_pdu *)hdr; in smb2_hdr_assemble()
86 char *temp = (char *)hdr; in smb2_hdr_assemble()
97 hdr->smb2_buf_length = cpu_to_be32(parmsize + sizeof(struct smb2_hdr) in smb2_hdr_assemble()
100 hdr->ProtocolId[0] = 0xFE; in smb2_hdr_assemble()
101 hdr->ProtocolId[1] = 'S'; in smb2_hdr_assemble()
102 hdr->ProtocolId[2] = 'M'; in smb2_hdr_assemble()
103 hdr->ProtocolId[3] = 'B'; in smb2_hdr_assemble()
104 hdr->StructureSize = cpu_to_le16(64); in smb2_hdr_assemble()
105 hdr->Command = smb2_cmd; in smb2_hdr_assemble()
112 hdr->CreditRequest = cpu_to_le16(0); in smb2_hdr_assemble()
114 hdr->CreditRequest = cpu_to_le16( in smb2_hdr_assemble()
119 hdr->CreditRequest = cpu_to_le16(2); in smb2_hdr_assemble()
121 hdr->ProcessId = cpu_to_le32((__u16)current->tgid); in smb2_hdr_assemble()
130 hdr->CreditCharge = cpu_to_le16(1); in smb2_hdr_assemble()
133 hdr->TreeId = tcon->tid; in smb2_hdr_assemble()
136 hdr->SessionId = tcon->ses->Suid; in smb2_hdr_assemble()
152 hdr->Flags |= SMB2_FLAGS_SIGNED; in smb2_hdr_assemble()
438 req->hdr.SessionId = 0; in SMB2_negotiate()
516 &rsp->hdr); in SMB2_negotiate()
681 req->hdr.SessionId = 0; /* First session, not a reauthenticate */ in SMB2_sess_setup()
688 req->hdr.CreditRequest = cpu_to_le16(3); in SMB2_sess_setup()
776 req->hdr.SessionId = ses->Suid; in SMB2_sess_setup()
819 ses->Suid = rsp->hdr.SessionId; in SMB2_sess_setup()
821 rsp->hdr.Status == STATUS_MORE_PROCESSING_REQUIRED) { in SMB2_sess_setup()
919 req->hdr.SessionId = ses->Suid; in SMB2_logoff()
921 req->hdr.Flags |= SMB2_FLAGS_SIGNED; in SMB2_logoff()
923 rc = SendReceiveNoRsp(xid, ses, (char *) &req->hdr, 0); in SMB2_logoff()
997 req->hdr.SessionId = ses->Suid; in SMB2_tcon()
1027 ses->ipc_tid = rsp->hdr.TreeId; in SMB2_tcon()
1054 tcon->tid = rsp->hdr.TreeId; in SMB2_tcon()
1071 if (rsp->hdr.Status == STATUS_BAD_NETWORK_NAME) { in SMB2_tcon()
1099 rc = SendReceiveNoRsp(xid, ses, (char *)&req->hdr, 0); in SMB2_tdis()
1202 inc_rfc1001_len(&req->hdr, server->vals->create_lease_size); in add_lease_context()
1285 inc_rfc1001_len(&req->hdr, sizeof(struct create_durable_v2)); in add_durable_v2_context()
1310 inc_rfc1001_len(&req->hdr, in add_durable_reconnect_v2_context()
1345 inc_rfc1001_len(&req->hdr, sizeof(struct create_durable)); in add_durable_context()
1590 req->hdr.Flags |= SMB2_FLAGS_SIGNED; in SMB2_ioctl()
1636 memcpy(*out_data, rsp->hdr.ProtocolId + le32_to_cpu(rsp->OutputOffset), in SMB2_ioctl()
1715 struct smb2_hdr *hdr, unsigned int min_buf_size) in validate_buf() argument
1718 unsigned int smb_len = be32_to_cpu(hdr->smb2_buf_length); in validate_buf()
1719 char *end_of_smb = smb_len + 4 /* RFC1001 length field */ + (char *)hdr; in validate_buf()
1720 char *begin_of_buf = 4 /* RFC1001 len field */ + offset + (char *)hdr; in validate_buf()
1751 struct smb2_hdr *hdr, unsigned int minbufsize, in validate_and_copy_buf() argument
1755 char *begin_of_buf = 4 /* RFC1001 len field */ + offset + (char *)hdr; in validate_and_copy_buf()
1761 rc = validate_buf(offset, buffer_length, hdr, minbufsize); in validate_and_copy_buf()
1817 &rsp->hdr, min_len, data); in query_info()
1860 credits_received = le16_to_cpu(smb2->hdr.CreditRequest); in smb2_echo_callback()
1937 req->hdr.CreditRequest = cpu_to_le16(1); in SMB2_echo()
2007 req->hdr.ProcessId = cpu_to_le32(io_parms->pid); in smb2_new_read_req()
2021 req->hdr.NextCommand = in smb2_new_read_req()
2024 req->hdr.NextCommand = 0; in smb2_new_read_req()
2026 req->hdr.Flags |= SMB2_FLAGS_RELATED_OPERATIONS; in smb2_new_read_req()
2031 req->hdr.SessionId = 0xFFFFFFFF; in smb2_new_read_req()
2032 req->hdr.TreeId = 0xFFFFFFFF; in smb2_new_read_req()
2191 if (rsp->hdr.Status == STATUS_END_OF_FILE) { in SMB2_read()
2211 memcpy(*buf, (char *)rsp->hdr.ProtocolId + rsp->DataOffset, in SMB2_read()
2240 credits_received = le16_to_cpu(rsp->hdr.CreditRequest); in smb2_writev_callback()
2304 req->hdr.ProcessId = cpu_to_le32(wdata->cfile->pid); in smb2_async_writev()
2333 inc_rfc1001_len(&req->hdr, wdata->bytes - 1 /* Buffer */); in smb2_async_writev()
2336 req->hdr.CreditCharge = cpu_to_le16(DIV_ROUND_UP(wdata->bytes, in smb2_async_writev()
2338 req->hdr.CreditRequest = req->hdr.CreditCharge; in smb2_async_writev()
2341 le16_to_cpu(req->hdr.CreditCharge); in smb2_async_writev()
2387 req->hdr.ProcessId = cpu_to_le32(io_parms->pid); in SMB2_write()
2546 if (rc == -ENODATA && rsp->hdr.Status == STATUS_NO_MORE_FILES) { in SMB2_query_directory()
2555 le32_to_cpu(rsp->OutputBufferLength), &rsp->hdr, in SMB2_query_directory()
2570 (char *)&rsp->hdr + le16_to_cpu(rsp->OutputBufferOffset); in SMB2_query_directory()
2572 end_of_smb = get_rfc1002_length(rsp) + 4 + (char *)&rsp->hdr; in SMB2_query_directory()
2626 req->hdr.ProcessId = cpu_to_le32(pid); in send_set_info()
2792 req->hdr.CreditRequest = cpu_to_le16(1); in SMB2_oplock_break()
2874 le16_to_cpu(rsp->OutputBufferOffset) + (char *)&rsp->hdr); in SMB2_QFS_info()
2876 le32_to_cpu(rsp->OutputBufferLength), &rsp->hdr, in SMB2_QFS_info()
2925 rc = validate_buf(offset, rsp_len, &rsp->hdr, min_len); in SMB2_QFS_attr()
2931 + (char *)&rsp->hdr, min_t(unsigned int, in SMB2_QFS_attr()
2935 + (char *)&rsp->hdr, sizeof(FILE_SYSTEM_DEVICE_INFO)); in SMB2_QFS_attr()
2938 (4 /* RFC1001 len */ + offset + (char *)&rsp->hdr); in SMB2_QFS_attr()
2966 req->hdr.ProcessId = cpu_to_le32(pid); in smb2_lockv()
3021 req->hdr.CreditRequest = cpu_to_le16(1); in SMB2_lease_break()