ReactOS  0.4.15-dev-506-ga3ec01c
nfs41_debug.h
Go to the documentation of this file.
1 /* NFSv4.1 client for Windows
2  * Copyright 2012 The Regents of the University of Michigan
3  *
4  * Olga Kornievskaia <aglo@umich.edu>
5  * Casey Bodley <cbodley@umich.edu>
6  *
7  * This library is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU Lesser General Public License as published by
9  * the Free Software Foundation; either version 2.1 of the License, or (at
10  * your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful, but
13  * without any warranty; without even the implied warranty of merchantability
14  * or fitness for a particular purpose. See the GNU Lesser General Public
15  * License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with this library; if not, write to the Free Software Foundation,
19  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20  */
21 
22 #ifndef _NFS41_DEBUG_
23 #define _NFS41_DEBUG_
24 
25 #define _DRIVER_NAME_ "NFS4.1 Driver"
26 
27 ULONG __cdecl DbgP(IN PCCH fmt, ...);
33 VOID print_fcb(int on, IN PMRX_FCB p);
35 VOID print_fobx(int on, IN PMRX_FOBX p);
36 VOID print_irp_flags(int on, PIRP irp);
39 unsigned char *print_file_information_class(int InfoClass);
40 unsigned char *print_fs_information_class(int InfoClass);
41 void print_hexbuf(int on, unsigned char *title, unsigned char *buf, int len);
42 void print_ioctl(int on, int op);
43 void print_fs_ioctl(int on, int op);
44 void print_driver_state(int state);
45 void print_file_object(int on, PFILE_OBJECT file);
51 const char *opcode2string(int opcode);
52 void print_open_error(int on, int status);
53 void print_wait_status(int on, const char *str, NTSTATUS status,
54  const char *opcode, PVOID entry, LONGLONG xid);
56 
57 #define DbgEn() DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_ERROR_LEVEL, \
58  "--> [%s] [%04x] %s\n", _DRIVER_NAME_, PsGetCurrentProcessId(), \
59  __FUNCTION__); _SEH2_TRY {
60 
61 #define DbgEx() DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_ERROR_LEVEL, \
62  "<-- [%s] [%04x] %s status = %08lx\n", _DRIVER_NAME_, PsGetCurrentProcessId(), \
63  __FUNCTION__, status); \
64  } _SEH2_EXCEPT (EXCEPTION_EXECUTE_HANDLER) { \
65  status = _SEH2_GetExceptionCode() ; \
66  DbgP("Exception encountered with value = Ox%x\n", status); \
67  } _SEH2_END;
68 #define DbgR() DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_ERROR_LEVEL, \
69  "<-- [%s] [%04x] %s\n", _DRIVER_NAME_, PsGetCurrentProcessId(), __FUNCTION__); \
70  } _SEH2_EXCEPT (EXCEPTION_EXECUTE_HANDLER) { \
71  NTSTATUS status; \
72  status = _SEH2_GetExceptionCode() ; \
73  DbgP("Exception encountered with value = Ox%x\n", status); \
74  } _SEH2_END;
75 
76 /* These are for ToasterDebugPrint */
77 
78 #define DBG_ERROR 0x00000001
79 #define DBG_WARN 0x00000002
80 #define DBG_TRACE 0x00000004
81 #define DBG_INFO 0x00000008
82 #define DBG_DISP_IN 0x00000010 /* Marks entry into dispatch functions */
83 #define DBG_DISP_OUT 0x00000020 /* Marks exit from dispatch functions */
84 
85 /* I want to do:
86  * #define dprintk(flags, args...) DbgPrintEx(DPFLTR_IHVDRIVER_ID, DPFLTR_MASK | flags, ## args)
87  * but the ... is gcc specific, can't seem to do it here.
88  */
89 #define PNFS_TRACE_TAG "PNFSMRX: "
90 #define PNFS_FLTR_ID DPFLTR_IHVDRIVER_ID
91 
92 #define DbgEnter() DbgPrintEx(PNFS_FLTR_ID, DPFLTR_MASK | DBG_DISP_IN, "%s*** %s ***\n", \
93  PNFS_TRACE_TAG, __FUNCTION__);
94 #define DbgExit(status) DbgPrintEx(PNFS_FLTR_ID, DPFLTR_MASK | DBG_DISP_OUT, "%s<-- %s <-- 0x%08lx\n", \
95  PNFS_TRACE_TAG, __FUNCTION__, status);
96 ULONG
97 dprintk(
98  IN PCHAR func,
99  IN ULONG flags,
100  IN PCHAR format,
101  ...);
102 #endif
const char * opcode2string(int opcode)
Definition: nfs41_debug.c:601
signed char * PCHAR
Definition: retypes.h:7
GLenum func
Definition: glext.h:6028
#define IN
Definition: typedefs.h:39
VOID print_irps_flags(int on, PIO_STACK_LOCATION irps)
Definition: nfs41_debug.c:409
VOID print_net_root(int on, IN PMRX_NET_ROOT p)
Definition: nfs41_debug.c:258
#define __cdecl
Definition: accygwin.h:79
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
LONG NTSTATUS
Definition: precomp.h:26
VOID print_v_net_root(int on, IN PMRX_V_NET_ROOT p)
Definition: nfs41_debug.c:279
void print_ioctl(int on, int op)
Definition: nfs41_debug.c:132
LONGLONG xid
Definition: nfs41_driver.c:106
void print_acl_args(SECURITY_INFORMATION info)
Definition: nfs41_debug.c:626
VOID print_fo_all(int on, IN PRX_CONTEXT c)
void print_driver_state(int state)
Definition: nfs41_debug.c:183
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
VOID print_fobx(int on, IN PMRX_FOBX p)
Definition: nfs41_debug.c:372
VOID print_srv_open(int on, IN PMRX_SRV_OPEN p)
Definition: nfs41_debug.c:347
void print_ea_info(int on, PFILE_FULL_EA_INFORMATION info)
Definition: nfs41_debug.c:221
GLenum const GLfloat * params
Definition: glext.h:5645
DWORD SECURITY_INFORMATION
Definition: ms-dtyp.idl:311
void print_wait_status(int on, const char *str, NTSTATUS status, const char *opcode, PVOID entry, LONGLONG xid)
Definition: nfs41_debug.c:688
const WCHAR * str
void print_std_info(int on, PFILE_STANDARD_INFORMATION info)
Definition: nfs41_debug.c:212
unsigned char * print_fs_information_class(int InfoClass)
Definition: nfs41_debug.c:558
VOID print_irp_flags(int on, PIRP irp)
Definition: nfs41_debug.c:387
void print_caching_level(int on, ULONG flag, PUNICODE_STRING s)
Definition: nfs41_debug.c:582
void print_open_error(int on, int status)
Definition: nfs41_debug.c:636
int64_t LONGLONG
Definition: typedefs.h:67
CONST CHAR * PCCH
Definition: ntbasedef.h:399
ULONG dprintk(IN PCHAR func, IN ULONG flags, IN PCHAR format,...)
Definition: nfs41_debug.c:714
void print_file_object(int on, PFILE_OBJECT file)
Definition: nfs41_debug.c:302
const GLubyte * c
Definition: glext.h:8905
UINT op
Definition: effect.c:224
void print_basic_info(int on, PFILE_BASIC_INFORMATION info)
Definition: nfs41_debug.c:204
* PFILE_OBJECT
Definition: iotypes.h:1957
GLbitfield flags
Definition: glext.h:7161
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
Definition: glfuncs.h:52
VOID print_srv_call(int on, IN PMRX_SRV_CALL p)
Definition: nfs41_debug.c:240
static int state
Definition: maze.c:121
uint32_t entry
Definition: isohybrid.c:63
GLenum GLsizei len
Definition: glext.h:6722
GLdouble s
Definition: gl.h:2039
ULONG __cdecl print_error(IN PCCH fmt,...)
Definition: nfs41_debug.c:75
void print_hexbuf(int on, unsigned char *title, unsigned char *buf, int len)
Definition: daemon_debug.c:98
ULONG __cdecl DbgP(IN PCCH fmt,...)
Definition: nfs41_debug.c:43
void print_get_ea(int on, PFILE_GET_EA_INFORMATION info)
Definition: nfs41_debug.c:233
VOID print_fcb(int on, IN PMRX_FCB p)
Definition: nfs41_debug.c:321
void print_nt_create_params(int on, NT_CREATE_PARAMETERS params)
Definition: nfs41_debug.c:419
unsigned int ULONG
Definition: retypes.h:1
void print_fs_ioctl(int on, int op)
Definition: nfs41_debug.c:150
GLfloat GLfloat p
Definition: glext.h:8902
unsigned char * print_file_information_class(int InfoClass)
Definition: nfs41_debug.c:498
static char title[]
Definition: ps.c:92
Definition: dsound.c:943
Definition: fci.c:126
Definition: ps.c:97