ReactOS  0.4.15-dev-506-ga3ec01c
nfs41_debug.c File Reference
#include <rx.h>
#include "nfs41_driver.h"
#include "nfs41_debug.h"
#include <stdio.h>
#include <stdarg.h>
#include <ntstrsafe.h>
#include <winerror.h>
Include dependency graph for nfs41_debug.c:

Go to the source code of this file.

Macros

#define MINIRDR__NAME   "Value is ignored, only fact of definition"
 
#define TEMP_BUFFER_SIZE   1024
 

Functions

ULONG __cdecl DbgP (IN PCCH fmt,...)
 
ULONG __cdecl print_error (IN PCCH fmt,...)
 
void print_hexbuf (int on, unsigned char *title, unsigned char *buf, int len)
 
void print_ioctl (int on, int op)
 
void print_fs_ioctl (int on, int op)
 
void print_driver_state (int state)
 
void print_basic_info (int on, PFILE_BASIC_INFORMATION info)
 
void print_std_info (int on, PFILE_STANDARD_INFORMATION info)
 
void print_ea_info (int on, PFILE_FULL_EA_INFORMATION info)
 
void print_get_ea (int on, PFILE_GET_EA_INFORMATION info)
 
VOID print_srv_call (int on, IN PMRX_SRV_CALL p)
 
VOID print_net_root (int on, IN PMRX_NET_ROOT p)
 
VOID print_v_net_root (int on, IN PMRX_V_NET_ROOT p)
 
void print_file_object (int on, PFILE_OBJECT file)
 
void print_fo_all (int on, PRX_CONTEXT c)
 
VOID print_fcb (int on, IN PMRX_FCB p)
 
VOID print_srv_open (int on, IN PMRX_SRV_OPEN p)
 
VOID print_fobx (int on, IN PMRX_FOBX p)
 
VOID print_irp_flags (int on, PIRP irp)
 
void print_irps_flags (int on, PIO_STACK_LOCATION irps)
 
void print_nt_create_params (int on, NT_CREATE_PARAMETERS params)
 
unsigned charprint_file_information_class (int InfoClass)
 
unsigned charprint_fs_information_class (int InfoClass)
 
void print_caching_level (int on, ULONG flag, PUNICODE_STRING name)
 
const charopcode2string (int opcode)
 
void print_acl_args (SECURITY_INFORMATION info)
 
void print_open_error (int on, int status)
 
void print_wait_status (int on, const char *prefix, NTSTATUS status, const char *opcode, PVOID entry, LONGLONG xid)
 
ULONG dprintk (IN PCHAR func, IN ULONG flags, IN PCHAR format,...)
 

Macro Definition Documentation

◆ MINIRDR__NAME

#define MINIRDR__NAME   "Value is ignored, only fact of definition"

Definition at line 22 of file nfs41_debug.c.

◆ TEMP_BUFFER_SIZE

#define TEMP_BUFFER_SIZE   1024

Function Documentation

◆ DbgP()

ULONG __cdecl DbgP ( IN PCCH  fmt,
  ... 
)

Definition at line 43 of file nfs41_debug.c.

44 {
45  CHAR msg[512];
46  va_list args;
48 
49  va_start(args, fmt);
50  ASSERT(fmt != NULL);
51  status = RtlStringCbVPrintfA(msg, sizeof(msg), fmt, args);
52  if (NT_SUCCESS(status)) {
53 #ifdef INCLUDE_TIMESTAMPS
55  TIME_FIELDS time_fields;
56 
59  RtlTimeToTimeFields(&local_time, &time_fields);
60 
62  "[%ld].[%02u:%02u:%02u.%u] %s", IoGetCurrentProcess(),
63  time_fields.Hour, time_fields.Minute, time_fields.Second,
64  time_fields.Milliseconds, msg);
65 #else
67  "[%04x] %s", PsGetCurrentProcessId(), msg);
68 #endif
69  }
70  va_end(args);
71 
72  return 0;
73 }
#define KeQuerySystemTime(t)
Definition: env_spec_w32.h:570
char CHAR
Definition: xmlstorage.h:175
LONG NTSTATUS
Definition: precomp.h:26
NTSYSAPI ULONG __cdecl DbgPrintEx(_In_ ULONG ComponentId, _In_ ULONG Level, _In_z_ _Printf_format_string_ PCSTR Format,...)
static DOUBLE local_time(DOUBLE time, DateInstance *date)
Definition: date.c:351
Definition: match.c:390
#define va_end(ap)
Definition: acmsvcex.h:90
NTSTATUS RtlStringCbVPrintfA(char *pszDest, size_t cbDest, const char *pszFormat, va_list argList)
smooth NULL
Definition: ftsmooth.c:416
char * va_list
Definition: acmsvcex.h:78
USHORT Milliseconds
Definition: env_spec_w32.h:717
#define ExSystemTimeToLocalTime(SysTime, LocTime)
Definition: env_spec_w32.h:729
BOOLEAN RtlTimeToTimeFields(IN PLARGE_INTEGER Time, IN PTIME_FIELDS TimeFields)
PEPROCESS NTAPI IoGetCurrentProcess(VOID)
Definition: util.c:139
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define DPFLTR_ERROR_LEVEL
Definition: main.cpp:32
#define va_start(ap, A)
Definition: acmsvcex.h:91
HANDLE NTAPI PsGetCurrentProcessId(VOID)
Definition: process.c:1123
#define msg(x)
Definition: auth_time.c:54
static SERVICE_STATUS status
Definition: service.c:31
#define args
Definition: format.c:66
Definition: dsound.c:943
Definition: ps.c:97

Referenced by print_acl_args(), print_basic_info(), print_caching_level(), print_driver_state(), print_ea_info(), print_fcb(), print_file_object(), print_fo_all(), print_fobx(), print_fs_ioctl(), print_get_ea(), print_ioctl(), print_irp_flags(), print_irps_flags(), print_net_root(), print_nt_create_params(), print_open_error(), print_srv_call(), print_srv_open(), print_std_info(), print_v_net_root(), and print_wait_status().

◆ dprintk()

ULONG dprintk ( IN PCHAR  func,
IN ULONG  flags,
IN PCHAR  format,
  ... 
)

Definition at line 714 of file nfs41_debug.c.

719 {
720  #define TEMP_BUFFER_SIZE 1024
721  va_list list;
722  CHAR debugMessageBuffer[TEMP_BUFFER_SIZE];
724 
725  va_start(list, format);
726 
727  if (format)
728  {
729  //
730  // Use the safe string function, RtlStringCbVPrintfA, instead of _vsnprintf.
731  // RtlStringCbVPrintfA NULL terminates the output buffer even if the message
732  // is longer than the buffer. This prevents malicious code from compromising
733  // the security of the system.
734  //
735  status = RtlStringCbVPrintfA(debugMessageBuffer, sizeof(debugMessageBuffer),
736  format, list);
737 
738  if (!NT_SUCCESS(status))
740  "RtlStringCbVPrintfA failed %x \n", status);
741  else
742  rv = DbgPrintEx(PNFS_FLTR_ID, DPFLTR_MASK | flags, "%s %s: %s\n",
743  PNFS_TRACE_TAG, func, debugMessageBuffer);
744  }
745  va_end(list);
746 
747  return rv;
748 }
GLenum func
Definition: glext.h:6028
#define PNFS_FLTR_ID
Definition: nfs41_debug.h:90
char CHAR
Definition: xmlstorage.h:175
LONG NTSTATUS
Definition: precomp.h:26
#define DPFLTR_MASK
Definition: kdtypes.h:34
NTSYSAPI ULONG __cdecl DbgPrintEx(_In_ ULONG ComponentId, _In_ ULONG Level, _In_z_ _Printf_format_string_ PCSTR Format,...)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define va_end(ap)
Definition: acmsvcex.h:90
NTSTATUS RtlStringCbVPrintfA(char *pszDest, size_t cbDest, const char *pszFormat, va_list argList)
char * va_list
Definition: acmsvcex.h:78
#define TEMP_BUFFER_SIZE
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
GLbitfield flags
Definition: glext.h:7161
Definition: _list.h:228
#define list
Definition: rosglue.h:35
#define va_start(ap, A)
Definition: acmsvcex.h:91
return STATUS_SUCCESS
Definition: btrfs.c:3014
static SERVICE_STATUS status
Definition: service.c:31
#define PNFS_TRACE_TAG
Definition: nfs41_debug.h:89
Definition: ps.c:97

◆ opcode2string()

const char* opcode2string ( int  opcode)

Definition at line 601 of file nfs41_debug.c.

602 {
603  switch(opcode) {
604  case NFS41_SHUTDOWN: return "NFS41_SHUTDOWN";
605  case NFS41_MOUNT: return "NFS41_MOUNT";
606  case NFS41_UNMOUNT: return "NFS41_UNMOUNT";
607  case NFS41_OPEN: return "NFS41_OPEN";
608  case NFS41_CLOSE: return "NFS41_CLOSE";
609  case NFS41_READ: return "NFS41_READ";
610  case NFS41_WRITE: return "NFS41_WRITE";
611  case NFS41_LOCK: return "NFS41_LOCK";
612  case NFS41_UNLOCK: return "NFS41_UNLOCK";
613  case NFS41_DIR_QUERY: return "NFS41_DIR_QUERY";
614  case NFS41_FILE_QUERY: return "NFS41_FILE_QUERY";
615  case NFS41_FILE_SET: return "NFS41_FILE_SET";
616  case NFS41_EA_SET: return "NFS41_EA_SET";
617  case NFS41_EA_GET: return "NFS41_EA_GET";
618  case NFS41_SYMLINK: return "NFS41_SYMLINK";
619  case NFS41_VOLUME_QUERY: return "NFS41_VOLUME_QUERY";
620  case NFS41_ACL_QUERY: return "NFS41_ACL_QUERY";
621  case NFS41_ACL_SET: return "NFS41_ACL_SET";
622  default: return "UNKNOWN";
623  }
624 }

◆ print_acl_args()

void print_acl_args ( SECURITY_INFORMATION  info)

Definition at line 626 of file nfs41_debug.c.

628 {
629  DbgP("Security query: %s %s %s\n",
630  (info & OWNER_SECURITY_INFORMATION)?"OWNER":"",
631  (info & GROUP_SECURITY_INFORMATION)?"GROUP":"",
632  (info & DACL_SECURITY_INFORMATION)?"DACL":"",
633  (info & SACL_SECURITY_INFORMATION)?"SACL":"");
634 }
#define GROUP_SECURITY_INFORMATION
Definition: setypes.h:124
#define SACL_SECURITY_INFORMATION
Definition: setypes.h:126
ULONG __cdecl DbgP(IN PCCH fmt,...)
Definition: nfs41_debug.c:43
#define OWNER_SECURITY_INFORMATION
Definition: setypes.h:123
#define DACL_SECURITY_INFORMATION
Definition: setypes.h:125

Referenced by nfs41_QuerySecurityInformation(), and nfs41_SetSecurityInformation().

◆ print_basic_info()

void print_basic_info ( int  on,
PFILE_BASIC_INFORMATION  info 
)

Definition at line 204 of file nfs41_debug.c.

205 {
206  if (!on) return;
207  DbgP("BASIC_INFO: Create=%lx Access=%lx Write=%lx Change=%lx Attr=%x\n",
208  info->CreationTime.QuadPart, info->LastAccessTime.QuadPart,
209  info->LastWriteTime.QuadPart, info->ChangeTime.QuadPart,
210  info->FileAttributes);
211 }
ULONG __cdecl DbgP(IN PCCH fmt,...)
Definition: nfs41_debug.c:43

Referenced by nfs41_QueryFileInformation().

◆ print_caching_level()

void print_caching_level ( int  on,
ULONG  flag,
PUNICODE_STRING  name 
)

Definition at line 582 of file nfs41_debug.c.

583 {
584  if (!on) return;
585  switch(flag) {
586  case 0:
587  DbgP("enable_caching: DISABLE_CACHING %wZ\n", name);
588  break;
589  case 1:
590  DbgP("enable_caching: ENABLE_READ_CACHING %wZ\n", name);
591  break;
592  case 2:
593  DbgP("enable_caching: ENABLE_WRITE_CACHING %wZ\n", name);
594  break;
595  case 3:
596  DbgP("enable_caching: ENABLE_READWRITE_CACHING %wZ\n", name);
597  break;
598  }
599 }
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
ULONG __cdecl DbgP(IN PCCH fmt,...)
Definition: nfs41_debug.c:43
Definition: name.c:38

Referenced by enable_caching().

◆ print_driver_state()

void print_driver_state ( int  state)

Definition at line 183 of file nfs41_debug.c.

184 {
185  switch (state) {
187  DbgP("NFS41_START_DRIVER_STARTABLE\n");
188  break;
190  DbgP("NFS41_START_DRIVER_STOPPED\n");
191  break;
193  DbgP("NFS41_START_DRIVER_START_IN_PROGRESS\n");
194  break;
196  DbgP("NFS41_START_DRIVER_STARTED\n");
197  break;
198  default:
199  DbgP("UNKNOWN DRIVER STATE %d\n", state);
200  };
201 
202 }
static int state
Definition: maze.c:121
ULONG __cdecl DbgP(IN PCCH fmt,...)
Definition: nfs41_debug.c:43

Referenced by nfs41_DevFcbXXXControlFile().

◆ print_ea_info()

void print_ea_info ( int  on,
PFILE_FULL_EA_INFORMATION  info 
)

Definition at line 221 of file nfs41_debug.c.

222 {
223  if (!on) return;
224  DbgP("FULL_EA_INFO: NextOffset=%d Flags=%x EaNameLength=%d "
225  "ExValueLength=%x EaName=%s\n", info->NextEntryOffset, info->Flags,
226  info->EaNameLength, info->EaValueLength, info->EaName);
227  if (info->EaValueLength)
228  print_hexbuf(0, (unsigned char *)"eavalue",
229  (unsigned char *)info->EaName + info->EaNameLength + 1,
230  info->EaValueLength);
231 }
ULONG __cdecl DbgP(IN PCCH fmt,...)
Definition: nfs41_debug.c:43
void print_hexbuf(int on, unsigned char *title, unsigned char *buf, int len)
Definition: nfs41_debug.c:107

Referenced by nfs41_Create(), and nfs41_SetEaInformation().

◆ print_error()

ULONG __cdecl print_error ( IN PCCH  fmt,
  ... 
)

Definition at line 75 of file nfs41_debug.c.

76 {
77  CHAR msg[512];
78  va_list args;
80 
81  va_start(args, fmt);
82  ASSERT(fmt != NULL);
83  status = RtlStringCbVPrintfA(msg, sizeof(msg), fmt, args);
84  if (NT_SUCCESS(status)) {
85 #ifdef INCLUDE_TIMESTAMPS
87  TIME_FIELDS time_fields;
88 
91  RtlTimeToTimeFields(&local_time, &time_fields);
92 
94  "[%ld].[%02u:%02u:%02u.%u] %s", IoGetCurrentProcess(),
95  time_fields.Hour, time_fields.Minute, time_fields.Second,
96  time_fields.Milliseconds, msg);
97 #else
99  "[%04x] %s", PsGetCurrentProcessId(), msg);
100 #endif
101  }
102  va_end(args);
103 
104  return 0;
105 }
#define KeQuerySystemTime(t)
Definition: env_spec_w32.h:570
char CHAR
Definition: xmlstorage.h:175
LONG NTSTATUS
Definition: precomp.h:26
NTSYSAPI ULONG __cdecl DbgPrintEx(_In_ ULONG ComponentId, _In_ ULONG Level, _In_z_ _Printf_format_string_ PCSTR Format,...)
static DOUBLE local_time(DOUBLE time, DateInstance *date)
Definition: date.c:351
Definition: match.c:390
#define va_end(ap)
Definition: acmsvcex.h:90
NTSTATUS RtlStringCbVPrintfA(char *pszDest, size_t cbDest, const char *pszFormat, va_list argList)
smooth NULL
Definition: ftsmooth.c:416
char * va_list
Definition: acmsvcex.h:78
USHORT Milliseconds
Definition: env_spec_w32.h:717
#define ExSystemTimeToLocalTime(SysTime, LocTime)
Definition: env_spec_w32.h:729
BOOLEAN RtlTimeToTimeFields(IN PLARGE_INTEGER Time, IN PTIME_FIELDS TimeFields)
PEPROCESS NTAPI IoGetCurrentProcess(VOID)
Definition: util.c:139
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define DPFLTR_ERROR_LEVEL
Definition: main.cpp:32
#define va_start(ap, A)
Definition: acmsvcex.h:91
HANDLE NTAPI PsGetCurrentProcessId(VOID)
Definition: process.c:1123
#define msg(x)
Definition: auth_time.c:54
static SERVICE_STATUS status
Definition: service.c:31
#define args
Definition: format.c:66
Definition: dsound.c:943
Definition: ps.c:97

Referenced by _nfs41_CreateSrvCall(), check_nfs41_create_args(), check_nfs41_setacl_args(), check_nfs41_setattr_args(), check_nfs41_setea_args(), check_nfs41_write_args(), DriverEntry(), GetConnectionHandle(), handle_upcall(), map_close_errors(), map_disposition_to_create_retval(), map_lock_errors(), map_mount_errors(), map_open_errors(), map_query_acl_error(), map_querydir_errors(), map_queryfile_error(), map_readwrite_errors(), map_setea_error(), map_setfile_error(), map_symlink_errors(), map_volume_errors(), marshal_nfs41_dirquery(), marshal_nfs41_open(), marshal_nfs41_rw(), marshall_unicode_as_utf8(), nfs41_CreateSrvCall(), nfs41_CreateVNetRoot(), nfs41_downcall(), nfs41_driver_unload(), nfs41_FinalizeNetRoot(), nfs41_FsdDispatch(), nfs41_get_sec_ctx(), nfs41_GetConnectionInfoFromBuffer(), nfs41_GetLUID(), nfs41_MountConfig_ParseDword(), nfs41_MountConfig_ParseOptions(), nfs41_QueryDirectory(), nfs41_QueryFileInformation(), nfs41_QueryVolumeInformation(), nfs41_Start(), nfs41_UpcallCreate(), SharedMemoryInit(), unmarshal_nfs41_dirquery(), unmarshal_nfs41_open(), and unmarshal_nfs41_rw().

◆ print_fcb()

VOID print_fcb ( int  on,
IN PMRX_FCB  p 
)

Definition at line 321 of file nfs41_debug.c.

322 {
323  if (!on) return;
324  DbgP("PMRX_FCB %p OpenCount %d\n", p, p->OpenCount);
325 #if 0
326  DbgP("\tNodeReferenceCount %ld\n", p->NodeReferenceCount);
327  DbgP("\tpNetRoot %p\n", p->pNetRoot);
328  //DbgP("Context %p\n", p->Context);
329  //DbgP("Context2 %p\n", p->Context2);
330  //DbgP("FcbState %ld\n", p->FcbState);
331  //DbgP("UncleanCount %ld\n", p->UncleanCount);
332  //DbgP("UncachedUncleanCount %ld\n", p->UncachedUncleanCount);
333  DbgP("\tOpenCount %ld\n", p->OpenCount);
334  //DbgP("OutstandingLockOperationsCount %ld\n", p->OutstandingLockOperationsCount);
335  //DbgP("ActualAllocationLength %ull\n", p->ActualAllocationLength);
336  //DbgP("Attributes %ld\n", p->Attributes);
337  //DbgP("IsFileWritten %d\n", p->IsFileWritten);
338  //DbgP("fShouldBeOrphaned %d\n", p->fShouldBeOrphaned);
339  //DbgP("fMiniInited %ld\n", p->fMiniInited);
340  //DbgP("CachedNetRootType %c\n", p->CachedNetRootType);
341  //DbgP("SrvOpenList\n");
342  //DbgP("SrvOpenListVersion %ld\n", p->SrvOpenListVersion);
343  DbgP("*****************\n");
344 #endif
345 }
ULONG __cdecl DbgP(IN PCCH fmt,...)
Definition: nfs41_debug.c:43
GLfloat GLfloat p
Definition: glext.h:8902

◆ print_file_information_class()

unsigned char* print_file_information_class ( int  InfoClass)

Definition at line 498 of file nfs41_debug.c.

499 {
500  switch(InfoClass) {
502  return (unsigned char *)"FileBothDirectoryInformation";
504  return (unsigned char *)"FileDirectoryInformation";
506  return (unsigned char *)"FileFullDirectoryInformation";
508  return (unsigned char *)"FileIdBothDirectoryInformation";
510  return (unsigned char *)"FileIdFullDirectoryInformation";
512  return (unsigned char *)"FileNamesInformation";
514  return (unsigned char *)"FileObjectIdInformation";
516  return (unsigned char *)"FileQuotaInformation";
518  return (unsigned char *)"FileReparsePointInformation";
519  case FileAllInformation:
520  return (unsigned char *)"FileAllInformation";
522  return (unsigned char *)"FileAttributeTagInformation";
524  return (unsigned char *)"FileBasicInformation";
526  return (unsigned char *)"FileCompressionInformation";
527  case FileEaInformation:
528  return (unsigned char *)"FileEaInformation";
530  return (unsigned char *)"FileInternalInformation";
531  case FileNameInformation:
532  return (unsigned char *)"FileNameInformation";
534  return (unsigned char *)"FileNetworkOpenInformation";
536  return (unsigned char *)"FilePositionInformation";
538  return (unsigned char *)"FileStandardInformation";
540  return (unsigned char *)"FileStreamInformation";
542  return (unsigned char *)"FileAllocationInformation";
544  return (unsigned char *)"FileDispositionInformation";
546  return (unsigned char *)"FileEndOfFileInformation";
547  case FileLinkInformation:
548  return (unsigned char *)"FileLinkInformation";
550  return (unsigned char *)"FileRenameInformation";
552  return (unsigned char *)"FileValidDataLengthInformation";
553  default:
554  return (unsigned char *)"UNKNOWN";
555  }
556 }
#define FileStandardInformation
Definition: propsheet.cpp:61

Referenced by print_debug_filedirquery_header().

◆ print_file_object()

void print_file_object ( int  on,
PFILE_OBJECT  file 
)

Definition at line 302 of file nfs41_debug.c.

303 {
304  if (!on) return;
305  DbgP("FsContext %p FsContext2 %p\n", file->FsContext, file->FsContext2);
306  DbgP("DeletePending %d ReadAccess %d WriteAccess %d DeleteAccess %d\n",
307  file->DeletePending, file->WriteAccess, file->DeleteAccess);
308  DbgP("SharedRead %d SharedWrite %d SharedDelete %d Flags %x\n",
309  file->SharedRead, file->SharedWrite, file->SharedDelete, file->Flags);
310 }
ULONG __cdecl DbgP(IN PCCH fmt,...)
Definition: nfs41_debug.c:43
Definition: fci.c:126

Referenced by print_debug_header().

◆ print_fo_all()

void print_fo_all ( int  on,
PRX_CONTEXT  c 
)

Definition at line 312 of file nfs41_debug.c.

313 {
314  if (!on) return;
315  if (c->pFcb && c->pRelevantSrvOpen)
316  DbgP("OpenCount %d FCB %p SRV %p FOBX %p VNET %p NET %p\n",
317  c->pFcb->OpenCount, c->pFcb, c->pRelevantSrvOpen, c->pFobx,
318  c->pRelevantSrvOpen->pVNetRoot, c->pFcb->pNetRoot);
319 }
const GLubyte * c
Definition: glext.h:8905
ULONG __cdecl DbgP(IN PCCH fmt,...)
Definition: nfs41_debug.c:43

Referenced by print_debug_header().

◆ print_fobx()

VOID print_fobx ( int  on,
IN PMRX_FOBX  p 
)

Definition at line 372 of file nfs41_debug.c.

373 {
374  if (!on) return;
375  DbgP("PMRX_FOBX %p\n", p);
376 #if 0
377  DbgP("\tNodeReferenceCount %ld\n", p->NodeReferenceCount);
378  DbgP("\tpSrvOpen %p\n", p->pSrvOpen);
379  DbgP("\tAssociatedFileObject %p\n", p->AssociatedFileObject);
380  //DbgP("Context %p\n", p->Context);
381  //DbgP("Context2 %p\n", p->Context2);
382  //DbgP("Flags %08lx\n", p->Flags);
383  DbgP("*****************\n");
384 #endif
385 }
ULONG __cdecl DbgP(IN PCCH fmt,...)
Definition: nfs41_debug.c:43
GLfloat GLfloat p
Definition: glext.h:8902

◆ print_fs_information_class()

unsigned char* print_fs_information_class ( int  InfoClass)

Definition at line 558 of file nfs41_debug.c.

559 {
560  switch (InfoClass) {
562  return (unsigned char *)"FileFsAttributeInformation";
564  return (unsigned char *)"FileFsControlInformation";
566  return (unsigned char *)"FileFsDeviceInformation";
568  return (unsigned char *)"FileFsDriverPathInformation";
570  return (unsigned char *)"FileFsFullSizeInformation";
572  return (unsigned char *)"FileFsObjectIdInformation";
574  return (unsigned char *)"FileFsSizeInformation";
576  return (unsigned char *)"FileFsVolumeInformation";
577  default:
578  return (unsigned char *)"UNKNOWN";
579  }
580 }
#define FileFsFullSizeInformation
Definition: ntifs_ex.h:389
#define FileFsObjectIdInformation
Definition: ntifs_ex.h:390
#define FileFsDriverPathInformation
Definition: ntifs_ex.h:391

Referenced by print_queryvolume_args().

◆ print_fs_ioctl()

void print_fs_ioctl ( int  on,
int  op 
)

Definition at line 150 of file nfs41_debug.c.

151 {
152  if(!on) return;
153  switch(op) {
155  DbgP("IOCTL_NFS41_INVALCACHE\n");
156  break;
157  case IOCTL_NFS41_READ:
158  DbgP("IOCTL_NFS41_UPCALL\n");
159  break;
160  case IOCTL_NFS41_WRITE:
161  DbgP("IOCTL_NFS41_DOWNCALL\n");
162  break;
163  case IOCTL_NFS41_ADDCONN:
164  DbgP("IOCTL_NFS41_ADDCONN\n");
165  break;
166  case IOCTL_NFS41_DELCONN:
167  DbgP("IOCTL_NFS41_DELCONN\n");
168  break;
170  DbgP("IOCTL_NFS41_GETSTATE\n");
171  break;
172  case IOCTL_NFS41_START:
173  DbgP("IOCTL_NFS41_START\n");
174  break;
175  case IOCTL_NFS41_STOP:
176  DbgP("IOCTL_NFS41_STOP\n");
177  break;
178  default:
179  DbgP("UNKNOWN FS IOCTL %d\n", op);
180  };
181 }
#define IOCTL_NFS41_STOP
Definition: nfs41_driver.h:44
#define IOCTL_NFS41_DELCONN
Definition: nfs41_driver.h:47
#define IOCTL_NFS41_INVALCACHE
Definition: nfs41_driver.h:50
#define IOCTL_NFS41_START
Definition: nfs41_driver.h:43
UINT op
Definition: effect.c:224
#define IOCTL_NFS41_GETSTATE
Definition: nfs41_driver.h:45
#define IOCTL_NFS41_ADDCONN
Definition: nfs41_driver.h:46
ULONG __cdecl DbgP(IN PCCH fmt,...)
Definition: nfs41_debug.c:43
#define IOCTL_NFS41_READ
Definition: nfs41_driver.h:48
#define IOCTL_NFS41_WRITE
Definition: nfs41_driver.h:49

Referenced by nfs41_DevFcbXXXControlFile().

◆ print_get_ea()

void print_get_ea ( int  on,
PFILE_GET_EA_INFORMATION  info 
)

Definition at line 233 of file nfs41_debug.c.

234 {
235  if (!on || !info) return;
236  DbgP("GET_EA_INFO: NextOffset=%d EaNameLength=%d EaName=%s\n",
237  info->NextEntryOffset, info->EaNameLength, info->EaName);
238 }
ULONG __cdecl DbgP(IN PCCH fmt,...)
Definition: nfs41_debug.c:43

Referenced by nfs41_QueryEaInformation().

◆ print_hexbuf()

void print_hexbuf ( int  on,
unsigned char title,
unsigned char buf,
int  len 
)

Definition at line 107 of file nfs41_debug.c.

108 {
109  int j, k;
111  TIME_FIELDS time_fields;
112 
113  if (!on) return;
114 
117  RtlTimeToTimeFields(&local_time, &time_fields);
118 
120  "[%ld].[%02u:%02u:%02u.%u] %s\n", IoGetCurrentProcess(),
121  time_fields.Hour, time_fields.Minute, time_fields.Second,
122  time_fields.Milliseconds, title);
123  for(j = 0, k = 0; j < len; j++, k++) {
125  "%02x ", buf[j]);
126  if (((k+1) % 30 == 0 && k > 0))
128  }
130 }
#define KeQuerySystemTime(t)
Definition: env_spec_w32.h:570
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
NTSYSAPI ULONG __cdecl DbgPrintEx(_In_ ULONG ComponentId, _In_ ULONG Level, _In_z_ _Printf_format_string_ PCSTR Format,...)
static DOUBLE local_time(DOUBLE time, DateInstance *date)
Definition: date.c:351
USHORT Milliseconds
Definition: env_spec_w32.h:717
#define ExSystemTimeToLocalTime(SysTime, LocTime)
Definition: env_spec_w32.h:729
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 const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
BOOLEAN RtlTimeToTimeFields(IN PLARGE_INTEGER Time, IN PTIME_FIELDS TimeFields)
PEPROCESS NTAPI IoGetCurrentProcess(VOID)
Definition: util.c:139
GLenum GLsizei len
Definition: glext.h:6722
#define DPFLTR_ERROR_LEVEL
Definition: main.cpp:32
static char title[]
Definition: ps.c:92
int k
Definition: mpi.c:3369

Referenced by print_ea_info().

◆ print_ioctl()

void print_ioctl ( int  on,
int  op 
)

Definition at line 132 of file nfs41_debug.c.

133 {
134  if(!on) return;
135  switch(op) {
137  DbgP("IRP_MJ_FILE_SYSTEM_CONTROL\n");
138  break;
140  DbgP("IRP_MJ_DEVICE_CONTROL\n");
141  break;
143  DbgP("IRP_MJ_INTERNAL_DEVICE_CONTROL\n");
144  break;
145  default:
146  DbgP("UNKNOWN MJ IRP %d\n", op);
147  };
148 }
#define IRP_MJ_FILE_SYSTEM_CONTROL
UINT op
Definition: effect.c:224
#define IRP_MJ_INTERNAL_DEVICE_CONTROL
ULONG __cdecl DbgP(IN PCCH fmt,...)
Definition: nfs41_debug.c:43
#define IRP_MJ_DEVICE_CONTROL
Definition: rdpdr.c:52

Referenced by nfs41_DevFcbXXXControlFile().

◆ print_irp_flags()

VOID print_irp_flags ( int  on,
PIRP  irp 
)

Definition at line 387 of file nfs41_debug.c.

388 {
389  if (!on) return;
390  if (irp->Flags)
391  DbgP("IRP FLAGS: 0x%x %s %s %s %s %s %s %s %s %s %s %s %s %s %s\n",
392  irp->Flags,
393  (irp->Flags & IRP_NOCACHE)?"NOCACHE":"",
394  (irp->Flags & IRP_PAGING_IO)?"PAGING_IO":"",
395  (irp->Flags & IRP_MOUNT_COMPLETION)?"MOUNT":"",
396  (irp->Flags & IRP_SYNCHRONOUS_API)?"SYNC":"",
397  (irp->Flags & IRP_ASSOCIATED_IRP)?"ASSOC_IPR":"",
398  (irp->Flags & IRP_BUFFERED_IO)?"BUFFERED":"",
399  (irp->Flags & IRP_DEALLOCATE_BUFFER)?"DEALLOC_BUF":"",
400  (irp->Flags & IRP_INPUT_OPERATION)?"INPUT_OP":"",
401  (irp->Flags & IRP_SYNCHRONOUS_PAGING_IO)?"SYNC_PAGIN_IO":"",
402  (irp->Flags & IRP_CREATE_OPERATION)?"CREATE_OP":"",
403  (irp->Flags & IRP_READ_OPERATION)?"READ_OP":"",
404  (irp->Flags & IRP_WRITE_OPERATION)?"WRITE_OP":"",
405  (irp->Flags & IRP_CLOSE_OPERATION)?"CLOSE_OP":"",
406  (irp->Flags & IRP_DEFER_IO_COMPLETION)?"DEFER_IO":"");
407 }
#define IRP_CLOSE_OPERATION
#define IRP_NOCACHE
#define IRP_ASSOCIATED_IRP
#define IRP_READ_OPERATION
#define IRP_MOUNT_COMPLETION
ULONG __cdecl DbgP(IN PCCH fmt,...)
Definition: nfs41_debug.c:43
#define IRP_INPUT_OPERATION
#define IRP_BUFFERED_IO
#define IRP_PAGING_IO
#define IRP_DEALLOCATE_BUFFER
#define IRP_SYNCHRONOUS_API
#define IRP_CREATE_OPERATION
#define IRP_DEFER_IO_COMPLETION
#define IRP_WRITE_OPERATION
#define IRP_SYNCHRONOUS_PAGING_IO

Referenced by print_debug_header().

◆ print_irps_flags()

void print_irps_flags ( int  on,
PIO_STACK_LOCATION  irps 
)

Definition at line 409 of file nfs41_debug.c.

410 {
411  if (!on) return;
412  if (irps->Flags)
413  DbgP("IRPSP FLAGS 0x%x %s %s %s %s\n", irps->Flags,
414  (irps->Flags & SL_CASE_SENSITIVE)?"CASE_SENSITIVE":"",
415  (irps->Flags & SL_OPEN_PAGING_FILE)?"PAGING_FILE":"",
416  (irps->Flags & SL_FORCE_ACCESS_CHECK)?"ACCESS_CHECK":"",
417  (irps->Flags & SL_OPEN_TARGET_DIRECTORY)?"TARGET_DIR":"");
418 }
#define SL_CASE_SENSITIVE
Definition: iotypes.h:1779
#define SL_OPEN_PAGING_FILE
Definition: iotypes.h:1776
#define SL_FORCE_ACCESS_CHECK
Definition: iotypes.h:1775
ULONG __cdecl DbgP(IN PCCH fmt,...)
Definition: nfs41_debug.c:43
#define SL_OPEN_TARGET_DIRECTORY
Definition: iotypes.h:1777

Referenced by print_debug_header().

◆ print_net_root()

VOID print_net_root ( int  on,
IN PMRX_NET_ROOT  p 
)

Definition at line 258 of file nfs41_debug.c.

259 {
260  if (!on) return;
261  DbgP("PMRX_NET_ROOT %p\n", p);
262 #if 0
263  DbgP("\tNodeReferenceCount %ld\n", p->NodeReferenceCount);
264  DbgP("\tpSrvCall %p\n", p->pSrvCall);
265  //DbgP("Context %p\n", p->Context);
266  //DbgP("Context2 %p\n", p->Context2);
267  //DbgP("Flags %08lx\n", p->Flags);
268  DbgP("\tNumberOfFcbs %ld\n", p->NumberOfFcbs);
269  DbgP("\tNumberofSrvOpens %ld\n", p->NumberOfSrvOpens);
270  //DbgP("MRxNetRootState %ld\n", p->MRxNetRootState);
271  //DbgP("Type %ld\n", p->Type);
272  //DbgP("DeviceType %ld\n", p->DeviceType);
273  //DbgP("pNetRootName %wZ\n", p->pNetRootName);
274  //DbgP("InnerNamePrefix %wZ\n", &p->InnerNamePrefix);
275  DbgP("*****************\n");
276 #endif
277 }
ULONG __cdecl DbgP(IN PCCH fmt,...)
Definition: nfs41_debug.c:43
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by nfs41_CreateVNetRoot(), and nfs41_FinalizeNetRoot().

◆ print_nt_create_params()

void print_nt_create_params ( int  on,
NT_CREATE_PARAMETERS  params 
)

Definition at line 419 of file nfs41_debug.c.

420 {
421  if (!on) return;
422  if (params.FileAttributes)
423  DbgP("File attributes %x: %s %s %s %s %s %s %s %s %s %s %s %s %s %s\n",
424  params.FileAttributes,
425  (params.FileAttributes & FILE_ATTRIBUTE_TEMPORARY)?"TEMPFILE ":"",
426  (params.FileAttributes & FILE_ATTRIBUTE_READONLY)?"READONLY ":"",
427  (params.FileAttributes & FILE_ATTRIBUTE_HIDDEN)?"HIDDEN ":"",
428  (params.FileAttributes & FILE_ATTRIBUTE_SYSTEM)?"SYSTEM ":"",
429  (params.FileAttributes & FILE_ATTRIBUTE_ARCHIVE)?"ARCHIVE ":"",
430  (params.FileAttributes & FILE_ATTRIBUTE_DIRECTORY)?"DIR ":"",
431  (params.FileAttributes & FILE_ATTRIBUTE_DEVICE)?"DEVICE ":"",
432  (params.FileAttributes & FILE_ATTRIBUTE_NORMAL)?"NORMAL ":"",
433  (params.FileAttributes & FILE_ATTRIBUTE_SPARSE_FILE)?"SPARSE_FILE ":"",
434  (params.FileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)?"REPARSE_POINT ":"",
435  (params.FileAttributes & FILE_ATTRIBUTE_COMPRESSED)?"COMPRESSED ":"",
436  (params.FileAttributes & FILE_ATTRIBUTE_NOT_CONTENT_INDEXED)?"NOT INDEXED ":"",
437  (params.FileAttributes & FILE_ATTRIBUTE_ENCRYPTED)?"ENCRYPTED ":"",
438  (params.FileAttributes & FILE_ATTRIBUTE_VIRTUAL)?"VIRTUAL":"");
439 
440  if (params.Disposition == FILE_SUPERSEDE)
441  DbgP("Create Dispositions: FILE_SUPERSEDE\n");
442  if (params.Disposition == FILE_CREATE)
443  DbgP("Create Dispositions: FILE_CREATE\n");
444  if (params.Disposition == FILE_OPEN)
445  DbgP("Create Dispositions: FILE_OPEN\n");
446  if (params.Disposition == FILE_OPEN_IF)
447  DbgP("Create Dispositions: FILE_OPEN_IF\n");
448  if (params.Disposition == FILE_OVERWRITE)
449  DbgP("Create Dispositions: FILE_OVERWRITE\n");
450  if (params.Disposition == FILE_OVERWRITE_IF)
451  DbgP("Create Dispositions: FILE_OVERWRITE_IF\n");
452 
453  DbgP("Create Attributes: 0x%x %s %s %s %s %s %s %s %s %s %s %s %s %s %s "
454  "%s %s\n", params.CreateOptions,
455  (params.CreateOptions & FILE_DIRECTORY_FILE)?"DIRFILE":"",
456  (params.CreateOptions & FILE_NON_DIRECTORY_FILE)?"FILE":"",
457  (params.CreateOptions & FILE_DELETE_ON_CLOSE)?"DELETE_ON_CLOSE":"",
458  (params.CreateOptions & FILE_WRITE_THROUGH)?"WRITE_THROUGH":"",
459  (params.CreateOptions & FILE_SEQUENTIAL_ONLY)?"SEQUENTIAL":"",
460  (params.CreateOptions & FILE_RANDOM_ACCESS)?"RANDOM":"",
461  (params.CreateOptions & FILE_NO_INTERMEDIATE_BUFFERING)?"NO_BUFFERING":"",
462  (params.CreateOptions & FILE_SYNCHRONOUS_IO_ALERT)?"SYNC_ALERT":"",
463  (params.CreateOptions & FILE_SYNCHRONOUS_IO_NONALERT)?"SYNC_NOALERT":"",
464  (params.CreateOptions & FILE_CREATE_TREE_CONNECTION)?"CREATE_TREE_CONN":"",
465  (params.CreateOptions & FILE_COMPLETE_IF_OPLOCKED)?"OPLOCKED":"",
466  (params.CreateOptions & FILE_NO_EA_KNOWLEDGE)?"NO_EA":"",
467  (params.CreateOptions & FILE_OPEN_REPARSE_POINT)?"OPEN_REPARSE":"",
468  (params.CreateOptions & FILE_OPEN_BY_FILE_ID)?"BY_ID":"",
469  (params.CreateOptions & FILE_OPEN_FOR_BACKUP_INTENT)?"4_BACKUP":"",
470  (params.CreateOptions & FILE_RESERVE_OPFILTER)?"OPFILTER":"");
471 
472  DbgP("Share Access: %s %s %s\n",
473  (params.ShareAccess & FILE_SHARE_READ)?"READ":"",
474  (params.ShareAccess & FILE_SHARE_WRITE)?"WRITE":"",
475  (params.ShareAccess & FILE_SHARE_DELETE)?"DELETE":"");
476 
477  DbgP("Desired Access: 0x%x %s %s %s %s %s %s %s %s %s %s %s\n",
478  params.DesiredAccess,
479  (params.DesiredAccess & FILE_READ_DATA)?"READ":"",
480  (params.DesiredAccess & STANDARD_RIGHTS_READ)?"READ_ACL":"",
481  (params.DesiredAccess & FILE_READ_ATTRIBUTES)?"GETATTR":"",
482  (params.DesiredAccess & FILE_READ_EA)?"READ_EA":"",
483  (params.DesiredAccess & FILE_WRITE_DATA)?"WRITE":"",
484  (params.DesiredAccess & FILE_WRITE_ATTRIBUTES)?"SETATTR":"",
485  (params.DesiredAccess & FILE_WRITE_EA)?"WRITE_EA":"",
486  (params.DesiredAccess & FILE_APPEND_DATA)?"APPEND":"",
487  (params.DesiredAccess & FILE_EXECUTE)?"EXEC":"",
488  (params.DesiredAccess & FILE_LIST_DIRECTORY)?"LSDIR":"",
489  (params.DesiredAccess & FILE_TRAVERSE)?"TRAVERSE":"",
490  (params.DesiredAccess & FILE_LIST_DIRECTORY)?"LSDIR":"",
491  (params.DesiredAccess & DELETE)?"DELETE":"",
492  (params.DesiredAccess & READ_CONTROL)?"READ_CONTROL":"",
493  (params.DesiredAccess & WRITE_DAC)?"WRITE_DAC":"",
494  (params.DesiredAccess & WRITE_OWNER)?"WRITE_OWNER":"",
495  (params.DesiredAccess & SYNCHRONIZE)?"SYNCHRONIZE":"");
496 }
#define FILE_WRITE_EA
Definition: nt_native.h:640
#define FILE_SEQUENTIAL_ONLY
Definition: from_kernel.h:27
#define FILE_ATTRIBUTE_TEMPORARY
Definition: nt_native.h:708
#define FILE_OPEN_IF
Definition: from_kernel.h:56
#define FILE_ATTRIBUTE_SPARSE_FILE
Definition: ntifs_ex.h:380
#define FILE_ATTRIBUTE_SYSTEM
Definition: nt_native.h:704
#define FILE_DIRECTORY_FILE
Definition: constants.h:491
#define FILE_CREATE
Definition: from_kernel.h:55
#define FILE_OVERWRITE
Definition: from_kernel.h:57
#define WRITE_OWNER
Definition: nt_native.h:60
#define FILE_SHARE_WRITE
Definition: nt_native.h:681
#define FILE_APPEND_DATA
Definition: nt_native.h:634
#define FILE_ATTRIBUTE_NOT_CONTENT_INDEXED
Definition: ntifs_ex.h:384
#define FILE_RESERVE_OPFILTER
Definition: from_kernel.h:45
#define FILE_WRITE_ATTRIBUTES
Definition: nt_native.h:649
#define FILE_SHARE_READ
Definition: compat.h:125
#define FILE_OPEN_BY_FILE_ID
Definition: from_kernel.h:41
#define FILE_TRAVERSE
Definition: nt_native.h:643
#define FILE_NO_INTERMEDIATE_BUFFERING
Definition: from_kernel.h:28
#define FILE_SYNCHRONOUS_IO_ALERT
Definition: from_kernel.h:30
GLenum const GLfloat * params
Definition: glext.h:5645
#define FILE_READ_DATA
Definition: nt_native.h:628
#define FILE_NO_EA_KNOWLEDGE
Definition: from_kernel.h:36
#define FILE_WRITE_THROUGH
Definition: from_kernel.h:26
#define FILE_OVERWRITE_IF
Definition: from_kernel.h:58
#define FILE_ATTRIBUTE_REPARSE_POINT
Definition: ntifs_ex.h:381
#define FILE_WRITE_DATA
Definition: nt_native.h:631
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
#define FILE_DELETE_ON_CLOSE
Definition: constants.h:494
#define FILE_ATTRIBUTE_DEVICE
Definition: disk.h:27
#define FILE_LIST_DIRECTORY
Definition: nt_native.h:629
#define FILE_ATTRIBUTE_READONLY
Definition: nt_native.h:702
#define WRITE_DAC
Definition: nt_native.h:59
#define FILE_ATTRIBUTE_COMPRESSED
Definition: nt_native.h:711
#define READ_CONTROL
Definition: nt_native.h:58
#define FILE_READ_ATTRIBUTES
Definition: nt_native.h:647
#define FILE_ATTRIBUTE_ARCHIVE
Definition: nt_native.h:706
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:126
#define FILE_SHARE_DELETE
Definition: nt_native.h:682
#define FILE_EXECUTE
Definition: nt_native.h:642
#define FILE_NON_DIRECTORY_FILE
Definition: constants.h:492
#define STANDARD_RIGHTS_READ
Definition: nt_native.h:65
#define SYNCHRONIZE
Definition: nt_native.h:61
#define FILE_OPEN
Definition: from_kernel.h:54
ULONG __cdecl DbgP(IN PCCH fmt,...)
Definition: nfs41_debug.c:43
#define FILE_ATTRIBUTE_VIRTUAL
Definition: IDataObject.cpp:11
#define FILE_ATTRIBUTE_ENCRYPTED
Definition: ntifs_ex.h:385
#define FILE_OPEN_FOR_BACKUP_INTENT
Definition: from_kernel.h:42
#define FILE_READ_EA
Definition: nt_native.h:638
#define FILE_RANDOM_ACCESS
Definition: from_kernel.h:38
#define FILE_ATTRIBUTE_HIDDEN
Definition: nt_native.h:703
#define FILE_SYNCHRONOUS_IO_NONALERT
Definition: from_kernel.h:31
#define FILE_SUPERSEDE
Definition: from_kernel.h:53
#define FILE_CREATE_TREE_CONNECTION
Definition: from_kernel.h:33
#define FILE_OPEN_REPARSE_POINT
Definition: from_kernel.h:46
#define FILE_COMPLETE_IF_OPLOCKED
Definition: constants.h:493
#define DELETE
Definition: nt_native.h:57

Referenced by nfs41_Create().

◆ print_open_error()

void print_open_error ( int  on,
int  status 
)

Definition at line 636 of file nfs41_debug.c.

637 {
638  if (!on) return;
639  switch (status) {
641  DbgP("[ERROR] nfs41_Create: STATUS_ACCESS_DENIED\n");
642  break;
644  DbgP("[ERROR] nfs41_Create: STATUS_NETWORK_ACCESS_DENIED\n");
645  break;
647  DbgP("[ERROR] nfs41_Create: STATUS_OBJECT_NAME_INVALID\n");
648  break;
650  DbgP("[ERROR] nfs41_Create: STATUS_OBJECT_NAME_COLLISION\n");
651  break;
652  case STATUS_FILE_INVALID:
653  DbgP("[ERROR] nfs41_Create: STATUS_FILE_INVALID\n");
654  break;
656  DbgP("[ERROR] nfs41_Create: STATUS_OBJECT_NAME_NOT_FOUND\n");
657  break;
659  DbgP("[ERROR] nfs41_Create: STATUS_NAME_TOO_LONG\n");
660  break;
662  DbgP("[ERROR] nfs41_Create: STATUS_OBJECT_PATH_NOT_FOUND\n");
663  break;
665  DbgP("[ERROR] nfs41_Create: STATUS_BAD_NETWORK_PATH\n");
666  break;
668  DbgP("[ERROR] nfs41_Create: STATUS_SHARING_VIOLATION\n");
669  break;
670  case ERROR_REPARSE:
671  DbgP("[ERROR] nfs41_Create: STATUS_REPARSE\n");
672  break;
674  DbgP("[ERROR] nfs41_Create: STATUS_TOO_MANY_LINKS\n");
675  break;
676  case ERROR_DIRECTORY:
677  DbgP("[ERROR] nfs41_Create: STATUS_FILE_IS_A_DIRECTORY\n");
678  break;
679  case ERROR_BAD_FILE_TYPE:
680  DbgP("[ERROR] nfs41_Create: STATUS_NOT_A_DIRECTORY\n");
681  break;
682  default:
683  DbgP("[ERROR] nfs41_Create: STATUS_INSUFFICIENT_RESOURCES\n");
684  break;
685  }
686 }
#define STATUS_OBJECT_NAME_COLLISION
Definition: udferr_usr.h:150
#define STATUS_FILE_INVALID
Definition: ntstatus.h:374
#define ERROR_DIRECTORY
Definition: winerror.h:295
#define ERROR_BAD_FILE_TYPE
Definition: winerror.h:277
#define STATUS_SHARING_VIOLATION
Definition: udferr_usr.h:154
#define STATUS_BAD_NETWORK_PATH
Definition: ntstatus.h:412
#define STATUS_NAME_TOO_LONG
Definition: ntstatus.h:484
#define STATUS_OBJECT_PATH_NOT_FOUND
Definition: udferr_usr.h:151
#define STATUS_ACCESS_DENIED
Definition: udferr_usr.h:145
#define ERROR_TOO_MANY_LINKS
Definition: winerror.h:671
#define ERROR_REPARSE
Definition: winerror.h:522
ULONG __cdecl DbgP(IN PCCH fmt,...)
Definition: nfs41_debug.c:43
#define STATUS_OBJECT_NAME_NOT_FOUND
Definition: udferr_usr.h:149
#define STATUS_OBJECT_NAME_INVALID
Definition: udferr_usr.h:148
#define STATUS_NETWORK_ACCESS_DENIED
Definition: ntstatus.h:424
Definition: ps.c:97

◆ print_srv_call()

VOID print_srv_call ( int  on,
IN PMRX_SRV_CALL  p 
)

Definition at line 240 of file nfs41_debug.c.

241 {
242  if (!on) return;
243  DbgP("PMRX_SRV_CALL %p\n", p);
244 #if 0
245  DbgP("\tNodeReferenceCount %ld\n", p->NodeReferenceCount);
246  //DbgP("Context %p\n", p->Context);
247  //DbgP("Context2 %p\n", p->Context2);
248  //DbgP("pSrvCallName %wZ\n", p->pSrvCallName);
249  //DbgP("pPrincipalName %wZ\n", p->pPrincipalName);
250  //DbgP("PDomainName %wZ\n", p->pDomainName);
251  //DbgP("Flags %08lx\n", p->Flags);
252  //DbgP("MaximumNumberOfCloseDelayedFiles %ld\n", p->MaximumNumberOfCloseDelayedFiles);
253  //DbgP("Status %ld\n", p->Status);
254  DbgP("*****************\n");
255 #endif
256 }
ULONG __cdecl DbgP(IN PCCH fmt,...)
Definition: nfs41_debug.c:43
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by _nfs41_CreateSrvCall(), nfs41_CreateVNetRoot(), and nfs41_FinalizeSrvCall().

◆ print_srv_open()

VOID print_srv_open ( int  on,
IN PMRX_SRV_OPEN  p 
)

Definition at line 347 of file nfs41_debug.c.

348 {
349  if (!on) return;
350  DbgP("PMRX_SRV_OPEN %p\n", p);
351 #if 0
352  DbgP("\tNodeReferenceCount %ld\n", p->NodeReferenceCount);
353  DbgP("\tpFcb %p\n", p->pFcb);
354  DbgP("\tpVNetRoot %p\n", p->pVNetRoot);
355  //DbgP("Context %p\n", p->Context);
356  //DbgP("Context2 %p\n", p->Context2);
357  //DbgP("Flags %08lx\n", p->Flags);
358  //DbgP("pAlreadyPrefixedName %wZ\n", p->pAlreadyPrefixedName);
359  //DbgP("UncleanFobxCount %ld\n", p->UncleanFobxCount);
360  DbgP("\tOpenCount %ld\n", p->OpenCount);
361  //DbgP("Key %p\n", p->Key);
362  //DbgP("DesiredAccess\n");
363  //DbgP("ShareAccess %ld\n", p->ShareAccess);
364  //DbgP("CreateOptions %ld\n", p->CreateOptions);
365  //DbgP("BufferingFlags %ld\n", p->BufferingFlags);
366  //DbgP("ulFileSizeVersion %ld\n", p->ulFileSizeVersion);
367  //DbgP("SrvOpenQLinks\n");
368  DbgP("*****************\n");
369 #endif
370 }
ULONG __cdecl DbgP(IN PCCH fmt,...)
Definition: nfs41_debug.c:43
GLfloat GLfloat p
Definition: glext.h:8902

◆ print_std_info()

void print_std_info ( int  on,
PFILE_STANDARD_INFORMATION  info 
)

Definition at line 212 of file nfs41_debug.c.

213 {
214  if (!on) return;
215  DbgP("STD_INFO: Type=%s #Links=%d Alloc=%lx EOF=%lx Delete=%d\n",
216  info->Directory?"DIR":"FILE", info->NumberOfLinks,
217  info->AllocationSize.QuadPart, info->EndOfFile.QuadPart,
218  info->DeletePending);
219 }
ULONG __cdecl DbgP(IN PCCH fmt,...)
Definition: nfs41_debug.c:43

Referenced by nfs41_QueryFileInformation().

◆ print_v_net_root()

VOID print_v_net_root ( int  on,
IN PMRX_V_NET_ROOT  p 
)

Definition at line 279 of file nfs41_debug.c.

280 {
281  if (!on) return;
282  DbgP("PMRX_V_NET_ROOT %p\n", p);
283 #if 0
284  DbgP("\tNodeReferenceCount %ld\n", p->NodeReferenceCount);
285  DbgP("\tpNetRoot %p\n", p->pNetRoot);
286  //DbgP("Context %p\n", p->Context);
287  //DbgP("Context2 %p\n", p->Context2);
288  //DbgP("Flags %08lx\n", p->Flags);
289  DbgP("\tNumberofOpens %ld\n", p->NumberOfOpens);
290  DbgP("\tNumberofFobxs %ld\n", p->NumberOfFobxs);
291  //DbgP("LogonId\n");
292  //DbgP("pUserDomainName %wZ\n", p->pUserDomainName);
293  //DbgP("pUserName %wZ\n", p->pUserName);
294  //DbgP("pPassword %wZ\n", p->pPassword);
295  //DbgP("SessionId %ld\n", p->SessionId);
296  //DbgP("ConstructionStatus %08lx\n", p->ConstructionStatus);
297  //DbgP("IsExplicitConnection %d\n", p->IsExplicitConnection);
298  DbgP("*****************\n");
299 #endif
300 }
ULONG __cdecl DbgP(IN PCCH fmt,...)
Definition: nfs41_debug.c:43
GLfloat GLfloat p
Definition: glext.h:8902

Referenced by nfs41_CreateVNetRoot(), and nfs41_FinalizeVNetRoot().

◆ print_wait_status()

void print_wait_status ( int  on,
const char prefix,
NTSTATUS  status,
const char opcode,
PVOID  entry,
LONGLONG  xid 
)

Definition at line 688 of file nfs41_debug.c.

690 {
691  if (!on) return;
692  switch (status) {
693  case STATUS_SUCCESS:
694  if (opcode)
695  DbgP("%s Got a wakeup call, finishing %s entry=%p xid=%lld\n",
696  prefix, opcode, entry, xid);
697  else
698  DbgP("%s Got a wakeup call\n", prefix);
699  break;
700  case STATUS_USER_APC:
701  DbgP("%s KeWaitForSingleObject returned STATUS_USER_APC\n", prefix);
702  break;
703  case STATUS_ALERTED:
704  DbgP("%s KeWaitForSingleObject returned STATUS_ALERTED\n", prefix);
705  break;
706  default:
707  DbgP("%s KeWaitForSingleObject returned %d\n", prefix, status);
708  }
709 }
LONGLONG xid
Definition: nfs41_driver.c:106
#define STATUS_ALERTED
Definition: ntstatus.h:80
uint32_t entry
Definition: isohybrid.c:63
#define STATUS_USER_APC
Definition: ntstatus.h:78
ULONG __cdecl DbgP(IN PCCH fmt,...)
Definition: nfs41_debug.c:43
return STATUS_SUCCESS
Definition: btrfs.c:3014
Definition: ps.c:97

Referenced by nfs41_upcall(), and nfs41_UpcallWaitForReply().