Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

170 lines
4.6 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1996 - 1999
  6. //
  7. // File: dsid.c
  8. //
  9. //--------------------------------------------------------------------------
  10. #pragma hdrstop
  11. #include <stdlib.h>
  12. #include <stdio.h>
  13. #include <fileno.h>
  14. struct namepair {
  15. int key;
  16. char * name;
  17. };
  18. struct namepair dirtbl [] = {
  19. {DIRNO_CLIENT2, "client2"},
  20. {DIRNO_COMMON2, "common2"},
  21. {DIRNO_KERNEL, "kernel"},
  22. {DIRNO_RTL, "rtl"},
  23. {DIRNO_SERVER, "server"},
  24. {0,0}
  25. };
  26. // Please add constants to this table alphabetically by constant, or
  27. // we'll never find the ones we've missed.
  28. struct namepair filetbl [] = {
  29. {FILENO_BNDCACHE,"bndcache.cxx"},
  30. {FILENO_CREDAPI,"credapi.cxx"},
  31. {FILENO_CREDMGR,"credmgr.cxx"},
  32. {FILENO_CTXTAPI,"ctxtapi.cxx"},
  33. {FILENO_CTXTMGR,"ctxtmgr.cxx"},
  34. {FILENO_GSSUTIL,"gssutil.cxx"},
  35. {FILENO_KERBEROS,"kerberos.cxx"},
  36. {FILENO_KERBLIST,"kerblist.cxx"},
  37. {FILENO_KERBPASS,"kerbpass.cxx"},
  38. {FILENO_KERBTICK,"kerbtick.cxx"},
  39. {FILENO_KERBWOW,"kerbwow.cxx"},
  40. {FILENO_KRBEVENT,"krbevent.cxx"},
  41. {FILENO_KRBTOKEN,"krbtoken.cxx"},
  42. {FILENO_LOGONAPI,"logonapi.cxx"},
  43. {FILENO_MISCAPI,"miscapi.cxx"},
  44. {FILENO_MITUTIL,"mitutil.cxx"},
  45. {FILENO_PKAUTH,"pkauth.cxx"},
  46. {FILENO_PROXYAPI,"proxyapi.cxx"},
  47. {FILENO_RPCUTIL,"rpcutil.cxx"},
  48. {FILENO_SIDCACHE,"sidcache.cxx"},
  49. {FILENO_TIMESYNC,"timesync.cxx"},
  50. {FILENO_TKTCACHE,"tktcache.cxx"},
  51. {FILENO_TKTLOGON,"tktlogon.cxx"},
  52. {FILENO_USERAPI,"userapi.cxx"},
  53. {FILENO_USERLIST,"userlist.cxx"}, // client2
  54. {FILENO_S4U,"kerbs4u.cxx"}, // client2
  55. {FILENO_AUTHEN,"authen.cxx"},
  56. {FILENO_CRYPT,"crypt.c"},
  57. {FILENO_KEYGEN,"keygen.c"},
  58. {FILENO_KRB5,"krb5.c"},
  59. {FILENO_NAMES,"names.c"},
  60. {FILENO_PASSWD,"passwd.c"},
  61. {FILENO_RESTRICT,"restrict.c"},
  62. {FILENO_SOCKETS,"sockets.cxx"},
  63. {FILENO_TICKETS,"tickets.cxx"}, // Kernel
  64. {FILENO_CPGSSUTL,"cpgssutl.cxx"},
  65. {FILENO_CTXTMGR2,"ctxtmgr.cxx"},
  66. {FILENO_KERBLIST2,"kerblist.cxx"},
  67. {FILENO_KRNLAPI,"krnlapi.cxx"}, // RTL
  68. {FILENO_AUTHDATA,"authdata.cxx"},
  69. {FILENO_CRACKPAC,"crackpac.cxx"},
  70. {FILENO_CRED,"cred.cxx"},
  71. {FILENO_CREDLIST,"credlist.cxx"},
  72. {FILENO_CREDLOCK,"credlock.cxx"},
  73. {FILENO_DBUTIL,"dbutil.cxx"},
  74. {FILENO_DBOPEN,"dbopen.cxx"},
  75. {FILENO_DOMCACHE,"domcache.cxx"},
  76. {FILENO_FILTER,"filter.cxx"},
  77. {FILENO_MAPERR,"maperr.cxx"},
  78. {FILENO_MAPSECER,"mapsecer.cxx"},
  79. {FILENO_MISCID,"miscid.cxx"},
  80. {FILENO_PAC,"pac.cxx"},
  81. {FILENO_PAC2, "pac2.cxx"},
  82. {FILENO_PARMCHK, "parmchk.cxx"},
  83. {FILENO_REG, "reg.cxx"},
  84. {FILENO_SECSTR,"secstr.cxx"},
  85. {FILENO_SERVICES,"services.cxx"},
  86. {FILENO_STRING,"string.cxx"},
  87. {FILENO_TIMESERV,"timeserv.cxx"},
  88. {FILENO_TOKENUTL,"tokenutl.cxx"},
  89. {FILENO_TRNSPORT,"trnsport.cxx"}, // Server
  90. {FILENO_DEBUG,"debug.cxx"},
  91. {FILENO_DGUTIL,"dgutil.cxx"},
  92. {FILENO_EVENTS,"events.cxx"},
  93. {FILENO_GETAS,"getas.cxx"},
  94. {FILENO_GETTGS,"gettgs.cxx"},
  95. {FILENO_KDC,"kdc.cxx"},
  96. {FILENO_KDCTRACE,"kdctrace.cxx"},
  97. {FILENO_KPASSWD,"kpasswd.cxx"},
  98. {FILENO_NOTIFY2,"notify2.cxx"},
  99. {FILENO_SRVPAC,"srvpac.cxx"},
  100. {FILENO_PKSERV,"pkserv.cxx"},
  101. {FILENO_REFER,"refer.cxx"},
  102. {FILENO_RPCIF,"rpcif.cxx"},
  103. {FILENO_SECDATA,"secdata.cxx"},
  104. {FILENO_SOCKUTIL,"sockutil.cxx"},
  105. {FILENO_TKTUTIL,"tktutil.cxx"},
  106. {FILENO_TRANSIT,"transit.cxx"},
  107. {0, 0}
  108. };
  109. void __cdecl main(int argc, char ** argv)
  110. {
  111. int line;
  112. int fileno;
  113. int dirno;
  114. int dirfile;
  115. int i;
  116. char * stopstring;
  117. char * dirname;
  118. char * filename;
  119. dirname = filename = "huh?";
  120. if (argc != 2) {
  121. printf("usage: %s id\n", argv[0]);
  122. exit(1);
  123. }
  124. dirfile = strtol(argv[1], &stopstring, 16);
  125. if (dirfile == 0) {
  126. printf("I can't make sense of %s\n", argv[1]);
  127. exit(1);
  128. }
  129. line = dirfile & 0x0000ffff;
  130. dirno = (dirfile & 0xff000000) >> 24;
  131. fileno = (dirfile & 0x00ff0000) >> 16;
  132. dirfile >>= 16;
  133. for (i=0; dirtbl[i].name; i++) {
  134. if (dirtbl[i].key == dirno << 8) {
  135. dirname = dirtbl[i].name;
  136. break;
  137. }
  138. }
  139. for (i=0; filetbl[i].name; i++) {
  140. if (filetbl[i].key == dirfile) {
  141. filename = filetbl[i].name;
  142. break;
  143. }
  144. }
  145. printf("dir %u, file %u (%s\\%s), line %u\n", dirno, fileno, dirname,
  146. filename, line);
  147. }