ReactOS 0.4.16-dev-297-gc569aee
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
33VOID print_fcb(int on, IN PMRX_FCB p);
39unsigned char *print_file_information_class(int InfoClass);
40unsigned char *print_fs_information_class(int InfoClass);
41void print_hexbuf(int on, unsigned char *title, unsigned char *buf, int len);
42void print_ioctl(int on, int op);
43void print_fs_ioctl(int on, int op);
51const char *opcode2string(int opcode);
52void print_open_error(int on, int status);
53void 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);
101 ...);
102#endif
#define __cdecl
Definition: accygwin.h:79
static int state
Definition: maze.c:121
LONG NTSTATUS
Definition: precomp.h:26
UINT op
Definition: effect.c:236
FxIrp * irp
GLdouble s
Definition: gl.h:2039
GLenum func
Definition: glext.h:6028
const GLubyte * c
Definition: glext.h:8905
GLenum const GLfloat * params
Definition: glext.h:5645
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLbitfield flags
Definition: glext.h:7161
GLfloat GLfloat p
Definition: glext.h:8902
GLenum GLsizei len
Definition: glext.h:6722
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
uint32_t entry
Definition: isohybrid.c:63
DWORD SECURITY_INFORMATION
Definition: ms-dtyp.idl:311
unsigned char * print_file_information_class(int InfoClass)
Definition: nfs41_debug.c:498
VOID print_srv_call(int on, IN PMRX_SRV_CALL p)
Definition: nfs41_debug.c:240
void print_ioctl(int on, int op)
Definition: nfs41_debug.c:132
void print_driver_state(int state)
Definition: nfs41_debug.c:183
void print_get_ea(int on, PFILE_GET_EA_INFORMATION info)
Definition: nfs41_debug.c:233
VOID print_fobx(int on, IN PMRX_FOBX p)
Definition: nfs41_debug.c:372
VOID print_fo_all(int on, IN PRX_CONTEXT c)
VOID print_net_root(int on, IN PMRX_NET_ROOT p)
Definition: nfs41_debug.c:258
VOID print_irp_flags(int on, PIRP irp)
Definition: nfs41_debug.c:387
VOID print_v_net_root(int on, IN PMRX_V_NET_ROOT p)
Definition: nfs41_debug.c:279
void print_fs_ioctl(int on, int op)
Definition: nfs41_debug.c:150
const char * opcode2string(int opcode)
Definition: nfs41_debug.c:601
VOID print_irps_flags(int on, PIO_STACK_LOCATION irps)
Definition: nfs41_debug.c:409
void print_open_error(int on, int status)
Definition: nfs41_debug.c:636
void print_wait_status(int on, const char *str, NTSTATUS status, const char *opcode, PVOID entry, LONGLONG xid)
Definition: nfs41_debug.c:688
void print_acl_args(SECURITY_INFORMATION info)
Definition: nfs41_debug.c:626
ULONG __cdecl print_error(IN PCCH fmt,...)
Definition: nfs41_debug.c:75
void print_nt_create_params(int on, NT_CREATE_PARAMETERS params)
Definition: nfs41_debug.c:419
void print_file_object(int on, PFILE_OBJECT file)
Definition: nfs41_debug.c:302
void print_std_info(int on, PFILE_STANDARD_INFORMATION info)
Definition: nfs41_debug.c:212
ULONG dprintk(IN PCHAR func, IN ULONG flags, IN PCHAR format,...)
Definition: nfs41_debug.c:714
VOID print_fcb(int on, IN PMRX_FCB p)
Definition: nfs41_debug.c:321
void print_hexbuf(int on, unsigned char *title, unsigned char *buf, int len)
Definition: daemon_debug.c:98
VOID print_srv_open(int on, IN PMRX_SRV_OPEN p)
Definition: nfs41_debug.c:347
void print_caching_level(int on, ULONG flag, PUNICODE_STRING s)
Definition: nfs41_debug.c:582
unsigned char * print_fs_information_class(int InfoClass)
Definition: nfs41_debug.c:558
void print_ea_info(int on, PFILE_FULL_EA_INFORMATION info)
Definition: nfs41_debug.c:221
void print_basic_info(int on, PFILE_BASIC_INFORMATION info)
Definition: nfs41_debug.c:204
LONGLONG xid
Definition: nfs41_driver.c:106
#define DbgP(_x_)
Definition: nfs41_np.c:36
CONST CHAR * PCCH
Definition: ntbasedef.h:400
static char title[]
Definition: ps.c:92
const WCHAR * str
Definition: fci.c:127
Definition: dsound.c:943
Definition: format.c:58
Definition: ps.c:97
int64_t LONGLONG
Definition: typedefs.h:68
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
char * PCHAR
Definition: typedefs.h:51
* PFILE_OBJECT
Definition: iotypes.h:1998