Lines Matching defs:hdr

14 static int check_smb2_hdr(struct smb2_hdr *hdr)
19 if (hdr->Flags & SMB2_FLAGS_SERVER_TO_REDIR)
86 struct smb2_hdr *hdr)
98 switch (hdr->Command) {
100 *off = le16_to_cpu(((struct smb2_sess_setup_req *)hdr)->SecurityBufferOffset);
101 *len = le16_to_cpu(((struct smb2_sess_setup_req *)hdr)->SecurityBufferLength);
105 le16_to_cpu(((struct smb2_tree_connect_req *)hdr)->PathOffset),
107 *len = le16_to_cpu(((struct smb2_tree_connect_req *)hdr)->PathLength);
113 le16_to_cpu(((struct smb2_create_req *)hdr)->NameOffset),
116 le16_to_cpu(((struct smb2_create_req *)hdr)->NameLength);
118 if (((struct smb2_create_req *)hdr)->CreateContextsLength) {
120 hdr)->CreateContextsOffset);
122 hdr)->CreateContextsLength);
136 le16_to_cpu(((struct smb2_query_info_req *)hdr)->InputBufferOffset),
138 *len = le32_to_cpu(((struct smb2_query_info_req *)hdr)->InputBufferLength);
142 le16_to_cpu(((struct smb2_set_info_req *)hdr)->BufferOffset),
144 *len = le32_to_cpu(((struct smb2_set_info_req *)hdr)->BufferLength);
147 *off = le16_to_cpu(((struct smb2_read_req *)hdr)->ReadChannelInfoOffset);
148 *len = le16_to_cpu(((struct smb2_read_req *)hdr)->ReadChannelInfoLength);
151 if (((struct smb2_write_req *)hdr)->DataOffset ||
152 ((struct smb2_write_req *)hdr)->Length) {
154 le16_to_cpu(((struct smb2_write_req *)hdr)->DataOffset),
156 *len = le32_to_cpu(((struct smb2_write_req *)hdr)->Length);
160 *off = le16_to_cpu(((struct smb2_write_req *)hdr)->WriteChannelInfoOffset);
161 *len = le16_to_cpu(((struct smb2_write_req *)hdr)->WriteChannelInfoLength);
165 le16_to_cpu(((struct smb2_query_directory_req *)hdr)->FileNameOffset),
167 *len = le16_to_cpu(((struct smb2_query_directory_req *)hdr)->FileNameLength);
173 lock_count = le16_to_cpu(((struct smb2_lock_req *)hdr)->LockCount);
182 le32_to_cpu(((struct smb2_ioctl_req *)hdr)->InputOffset),
184 *len = le32_to_cpu(((struct smb2_ioctl_req *)hdr)->InputCount);
210 struct smb2_hdr *hdr = &pdu->hdr;
216 *len = le16_to_cpu(hdr->StructureSize);
229 if (hdr->Command == SMB2_LOCK)
232 if (has_smb2_data_area[le16_to_cpu(hdr->Command)] == false)
235 ret = smb2_get_data_area_len(&offset, &data_length, hdr);
302 struct smb2_hdr *hdr)
305 unsigned short credit_charge = le16_to_cpu(hdr->CreditCharge);
306 void *__hdr = hdr;
309 switch (hdr->Command) {
371 struct smb2_hdr *hdr = &pdu->hdr;
375 __u32 req_struct_size, next_cmd = le32_to_cpu(hdr->NextCommand);
388 if (check_smb2_hdr(hdr))
391 if (hdr->StructureSize != SMB2_HEADER_STRUCTURE_SIZE) {
393 le16_to_cpu(hdr->StructureSize));
397 command = le16_to_cpu(hdr->Command);
423 if (smb2_calc_size(hdr, &clc_len))
457 le64_to_cpu(hdr->MessageId));
464 smb2_validate_credit_charge(work->conn, hdr))