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.

433 lines
6.3 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. elfproto.h
  5. Abstract:
  6. This file contains the prototypes for the Eventlog service.
  7. Author:
  8. Rajen Shah (rajens) 12-Aug-1991
  9. Revision History:
  10. --*/
  11. #ifndef _ELFPROTO_
  12. #define _ELFPROTO
  13. //
  14. // Other prototypes
  15. //
  16. VOID
  17. ElfpCreateHeap(
  18. VOID
  19. );
  20. PVOID
  21. ElfpAllocateBuffer(
  22. ULONG size
  23. );
  24. BOOLEAN
  25. ElfpFreeBuffer(
  26. PVOID BufPtr
  27. );
  28. VOID
  29. ElfPerformRequest(
  30. PELF_REQUEST_RECORD Request
  31. );
  32. PLOGMODULE
  33. GetModuleStruc (
  34. PUNICODE_STRING ModuleName
  35. );
  36. PLOGMODULE
  37. FindModuleStrucFromAtom (
  38. ATOM Atom
  39. );
  40. VOID
  41. ElfControlResponse(
  42. DWORD
  43. );
  44. VOID
  45. IELF_HANDLE_rundown(
  46. IELF_HANDLE ElfHandle
  47. );
  48. VOID
  49. LinkContextHandle(
  50. IELF_HANDLE LogHandle
  51. );
  52. VOID
  53. UnlinkContextHandle (
  54. IELF_HANDLE LogHandle
  55. );
  56. VOID
  57. LinkLogModule (
  58. PLOGMODULE pLogModule,
  59. ANSI_STRING * pModuleNameA
  60. );
  61. VOID
  62. UnlinkLogModule (
  63. PLOGMODULE pLogModule
  64. );
  65. VOID
  66. LinkLogFile (
  67. PLOGFILE pLogFile
  68. );
  69. VOID
  70. UnlinkLogFile (
  71. PLOGFILE pLogFile
  72. );
  73. VOID
  74. GetGlobalResource (
  75. DWORD Type
  76. );
  77. VOID
  78. ReleaseGlobalResource(
  79. VOID
  80. );
  81. NTSTATUS
  82. SetUpDataStruct (
  83. PUNICODE_STRING LogFileName,
  84. ULONG MaxFileSize,
  85. ULONG Retention,
  86. ULONG GuestAccessRestriction,
  87. PUNICODE_STRING ModuleName,
  88. HANDLE hLogFile,
  89. ELF_LOG_TYPE LogType,
  90. LOGPOPUP logpLogPopup,
  91. DWORD dwAutoBackup
  92. );
  93. NTSTATUS
  94. SetUpModules (
  95. HANDLE hLogFile,
  96. PLOGFILE pLogFile,
  97. BOOLEAN bAllowDupes
  98. );
  99. BOOL
  100. StartLPCThread (
  101. VOID
  102. );
  103. VOID
  104. StopLPCThread (
  105. VOID
  106. );
  107. BOOL
  108. ElfStartRegistryMonitor (
  109. VOID
  110. );
  111. VOID
  112. StopRegistryMonitor (
  113. VOID
  114. );
  115. NTSTATUS
  116. ReadRegistryInfo (
  117. HANDLE hLogFiles,
  118. PUNICODE_STRING SubKeyName,
  119. PLOG_FILE_INFO LogFileInfo
  120. );
  121. NTSTATUS
  122. ElfOpenLogFile (
  123. PLOGFILE pLogFile,
  124. ELF_LOG_TYPE LogType
  125. );
  126. NTSTATUS
  127. ElfpCloseLogFile (
  128. PLOGFILE pLogFile,
  129. DWORD Flags
  130. );
  131. BOOL
  132. ValidFilePos (
  133. PVOID Position,
  134. PVOID BeginningRecord,
  135. PVOID EndingRecord,
  136. PVOID PhysicalEOF,
  137. PVOID BaseAddress,
  138. BOOL fCheckBeginEndRange
  139. );
  140. VOID
  141. ElfpCleanUp (
  142. ULONG EventFlags
  143. );
  144. NTSTATUS
  145. ElfpCopyFile (
  146. IN HANDLE SourceHandle,
  147. IN PUNICODE_STRING TargetFileName
  148. );
  149. VOID
  150. FreeModuleAndLogFileStructs (VOID);
  151. NTSTATUS
  152. ElfpFlushFiles (VOID);
  153. VOID
  154. InvalidateContextHandlesForLogFile (
  155. PLOGFILE pLogFile
  156. );
  157. VOID
  158. FixContextHandlesForRecord (
  159. DWORD RecordOffset,
  160. DWORD NewRecordOffset
  161. );
  162. PLOGFILE
  163. FindLogFileFromName (
  164. PUNICODE_STRING LogFileName
  165. );
  166. BOOL
  167. SendAdminAlert (
  168. ULONG MessageID,
  169. ULONG NumStrings,
  170. UNICODE_STRING *pStrings
  171. );
  172. PVOID
  173. NextRecordPosition (
  174. ULONG ReadFlags,
  175. PVOID CurrPosition,
  176. ULONG CurrRecordLength,
  177. PVOID BeginRecord,
  178. PVOID EndRecord,
  179. PVOID PhysicalEOF,
  180. PVOID PhysStart
  181. );
  182. VOID
  183. NotifyChange (
  184. PLOGFILE pLogFile
  185. );
  186. VOID
  187. WriteQueuedEvents (
  188. VOID
  189. );
  190. VOID
  191. FlushQueuedEvents (
  192. VOID
  193. );
  194. VOID
  195. PerformWriteRequest (
  196. PELF_REQUEST_RECORD Request
  197. );
  198. NTSTATUS
  199. ElfpCreateLogFileObject(
  200. PLOGFILE LogFile,
  201. DWORD Type,
  202. ULONG GuestAccessRestriction
  203. );
  204. VOID
  205. ElfpDeleteLogFileObject(
  206. PLOGFILE LogFile
  207. );
  208. VOID
  209. ElfpCloseAudit(
  210. IN LPWSTR SubsystemName,
  211. IN IELF_HANDLE ContextHandle
  212. );
  213. NTSTATUS
  214. ElfpAccessCheckAndAudit(
  215. IN LPWSTR SubsystemName,
  216. IN LPWSTR ObjectTypeName,
  217. IN LPWSTR ObjectName,
  218. IN OUT IELF_HANDLE ContextHandle,
  219. IN PSECURITY_DESCRIPTOR SecurityDescriptor,
  220. IN ACCESS_MASK DesiredAccess,
  221. IN PGENERIC_MAPPING GenericMapping,
  222. IN BOOL ForSecurityLog
  223. );
  224. NTSTATUS
  225. ElfCreateWellKnownSids(
  226. VOID
  227. );
  228. VOID
  229. ElfFreeWellKnownSids(
  230. VOID
  231. );
  232. NTSTATUS
  233. ElfCreateAndSetSD(
  234. IN PRTL_ACE_DATA AceData,
  235. IN ULONG AceCount,
  236. IN PSID OwnerSid OPTIONAL,
  237. IN PSID GroupSid OPTIONAL,
  238. OUT PSECURITY_DESCRIPTOR *NewDescriptor
  239. );
  240. NTSTATUS
  241. ElfCreateUserSecurityObject(
  242. IN PRTL_ACE_DATA AceData,
  243. IN ULONG AceCount,
  244. IN PSID OwnerSid,
  245. IN PSID GroupSid,
  246. IN BOOLEAN IsDirectoryObject,
  247. IN PGENERIC_MAPPING GenericMapping,
  248. OUT PSECURITY_DESCRIPTOR *NewDescriptor
  249. );
  250. VOID
  251. ElfpCreateElfEvent(
  252. IN ULONG EventId,
  253. IN USHORT EventType,
  254. IN USHORT EventCategory,
  255. IN USHORT NumStrings,
  256. IN LPWSTR * Strings,
  257. IN LPVOID Data,
  258. IN ULONG DataSize,
  259. IN USHORT Flags,
  260. IN BOOL ForSecurity
  261. );
  262. VOID
  263. ElfpCreateQueuedAlert(
  264. DWORD MessageId,
  265. DWORD NumberOfStrings,
  266. LPWSTR Strings[]
  267. );
  268. VOID
  269. ElfpCreateQueuedMessage(
  270. DWORD MessageId,
  271. DWORD NumberOfStrings,
  272. LPWSTR Strings[]
  273. );
  274. NTSTATUS
  275. ElfpInitCriticalSection(
  276. PRTL_CRITICAL_SECTION pCritsec
  277. );
  278. NTSTATUS
  279. ElfpInitResource(
  280. PRTL_RESOURCE pResource
  281. );
  282. DWORD
  283. ElfStatusUpdate(
  284. IN DWORD NewState
  285. );
  286. DWORD
  287. GetElState (
  288. VOID
  289. );
  290. VOID
  291. ElfpGenerateLogClearedEvent(
  292. IELF_HANDLE LogHandle
  293. );
  294. NTSTATUS
  295. ElfpInitStatus(
  296. VOID
  297. );
  298. VOID
  299. ElCleanupStatus(
  300. VOID
  301. );
  302. DWORD
  303. ElfBeginForcedShutdown(
  304. IN BOOL PendingCode,
  305. IN DWORD ExitCode,
  306. IN DWORD ServiceSpecificCode
  307. );
  308. NTSTATUS
  309. ElfpTestClientPrivilege(
  310. IN ULONG ulPrivilege,
  311. IN HANDLE hThreadToken OPTIONAL
  312. );
  313. //SS: added to extend clustering support
  314. NTSTATUS
  315. FindSizeofEventsSinceStart (
  316. OUT PULONG pulTotalEventSize,
  317. IN PULONG pulNumLogFiles,
  318. OUT PPROPLOGFILEINFO *ppPropLogFileInfo
  319. );
  320. NTSTATUS
  321. GetEventsToProp(
  322. IN PEVENTLOGRECORD pEventLogRecords,
  323. IN PPROPLOGFILEINFO pPropLogFileInfo
  324. );
  325. NTSTATUS
  326. ElfCheckForComputerNameChange(
  327. );
  328. NTSTATUS
  329. ElfpReplicateEvent(
  330. IN PLOGMODULE pLogModule,
  331. IN PVOID pEventBuffer,
  332. IN DWORD dwRecordLength
  333. );
  334. //SS: end of changes for clustering
  335. VOID
  336. ElfWriteTimeStamp(
  337. TIMESTAMPEVENT EventType,
  338. BOOLEAN Append
  339. );
  340. VOID CALLBACK
  341. ElfWriteLastAliveTimeStamp(
  342. UINT uID,
  343. UINT uMsg,
  344. DWORD dwUser,
  345. DWORD dw1,
  346. DWORD dw2
  347. );
  348. NTSTATUS
  349. FlushLogFile(
  350. PLOGFILE pLogFile
  351. );
  352. #endif // ifndef _ELFPROTO_