Source code of Windows XP (NT5)
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.

112 lines
3.4 KiB

  1. /*++
  2. Copyright (c) 1992-1996 Microsoft Corporation
  3. Module Name:
  4. lmcache.c
  5. Abstract:
  6. This file actually creates the global cache_table.
  7. Environment:
  8. User Mode - Win32
  9. Revision History:
  10. 10-May-1996 DonRyan
  11. Removed banner from Technology Dynamics, Inc.
  12. --*/
  13. //--------------------------- WINDOWS DEPENDENCIES --------------------------
  14. //--------------------------- STANDARD DEPENDENCIES -- #include<xxxxx.h> ----
  15. #include <time.h>
  16. #ifdef WIN32
  17. #include <windows.h>
  18. #endif
  19. //--------------------------- MODULE DEPENDENCIES -- #include"xxxxx.h" ------
  20. #include "lmcache.h"
  21. //--------------------------- SELF-DEPENDENCY -- ONE #include"module.h" -----
  22. //--------------------------- PUBLIC VARIABLES --(same as in module.h file)--
  23. CACHE_ENTRY cache_table[MAX_CACHE_ENTRIES] =
  24. {
  25. {0, NULL, 0, 0},
  26. {0, NULL, 0, 0},
  27. {0, NULL, 0, 0},
  28. {0, NULL, 0, 0},
  29. {0, NULL, 0, 0},
  30. {0, NULL, 0, 0},
  31. {0, NULL, 0, 0},
  32. {0, NULL, 0, 0},
  33. {0, NULL, 0, 0},
  34. {0, NULL, 0, 0},
  35. {0, NULL, 0, 0},
  36. {0, NULL, 0, 0},
  37. {0, NULL, 0, 0},
  38. {0, NULL, 0, 0},
  39. {0, NULL, 0, 0},
  40. {0, NULL, 0, 0},
  41. {0, NULL, 0, 0},
  42. {0, NULL, 0, 0},
  43. {0, NULL, 0, 0},
  44. {0, NULL, 0, 0},
  45. {0, NULL, 0, 0},
  46. {0, NULL, 0, 0},
  47. {0, NULL, 0, 0},
  48. {0, NULL, 0, 0},
  49. {0, NULL, 0, 0}
  50. };
  51. time_t cache_expire[MAX_CACHE_ENTRIES] =
  52. {
  53. 120, // 2 min cache expiration for C_NETWKSTAGETINFO 1
  54. 120, // 2 min cache expiration for C_NETSERVERGETINFO 2
  55. 120, // 2 min cache expiration for C_NETSTATISTICSGET_SERVER 3
  56. 120, // 2 min cache expiration for C_NETSTATISTICSGET_WORKSTATION 4
  57. 120, // 2 min cache expiration for C_NETSERVICEENUM 5
  58. 120, // 2 min cache expiration for C_NETSESSIONENUM 6
  59. 120, // 2 min cache expiration for C_NETUSERENUM 7
  60. 120, // 2 min cache expiration for C_NETSHAREENUM 8
  61. 120, // 2 min cache expiration for C_NETUSEENUM 9
  62. 120, // 2 min cache expiration for C_NETWKSTAUSERGETINFO 10
  63. 120, // 2 min cache expiration for C_NETSERVERENUM 11
  64. 120, // 2 min cache expiration for C_NETWKSTAGETINFO_502 12
  65. 120, // 2 min cache expiration for C_NETSERVERGETINFO_402 13
  66. 120, // 2 min cache expiration for C_NETSERVERGETINFO_403 14
  67. 120, // 2 min cache expiration for C_NETWKSTAGETINFO_101 15
  68. 120, // 2 min cache expiration for C_PRNT_TABLE 16
  69. 120, // 2 min cache expiration for C_USES_TABLE 17
  70. 120, // 2 min cache expiration for C_DLOG_TABLE 18
  71. 120, // 2 min cache expiration for C_SESS_TABLE 19
  72. 120, // 2 min cache expiration for C_SRVR_TABLE 20
  73. 120, // 2 min cache expiration for C_SRVC_TABLE 21
  74. 120, // 2 min cache expiration for C_USER_TABLE 22
  75. 120, // 2 min cache expiration for C_ODOM_TABLE 23
  76. 120, // 2 min cache expiration for C_SHAR_TABLE 24
  77. 120 // 2 min cache expiration for C_NETSERVERENUM 25
  78. };
  79. //--------------------------- PRIVATE CONSTANTS -----------------------------
  80. //--------------------------- PRIVATE STRUCTS -------------------------------
  81. //--------------------------- PRIVATE VARIABLES -----------------------------
  82. //--------------------------- PRIVATE PROTOTYPES ----------------------------
  83. //--------------------------- PRIVATE PROCEDURES ----------------------------
  84. //--------------------------- PUBLIC PROCEDURES -----------------------------
  85. //-------------------------------- END --------------------------------------