xref: /linux/fs/smb/client/smb1debug.c (revision 69050f8d6d075dc01af7a5f2f550a8067510366f)
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  *
4  *   Copyright (C) International Business Machines  Corp., 2000,2005
5  *
6  *   Modified by Steve French (sfrench@us.ibm.com)
7  */
8 #include "cifsproto.h"
9 #include "smb1proto.h"
10 #include "cifs_debug.h"
11 
12 void cifs_dump_detail(void *buf, size_t buf_len, struct TCP_Server_Info *server)
13 {
14 #ifdef CONFIG_CIFS_DEBUG2
15 	struct smb_hdr *smb = buf;
16 
17 	cifs_dbg(VFS, "Cmd: %d Err: 0x%x Flags: 0x%x Flgs2: 0x%x Mid: %d Pid: %d Wct: %d\n",
18 		 smb->Command, smb->Status.CifsError, smb->Flags,
19 		 smb->Flags2, smb->Mid, smb->Pid, smb->WordCount);
20 	if (!server->ops->check_message(buf, buf_len, server->total_read, server)) {
21 		cifs_dbg(VFS, "smb buf %p len %u\n", smb,
22 			 server->ops->calc_smb_size(smb));
23 	}
24 #endif /* CONFIG_CIFS_DEBUG2 */
25 }
26