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.

237 lines
6.7 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1991 - 1999
  3. Module Name:
  4. DbgIdl.idl
  5. Abstract:
  6. This file specifies the interface for enhanced debugging in the endpoint mapper
  7. Author:
  8. Kamen Moutafov (kamenm) 11-18-99
  9. Revision History:
  10. --*/
  11. //
  12. // DbgIdl Interface.
  13. //
  14. [
  15. uuid(1d55b526-c137-46c5-ab79-638f2a68e869), version(1.0),
  16. ]
  17. interface DbgIdl
  18. {
  19. import "nbase.idl";
  20. cpp_quote("#if 0")
  21. typedef unsigned short USHORT;
  22. typedef byte BYTE;
  23. typedef unsigned long DWORD;
  24. cpp_quote("#endif")
  25. typedef [context_handle] void * DbgCallEnumHandle;
  26. typedef [context_handle] void * DbgThreadEnumHandle;
  27. typedef [context_handle] void * DbgEndpointEnumHandle;
  28. typedef [context_handle] void * DbgClientCallEnumHandle;
  29. cpp_quote("// the DebugCellID allows to uniquely identify a cell using just a DWORD")
  30. cpp_quote("// Giving any pointer to the cell would require QUADWORD on Win64")
  31. cpp_quote("// The SectionID corresponds to the section id of the containing")
  32. cpp_quote("// section in the dictionary. The CellID is the index of the cell")
  33. cpp_quote("// within the containing section")
  34. cpp_quote("//")
  35. cpp_quote("// The maximum size, in bytes, of incoming data for methods in the interface.")
  36. cpp_quote("//")
  37. cpp_quote("// Any legitimate call should fit into several K and we will be generous.")
  38. cpp_quote("//")
  39. cpp_quote("#define DbgIdl_MaxRpcSize (4*1024)")
  40. typedef struct tagDebugCellID
  41. {
  42. USHORT SectionID;
  43. USHORT CellID;
  44. } DebugCellID;
  45. typedef struct tagLRPCCaller
  46. {
  47. USHORT PID;
  48. USHORT TID;
  49. } LRPCCaller;
  50. typedef enum tagDebugCellType
  51. {
  52. dctInvalid,
  53. dctFree,
  54. dctCallInfo,
  55. dctThreadInfo,
  56. dctEndpointInfo,
  57. dctClientCallInfo,
  58. dctConnectionInfo,
  59. dctCallTargetInfo,
  60. dctUsedGeneric
  61. } DebugCellType;
  62. typedef enum tagConnectionReferenceType
  63. {
  64. crtOsfConnection,
  65. crtLrpcConnection
  66. } ConnectionReferenceType;
  67. typedef [switch_type(short)] union tagConnectionReferenceInfo
  68. {
  69. [case (crtOsfConnection)]
  70. DebugCellID Connection;
  71. [case (crtLrpcConnection)]
  72. LRPCCaller Caller;
  73. } ConnectionReferenceInfo;
  74. typedef struct tagRemoteDebugCallInfo
  75. {
  76. BYTE Type;
  77. BYTE Status;
  78. USHORT ProcNum;
  79. DWORD InterfaceUUIDStart;
  80. DebugCellID ServicingTID;
  81. DWORD CallFlags;
  82. DWORD CallID;
  83. DWORD LastUpdateTime;
  84. ConnectionReferenceType ConnectionType;
  85. [switch_is(ConnectionType)] ConnectionReferenceInfo connInfo;
  86. } RemoteDebugCallInfo;
  87. typedef struct tagRemoteDebugConnectionInfo
  88. {
  89. BYTE Type;
  90. BYTE Flags;
  91. USHORT LastTransmitFragmentSize;
  92. DebugCellID Endpoint;
  93. DWORD ConnectionID[2];
  94. DWORD LastSendTime;
  95. DWORD LastReceiveTime;
  96. } RemoteDebugConnectionInfo;
  97. typedef struct tagRemoteDebugThreadInfo
  98. {
  99. BYTE Type;
  100. USHORT Status;
  101. DWORD LastUpdateTime;
  102. USHORT TID;
  103. DebugCellID Endpoint;
  104. } RemoteDebugThreadInfo;
  105. typedef struct tagRemoteDebugEndpointInfo
  106. {
  107. BYTE Type;
  108. BYTE ProtseqType;
  109. BYTE Status;
  110. [range(0, 200)] short EndpointNameLength;
  111. [size_is(EndpointNameLength)] char *EndpointName;
  112. } RemoteDebugEndpointInfo;
  113. typedef struct tagRemoteDebugClientCallInfo
  114. {
  115. BYTE Type;
  116. USHORT ProcNum;
  117. DebugCellID ServicingThread;
  118. DWORD IfStart;
  119. DWORD CallID;
  120. DebugCellID CallTargetID;
  121. [range(0, 200)] short EndpointLength;
  122. [size_is(EndpointLength)] char *Endpoint;
  123. } RemoteDebugClientCallInfo;
  124. typedef struct tagRemoteDebugCallTargetInfo
  125. {
  126. BYTE Type;
  127. USHORT ProtocolSequence;
  128. DWORD LastUpdateTime;
  129. [range(0, 300)] short TargetServerLength;
  130. [size_is(TargetServerLength)] char *TargetServer;
  131. } RemoteDebugCallTargetInfo;
  132. typedef [switch_type(short)] union tagRemoteDebugCellUnionBody
  133. {
  134. [case (dctCallInfo)]
  135. RemoteDebugCallInfo callInfo;
  136. [case (dctThreadInfo)]
  137. RemoteDebugThreadInfo threadInfo;
  138. [case (dctEndpointInfo)]
  139. RemoteDebugEndpointInfo endpointInfo;
  140. [case (dctClientCallInfo)]
  141. RemoteDebugClientCallInfo clientCallInfo;
  142. [case (dctConnectionInfo)]
  143. RemoteDebugConnectionInfo connectionInfo;
  144. [case (dctCallTargetInfo)]
  145. RemoteDebugCallTargetInfo callTargetInfo;
  146. } RemoteDebugCellUnionBody;
  147. typedef struct tagRemoteDebugCellUnion
  148. {
  149. short UnionType;
  150. [switch_is(UnionType)] RemoteDebugCellUnionBody debugInfo;
  151. } RemoteDebugCellUnion;
  152. // in, out, unique means client side must deallocate it after the call returns
  153. error_status_t RemoteGetCellByDebugCellID([in] DWORD ProcessID, [in] DebugCellID CellID,
  154. [in, out, unique] RemoteDebugCellUnion **debugInfo);
  155. // call enumeration routines
  156. error_status_t RemoteOpenRPCDebugCallInfoEnumeration([out] DbgCallEnumHandle *h, [in] DWORD CallID,
  157. [in] DWORD IfStart, [in] int ProcNum, [in] DWORD ProcessID);
  158. error_status_t RemoteGetNextRPCDebugCallInfo([in] DbgCallEnumHandle h,
  159. [in, out, unique] RemoteDebugCallInfo **debugInfo, [out] DebugCellID *CellID,
  160. [out] DWORD *ProcessID);
  161. error_status_t RemoteFinishRPCDebugCallInfoEnumeration([in, out] DbgCallEnumHandle *h);
  162. // endpoint enumeration routines
  163. error_status_t RemoteOpenRPCDebugEndpointInfoEnumeration([out] DbgEndpointEnumHandle *h,
  164. [in, range(0, 200)] short EndpointSize, [in, size_is(EndpointSize), unique] char *Endpoint);
  165. error_status_t RemoteGetNextRPCDebugEndpointInfo([in] DbgEndpointEnumHandle h,
  166. [in, out, unique] RemoteDebugEndpointInfo **debugInfo, [out] DebugCellID *CellID,
  167. [out] DWORD *ProcessID);
  168. error_status_t RemoteFinishRPCDebugEndpointInfoEnumeration([in, out] DbgEndpointEnumHandle *h);
  169. // thread enumeration routines
  170. error_status_t RemoteOpenRPCDebugThreadInfoEnumeration([out] DbgThreadEnumHandle *h,
  171. [in] DWORD ProcessID, [in] DWORD ThreadID);
  172. error_status_t RemoteGetNextRPCDebugThreadInfo([in] DbgThreadEnumHandle h,
  173. [in, out, unique] RemoteDebugThreadInfo **debugInfo, [out] DebugCellID *CellID,
  174. [out] DWORD *ProcessID);
  175. error_status_t RemoteFinishRPCDebugThreadInfoEnumeration([in, out] DbgThreadEnumHandle *h);
  176. // client call enumeration routines
  177. error_status_t RemoteOpenRPCDebugClientCallInfoEnumeration([out] DbgClientCallEnumHandle *h,
  178. [in] DWORD CallID, [in] DWORD IfStart, [in] int ProcNum, [in] DWORD ProcessID);
  179. error_status_t RemoteGetNextRPCDebugClientCallInfo([in] DbgClientCallEnumHandle h,
  180. [in, out, unique] RemoteDebugClientCallInfo **debugInfo,
  181. [in, out, unique] RemoteDebugCallTargetInfo **CallTargetDebugInfo,
  182. [out] DebugCellID *CellID,
  183. [out] DWORD *ProcessID);
  184. error_status_t RemoteFinishRPCDebugClientCallInfoEnumeration([in, out] DbgClientCallEnumHandle *h);
  185. } // interface DbgIdl