Lines Matching defs:shdr
236 struct smb2_hdr *shdr = (struct smb2_hdr *)iov[0].iov_base;
241 ses = smb2_find_smb_ses(server, le64_to_cpu(shdr->SessionId));
248 memset(shdr->Signature, 0x0, SMB2_SIGNATURE_SIZE);
299 memcpy(shdr->Signature, sigptr, SMB2_SIGNATURE_SIZE);
566 struct smb2_hdr *shdr = (struct smb2_hdr *)iov[0].iov_base;
571 rc = smb2_get_sign_key(le64_to_cpu(shdr->SessionId), server, key);
586 memset(shdr->Signature, 0x0, SMB2_SIGNATURE_SIZE);
627 memcpy(shdr->Signature, sigptr, SMB2_SIGNATURE_SIZE);
640 struct smb2_hdr *shdr;
645 shdr = (struct smb2_hdr *)rqst->rq_iov[0].iov_base;
646 ssr = (struct smb2_sess_setup_req *)shdr;
648 is_binding = shdr->Command == SMB2_SESSION_SETUP &&
650 is_signed = shdr->Flags & SMB2_FLAGS_SIGNED;
662 strncpy(shdr->Signature, "BSRSPYL", 8);
676 struct smb2_hdr *shdr =
679 if ((shdr->Command == SMB2_NEGOTIATE) ||
680 (shdr->Command == SMB2_SESSION_SETUP) ||
681 (shdr->Command == SMB2_OPLOCK_BREAK) ||
692 if (memcmp(shdr->Signature, "BSRSPYL ", 8) == 0)
694 shdr->Command);
700 memcpy(server_response_sig, shdr->Signature, SMB2_SIGNATURE_SIZE);
702 memset(shdr->Signature, 0, SMB2_SIGNATURE_SIZE);
709 if (memcmp(server_response_sig, shdr->Signature, SMB2_SIGNATURE_SIZE)) {
711 shdr->Command, shdr->MessageId);
723 struct smb2_hdr *shdr)
725 unsigned int i, num = le16_to_cpu(shdr->CreditCharge);
727 shdr->MessageId = get_next_mid64(server);
734 smb2_mid_entry_alloc(const struct smb2_hdr *shdr,
738 unsigned int credits = le16_to_cpu(shdr->CreditCharge);
748 temp->mid = le64_to_cpu(shdr->MessageId);
751 temp->command = shdr->Command; /* Always LE */
766 trace_smb3_cmd_enter(le32_to_cpu(shdr->Id.SyncId.TreeId),
767 le64_to_cpu(shdr->SessionId),
768 le16_to_cpu(shdr->Command), temp->mid);
774 struct smb2_hdr *shdr, struct mid_q_entry **mid)
789 shdr->Command != SMB2_NEGOTIATE) {
797 if ((shdr->Command != SMB2_SESSION_SETUP) &&
798 (shdr->Command != SMB2_NEGOTIATE)) {
806 if (shdr->Command != SMB2_LOGOFF) {
814 *mid = smb2_mid_entry_alloc(shdr, server);
855 struct smb2_hdr *shdr =
859 smb2_seq_num_into_buf(server, shdr);
861 rc = smb2_get_mid_entry(ses, server, shdr, &mid);
863 revert_current_mid_from_hdr(server, shdr);
869 revert_current_mid_from_hdr(server, shdr);
881 struct smb2_hdr *shdr =
887 shdr->Command != SMB2_NEGOTIATE) {
893 smb2_seq_num_into_buf(server, shdr);
895 mid = smb2_mid_entry_alloc(shdr, server);
897 revert_current_mid_from_hdr(server, shdr);
903 revert_current_mid_from_hdr(server, shdr);