• Home
  • Raw
  • Download

Lines Matching refs:shdr

22 check_smb2_hdr(struct smb2_sync_hdr *shdr, __u64 mid)  in check_smb2_hdr()  argument
24 __u64 wire_mid = le64_to_cpu(shdr->MessageId); in check_smb2_hdr()
30 if ((shdr->ProtocolId == SMB2_PROTO_NUMBER) && in check_smb2_hdr()
32 if (shdr->Flags & SMB2_FLAGS_SERVER_TO_REDIR) in check_smb2_hdr()
36 if (shdr->Command == SMB2_OPLOCK_BREAK) in check_smb2_hdr()
42 if (shdr->ProtocolId != SMB2_PROTO_NUMBER) in check_smb2_hdr()
44 le32_to_cpu(shdr->ProtocolId)); in check_smb2_hdr()
138 struct smb2_sync_hdr *shdr = (struct smb2_sync_hdr *)buf; in smb2_check_message() local
139 struct smb2_sync_pdu *pdu = (struct smb2_sync_pdu *)shdr; in smb2_check_message()
150 if (shdr->ProtocolId == SMB2_TRANSFORM_PROTO_NUM) { in smb2_check_message()
169 mid = le64_to_cpu(shdr->MessageId); in smb2_check_message()
172 && (shdr->Status != 0)) { in smb2_check_message()
190 if (check_smb2_hdr(shdr, mid)) in smb2_check_message()
193 if (shdr->StructureSize != SMB2_HEADER_STRUCTURE_SIZE) { in smb2_check_message()
195 le16_to_cpu(shdr->StructureSize)); in smb2_check_message()
199 command = le16_to_cpu(shdr->Command); in smb2_check_message()
206 if (command != SMB2_OPLOCK_BREAK_HE && (shdr->Status == 0 || in smb2_check_message()
213 && (shdr->Status == 0) in smb2_check_message()
225 if (shdr->Command == SMB2_NEGOTIATE) in smb2_check_message()
226 clc_len += get_neg_ctxt_len(shdr, len, clc_len); in smb2_check_message()
233 shdr->Status == STATUS_STOPPED_ON_SYMLINK) in smb2_check_message()
299 smb2_get_data_area_len(int *off, int *len, struct smb2_sync_hdr *shdr) in smb2_get_data_area_len() argument
308 if (shdr->Status && shdr->Status != STATUS_MORE_PROCESSING_REQUIRED && in smb2_get_data_area_len()
309 (((struct smb2_err_rsp *)shdr)->StructureSize) == in smb2_get_data_area_len()
318 switch (shdr->Command) { in smb2_get_data_area_len()
321 ((struct smb2_negotiate_rsp *)shdr)->SecurityBufferOffset); in smb2_get_data_area_len()
323 ((struct smb2_negotiate_rsp *)shdr)->SecurityBufferLength); in smb2_get_data_area_len()
327 ((struct smb2_sess_setup_rsp *)shdr)->SecurityBufferOffset); in smb2_get_data_area_len()
329 ((struct smb2_sess_setup_rsp *)shdr)->SecurityBufferLength); in smb2_get_data_area_len()
333 ((struct smb2_create_rsp *)shdr)->CreateContextsOffset); in smb2_get_data_area_len()
335 ((struct smb2_create_rsp *)shdr)->CreateContextsLength); in smb2_get_data_area_len()
339 ((struct smb2_query_info_rsp *)shdr)->OutputBufferOffset); in smb2_get_data_area_len()
341 ((struct smb2_query_info_rsp *)shdr)->OutputBufferLength); in smb2_get_data_area_len()
345 *off = ((struct smb2_read_rsp *)shdr)->DataOffset; in smb2_get_data_area_len()
346 *len = le32_to_cpu(((struct smb2_read_rsp *)shdr)->DataLength); in smb2_get_data_area_len()
350 ((struct smb2_query_directory_rsp *)shdr)->OutputBufferOffset); in smb2_get_data_area_len()
352 ((struct smb2_query_directory_rsp *)shdr)->OutputBufferLength); in smb2_get_data_area_len()
356 ((struct smb2_ioctl_rsp *)shdr)->OutputOffset); in smb2_get_data_area_len()
358 ((struct smb2_ioctl_rsp *)shdr)->OutputCount); in smb2_get_data_area_len()
362 ((struct smb2_change_notify_rsp *)shdr)->OutputBufferOffset); in smb2_get_data_area_len()
364 ((struct smb2_change_notify_rsp *)shdr)->OutputBufferLength); in smb2_get_data_area_len()
367 cifs_dbg(VFS, "no length check for command %d\n", le16_to_cpu(shdr->Command)); in smb2_get_data_area_len()
387 return (char *)shdr + *off; in smb2_get_data_area_len()
399 struct smb2_sync_hdr *shdr = &pdu->sync_hdr; in smb2_calc_size() local
403 int len = le16_to_cpu(shdr->StructureSize); in smb2_calc_size()
411 if (has_smb2_data_area[le16_to_cpu(shdr->Command)] == false) in smb2_calc_size()
414 smb2_get_data_area_len(&offset, &data_length, shdr); in smb2_calc_size()