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.

458 lines
7.2 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. tcfwd.h
  5. Abstract:
  6. This module contains the forward function definitions for all the functions in
  7. the traffic control dll.
  8. Author:
  9. Jim Stewart (jstew) August 14, 1996
  10. Revision History:
  11. Ofer Bar (oferbar) Oct 1, 1997 - Revision II
  12. --*/
  13. #ifndef __TCFWD_H
  14. #define __TCFWD_H
  15. //
  16. // tckrnl.c
  17. //
  18. DWORD
  19. IoModifyFlow(
  20. IN PFLOW_STRUC pFlow,
  21. IN BOOLEAN Async
  22. );
  23. DWORD
  24. IoAddFlow(
  25. IN PFLOW_STRUC pFlow,
  26. IN BOOLEAN Async
  27. );
  28. DWORD
  29. IoAddClassMapFlow(
  30. IN PFLOW_STRUC pFlow,
  31. IN BOOLEAN Async
  32. );
  33. DWORD
  34. IoDeleteFlow(
  35. IN PFLOW_STRUC pFlow,
  36. IN BOOLEAN Async
  37. );
  38. DWORD
  39. IoAddFilter(
  40. IN PFILTER_STRUC pFilter
  41. );
  42. DWORD
  43. IoDeleteFilter(
  44. IN PFILTER_STRUC pFilter
  45. );
  46. DWORD
  47. IoRegisterClient(
  48. IN PGPC_CLIENT pGpcClient
  49. );
  50. DWORD
  51. IoDeregisterClient(
  52. IN PGPC_CLIENT pGpcClient
  53. );
  54. DWORD
  55. IoEnumerateFlows(
  56. IN PGPC_CLIENT pGpcClient,
  57. IN OUT PHANDLE pEnumHandle,
  58. IN OUT PULONG pFlowCount,
  59. IN OUT PULONG pBufSize,
  60. OUT PGPC_ENUM_CFINFO_RES *ppBuffer
  61. );
  62. DWORD
  63. IoRequestNotify(
  64. VOID
  65. //IN PGPC_CLIENT pGpcClient
  66. );
  67. VOID
  68. CancelIoRequestNotify(
  69. VOID
  70. );
  71. DWORD
  72. StartGpcNotifyThread();
  73. DWORD
  74. StopGpcNotifyThread();
  75. //
  76. // tcutils.c
  77. //
  78. VOID
  79. WsAssert(
  80. IN PVOID FailedAssertion,
  81. IN PVOID FileName,
  82. IN ULONG LineNumber
  83. );
  84. VOID
  85. WsPrintf (
  86. char *Format,
  87. ...
  88. );
  89. VOID
  90. SetupDebugInfo( void );
  91. VOID
  92. CloseDbgFile( void );
  93. //
  94. // handles.c
  95. //
  96. PVOID
  97. GetHandleObjectWithRef(
  98. IN HANDLE h,
  99. IN ENUM_OBJECT_TYPE ObjType,
  100. IN ULONG RefType
  101. );
  102. PVOID
  103. GetHandleObject(
  104. IN HANDLE h,
  105. IN ENUM_OBJECT_TYPE ObjType
  106. );
  107. HANDLE
  108. AllocateHandle(
  109. IN PVOID Context
  110. );
  111. VOID
  112. FreeHandle(
  113. IN HANDLE Handle
  114. );
  115. //
  116. // apiutil.c
  117. //
  118. VOID
  119. MarkAllNodesForClosing(
  120. PINTERFACE_STRUC pInterface,
  121. STATE stateToMark
  122. );
  123. PTC_IFC
  124. GetTcIfc(
  125. IN LPWSTR pInterfaceName
  126. );
  127. PTC_IFC
  128. GetTcIfcWithRef(
  129. IN LPWSTR pInterfaceName,
  130. IN ULONG RefType
  131. );
  132. DWORD
  133. UpdateTcIfcList(
  134. IN LPWSTR InstanceName,
  135. IN ULONG IndicationBufferSize,
  136. IN PTC_INDICATION_BUFFER IndicationBuffer,
  137. IN DWORD IndicationCode
  138. );
  139. DWORD
  140. CreateClientStruc(
  141. IN HANDLE ClRegCtx,
  142. OUT PCLIENT_STRUC *ppClient
  143. );
  144. DWORD
  145. CreateClInterfaceStruc(
  146. IN HANDLE ClIfcCtx,
  147. OUT PINTERFACE_STRUC *ppClIfc
  148. );
  149. DWORD
  150. CreateFlowStruc(
  151. IN HANDLE ClFlowCtx,
  152. IN PTC_GEN_FLOW pGenFlow,
  153. OUT PFLOW_STRUC *ppFlow
  154. );
  155. DWORD
  156. CreateClassMapFlowStruc(
  157. IN HANDLE ClFlowCtx,
  158. IN PTC_CLASS_MAP_FLOW pClassMapFlow,
  159. OUT PFLOW_STRUC *ppFlow
  160. );
  161. DWORD
  162. CreateFilterStruc(
  163. IN PTC_GEN_FILTER pGenericFilter,
  164. IN PFLOW_STRUC pFlow,
  165. IN PFILTER_STRUC *ppFiler
  166. );
  167. VOID
  168. DeleteFlowStruc(
  169. IN PFLOW_STRUC pFlow
  170. );
  171. DWORD
  172. EnumAllInterfaces(VOID);
  173. DWORD
  174. CloseInterface(
  175. IN PINTERFACE_STRUC pInterface,
  176. IN BOOLEAN RemoveFlows
  177. );
  178. PGPC_CLIENT
  179. FindGpcClient(
  180. IN ULONG CfInfoType
  181. );
  182. VOID
  183. CloseOpenFlows(
  184. IN PINTERFACE_STRUC pInterface
  185. );
  186. DWORD
  187. DeleteFlow(
  188. IN PFLOW_STRUC pFlow,
  189. IN BOOLEAN RemoveFilters
  190. );
  191. DWORD
  192. DeleteFilter(
  193. IN PFILTER_STRUC pFilter
  194. );
  195. VOID
  196. DeleteFilterStruc(
  197. IN PFILTER_STRUC pFilter
  198. );
  199. VOID
  200. CompleteAddFlow(
  201. IN PFLOW_STRUC pFlow,
  202. IN DWORD Status
  203. );
  204. VOID
  205. CompleteAddClassMapFlow(
  206. IN PFLOW_STRUC pFlow,
  207. IN DWORD Status
  208. );
  209. VOID
  210. CompleteModifyFlow(
  211. IN PFLOW_STRUC pFlow,
  212. IN DWORD Status
  213. );
  214. VOID
  215. CompleteDeleteFlow(
  216. IN PFLOW_STRUC pFlow,
  217. IN DWORD Status
  218. );
  219. DWORD
  220. OpenGpcClients(
  221. IN ULONG CfInfoType
  222. );
  223. DWORD
  224. DereferenceInterface(
  225. IN PINTERFACE_STRUC pInterface
  226. );
  227. DWORD
  228. DereferenceFlow(
  229. IN PFLOW_STRUC pFlow
  230. );
  231. DWORD
  232. DereferenceFilter(
  233. IN PFILTER_STRUC pFilter
  234. );
  235. DWORD
  236. DereferenceClient(
  237. IN PCLIENT_STRUC pClient
  238. );
  239. DWORD
  240. GetInterfaceIndex(
  241. IN PADDRESS_LIST_DESCRIPTOR pAddressListDesc,
  242. OUT PULONG pInterfaceIndex,
  243. OUT PULONG pSpecificLinkCtx
  244. );
  245. DWORD
  246. CreateKernelInterfaceStruc(
  247. OUT PTC_IFC *ppTcIfc,
  248. IN DWORD AddresssLength
  249. );
  250. DWORD
  251. DereferenceKernelInterface(
  252. PTC_IFC pTcIfc
  253. );
  254. //
  255. // tcglob.c
  256. //
  257. DWORD
  258. InitializeGlobalData();
  259. VOID
  260. DeInitializeGlobalData();
  261. //
  262. // callback.c
  263. //
  264. VOID
  265. NTAPI CbAddFlowComplete(
  266. IN PVOID ApcContext,
  267. IN PIO_STATUS_BLOCK IoStatusBlock,
  268. IN ULONG Reserved
  269. );
  270. VOID
  271. NTAPI CbModifyFlowComplete(
  272. IN PVOID ApcContext,
  273. IN PIO_STATUS_BLOCK IoStatusBlock,
  274. IN ULONG Reserved
  275. );
  276. VOID
  277. NTAPI CbDeleteFlowComplete(
  278. IN PVOID ApcContext,
  279. IN PIO_STATUS_BLOCK IoStatusBlock,
  280. IN ULONG Reserved
  281. );
  282. VOID
  283. NTAPI CbGpcNotifyRoutine(
  284. IN PVOID ApcContext,
  285. IN PIO_STATUS_BLOCK IoStatusBlock,
  286. IN ULONG Reserved
  287. );
  288. VOID
  289. CbParamNotifyClient(
  290. IN ULONG Context,
  291. IN LPGUID pGuid,
  292. IN LPWSTR InstanceName,
  293. IN ULONG DataSize,
  294. IN PVOID DataBuffer
  295. );
  296. VOID
  297. CbInterfaceNotifyClient(
  298. IN ULONG Context,
  299. IN LPGUID pGuid,
  300. IN LPWSTR InstanceName,
  301. IN ULONG DataSize,
  302. IN PVOID DataBuffer
  303. );
  304. //
  305. // tcwmi.c
  306. //
  307. DWORD
  308. InitializeWmi(VOID);
  309. DWORD
  310. DeInitializeWmi(VOID);
  311. VOID
  312. CbWmiParamNotification(
  313. IN PWNODE_HEADER WnodeHeader,
  314. IN ULONG Index
  315. );
  316. VOID
  317. CbWmiInterfaceNotification(
  318. IN PWNODE_HEADER WnodeHeader,
  319. IN ULONG Index
  320. );
  321. DWORD
  322. WalkWnode(
  323. IN PWNODE_HEADER pWnodeHdr,
  324. IN ULONG Context,
  325. IN CB_PER_INSTANCE_ROUTINE CbPerInstance
  326. );
  327. //
  328. // tcutils.c
  329. //
  330. ULONG
  331. LockedDec(
  332. IN PULONG Count
  333. );
  334. //
  335. // tcnotify.c
  336. //
  337. ULONG
  338. TcipAddToNotificationList(
  339. IN LPGUID Guid,
  340. IN PINTERFACE_STRUC IfcHandle,
  341. IN ULONG Flags
  342. );
  343. ULONG
  344. TcipDeleteFromNotificationList(
  345. IN LPGUID Guid,
  346. IN PINTERFACE_STRUC IfcHandle,
  347. IN ULONG Flags
  348. );
  349. ULONG
  350. TcipClientRegisteredForNotification(
  351. IN LPGUID Guid,
  352. IN PINTERFACE_STRUC IfcHandle,
  353. IN ULONG Flags
  354. );
  355. ULONG
  356. TcipDeleteInterfaceFromNotificationList(
  357. IN PINTERFACE_STRUC IfcHandle,
  358. IN ULONG Flags
  359. );
  360. #endif