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.

206 lines
3.6 KiB

  1. /********************************************************************/
  2. /** Copyright(c) 1995 Microsoft Corporation. **/
  3. /********************************************************************/
  4. //***
  5. //
  6. // Filename: util.h
  7. //
  8. // Description: Prototypes of various DDM utility functions.
  9. //
  10. // History: May 11,1995 NarenG Created original version.
  11. //
  12. #define GET_USHORT(DstPtr, SrcPtr) \
  13. *(unsigned short *)(DstPtr) = \
  14. ((*((unsigned char *)(SrcPtr)+1)) + \
  15. (*((unsigned char *)(SrcPtr)+0) << 8))
  16. DWORD
  17. GetRasiConnection0Data(
  18. IN PCONNECTION_OBJECT pConnObj,
  19. OUT PRASI_CONNECTION_0 pRasConnection0
  20. );
  21. DWORD
  22. GetRasiConnection1Data(
  23. IN PCONNECTION_OBJECT pConnObj,
  24. OUT PRASI_CONNECTION_1 pRasConnection1
  25. );
  26. DWORD
  27. GetRasiConnection2Data(
  28. IN PCONNECTION_OBJECT pConnObj,
  29. OUT PRASI_CONNECTION_2 pRasConnection2
  30. );
  31. DWORD
  32. GetRasConnection0Data(
  33. IN PCONNECTION_OBJECT pConnObj,
  34. OUT PRAS_CONNECTION_0 pRasConnection0
  35. );
  36. DWORD
  37. GetRasConnection1Data(
  38. IN PCONNECTION_OBJECT pConnObj,
  39. OUT PRAS_CONNECTION_1 pRasConnection1
  40. );
  41. DWORD
  42. GetRasConnection2Data(
  43. IN PCONNECTION_OBJECT pConnObj,
  44. OUT PRAS_CONNECTION_2 pRasConnection2
  45. );
  46. DWORD
  47. GetRasiPort0Data(
  48. IN PDEVICE_OBJECT pDevObj,
  49. OUT PRASI_PORT_0 pRasPort0
  50. );
  51. DWORD
  52. GetRasiPort1Data(
  53. IN PDEVICE_OBJECT pDevObj,
  54. OUT PRASI_PORT_1 pRasPort1
  55. );
  56. DWORD
  57. GetRasPort0Data(
  58. IN PDEVICE_OBJECT pDevObj,
  59. OUT PRAS_PORT_0 pRasPort0
  60. );
  61. DWORD
  62. GetRasPort1Data(
  63. IN PDEVICE_OBJECT pDevObj,
  64. OUT PRAS_PORT_1 pRasPort1
  65. );
  66. DWORD
  67. LoadStrings(
  68. VOID
  69. );
  70. DWORD
  71. GetRouterPhoneBook(
  72. VOID
  73. );
  74. DWORD
  75. MapAuthCodeToLogId(
  76. IN WORD Code
  77. );
  78. BOOL
  79. IsPortOwned(
  80. IN PDEVICE_OBJECT pDeviceObj
  81. );
  82. VOID
  83. GetLoggingInfo(
  84. IN PDEVICE_OBJECT pDeviceObj,
  85. OUT PDWORD BaudRate,
  86. OUT PDWORD BytesSent,
  87. OUT PDWORD BytesRecv,
  88. OUT RASMAN_DISCONNECT_REASON *Reason,
  89. OUT SYSTEMTIME *Time
  90. );
  91. DWORD
  92. GetLineSpeed(
  93. IN HPORT hPort
  94. );
  95. VOID
  96. LogConnectionEvent(
  97. IN PCONNECTION_OBJECT pConnObj,
  98. IN PDEVICE_OBJECT pDeviceObj
  99. );
  100. DWORD
  101. GetTransportIndex(
  102. IN DWORD dwProtocolId
  103. );
  104. VOID
  105. DDMCleanUp(
  106. VOID
  107. );
  108. BOOL
  109. AcceptNewConnection(
  110. IN DEVICE_OBJECT * pDeviceObj,
  111. IN CONNECTION_OBJECT * pConnObj
  112. );
  113. VOID
  114. ConnectionHangupNotification(
  115. IN CONNECTION_OBJECT * pConnObj
  116. );
  117. BOOL
  118. AcceptNewLink(
  119. IN DEVICE_OBJECT * pDeviceObj,
  120. IN CONNECTION_OBJECT * pConnObj
  121. );
  122. VOID
  123. ConvertStringToIpAddress(
  124. IN WCHAR * pwchIpAddress,
  125. OUT DWORD * lpdwIpAddress
  126. );
  127. VOID
  128. ConvertStringToIpxAddress(
  129. IN WCHAR * pwchIpAddress,
  130. OUT BYTE * bIpxAddress
  131. );
  132. DWORD
  133. GetActiveTimeInSeconds(
  134. IN ULARGE_INTEGER * pqwActiveTime
  135. );
  136. BOOL
  137. DDMRecognizeFrame(
  138. IN PVOID pvFrameBuf,
  139. IN WORD wFrameLen,
  140. OUT DWORD *pProtocol
  141. );
  142. DWORD
  143. GetNextAccountingSessionId(
  144. VOID
  145. );
  146. DWORD
  147. GetLocalNASIpAddress(
  148. VOID
  149. );
  150. DWORD
  151. MungePhoneNumber(
  152. char *cbphno,
  153. DWORD dwIndex,
  154. DWORD *pdwSizeofMungedPhNo,
  155. char **ppszMungedPhNo
  156. );
  157. WCHAR *
  158. GetIpAddress(DWORD dwIpAddress);
  159. VOID
  160. LogUnreachabilityEvent(
  161. IN DWORD dwReason,
  162. IN LPWSTR lpwsInterfaceName
  163. );
  164. DWORD
  165. ModifyDefPolicyToForceEncryption(
  166. IN BOOL bStrong
  167. );
  168. DWORD
  169. RemoveQuarantineOnConnection(
  170. IN CONNECTION_OBJECT *pConnObj
  171. );