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.

214 lines
3.1 KiB

  1. //============================================================================
  2. // Copyright (c) 2000, Microsoft Corporation
  3. //
  4. // File: ndptsp.h
  5. //
  6. // History:
  7. // Yi Sun June-27-2000 Created
  8. //
  9. // Abstract:
  10. //============================================================================
  11. #ifndef _NDPTSP_H_
  12. #define _NDPTSP_H_
  13. // handle types
  14. #define HT_HDCALL 1
  15. #define HT_HDLINE 2
  16. // tapi success code
  17. #define TAPI_SUCCESS 0
  18. // alloc fixed mem then zeroinit it
  19. #define MALLOC(x) LocalAlloc(LPTR, x)
  20. #define FREE(x) LocalFree(x)
  21. // debug levels
  22. #define DL_ERROR 1
  23. #define DL_WARNING 2
  24. #define DL_INFO 4
  25. #define DL_TRACE 8
  26. typedef VOID (*FREEOBJPROC)(PVOID);
  27. // debug routine
  28. VOID
  29. TspLog(
  30. IN DWORD dwDebugLevel,
  31. IN PCHAR pchFormat,
  32. ...
  33. );
  34. //
  35. // implemented in mapper.c
  36. //
  37. LONG
  38. InitializeMapper();
  39. VOID
  40. UninitializeMapper();
  41. LONG
  42. OpenObjHandle(
  43. IN PVOID pObjPtr,
  44. IN FREEOBJPROC pfnFreeProc,
  45. OUT HANDLE *phObj
  46. );
  47. LONG
  48. CloseObjHandle(
  49. IN HANDLE hObj
  50. );
  51. LONG
  52. AcquireObjReadLock(
  53. IN HANDLE hObj
  54. );
  55. LONG
  56. GetObjWithReadLock(
  57. IN HANDLE hObj,
  58. OUT PVOID *ppObjPtr
  59. );
  60. LONG
  61. ReleaseObjReadLock(
  62. IN HANDLE hObj
  63. );
  64. LONG
  65. AcquireObjWriteLock(
  66. IN HANDLE hObj
  67. );
  68. LONG
  69. GetObjWithWriteLock(
  70. IN HANDLE hObj,
  71. OUT PVOID *ppObjPtr
  72. );
  73. LONG
  74. ReleaseObjWriteLock(
  75. IN HANDLE hObj
  76. );
  77. //
  78. // implemented in allocatr.c
  79. //
  80. VOID
  81. InitAllocator();
  82. VOID
  83. UninitAllocator();
  84. PVOID
  85. AllocRequest(
  86. IN DWORD dwSize
  87. );
  88. VOID
  89. FreeRequest(
  90. IN PVOID pMem
  91. );
  92. VOID
  93. MarkRequest(
  94. IN PVOID pMem
  95. );
  96. VOID
  97. UnmarkRequest(
  98. IN PVOID pMem
  99. );
  100. PVOID
  101. AllocCallObj(
  102. IN DWORD dwSize
  103. );
  104. VOID
  105. FreeCallObj(
  106. IN PVOID pCall
  107. );
  108. PVOID
  109. AllocLineObj(
  110. IN DWORD dwSize
  111. );
  112. VOID
  113. FreeLineObj(
  114. IN PVOID pLine
  115. );
  116. PVOID
  117. AllocMSPLineObj(
  118. IN DWORD dwSize
  119. );
  120. VOID
  121. FreeMSPLineObj(
  122. IN PVOID pLine
  123. );
  124. //
  125. // implemented in devlist.c
  126. //
  127. VOID
  128. InitLineDevList();
  129. VOID
  130. UninitLineDevList();
  131. LONG
  132. SetNegotiatedTSPIVersion(
  133. IN DWORD dwDeviceID,
  134. IN DWORD dwTSPIVersion
  135. );
  136. LONG
  137. SetNegotiatedExtVersion(
  138. IN DWORD dwDeviceID,
  139. IN DWORD dwExtVersion
  140. );
  141. LONG
  142. SetSelectedExtVersion(
  143. IN DWORD dwDeviceID,
  144. IN DWORD dwExtVersion
  145. );
  146. LONG
  147. CommitNegotiatedTSPIVersion(
  148. IN DWORD dwDeviceID
  149. );
  150. LONG
  151. DecommitNegotiatedTSPIVersion(
  152. IN DWORD dwDeviceID
  153. );
  154. LONG
  155. GetNumAddressIDs(
  156. IN DWORD dwDeviceID,
  157. OUT DWORD *pdwNumAddressIDs
  158. );
  159. LONG
  160. GetDevCaps(
  161. IN DWORD dwDeviceID,
  162. IN DWORD dwTSPIVersion,
  163. IN DWORD dwExtVersion,
  164. OUT LINEDEVCAPS *pLineDevCaps
  165. );
  166. //
  167. // implemented in ndptsp.c
  168. //
  169. LINEDEVCAPS *
  170. GetLineDevCaps(
  171. IN DWORD dwDeviceID,
  172. IN DWORD dwExtVersion
  173. );
  174. #endif // _NDPTSP_H_