ReactOS 0.4.16-dev-106-g10b08aa
daemon_debug.c File Reference
#include <windows.h>
#include <stdio.h>
#include "daemon_debug.h"
#include "from_kernel.h"
#include "nfs41_driver.h"
#include "nfs41_ops.h"
#include "service.h"
#include "rpc/rpc.h"
#include "rpc/auth_sspi.h"
Include dependency graph for daemon_debug.c:

Go to the source code of this file.

Functions

void set_debug_level (int level)
 
void open_log_files ()
 
void close_log_files ()
 
void dprintf (int level, LPCSTR format,...)
 
void eprintf (LPCSTR format,...)
 
void print_hexbuf (int level, unsigned char *title, unsigned char *buf, int len)
 
void print_hexbuf_no_asci (int level, unsigned char *title, unsigned char *buf, int len)
 
void print_create_attributes (int level, DWORD create_opts)
 
void print_disposition (int level, DWORD disposition)
 
void print_access_mask (int level, DWORD access_mask)
 
void print_share_mode (int level, DWORD mode)
 
void print_file_id_both_dir_info (int level, FILE_ID_BOTH_DIR_INFO *pboth_dir_info)
 
void print_opcode (int level, DWORD opcode)
 
const charopcode2string (DWORD opcode)
 
const charnfs_opnum_to_string (int opnum)
 
const charnfs_error_string (int status)
 
const charrpc_error_string (int status)
 
const chargssauth_string (int type)
 
void print_condwait_status (int level, int status)
 
void print_sr_status_flags (int level, int flags)
 
const charsecflavorop2name (DWORD sec_flavor)
 
void print_windows_access_mask (int on, ACCESS_MASK m)
 
void print_nfs_access_mask (int on, int m)
 

Variables

static int g_debug_level = DEFAULT_DEBUG_LEVEL
 
FILEdlog_file
 
FILEelog_file
 

Function Documentation

◆ close_log_files()

void close_log_files ( )

Definition at line 59 of file daemon_debug.c.

60{
63}
FILE * elog_file
Definition: daemon_debug.c:37
FILE * dlog_file
Definition: daemon_debug.c:37
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)

Referenced by ServiceStart().

◆ dprintf()

void dprintf ( int  level,
LPCSTR  format,
  ... 
)

Definition at line 72 of file daemon_debug.c.

73{
74 if (level <= g_debug_level) {
79#ifndef STANDALONE_NFSD
81#endif
82 va_end(args);
83 }
84}
char * va_list
Definition: acmsvcex.h:78
#define va_end(ap)
Definition: acmsvcex.h:90
#define va_start(ap, A)
Definition: acmsvcex.h:91
static int g_debug_level
Definition: daemon_debug.c:33
GLint level
Definition: gl.h:1546
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
_Check_return_opt_ _CRTIMP int __cdecl vfprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format, va_list _ArgList)
#define args
Definition: format.c:66
Definition: match.c:390
Definition: format.c:58
DWORD WINAPI GetCurrentThreadId(void)
Definition: thread.c:459

◆ eprintf()

void eprintf ( LPCSTR  format,
  ... 
)

Definition at line 86 of file daemon_debug.c.

87{
92#ifndef STANDALONE_NFSD
94#endif
95 va_end(args);
96}

Referenced by abs_path_link(), check_execute_access(), check_for_files(), compound_encode_send_decode(), config_defaults(), config_init(), config_load(), config_parse_pair(), convert_nfs4acl_2_dacl(), create_new_rpc_auth(), create_rpcsec_auth_client(), create_silly_rename(), create_unknownsid(), decode_layout(), decode_op_want_delegation(), decode_open_res_ok(), decode_space_limit4(), delegation_return(), encode_file_attrs(), encode_op_layoutreturn(), encode_open_claim4(), file_layout_read_thread(), file_layout_return(), file_layout_write_thread(), get_dense_fh(), get_ea_value(), get_sparse_fh(), get_superblock_attrs(), get_volume_size_info(), getdomainname(), handle_cb_compound(), handle_cb_sequence(), handle_getacl(), handle_getattr(), handle_mount(), handle_open(), handle_setacl(), handle_setattr(), handle_symlink(), handle_volume(), hash_mac_addrs(), idmap_filter(), idmap_lookup_group(), idmap_lookup_user(), idmap_query_attrs(), layout_update(), map_dacl_2_nfs4acl(), map_name_2_sid(), map_nfs4ace_who(), map_user_to_ids(), marshall_getattr(), mds_commit(), nfs41_cached_getattr(), nfs41_client_create(), nfs41_client_owner(), nfs41_client_renew(), nfs41_create_session(), nfs41_delegation_recall(), nfs41_delegation_to_open(), nfs41_destroy_session(), nfs41_ea_set(), nfs41_handle_callback(), nfs41_idmap_create(), nfs41_idmap_gid_to_group(), nfs41_idmap_uid_to_name(), nfs41_lookup(), nfs41_read(), nfs41_recover_session(), nfs41_recover_stateid(), nfs41_root_create(), nfs41_root_mount_addrs(), nfs41_rpc_clnt_create(), nfs41_send_compound(), nfs41_session_bad_slot(), nfs41_session_create(), nfs41_session_free(), nfs41_session_set_lease(), nfs41_symlink_target(), nfs41_write(), nfs_decode_compound(), nfs_to_windows_error(), pattern_fork(), pnfs_file_device_get(), pnfs_layout_state_close(), pnfs_read(), pnfs_write(), readdir_copy_entry(), readdir_size_for_entry(), recover_delegation_open(), recover_delegation_want(), recover_open(), referral_resolve(), replay_cache_read(), root_client_create(), rpc_reconnect(), server_create(), ServiceStart(), session_get_lease(), set_ea_value(), superblock_create(), thread_main(), unexpected_op(), upcall_handle(), upcall_parse(), xdr_bitmap4(), xdr_channel_attrs4(), xdr_layout_types(), xdr_locker4(), xdr_state_protect4_a(), and xdr_state_protect4_r().

◆ gssauth_string()

const char * gssauth_string ( int  type)

Definition at line 504 of file daemon_debug.c.

504 {
505 switch(type) {
506 case RPCSEC_SSPI_SVC_NONE: return "RPCSEC_SSPI_SVC_NONE";
507 case RPCSEC_SSPI_SVC_INTEGRITY: return "RPCSEC_SSPI_SVC_INTEGRITY";
508 case RPCSEC_SSPI_SVC_PRIVACY: return "RPCSEC_SSPI_SVC_PRIVACY";
509 default: return "invalid gss auth type";
510 }
511}
@ RPCSEC_SSPI_SVC_NONE
Definition: auth_sspi.h:39
@ RPCSEC_SSPI_SVC_INTEGRITY
Definition: auth_sspi.h:40
@ RPCSEC_SSPI_SVC_PRIVACY
Definition: auth_sspi.h:41
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545

Referenced by create_new_rpc_auth().

◆ nfs_error_string()

const char * nfs_error_string ( int  status)

Definition at line 370 of file daemon_debug.c.

371{
372 switch (status)
373 {
374 case NFS4_OK: return "NFS4_OK";
375 case NFS4ERR_PERM: return "NFS4ERR_PERM";
376 case NFS4ERR_NOENT: return "NFS4ERR_NOENT";
377 case NFS4ERR_IO: return "NFS4ERR_IO";
378 case NFS4ERR_NXIO: return "NFS4ERR_NXIO";
379 case NFS4ERR_ACCESS: return "NFS4ERR_ACCESS";
380 case NFS4ERR_EXIST: return "NFS4ERR_EXIST";
381 case NFS4ERR_XDEV: return "NFS4ERR_XDEV";
382 case NFS4ERR_NOTDIR: return "NFS4ERR_NOTDIR";
383 case NFS4ERR_ISDIR: return "NFS4ERR_ISDIR";
384 case NFS4ERR_INVAL: return "NFS4ERR_INVAL";
385 case NFS4ERR_FBIG: return "NFS4ERR_FBIG";
386 case NFS4ERR_NOSPC: return "NFS4ERR_NOSPC";
387 case NFS4ERR_ROFS: return "NFS4ERR_ROFS";
388 case NFS4ERR_MLINK: return "NFS4ERR_MLINK";
389 case NFS4ERR_NAMETOOLONG: return "NFS4ERR_NAMETOOLONG";
390 case NFS4ERR_NOTEMPTY: return "NFS4ERR_NOTEMPTY";
391 case NFS4ERR_DQUOT: return "NFS4ERR_DQUOT";
392 case NFS4ERR_STALE: return "NFS4ERR_STALE";
393 case NFS4ERR_BADHANDLE: return "NFS4ERR_BADHANDLE";
394 case NFS4ERR_BAD_COOKIE: return "NFS4ERR_BAD_COOKIE";
395 case NFS4ERR_NOTSUPP: return "NFS4ERR_NOTSUPP";
396 case NFS4ERR_TOOSMALL: return "NFS4ERR_TOOSMALL";
397 case NFS4ERR_SERVERFAULT: return "NFS4ERR_SERVERFAULT";
398 case NFS4ERR_BADTYPE: return "NFS4ERR_BADTYPE";
399 case NFS4ERR_DELAY: return "NFS4ERR_DELAY";
400 case NFS4ERR_SAME: return "NFS4ERR_SAME";
401 case NFS4ERR_DENIED: return "NFS4ERR_DENIED";
402 case NFS4ERR_EXPIRED: return "NFS4ERR_EXPIRED";
403 case NFS4ERR_LOCKED: return "NFS4ERR_LOCKED";
404 case NFS4ERR_GRACE: return "NFS4ERR_GRACE";
405 case NFS4ERR_FHEXPIRED: return "NFS4ERR_FHEXPIRED";
406 case NFS4ERR_SHARE_DENIED: return "NFS4ERR_SHARE_DENIED";
407 case NFS4ERR_WRONGSEC: return "NFS4ERR_WRONGSEC";
408 case NFS4ERR_CLID_INUSE: return "NFS4ERR_CLID_INUSE";
409 case NFS4ERR_RESOURCE: return "NFS4ERR_RESOURCE";
410 case NFS4ERR_MOVED: return "NFS4ERR_MOVED";
411 case NFS4ERR_NOFILEHANDLE: return "NFS4ERR_NOFILEHANDLE";
412 case NFS4ERR_MINOR_VERS_MISMATCH: return "NFS4ERR_MINOR_VERS_MISMATCH";
413 case NFS4ERR_STALE_CLIENTID: return "NFS4ERR_STALE_CLIENTID";
414 case NFS4ERR_STALE_STATEID: return "NFS4ERR_STALE_STATEID";
415 case NFS4ERR_OLD_STATEID: return "NFS4ERR_OLD_STATEID";
416 case NFS4ERR_BAD_STATEID: return "NFS4ERR_BAD_STATEID";
417 case NFS4ERR_BAD_SEQID: return "NFS4ERR_BAD_SEQID";
418 case NFS4ERR_NOT_SAME: return "NFS4ERR_NOT_SAME";
419 case NFS4ERR_LOCK_RANGE: return "NFS4ERR_LOCK_RANGE";
420 case NFS4ERR_SYMLINK: return "NFS4ERR_SYMLINK";
421 case NFS4ERR_RESTOREFH: return "NFS4ERR_RESTOREFH";
422 case NFS4ERR_LEASE_MOVED: return "NFS4ERR_LEASE_MOVED";
423 case NFS4ERR_ATTRNOTSUPP: return "NFS4ERR_ATTRNOTSUPP";
424 case NFS4ERR_NO_GRACE: return "NFS4ERR_NO_GRACE";
425 case NFS4ERR_RECLAIM_BAD: return "NFS4ERR_RECLAIM_BAD";
426 case NFS4ERR_RECLAIM_CONFLICT: return "NFS4ERR_RECLAIM_CONFLICT";
427 case NFS4ERR_BADXDR: return "NFS4ERR_BADXDR";
428 case NFS4ERR_LOCKS_HELD: return "NFS4ERR_LOCKS_HELD";
429 case NFS4ERR_OPENMODE: return "NFS4ERR_OPENMODE";
430 case NFS4ERR_BADOWNER: return "NFS4ERR_BADOWNER";
431 case NFS4ERR_BADCHAR: return "NFS4ERR_BADCHAR";
432 case NFS4ERR_BADNAME: return "NFS4ERR_BADNAME";
433 case NFS4ERR_BAD_RANGE: return "NFS4ERR_BAD_RANGE";
434 case NFS4ERR_LOCK_NOTSUPP: return "NFS4ERR_LOCK_NOTSUPP";
435 case NFS4ERR_OP_ILLEGAL: return "NFS4ERR_OP_ILLEGAL";
436 case NFS4ERR_DEADLOCK: return "NFS4ERR_DEADLOCK";
437 case NFS4ERR_FILE_OPEN: return "NFS4ERR_FILE_OPEN";
438 case NFS4ERR_ADMIN_REVOKED: return "NFS4ERR_ADMIN_REVOKED";
439 case NFS4ERR_CB_PATH_DOWN: return "NFS4ERR_CB_PATH_DOWN";
440 case NFS4ERR_BADIOMODE: return "NFS4ERR_BADIOMODE";
441 case NFS4ERR_BADLAYOUT: return "NFS4ERR_BADLAYOUT";
442 case NFS4ERR_BAD_SESSION_DIGEST: return "NFS4ERR_BAD_SESSION_DIGEST";
443 case NFS4ERR_BADSESSION: return "NFS4ERR_BADSESSION";
444 case NFS4ERR_BADSLOT: return "NFS4ERR_BADSLOT";
445 case NFS4ERR_COMPLETE_ALREADY: return "NFS4ERR_COMPLETE_ALREADY";
446 case NFS4ERR_CONN_NOT_BOUND_TO_SESSION: return "NFS4ERR_CONN_NOT_BOUND_TO_SESSION";
447 case NFS4ERR_DELEG_ALREADY_WANTED: return "NFS4ERR_DELEG_ALREADY_WANTED";
448 case NFS4ERR_BACK_CHAN_BUSY: return "NFS4ERR_BACK_CHAN_BUSY";
449 case NFS4ERR_LAYOUTTRYLATER: return "NFS4ERR_LAYOUTTRYLATER";
450 case NFS4ERR_LAYOUTUNAVAILABLE: return "NFS4ERR_LAYOUTUNAVAILABLE";
451 case NFS4ERR_NOMATCHING_LAYOUT: return "NFS4ERR_NOMATCHING_LAYOUT";
452 case NFS4ERR_RECALLCONFLICT: return "NFS4ERR_RECALLCONFLICT";
453 case NFS4ERR_UNKNOWN_LAYOUTTYPE: return "NFS4ERR_UNKNOWN_LAYOUTTYPE";
454 case NFS4ERR_SEQ_MISORDERED: return "NFS4ERR_SEQ_MISORDERED";
455 case NFS4ERR_SEQUENCE_POS: return "NFS4ERR_SEQUENCE_POS";
456 case NFS4ERR_REQ_TOO_BIG: return "NFS4ERR_REQ_TOO_BIG";
457 case NFS4ERR_REP_TOO_BIG: return "NFS4ERR_REP_TOO_BIG";
458 case NFS4ERR_REP_TOO_BIG_TO_CACHE: return "NFS4ERR_REP_TOO_BIG_TO_CACHE";
459 case NFS4ERR_RETRY_UNCACHED_REP: return "NFS4ERR_RETRY_UNCACHED_REP";
460 case NFS4ERR_UNSAFE_COMPOUND: return "NFS4ERR_UNSAFE_COMPOUND";
461 case NFS4ERR_TOO_MANY_OPS: return "NFS4ERR_TOO_MANY_OPS";
462 case NFS4ERR_OP_NOT_IN_SESSION: return "NFS4ERR_OP_NOT_IN_SESSION";
463 case NFS4ERR_HASH_ALG_UNSUPP: return "NFS4ERR_HASH_ALG_UNSUPP";
464 case NFS4ERR_CLIENTID_BUSY: return "NFS4ERR_CLIENTID_BUSY";
465 case NFS4ERR_PNFS_IO_HOLE: return "NFS4ERR_PNFS_IO_HOLE";
466 case NFS4ERR_SEQ_FALSE_RETRY: return "NFS4ERR_SEQ_FALSE_RETRY";
467 case NFS4ERR_BAD_HIGH_SLOT: return "NFS4ERR_BAD_HIGH_SLOT";
468 case NFS4ERR_DEADSESSION: return "NFS4ERR_DEADSESSION";
469 case NFS4ERR_ENCR_ALG_UNSUPP: return "NFS4ERR_ENCR_ALG_UNSUPP";
470 case NFS4ERR_PNFS_NO_LAYOUT: return "NFS4ERR_PNFS_NO_LAYOUT";
471 case NFS4ERR_NOT_ONLY_OP: return "NFS4ERR_NOT_ONLY_OP";
472 case NFS4ERR_WRONG_CRED: return "NFS4ERR_WRONG_CRED";
473 case NFS4ERR_WRONG_TYPE: return "NFS4ERR_WRONG_TYPE";
474 case NFS4ERR_DIRDELEG_UNAVAIL: return "NFS4ERR_DIRDELEG_UNAVAIL";
475 case NFS4ERR_REJECT_DELEG: return "NFS4ERR_REJECT_DELEG";
476 case NFS4ERR_RETURNCONFLICT: return "NFS4ERR_RETURNCONFLICT";
477 case NFS4ERR_DELEG_REVOKED: return "NFS4ERR_DELEG_REVOKED";
478 default: return "invalid nfs error code";
479 }
480}
@ NFS4ERR_BADLAYOUT
Definition: nfs41_const.h:159
@ NFS4ERR_BACK_CHAN_BUSY
Definition: nfs41_const.h:166
@ NFS4ERR_SEQ_MISORDERED
Definition: nfs41_const.h:172
@ NFS4ERR_REP_TOO_BIG
Definition: nfs41_const.h:175
@ NFS4ERR_OP_NOT_IN_SESSION
Definition: nfs41_const.h:180
@ NFS4ERR_SAME
Definition: nfs41_const.h:114
@ NFS4ERR_BAD_RANGE
Definition: nfs41_const.h:149
@ NFS4ERR_DELEG_ALREADY_WANTED
Definition: nfs41_const.h:165
@ NFS4ERR_SEQUENCE_POS
Definition: nfs41_const.h:173
@ NFS4ERR_OPENMODE
Definition: nfs41_const.h:145
@ NFS4ERR_REP_TOO_BIG_TO_CACHE
Definition: nfs41_const.h:176
@ NFS4ERR_COMPLETE_ALREADY
Definition: nfs41_const.h:163
@ NFS4ERR_BAD_STATEID
Definition: nfs41_const.h:132
@ NFS4ERR_ROFS
Definition: nfs41_const.h:101
@ NFS4ERR_SHARE_DENIED
Definition: nfs41_const.h:120
@ NFS4ERR_RECALLCONFLICT
Definition: nfs41_const.h:170
@ NFS4ERR_TOOSMALL
Definition: nfs41_const.h:110
@ NFS4ERR_TOO_MANY_OPS
Definition: nfs41_const.h:179
@ NFS4ERR_RETRY_UNCACHED_REP
Definition: nfs41_const.h:177
@ NFS4ERR_BAD_SESSION_DIGEST
Definition: nfs41_const.h:160
@ NFS4ERR_NAMETOOLONG
Definition: nfs41_const.h:103
@ NFS4ERR_RECLAIM_CONFLICT
Definition: nfs41_const.h:142
@ NFS4ERR_RETURNCONFLICT
Definition: nfs41_const.h:195
@ NFS4ERR_CB_PATH_DOWN
Definition: nfs41_const.h:155
@ NFS4ERR_NOTEMPTY
Definition: nfs41_const.h:104
@ NFS4ERR_EXIST
Definition: nfs41_const.h:93
@ NFS4ERR_DIRDELEG_UNAVAIL
Definition: nfs41_const.h:193
@ NFS4ERR_LAYOUTTRYLATER
Definition: nfs41_const.h:167
@ NFS4ERR_NOTDIR
Definition: nfs41_const.h:96
@ NFS4ERR_LOCKS_HELD
Definition: nfs41_const.h:144
@ NFS4ERR_FBIG
Definition: nfs41_const.h:99
@ NFS4ERR_NOT_SAME
Definition: nfs41_const.h:134
@ NFS4ERR_DQUOT
Definition: nfs41_const.h:105
@ NFS4ERR_REJECT_DELEG
Definition: nfs41_const.h:194
@ NFS4ERR_BADNAME
Definition: nfs41_const.h:148
@ NFS4ERR_ADMIN_REVOKED
Definition: nfs41_const.h:154
@ NFS4ERR_MINOR_VERS_MISMATCH
Definition: nfs41_const.h:128
@ NFS4ERR_NOSPC
Definition: nfs41_const.h:100
@ NFS4ERR_CONN_NOT_BOUND_TO_SESSION
Definition: nfs41_const.h:164
@ NFS4ERR_RESOURCE
Definition: nfs41_const.h:125
@ NFS4ERR_ENCR_ALG_UNSUPP
Definition: nfs41_const.h:188
@ NFS4ERR_CLID_INUSE
Definition: nfs41_const.h:122
@ NFS4ERR_REQ_TOO_BIG
Definition: nfs41_const.h:174
@ NFS4ERR_BADTYPE
Definition: nfs41_const.h:112
@ NFS4ERR_NOFILEHANDLE
Definition: nfs41_const.h:127
@ NFS4ERR_EXPIRED
Definition: nfs41_const.h:116
@ NFS4ERR_WRONG_CRED
Definition: nfs41_const.h:191
@ NFS4ERR_LEASE_MOVED
Definition: nfs41_const.h:138
@ NFS4ERR_XDEV
Definition: nfs41_const.h:94
@ NFS4ERR_MLINK
Definition: nfs41_const.h:102
@ NFS4ERR_LOCK_NOTSUPP
Definition: nfs41_const.h:150
@ NFS4ERR_ISDIR
Definition: nfs41_const.h:97
@ NFS4ERR_DELAY
Definition: nfs41_const.h:113
@ NFS4ERR_BADIOMODE
Definition: nfs41_const.h:158
@ NFS4ERR_RESTOREFH
Definition: nfs41_const.h:137
@ NFS4ERR_NOMATCHING_LAYOUT
Definition: nfs41_const.h:169
@ NFS4ERR_ACCESS
Definition: nfs41_const.h:92
@ NFS4ERR_MOVED
Definition: nfs41_const.h:126
@ NFS4ERR_UNSAFE_COMPOUND
Definition: nfs41_const.h:178
@ NFS4ERR_DELEG_REVOKED
Definition: nfs41_const.h:196
@ NFS4ERR_BADSLOT
Definition: nfs41_const.h:162
@ NFS4ERR_BADOWNER
Definition: nfs41_const.h:146
@ NFS4ERR_WRONGSEC
Definition: nfs41_const.h:121
@ NFS4ERR_BADXDR
Definition: nfs41_const.h:143
@ NFS4ERR_DENIED
Definition: nfs41_const.h:115
@ NFS4ERR_PERM
Definition: nfs41_const.h:88
@ NFS4ERR_BAD_SEQID
Definition: nfs41_const.h:133
@ NFS4ERR_LOCKED
Definition: nfs41_const.h:117
@ NFS4ERR_BAD_COOKIE
Definition: nfs41_const.h:108
@ NFS4ERR_HASH_ALG_UNSUPP
Definition: nfs41_const.h:181
@ NFS4ERR_WRONG_TYPE
Definition: nfs41_const.h:192
@ NFS4ERR_FHEXPIRED
Definition: nfs41_const.h:119
@ NFS4ERR_NOTSUPP
Definition: nfs41_const.h:109
@ NFS4ERR_BADSESSION
Definition: nfs41_const.h:161
@ NFS4ERR_PNFS_IO_HOLE
Definition: nfs41_const.h:184
@ NFS4ERR_STALE_CLIENTID
Definition: nfs41_const.h:129
@ NFS4ERR_OP_ILLEGAL
Definition: nfs41_const.h:151
@ NFS4ERR_NOENT
Definition: nfs41_const.h:89
@ NFS4ERR_FILE_OPEN
Definition: nfs41_const.h:153
@ NFS4ERR_NOT_ONLY_OP
Definition: nfs41_const.h:190
@ NFS4ERR_DEADSESSION
Definition: nfs41_const.h:187
@ NFS4_OK
Definition: nfs41_const.h:87
@ NFS4ERR_LOCK_RANGE
Definition: nfs41_const.h:135
@ NFS4ERR_INVAL
Definition: nfs41_const.h:98
@ NFS4ERR_RECLAIM_BAD
Definition: nfs41_const.h:141
@ NFS4ERR_IO
Definition: nfs41_const.h:90
@ NFS4ERR_STALE_STATEID
Definition: nfs41_const.h:130
@ NFS4ERR_PNFS_NO_LAYOUT
Definition: nfs41_const.h:189
@ NFS4ERR_DEADLOCK
Definition: nfs41_const.h:152
@ NFS4ERR_SYMLINK
Definition: nfs41_const.h:136
@ NFS4ERR_GRACE
Definition: nfs41_const.h:118
@ NFS4ERR_NO_GRACE
Definition: nfs41_const.h:140
@ NFS4ERR_BADHANDLE
Definition: nfs41_const.h:107
@ NFS4ERR_OLD_STATEID
Definition: nfs41_const.h:131
@ NFS4ERR_STALE
Definition: nfs41_const.h:106
@ NFS4ERR_UNKNOWN_LAYOUTTYPE
Definition: nfs41_const.h:171
@ NFS4ERR_CLIENTID_BUSY
Definition: nfs41_const.h:183
@ NFS4ERR_LAYOUTUNAVAILABLE
Definition: nfs41_const.h:168
@ NFS4ERR_ATTRNOTSUPP
Definition: nfs41_const.h:139
@ NFS4ERR_BADCHAR
Definition: nfs41_const.h:147
@ NFS4ERR_BAD_HIGH_SLOT
Definition: nfs41_const.h:186
@ NFS4ERR_NXIO
Definition: nfs41_const.h:91
@ NFS4ERR_SERVERFAULT
Definition: nfs41_const.h:111
@ NFS4ERR_SEQ_FALSE_RETRY
Definition: nfs41_const.h:185
Definition: ps.c:97

Referenced by cancel_open(), check_execute_access(), compound_encode_send_decode(), do_nfs41_close(), file_layout_fetch(), file_layout_read_thread(), file_layout_return(), file_layout_write_thread(), get_ea_value(), get_superblock_attrs(), get_volume_size_info(), handle_cb_compound(), handle_cb_layoutrecall(), handle_cb_recall_slot(), handle_cb_sequence(), handle_close(), handle_lock(), handle_nfs41_remove(), handle_nfs41_set_size(), handle_open(), handle_readdir(), handle_setacl(), handle_setexattr(), handle_symlink(), layout_commit(), mds_commit(), nfs41_cached_getattr(), nfs41_delegation_getattr(), nfs41_delegation_recall(), nfs41_delegation_to_open(), nfs41_ea_set(), nfs41_read(), nfs41_root_mount_addrs(), nfs41_symlink_target(), nfs41_write(), nfs_to_windows_error(), pnfs_file_device_get(), referral_resolve(), root_client_create(), rpc_reconnect(), session_get_lease(), and set_ea_value().

◆ nfs_opnum_to_string()

const char * nfs_opnum_to_string ( int  opnum)

Definition at line 305 of file daemon_debug.c.

306{
307 switch (opnum)
308 {
309 case OP_ACCESS: return "ACCESS";
310 case OP_CLOSE: return "CLOSE";
311 case OP_COMMIT: return "COMMIT";
312 case OP_CREATE: return "CREATE";
313 case OP_DELEGPURGE: return "DELEGPURGE";
314 case OP_DELEGRETURN: return "DELEGRETURN";
315 case OP_GETATTR: return "GETATTR";
316 case OP_GETFH: return "GETFH";
317 case OP_LINK: return "LINK";
318 case OP_LOCK: return "LOCK";
319 case OP_LOCKT: return "LOCKT";
320 case OP_LOCKU: return "LOCKU";
321 case OP_LOOKUP: return "LOOKUP";
322 case OP_LOOKUPP: return "LOOKUPP";
323 case OP_NVERIFY: return "NVERIFY";
324 case OP_OPEN: return "OPEN";
325 case OP_OPENATTR: return "OPENATTR";
326 case OP_OPEN_CONFIRM: return "OPEN_CONFIRM";
327 case OP_OPEN_DOWNGRADE: return "OPEN_DOWNGRADE";
328 case OP_PUTFH: return "PUTFH";
329 case OP_PUTPUBFH: return "PUTPUBFH";
330 case OP_PUTROOTFH: return "PUTROOTFH";
331 case OP_READ: return "READ";
332 case OP_READDIR: return "READDIR";
333 case OP_READLINK: return "READLINK";
334 case OP_REMOVE: return "REMOVE";
335 case OP_RENAME: return "RENAME";
336 case OP_RENEW: return "RENEW";
337 case OP_RESTOREFH: return "RESTOREFH";
338 case OP_SAVEFH: return "SAVEFH";
339 case OP_SECINFO: return "SECINFO";
340 case OP_SETATTR: return "SETATTR";
341 case OP_SETCLIENTID: return "SETCLIENTID";
342 case OP_SETCLIENTID_CONFIRM: return "SETCLIENTID_CONFIRM";
343 case OP_VERIFY: return "VERIFY";
344 case OP_WRITE: return "WRITE";
345 case OP_RELEASE_LOCKOWNER: return "RELEASE_LOCKOWNER";
346 case OP_BACKCHANNEL_CTL: return "BACKCHANNEL_CTL";
347 case OP_BIND_CONN_TO_SESSION: return "BIND_CONN_TO_SESSION";
348 case OP_EXCHANGE_ID: return "EXCHANGE_ID";
349 case OP_CREATE_SESSION: return "CREATE_SESSION";
350 case OP_DESTROY_SESSION: return "DESTROY_SESSION";
351 case OP_FREE_STATEID: return "FREE_STATEID";
352 case OP_GET_DIR_DELEGATION: return "GET_DIR_DELEGATION";
353 case OP_GETDEVICEINFO: return "GETDEVICEINFO";
354 case OP_GETDEVICELIST: return "GETDEVICELIST";
355 case OP_LAYOUTCOMMIT: return "LAYOUTCOMMIT";
356 case OP_LAYOUTGET: return "LAYOUTGET";
357 case OP_LAYOUTRETURN: return "LAYOUTRETURN";
358 case OP_SECINFO_NO_NAME: return "SECINFO_NO_NAME";
359 case OP_SEQUENCE: return "SEQUENCE";
360 case OP_SET_SSV: return "SET_SSV";
361 case OP_TEST_STATEID: return "TEST_STATEID";
362 case OP_WANT_DELEGATION: return "WANT_DELEGATION";
363 case OP_DESTROY_CLIENTID: return "DESTROY_CLIENTID";
364 case OP_RECLAIM_COMPLETE: return "RECLAIM_COMPLETE";
365 case OP_ILLEGAL: return "ILLEGAL";
366 default: return "invalid nfs opnum";
367 }
368}
@ OP_FREE_STATEID
Definition: nfs41_ops.h:75
@ OP_GETDEVICELIST
Definition: nfs41_ops.h:78
@ OP_RESTOREFH
Definition: nfs41_ops.h:59
@ OP_RECLAIM_COMPLETE
Definition: nfs41_ops.h:88
@ OP_WRITE
Definition: nfs41_ops.h:66
@ OP_SETATTR
Definition: nfs41_ops.h:62
@ OP_DELEGPURGE
Definition: nfs41_ops.h:35
@ OP_PUTPUBFH
Definition: nfs41_ops.h:51
@ OP_DESTROY_SESSION
Definition: nfs41_ops.h:74
@ OP_OPEN
Definition: nfs41_ops.h:46
@ OP_ACCESS
Definition: nfs41_ops.h:31
@ OP_SECINFO_NO_NAME
Definition: nfs41_ops.h:82
@ OP_GETFH
Definition: nfs41_ops.h:38
@ OP_LOOKUPP
Definition: nfs41_ops.h:44
@ OP_GET_DIR_DELEGATION
Definition: nfs41_ops.h:76
@ OP_SETCLIENTID
Definition: nfs41_ops.h:63
@ OP_CREATE_SESSION
Definition: nfs41_ops.h:73
@ OP_GETDEVICEINFO
Definition: nfs41_ops.h:77
@ OP_SECINFO
Definition: nfs41_ops.h:61
@ OP_DESTROY_CLIENTID
Definition: nfs41_ops.h:87
@ OP_RENEW
Definition: nfs41_ops.h:58
@ OP_TEST_STATEID
Definition: nfs41_ops.h:85
@ OP_READLINK
Definition: nfs41_ops.h:55
@ OP_LAYOUTCOMMIT
Definition: nfs41_ops.h:79
@ OP_LOCKU
Definition: nfs41_ops.h:42
@ OP_READDIR
Definition: nfs41_ops.h:54
@ OP_LAYOUTRETURN
Definition: nfs41_ops.h:81
@ OP_LAYOUTGET
Definition: nfs41_ops.h:80
@ OP_OPEN_DOWNGRADE
Definition: nfs41_ops.h:49
@ OP_PUTROOTFH
Definition: nfs41_ops.h:52
@ OP_VERIFY
Definition: nfs41_ops.h:65
@ OP_SAVEFH
Definition: nfs41_ops.h:60
@ OP_EXCHANGE_ID
Definition: nfs41_ops.h:72
@ OP_CLOSE
Definition: nfs41_ops.h:32
@ OP_ILLEGAL
Definition: nfs41_ops.h:89
@ OP_LOCKT
Definition: nfs41_ops.h:41
@ OP_CREATE
Definition: nfs41_ops.h:34
@ OP_RENAME
Definition: nfs41_ops.h:57
@ OP_OPEN_CONFIRM
Definition: nfs41_ops.h:48
@ OP_GETATTR
Definition: nfs41_ops.h:37
@ OP_BIND_CONN_TO_SESSION
Definition: nfs41_ops.h:71
@ OP_SEQUENCE
Definition: nfs41_ops.h:83
@ OP_READ
Definition: nfs41_ops.h:53
@ OP_PUTFH
Definition: nfs41_ops.h:50
@ OP_LOOKUP
Definition: nfs41_ops.h:43
@ OP_RELEASE_LOCKOWNER
Definition: nfs41_ops.h:67
@ OP_LOCK
Definition: nfs41_ops.h:40
@ OP_COMMIT
Definition: nfs41_ops.h:33
@ OP_LINK
Definition: nfs41_ops.h:39
@ OP_WANT_DELEGATION
Definition: nfs41_ops.h:86
@ OP_DELEGRETURN
Definition: nfs41_ops.h:36
@ OP_OPENATTR
Definition: nfs41_ops.h:47
@ OP_NVERIFY
Definition: nfs41_ops.h:45
@ OP_REMOVE
Definition: nfs41_ops.h:56
@ OP_SETCLIENTID_CONFIRM
Definition: nfs41_ops.h:64
@ OP_SET_SSV
Definition: nfs41_ops.h:84
@ OP_BACKCHANNEL_CTL
Definition: nfs41_ops.h:70

Referenced by nfs41_destroy_session(), nfs41_recover_stateid(), nfs_decode_compound(), and unexpected_op().

◆ opcode2string()

const char * opcode2string ( DWORD  opcode)

Definition at line 280 of file daemon_debug.c.

281{
282 switch(opcode) {
283 case NFS41_SHUTDOWN: return "NFS41_SHUTDOWN";
284 case NFS41_MOUNT: return "NFS41_MOUNT";
285 case NFS41_UNMOUNT: return "NFS41_UNMOUNT";
286 case NFS41_OPEN: return "NFS41_OPEN";
287 case NFS41_CLOSE: return "NFS41_CLOSE";
288 case NFS41_READ: return "NFS41_READ";
289 case NFS41_WRITE: return "NFS41_WRITE";
290 case NFS41_LOCK: return "NFS41_LOCK";
291 case NFS41_UNLOCK: return "NFS41_UNLOCK";
292 case NFS41_DIR_QUERY: return "NFS41_DIR_QUERY";
293 case NFS41_FILE_QUERY: return "NFS41_FILE_QUERY";
294 case NFS41_FILE_SET: return "NFS41_FILE_SET";
295 case NFS41_EA_SET: return "NFS41_EA_SET";
296 case NFS41_EA_GET: return "NFS41_EA_GET";
297 case NFS41_SYMLINK: return "NFS41_SYMLINK";
298 case NFS41_VOLUME_QUERY: return "NFS41_VOLUME_QUERY";
299 case NFS41_ACL_QUERY: return "NFS41_ACL_QUERY";
300 case NFS41_ACL_SET: return "NFS41_ACL_SET";
301 default: return "UNKNOWN";
302 }
303}
@ NFS41_READ
Definition: nfs41_driver.h:57
@ NFS41_CLOSE
Definition: nfs41_driver.h:56
@ NFS41_WRITE
Definition: nfs41_driver.h:58
@ NFS41_FILE_SET
Definition: nfs41_driver.h:63
@ NFS41_SYMLINK
Definition: nfs41_driver.h:66
@ NFS41_EA_GET
Definition: nfs41_driver.h:64
@ NFS41_EA_SET
Definition: nfs41_driver.h:65
@ NFS41_ACL_QUERY
Definition: nfs41_driver.h:68
@ NFS41_SHUTDOWN
Definition: nfs41_driver.h:70
@ NFS41_MOUNT
Definition: nfs41_driver.h:53
@ NFS41_UNMOUNT
Definition: nfs41_driver.h:54
@ NFS41_DIR_QUERY
Definition: nfs41_driver.h:61
@ NFS41_LOCK
Definition: nfs41_driver.h:59
@ NFS41_UNLOCK
Definition: nfs41_driver.h:60
@ NFS41_OPEN
Definition: nfs41_driver.h:55
@ NFS41_FILE_QUERY
Definition: nfs41_driver.h:62
@ NFS41_VOLUME_QUERY
Definition: nfs41_driver.h:67
@ NFS41_ACL_SET
Definition: nfs41_driver.h:69

Referenced by marshal_nfs41_header(), nfs41_UpcallWaitForReply(), parse_rw(), print_opcode(), thread_main(), unmarshal_nfs41_header(), upcall_handle(), and upcall_parse().

◆ open_log_files()

void open_log_files ( )

Definition at line 40 of file daemon_debug.c.

41{
42 const char dfile[] = "nfsddbg.log";
43 const char efile[] = "nfsderr.log";
44 const char mode[] = "w";
45 if (g_debug_level > 0) {
46 dlog_file = fopen(dfile, mode);
47 if (dlog_file == NULL) {
50 }
51 }
52 elog_file = fopen(efile, mode);
53 if (elog_file == NULL) {
56 }
57}
BOOL ReportStatusToSCMgr(DWORD dwCurrentState, DWORD dwWin32ExitCode, DWORD dwWaitHint)
Definition: service.c:240
#define NULL
Definition: types.h:112
GLenum mode
Definition: glext.h:6217
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
#define exit(n)
Definition: config.h:202
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define SERVICE_STOPPED
Definition: winsvc.h:21

Referenced by ServiceStart().

◆ print_access_mask()

void print_access_mask ( int  level,
DWORD  access_mask 
)

Definition at line 181 of file daemon_debug.c.

181 {
182 if (level > g_debug_level) return;
183 fprintf(dlog_file, "access mask: ");
184 if (access_mask & FILE_READ_DATA)
185 fprintf(dlog_file, "READ ");
186 if (access_mask & STANDARD_RIGHTS_READ)
187 fprintf(dlog_file, "READ_ACL ");
188 if (access_mask & FILE_READ_ATTRIBUTES)
189 fprintf(dlog_file, "READ_ATTR ");
190 if (access_mask & FILE_READ_EA)
191 fprintf(dlog_file, "READ_EA ");
192 if (access_mask & FILE_WRITE_DATA)
193 fprintf(dlog_file, "WRITE ");
194 if (access_mask & STANDARD_RIGHTS_WRITE)
195 fprintf(dlog_file, "WRITE_ACL ");
196 if (access_mask & FILE_WRITE_ATTRIBUTES)
197 fprintf(dlog_file, "WRITE_ATTR ");
198 if (access_mask & FILE_WRITE_EA)
199 fprintf(dlog_file, "WRITE_EA ");
200 if (access_mask & FILE_APPEND_DATA)
201 fprintf(dlog_file, "APPEND ");
202 if (access_mask & FILE_EXECUTE)
203 fprintf(dlog_file, "EXECUTE ");
204 if (access_mask & FILE_LIST_DIRECTORY)
205 fprintf(dlog_file, "LIST ");
206 if (access_mask & FILE_TRAVERSE)
207 fprintf(dlog_file, "TRAVERSE ");
208 if (access_mask & SYNCHRONIZE)
209 fprintf(dlog_file, "SYNC ");
210 if (access_mask & FILE_DELETE_CHILD)
211 fprintf(dlog_file, "DELETE_CHILD");
212 fprintf(dlog_file, "\n");
213}
#define SYNCHRONIZE
Definition: nt_native.h:61
#define FILE_WRITE_DATA
Definition: nt_native.h:631
#define FILE_READ_DATA
Definition: nt_native.h:628
#define FILE_READ_ATTRIBUTES
Definition: nt_native.h:647
#define FILE_LIST_DIRECTORY
Definition: nt_native.h:629
#define FILE_DELETE_CHILD
Definition: nt_native.h:645
#define FILE_READ_EA
Definition: nt_native.h:638
#define FILE_EXECUTE
Definition: nt_native.h:642
#define STANDARD_RIGHTS_READ
Definition: nt_native.h:65
#define FILE_TRAVERSE
Definition: nt_native.h:643
#define FILE_WRITE_ATTRIBUTES
Definition: nt_native.h:649
#define FILE_APPEND_DATA
Definition: nt_native.h:634
#define STANDARD_RIGHTS_WRITE
Definition: nt_native.h:66
#define FILE_WRITE_EA
Definition: nt_native.h:640

Referenced by parse_open().

◆ print_condwait_status()

void print_condwait_status ( int  level,
int  status 
)

Definition at line 513 of file daemon_debug.c.

514{
515 if (level > g_debug_level) return;
516 switch(status) {
517 case WAIT_ABANDONED: fprintf(dlog_file, "WAIT_ABANDONED\n"); break;
518 case WAIT_OBJECT_0: fprintf(dlog_file, "WAIT_OBJECT_0\n"); break;
519 case WAIT_TIMEOUT: fprintf(dlog_file, "WAIT_TIMEOUT\n"); break;
520 case WAIT_FAILED: fprintf(dlog_file, "WAIT_FAILED %d\n", GetLastError());
521 default: fprintf(dlog_file, "unknown status =%d\n", status);
522 }
523}
#define WAIT_TIMEOUT
Definition: dderror.h:14
#define WAIT_ABANDONED
Definition: winbase.h:412
#define WAIT_OBJECT_0
Definition: winbase.h:406
#define WAIT_FAILED
Definition: winbase.h:413

Referenced by nfs41_send_compound().

◆ print_create_attributes()

void print_create_attributes ( int  level,
DWORD  create_opts 
)

Definition at line 126 of file daemon_debug.c.

126 {
127 if (level > g_debug_level) return;
128 fprintf(dlog_file, "create attributes: ");
129 if (create_opts & FILE_DIRECTORY_FILE)
130 fprintf(dlog_file, "DIRECTORY_FILE ");
131 if (create_opts & FILE_NON_DIRECTORY_FILE)
132 fprintf(dlog_file, "NON_DIRECTORY_FILE ");
133 if (create_opts & FILE_WRITE_THROUGH)
134 fprintf(dlog_file, "WRITE_THROUGH ");
135 if (create_opts & FILE_SEQUENTIAL_ONLY)
136 fprintf(dlog_file, "SEQUENTIAL_ONLY ");
137 if (create_opts & FILE_RANDOM_ACCESS)
138 fprintf(dlog_file, "RANDOM_ACCESS ");
139 if (create_opts & FILE_NO_INTERMEDIATE_BUFFERING)
140 fprintf(dlog_file, "NO_INTERMEDIATE_BUFFERING ");
141 if (create_opts & FILE_SYNCHRONOUS_IO_ALERT)
142 fprintf(dlog_file, "SYNCHRONOUS_IO_ALERT ");
143 if (create_opts & FILE_SYNCHRONOUS_IO_NONALERT)
144 fprintf(dlog_file, "SYNCHRONOUS_IO_NONALERT ");
145 if (create_opts & FILE_CREATE_TREE_CONNECTION)
146 fprintf(dlog_file, "CREATE_TREE_CONNECTION ");
147 if (create_opts & FILE_COMPLETE_IF_OPLOCKED)
148 fprintf(dlog_file, "COMPLETE_IF_OPLOCKED ");
149 if (create_opts & FILE_NO_EA_KNOWLEDGE)
150 fprintf(dlog_file, "NO_EA_KNOWLEDGE ");
151 if (create_opts & FILE_OPEN_REPARSE_POINT)
152 fprintf(dlog_file, "OPEN_REPARSE_POINT ");
153 if (create_opts & FILE_DELETE_ON_CLOSE)
154 fprintf(dlog_file, "DELETE_ON_CLOSE ");
155 if (create_opts & FILE_OPEN_BY_FILE_ID)
156 fprintf(dlog_file, "OPEN_BY_FILE_ID ");
157 if (create_opts & FILE_OPEN_FOR_BACKUP_INTENT)
158 fprintf(dlog_file, "OPEN_FOR_BACKUP_INTENT ");
159 if (create_opts & FILE_RESERVE_OPFILTER)
160 fprintf(dlog_file, "RESERVE_OPFILTER");
161 fprintf(dlog_file, "\n");
162}
#define FILE_DIRECTORY_FILE
Definition: constants.h:491
#define FILE_NON_DIRECTORY_FILE
Definition: constants.h:492
#define FILE_COMPLETE_IF_OPLOCKED
Definition: constants.h:493
#define FILE_DELETE_ON_CLOSE
Definition: constants.h:494
#define FILE_OPEN_BY_FILE_ID
Definition: from_kernel.h:41
#define FILE_OPEN_REPARSE_POINT
Definition: from_kernel.h:46
#define FILE_NO_EA_KNOWLEDGE
Definition: from_kernel.h:36
#define FILE_RESERVE_OPFILTER
Definition: from_kernel.h:45
#define FILE_SYNCHRONOUS_IO_NONALERT
Definition: from_kernel.h:31
#define FILE_NO_INTERMEDIATE_BUFFERING
Definition: from_kernel.h:28
#define FILE_RANDOM_ACCESS
Definition: from_kernel.h:38
#define FILE_WRITE_THROUGH
Definition: from_kernel.h:26
#define FILE_SEQUENTIAL_ONLY
Definition: from_kernel.h:27
#define FILE_SYNCHRONOUS_IO_ALERT
Definition: from_kernel.h:30
#define FILE_CREATE_TREE_CONNECTION
Definition: from_kernel.h:33
#define FILE_OPEN_FOR_BACKUP_INTENT
Definition: from_kernel.h:42

Referenced by parse_open().

◆ print_disposition()

void print_disposition ( int  level,
DWORD  disposition 
)

Definition at line 164 of file daemon_debug.c.

164 {
165 if (level > g_debug_level) return;
166 fprintf(dlog_file, "userland disposition = ");
167 if (disposition == FILE_SUPERSEDE)
168 fprintf(dlog_file, "FILE_SUPERSEDE\n");
169 else if (disposition == FILE_CREATE)
170 fprintf(dlog_file, "FILE_CREATE\n");
171 else if (disposition == FILE_OPEN)
172 fprintf(dlog_file, "FILE_OPEN\n");
173 else if (disposition == FILE_OPEN_IF)
174 fprintf(dlog_file, "FILE_OPEN_IF\n");
175 else if (disposition == FILE_OVERWRITE)
176 fprintf(dlog_file, "FILE_OVERWRITE\n");
177 else if (disposition == FILE_OVERWRITE_IF)
178 fprintf(dlog_file, "FILE_OVERWRITE_IF\n");
179}
#define FILE_OPEN
Definition: from_kernel.h:54
#define FILE_CREATE
Definition: from_kernel.h:55
#define FILE_OVERWRITE_IF
Definition: from_kernel.h:58
#define FILE_OVERWRITE
Definition: from_kernel.h:57
#define FILE_OPEN_IF
Definition: from_kernel.h:56
#define FILE_SUPERSEDE
Definition: from_kernel.h:53

Referenced by parse_open().

◆ print_file_id_both_dir_info()

void print_file_id_both_dir_info ( int  level,
FILE_ID_BOTH_DIR_INFO *  pboth_dir_info 
)

Definition at line 228 of file daemon_debug.c.

229{
230 if (level > g_debug_level) return;
231 fprintf(dlog_file, "FILE_ID_BOTH_DIR_INFO %p %d\n",
232 pboth_dir_info, sizeof(unsigned char *));
233 fprintf(dlog_file, "\tNextEntryOffset=%ld %d %d\n",
234 pboth_dir_info->NextEntryOffset,
235 sizeof(pboth_dir_info->NextEntryOffset), sizeof(DWORD));
236 fprintf(dlog_file, "\tFileIndex=%ld %d\n", pboth_dir_info->FileIndex,
237 sizeof(pboth_dir_info->FileIndex));
238 fprintf(dlog_file, "\tCreationTime=0x%x %d\n",
239 pboth_dir_info->CreationTime.QuadPart,
240 sizeof(pboth_dir_info->CreationTime));
241 fprintf(dlog_file, "\tLastAccessTime=0x%x %d\n",
242 pboth_dir_info->LastAccessTime.QuadPart,
243 sizeof(pboth_dir_info->LastAccessTime));
244 fprintf(dlog_file, "\tLastWriteTime=0x%x %d\n",
245 pboth_dir_info->LastWriteTime.QuadPart,
246 sizeof(pboth_dir_info->LastWriteTime));
247 fprintf(dlog_file, "\tChangeTime=0x%x %d\n",
248 pboth_dir_info->ChangeTime.QuadPart,
249 sizeof(pboth_dir_info->ChangeTime));
250 fprintf(dlog_file, "\tEndOfFile=0x%x %d\n",
251 pboth_dir_info->EndOfFile.QuadPart,
252 sizeof(pboth_dir_info->EndOfFile));
253 fprintf(dlog_file, "\tAllocationSize=0x%x %d\n",
254 pboth_dir_info->AllocationSize.QuadPart,
255 sizeof(pboth_dir_info->AllocationSize));
256 fprintf(dlog_file, "\tFileAttributes=%ld %d\n",
257 pboth_dir_info->FileAttributes,
258 sizeof(pboth_dir_info->FileAttributes));
259 fprintf(dlog_file, "\tFileNameLength=%ld %d\n",
260 pboth_dir_info->FileNameLength,
261 sizeof(pboth_dir_info->FileNameLength));
262 fprintf(dlog_file, "\tEaSize=%ld %d\n",
263 pboth_dir_info->EaSize, sizeof(pboth_dir_info->EaSize));
264 fprintf(dlog_file, "\tShortNameLength=%d %d\n",
265 pboth_dir_info->ShortNameLength,
266 sizeof(pboth_dir_info->ShortNameLength));
267 fprintf(dlog_file, "\tShortName='%S' %d\n", pboth_dir_info->ShortName,
268 sizeof(pboth_dir_info->ShortName));
269 fprintf(dlog_file, "\tFileId=0x%x %d\n", pboth_dir_info->FileId.QuadPart,
270 sizeof(pboth_dir_info->FileId));
271 fprintf(dlog_file, "\tFileName='%S' %p\n", pboth_dir_info->FileName,
272 pboth_dir_info->FileName);
273}
unsigned long DWORD
Definition: ntddk_ex.h:95

◆ print_hexbuf()

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

Definition at line 98 of file daemon_debug.c.

99{
100 int j, k;
101 if (level > g_debug_level) return;
102 fprintf(dlog_file, "%s", title);
103 for(j = 0, k = 0; j < len; j++, k++) {
104 fprintf(dlog_file, "%02x '%c' ", buf[j], isascii(buf[j])? buf[j]:' ');
105 if (((k+1) % 10 == 0 && k > 0)) {
106 fprintf(dlog_file, "\n");
107 }
108 }
109 fprintf(dlog_file, "\n");
110}
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
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 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
#define isascii
Definition: ctype.h:742
int k
Definition: mpi.c:3369
static char title[]
Definition: ps.c:92

Referenced by compound_encode_send_decode(), handle_upcall(), nfs41_create_session(), nfs41_downcall(), and upcall_parse().

◆ print_hexbuf_no_asci()

void print_hexbuf_no_asci ( int  level,
unsigned char title,
unsigned char buf,
int  len 
)

Definition at line 112 of file daemon_debug.c.

113{
114 int j, k;
115 if (level > g_debug_level) return;
116 fprintf(dlog_file, "%s", title);
117 for(j = 0, k = 0; j < len; j++, k++) {
118 fprintf(dlog_file, "%02x ", buf[j]);
119 if (((k+1) % 10 == 0 && k > 0)) {
120 fprintf(dlog_file, "\n");
121 }
122 }
123 fprintf(dlog_file, "\n");
124}

Referenced by map_dacl_2_nfs4acl().

◆ print_nfs_access_mask()

void print_nfs_access_mask ( int  on,
int  m 
)

Definition at line 640 of file daemon_debug.c.

641{
642 if (!on) return;
643 dprintf(1, "--> print_nfs_access_mask: %x\n", m);
644 if (m & ACE4_READ_DATA)
645 dprintf(1, "\tACE4_READ_DATA\n");
647 dprintf(1, "\tACE4_LIST_DIRECTORY\n");
648 if (m & ACE4_WRITE_DATA)
649 dprintf(1, "\tACE4_WRITE_DATA\n");
650 if (m & ACE4_ADD_FILE)
651 dprintf(1, "\tACE4_ADD_FILE\n");
652 if (m & ACE4_APPEND_DATA)
653 dprintf(1, "\tACE4_APPEND_DATA\n");
655 dprintf(1, "\tACE4_ADD_SUBDIRECTORY\n");
657 dprintf(1, "\tACE4_READ_NAMED_ATTRS\n");
659 dprintf(1, "\tACE4_WRITE_NAMED_ATTRS\n");
660 if (m & ACE4_EXECUTE)
661 dprintf(1, "\tACE4_EXECUTE\n");
662 if (m & ACE4_DELETE_CHILD)
663 dprintf(1, "\tACE4_DELETE_CHILD\n");
665 dprintf(1, "\tACE4_READ_ATTRIBUTES\n");
667 dprintf(1, "\tACE4_WRITE_ATTRIBUTES\n");
668 if (m & ACE4_DELETE)
669 dprintf(1, "\tACE4_DELETE\n");
670 if (m & ACE4_READ_ACL)
671 dprintf(1, "\tACE4_READ_ACL\n");
672 if (m & ACE4_WRITE_ACL)
673 dprintf(1, "\tACE4_WRITE_ACL\n");
674 if (m & ACE4_WRITE_OWNER)
675 dprintf(1, "\tACE4_WRITE_OWNER\n");
676 if (m & ACE4_SYNCHRONIZE)
677 dprintf(1, "\tACE4_SYNCHRONIZE\n");
678}
const GLfloat * m
Definition: glext.h:10848
#define ACE4_READ_NAMED_ATTRS
Definition: nfs41_const.h:330
#define ACE4_ADD_SUBDIRECTORY
Definition: nfs41_const.h:329
#define ACE4_WRITE_NAMED_ATTRS
Definition: nfs41_const.h:331
#define ACE4_DELETE
Definition: nfs41_const.h:339
#define ACE4_READ_ACL
Definition: nfs41_const.h:340
#define ACE4_WRITE_DATA
Definition: nfs41_const.h:326
#define ACE4_SYNCHRONIZE
Definition: nfs41_const.h:343
#define ACE4_ADD_FILE
Definition: nfs41_const.h:327
#define ACE4_LIST_DIRECTORY
Definition: nfs41_const.h:325
#define ACE4_WRITE_ATTRIBUTES
Definition: nfs41_const.h:335
#define ACE4_READ_ATTRIBUTES
Definition: nfs41_const.h:334
#define ACE4_APPEND_DATA
Definition: nfs41_const.h:328
#define ACE4_WRITE_ACL
Definition: nfs41_const.h:341
#define ACE4_EXECUTE
Definition: nfs41_const.h:332
#define ACE4_WRITE_OWNER
Definition: nfs41_const.h:342
#define ACE4_DELETE_CHILD
Definition: nfs41_const.h:333
#define ACE4_READ_DATA
Definition: nfs41_const.h:324
#define dprintf
Definition: regdump.c:33

Referenced by map_acemask().

◆ print_opcode()

void print_opcode ( int  level,
DWORD  opcode 
)

Definition at line 275 of file daemon_debug.c.

276{
278}
const char * opcode2string(DWORD opcode)
Definition: daemon_debug.c:280
const char * LPCSTR
Definition: xmlstorage.h:183

◆ print_share_mode()

void print_share_mode ( int  level,
DWORD  mode 
)

Definition at line 215 of file daemon_debug.c.

216{
217 if (level > g_debug_level) return;
218 fprintf(dlog_file, "share mode: ");
219 if (mode & FILE_SHARE_READ)
220 fprintf(dlog_file, "READ ");
222 fprintf(dlog_file, "WRITE ");
224 fprintf(dlog_file, "DELETE");
225 fprintf(dlog_file, "\n");
226}
#define FILE_SHARE_READ
Definition: compat.h:136
#define FILE_SHARE_WRITE
Definition: nt_native.h:681
#define FILE_SHARE_DELETE
Definition: nt_native.h:682

Referenced by parse_open().

◆ print_sr_status_flags()

void print_sr_status_flags ( int  level,
int  flags 
)

Definition at line 525 of file daemon_debug.c.

526{
527 if (level > g_debug_level) return;
528 fprintf(dlog_file, "%04x: sr_status_flags: ", GetCurrentThreadId());
530 fprintf(dlog_file, "SEQ4_STATUS_CB_PATH_DOWN ");
532 fprintf(dlog_file, "SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRING ");
534 fprintf(dlog_file, "SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRED ");
536 fprintf(dlog_file, "SEQ4_STATUS_EXPIRED_ALL_STATE_REVOKED ");
538 fprintf(dlog_file, "SEQ4_STATUS_EXPIRED_SOME_STATE_REVOKED ");
540 fprintf(dlog_file, "SEQ4_STATUS_ADMIN_STATE_REVOKED ");
542 fprintf(dlog_file, "SEQ4_STATUS_RECALLABLE_STATE_REVOKED ");
544 fprintf(dlog_file, "SEQ4_STATUS_LEASE_MOVED ");
546 fprintf(dlog_file, "SEQ4_STATUS_RESTART_RECLAIM_NEEDED ");
548 fprintf(dlog_file, "SEQ4_STATUS_CB_PATH_DOWN_SESSION ");
550 fprintf(dlog_file, "SEQ4_STATUS_BACKCHANNEL_FAULT ");
552 fprintf(dlog_file, "SEQ4_STATUS_DEVID_CHANGED ");
554 fprintf(dlog_file, "SEQ4_STATUS_DEVID_DELETED ");
555 fprintf(dlog_file, "\n");
556}
GLbitfield flags
Definition: glext.h:7161
@ SEQ4_STATUS_EXPIRED_SOME_STATE_REVOKED
Definition: nfs41_ops.h:241
@ SEQ4_STATUS_CB_PATH_DOWN_SESSION
Definition: nfs41_ops.h:246
@ SEQ4_STATUS_RESTART_RECLAIM_NEEDED
Definition: nfs41_ops.h:245
@ SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRING
Definition: nfs41_ops.h:238
@ SEQ4_STATUS_ADMIN_STATE_REVOKED
Definition: nfs41_ops.h:242
@ SEQ4_STATUS_LEASE_MOVED
Definition: nfs41_ops.h:244
@ SEQ4_STATUS_CB_PATH_DOWN
Definition: nfs41_ops.h:237
@ SEQ4_STATUS_BACKCHANNEL_FAULT
Definition: nfs41_ops.h:247
@ SEQ4_STATUS_EXPIRED_ALL_STATE_REVOKED
Definition: nfs41_ops.h:240
@ SEQ4_STATUS_RECALLABLE_STATE_REVOKED
Definition: nfs41_ops.h:243
@ SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRED
Definition: nfs41_ops.h:239
@ SEQ4_STATUS_DEVID_DELETED
Definition: nfs41_ops.h:249
@ SEQ4_STATUS_DEVID_CHANGED
Definition: nfs41_ops.h:248

Referenced by compound_encode_send_decode().

◆ print_windows_access_mask()

void print_windows_access_mask ( int  on,
ACCESS_MASK  m 
)

Definition at line 570 of file daemon_debug.c.

571{
572 if (!on) return;
573 dprintf(1, "--> print_windows_access_mask: %x\n", m);
574 if (m & GENERIC_READ)
575 dprintf(1, "\tGENERIC_READ\n");
576 if (m & GENERIC_WRITE)
577 dprintf(1, "\tGENERIC_WRITE\n");
578 if (m & GENERIC_EXECUTE)
579 dprintf(1, "\tGENERIC_EXECUTE\n");
580 if (m & GENERIC_ALL)
581 dprintf(1, "\tGENERIC_ALL\n");
582 if (m & MAXIMUM_ALLOWED)
583 dprintf(1, "\tMAXIMUM_ALLOWED\n");
585 dprintf(1, "\tACCESS_SYSTEM_SECURITY\n");
587 dprintf(1, "\tSPECIFIC_RIGHTS_ALL\n");
589 dprintf(1, "\tSTANDARD_RIGHTS_ALL\n");
591 dprintf(1, "\tSTANDARD_RIGHTS_REQUIRED\n");
592 if (m & SYNCHRONIZE)
593 dprintf(1, "\tSYNCHRONIZE\n");
594 if (m & WRITE_OWNER)
595 dprintf(1, "\tWRITE_OWNER\n");
596 if (m & WRITE_DAC)
597 dprintf(1, "\tWRITE_DAC\n");
598 if (m & READ_CONTROL)
599 dprintf(1, "\tREAD_CONTROL\n");
600 if (m & DELETE)
601 dprintf(1, "\tDELETE\n");
602 if (m & FILE_READ_DATA)
603 dprintf(1, "\tFILE_READ_DATA\n");
605 dprintf(1, "\tFILE_LIST_DIRECTORY\n");
606 if (m & FILE_WRITE_DATA)
607 dprintf(1, "\tFILE_WRITE_DATA\n");
608 if (m & FILE_ADD_FILE)
609 dprintf(1, "\tFILE_ADD_FILE\n");
610 if (m & FILE_APPEND_DATA)
611 dprintf(1, "\tFILE_APPEND_DATA\n");
613 dprintf(1, "\tFILE_ADD_SUBDIRECTORY\n");
615 dprintf(1, "\tFILE_CREATE_PIPE_INSTANCE\n");
616 if (m & FILE_READ_EA)
617 dprintf(1, "\tFILE_READ_EA\n");
618 if (m & FILE_WRITE_EA)
619 dprintf(1, "\tFILE_WRITE_EA\n");
620 if (m & FILE_EXECUTE)
621 dprintf(1, "\tFILE_EXECUTE\n");
622 if (m & FILE_TRAVERSE)
623 dprintf(1, "\tFILE_TRAVERSE\n");
624 if (m & FILE_DELETE_CHILD)
625 dprintf(1, "\tFILE_DELETE_CHILD\n");
627 dprintf(1, "\tFILE_READ_ATTRIBUTES\n");
629 dprintf(1, "\tFILE_WRITE_ATTRIBUTES\n");
631 dprintf(1, "\tFILE_ALL_ACCESS\n");
633 dprintf(1, "\tFILE_GENERIC_READ\n");
635 dprintf(1, "\tFILE_GENERIC_WRITE\n");
637 dprintf(1, "\tFILE_GENERIC_EXECUTE\n");
638}
#define GENERIC_READ
Definition: compat.h:135
#define SPECIFIC_RIGHTS_ALL
Definition: nt_native.h:71
#define WRITE_DAC
Definition: nt_native.h:59
#define FILE_GENERIC_EXECUTE
Definition: nt_native.h:668
#define FILE_CREATE_PIPE_INSTANCE
Definition: nt_native.h:636
#define ACCESS_SYSTEM_SECURITY
Definition: nt_native.h:77
#define STANDARD_RIGHTS_ALL
Definition: nt_native.h:69
#define GENERIC_ALL
Definition: nt_native.h:92
#define DELETE
Definition: nt_native.h:57
#define READ_CONTROL
Definition: nt_native.h:58
#define FILE_ALL_ACCESS
Definition: nt_native.h:651
#define WRITE_OWNER
Definition: nt_native.h:60
#define FILE_ADD_SUBDIRECTORY
Definition: nt_native.h:635
#define GENERIC_WRITE
Definition: nt_native.h:90
#define FILE_ADD_FILE
Definition: nt_native.h:632
#define FILE_GENERIC_READ
Definition: nt_native.h:653
#define GENERIC_EXECUTE
Definition: nt_native.h:91
#define MAXIMUM_ALLOWED
Definition: nt_native.h:83
#define FILE_GENERIC_WRITE
Definition: nt_native.h:660
#define STANDARD_RIGHTS_REQUIRED
Definition: nt_native.h:63

Referenced by map_acemask().

◆ rpc_error_string()

const char * rpc_error_string ( int  status)

Definition at line 482 of file daemon_debug.c.

483{
484 switch (status)
485 {
486 case RPC_CANTENCODEARGS: return "RPC_CANTENCODEARGS";
487 case RPC_CANTDECODERES: return "RPC_CANTDECODERES";
488 case RPC_CANTSEND: return "RPC_CANTSEND";
489 case RPC_CANTRECV: return "RPC_CANTRECV";
490 case RPC_TIMEDOUT: return "RPC_TIMEDOUT";
491 case RPC_INTR: return "RPC_INTR";
492 case RPC_UDERROR: return "RPC_UDERROR";
493 case RPC_VERSMISMATCH: return "RPC_VERSMISMATCH";
494 case RPC_AUTHERROR: return "RPC_AUTHERROR";
495 case RPC_PROGUNAVAIL: return "RPC_PROGUNAVAIL";
496 case RPC_PROGVERSMISMATCH: return "RPC_PROGVERSMISMATCH";
497 case RPC_PROCUNAVAIL: return "RPC_PROCUNAVAIL";
498 case RPC_CANTDECODEARGS: return "RPC_CANTDECODEARGS";
499 case RPC_SYSTEMERROR: return "RPC_SYSTEMERROR";
500 default: return "invalid rpc error code";
501 }
502}
@ RPC_CANTDECODERES
Definition: clnt_stat.h:27
@ RPC_TIMEDOUT
Definition: clnt_stat.h:31
@ RPC_INTR
Definition: clnt_stat.h:32
@ RPC_AUTHERROR
Definition: clnt_stat.h:38
@ RPC_PROGUNAVAIL
Definition: clnt_stat.h:39
@ RPC_CANTSEND
Definition: clnt_stat.h:28
@ RPC_UDERROR
Definition: clnt_stat.h:33
@ RPC_CANTDECODEARGS
Definition: clnt_stat.h:42
@ RPC_CANTRECV
Definition: clnt_stat.h:29
@ RPC_CANTENCODEARGS
Definition: clnt_stat.h:26
@ RPC_PROGVERSMISMATCH
Definition: clnt_stat.h:40
@ RPC_SYSTEMERROR
Definition: clnt_stat.h:43
@ RPC_PROCUNAVAIL
Definition: clnt_stat.h:41
@ RPC_VERSMISMATCH
Definition: clnt_stat.h:37

Referenced by nfs41_send_compound().

◆ secflavorop2name()

const char * secflavorop2name ( DWORD  sec_flavor)

Definition at line 558 of file daemon_debug.c.

559{
560 switch(sec_flavor) {
561 case RPCSEC_AUTH_SYS: return "AUTH_SYS";
562 case RPCSEC_AUTHGSS_KRB5: return "AUTHGSS_KRB5";
563 case RPCSEC_AUTHGSS_KRB5I: return "AUTHGSS_KRB5I";
564 case RPCSEC_AUTHGSS_KRB5P: return "AUTHGSS_KRB5P";
565 }
566
567 return "UNKNOWN FLAVOR";
568}
@ RPCSEC_AUTH_SYS
Definition: nfs41_driver.h:75
@ RPCSEC_AUTHGSS_KRB5P
Definition: nfs41_driver.h:78
@ RPCSEC_AUTHGSS_KRB5
Definition: nfs41_driver.h:76
@ RPCSEC_AUTHGSS_KRB5I
Definition: nfs41_driver.h:77
sec_flavor
Definition: nfs41_ops.h:861

Referenced by create_rpcsec_auth_client(), nfs41_rpc_clnt_create(), and parse_mount().

◆ set_debug_level()

void set_debug_level ( int  level)

Definition at line 35 of file daemon_debug.c.

Referenced by ServiceStart().

Variable Documentation

◆ dlog_file

◆ elog_file

FILE * elog_file

Definition at line 37 of file daemon_debug.c.

Referenced by close_log_files(), eprintf(), and open_log_files().

◆ g_debug_level