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.

238 lines
4.0 KiB

  1. #ifndef _TAPI_H_
  2. #define _TAPI_H_
  3. #define ALLOC_LINE( ppL ) NdisAllocateMemoryWithTag( (PVOID*) ppL, sizeof( LINE ), MTAG_LINE )
  4. #define FREE_LINE( pL ) NdisFreeMemory( (PVOID) pL, sizeof( LINE ), 0 );
  5. #define VALIDATE_LINE( pL ) ( (pL) && (pL->tagLine == MTAG_LINE) )
  6. #define ALLOC_CALL( ppC ) NdisAllocateMemoryWithTag( (PVOID*) ppC, sizeof( CALL ), MTAG_CALL )
  7. #define FREE_CALL( pC ) NdisFreeMemory( (PVOID) pC, sizeof( CALL ), 0 );
  8. #define VALIDATE_CALL( pC ) ( (pC) && (pC->tagCall == MTAG_CALL) )
  9. VOID
  10. ReferenceCall(
  11. IN CALL* pCall,
  12. IN BOOLEAN fAcquireLock
  13. );
  14. VOID
  15. DereferenceCall(
  16. IN CALL *pCall
  17. );
  18. VOID
  19. ReferenceLine(
  20. IN LINE* pLine,
  21. IN BOOLEAN fAcquireLock
  22. );
  23. VOID
  24. DereferenceLine(
  25. IN LINE *pLine
  26. );
  27. VOID
  28. ReferenceTapiProv(
  29. IN ADAPTER* pAdapter,
  30. IN BOOLEAN fAcquireLock
  31. );
  32. VOID
  33. DereferenceTapiProv(
  34. IN ADAPTER *pAdapter
  35. );
  36. NDIS_STATUS
  37. TpProviderInitialize(
  38. IN ADAPTER* pAdapter,
  39. IN PNDIS_TAPI_PROVIDER_INITIALIZE pRequest
  40. );
  41. NDIS_STATUS
  42. TpProviderShutdown(
  43. IN ADAPTER* pAdapter,
  44. IN PNDIS_TAPI_PROVIDER_SHUTDOWN pRequest,
  45. IN BOOLEAN fNotifyNDIS
  46. );
  47. NDIS_STATUS
  48. TpOpenLine(
  49. ADAPTER* pAdapter,
  50. PNDIS_TAPI_OPEN pRequest
  51. );
  52. NDIS_STATUS
  53. TpCloseLine(
  54. IN ADAPTER* pAdapter,
  55. IN PNDIS_TAPI_CLOSE pRequest,
  56. IN BOOLEAN fNotifyNDIS
  57. );
  58. NDIS_STATUS
  59. TpCloseCall(
  60. IN ADAPTER* pAdapter,
  61. IN PNDIS_TAPI_CLOSE_CALL pRequest,
  62. IN BOOLEAN fNotifyNDIS
  63. );
  64. NDIS_STATUS
  65. TpDropCall(
  66. IN ADAPTER* pAdapter,
  67. IN PNDIS_TAPI_DROP pRequest,
  68. IN ULONG ulLineDisconnectMode
  69. );
  70. VOID
  71. TpCloseCallComplete(
  72. IN CALL* pCall
  73. );
  74. VOID
  75. TpCloseLineComplete(
  76. IN LINE* pLine
  77. );
  78. VOID
  79. TpProviderShutdownComplete(
  80. IN ADAPTER* pAdapter
  81. );
  82. VOID
  83. TpProviderCleanup(
  84. IN ADAPTER* pAdapter
  85. );
  86. VOID
  87. TpLineCleanup(
  88. IN LINE* pLine
  89. );
  90. VOID
  91. TpCallCleanup(
  92. IN CALL* pCall
  93. );
  94. NDIS_STATUS
  95. TpSetDefaultMediaDetection(
  96. IN ADAPTER* pAdapter,
  97. IN PNDIS_TAPI_SET_DEFAULT_MEDIA_DETECTION pRequest
  98. );
  99. VOID
  100. TpSetDefaultMediaDetectionComplete(
  101. IN LINE* pLine,
  102. IN PNDIS_TAPI_SET_DEFAULT_MEDIA_DETECTION pRequest
  103. );
  104. NDIS_STATUS
  105. TpNegotiateExtVersion(
  106. IN ADAPTER* pAdapter,
  107. IN PNDIS_TAPI_NEGOTIATE_EXT_VERSION pRequest
  108. );
  109. NDIS_STATUS
  110. TpGetExtensionId(
  111. IN ADAPTER* pAdapter,
  112. IN PNDIS_TAPI_GET_EXTENSION_ID pRequest
  113. );
  114. NDIS_STATUS
  115. TpGetAddressStatus(
  116. IN ADAPTER* pAdapter,
  117. IN PNDIS_TAPI_GET_ADDRESS_STATUS pRequest
  118. );
  119. NDIS_STATUS
  120. TpGetId(
  121. IN ADAPTER* pAdapter,
  122. IN PNDIS_TAPI_GET_ID pRequest,
  123. IN ULONG ulRequestLength
  124. );
  125. NDIS_STATUS
  126. TpGetDevCaps(
  127. IN ADAPTER* pAdapter,
  128. IN PNDIS_TAPI_GET_DEV_CAPS pRequest
  129. );
  130. NDIS_STATUS
  131. TpGetCallStatus(
  132. IN ADAPTER* pAdapter,
  133. IN PNDIS_TAPI_GET_CALL_STATUS pRequest
  134. );
  135. NDIS_STATUS
  136. TpGetCallInfo(
  137. IN ADAPTER* pAdapter,
  138. IN PNDIS_TAPI_GET_CALL_INFO pRequest
  139. );
  140. NDIS_STATUS
  141. TpGetAddressCaps(
  142. IN ADAPTER* pAdapter,
  143. IN PNDIS_TAPI_GET_ADDRESS_CAPS pRequest
  144. );
  145. NDIS_STATUS
  146. TpSetStatusMessages(
  147. IN ADAPTER* pAdapter,
  148. IN PNDIS_TAPI_SET_STATUS_MESSAGES pRequest
  149. );
  150. VOID
  151. TpCallStateChangeHandler(
  152. IN CALL* pCall,
  153. IN ULONG ulCallState,
  154. IN ULONG ulStateParam
  155. );
  156. NDIS_STATUS
  157. TpMakeCall(
  158. IN ADAPTER* pAdapter,
  159. IN PNDIS_TAPI_MAKE_CALL pRequest,
  160. IN ULONG ulRequestLength
  161. );
  162. VOID
  163. TpMakeCallComplete(
  164. IN CALL* pCall,
  165. IN PNDIS_TAPI_MAKE_CALL pRequest
  166. );
  167. NDIS_STATUS
  168. TpCallInitialize(
  169. IN CALL* pCall,
  170. IN LINE* pLine,
  171. IN HTAPI_CALL htCall,
  172. IN BOOLEAN fIncoming
  173. );
  174. NDIS_STATUS
  175. TpAnswerCall(
  176. IN ADAPTER* pAdapter,
  177. IN PNDIS_TAPI_ANSWER pRequest
  178. );
  179. VOID
  180. ExecAdapterWorkItem(
  181. IN PVOID Args[4],
  182. IN UINT workType
  183. );
  184. VOID
  185. TpReceiveCall(
  186. IN ADAPTER* pAdapter,
  187. IN BINDING* pBinding,
  188. IN PPPOE_PACKET* pPacket
  189. );
  190. BOOLEAN
  191. TpIndicateNewCall(
  192. IN CALL* pCall
  193. );
  194. #endif