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.

344 lines
7.2 KiB

  1. #ifndef __PROTO_H__
  2. #define __PROTO_H__
  3. PMIB_IFROW
  4. LocateIfRow(
  5. DWORD dwQueryType,
  6. AsnAny *paaIfIndex
  7. );
  8. PMIB_IPADDRROW
  9. LocateIpAddrRow(
  10. DWORD dwQueryType,
  11. AsnAny *paaIpAddr
  12. );
  13. PMIB_IPFORWARDROW
  14. LocateIpRouteRow(
  15. DWORD dwQueryType ,
  16. AsnAny *paaIpDest
  17. );
  18. PMIB_IPFORWARDROW
  19. LocateIpForwardRow(
  20. DWORD dwQueryType,
  21. AsnAny *paaDest,
  22. AsnAny *paaProto,
  23. AsnAny *paaPolicy,
  24. AsnAny *paaNextHop
  25. );
  26. PMIB_IPNETROW
  27. LocateIpNetRow(
  28. DWORD dwQueryType,
  29. AsnAny *paaIndex,
  30. AsnAny *paaAddr
  31. );
  32. PMIB_UDPROW
  33. LocateUdpRow(
  34. DWORD dwQueryType,
  35. AsnAny *paaLocalAddr,
  36. AsnAny *paaLocalPort
  37. );
  38. PUDP6ListenerEntry
  39. LocateUdp6Row(
  40. DWORD dwQueryType,
  41. AsnAny *paaLocalAddr,
  42. AsnAny *paaLocalPort
  43. );
  44. PMIB_TCPROW
  45. LocateTcpRow(
  46. DWORD dwQueryType,
  47. AsnAny *paaLocalAddr,
  48. AsnAny *paaLocalPort,
  49. AsnAny *paaRemoteAddr,
  50. AsnAny *paaRemotePort
  51. );
  52. PTCP6ConnTableEntry
  53. LocateTcp6Row(
  54. DWORD dwQueryType,
  55. AsnAny *paaLocalAddr,
  56. AsnAny *paaLocalPort,
  57. AsnAny *paaRemoteAddr,
  58. AsnAny *paaRemotePort
  59. );
  60. typedef struct _MIB_IPV6_IF {
  61. DWORD dwIndex;
  62. DWORD dwEffectiveMtu;
  63. DWORD dwReasmMaxSize;
  64. DWORD dwAdminStatus;
  65. DWORD dwOperStatus;
  66. DWORD dwLastChange;
  67. BYTE bPhysicalAddress[MAX_PHYS_ADDR_LEN];
  68. DWORD dwPhysicalAddressLength;
  69. WCHAR wszDescription[MAX_IF_DESCR_LEN + 1];
  70. }MIB_IPV6_IF, *PMIB_IPV6_IF;
  71. PMIB_IPV6_IF
  72. LocateIpv6IfRow(
  73. DWORD dwQueryType,
  74. AsnAny *paaIfIndex
  75. );
  76. typedef struct _MIB_INET_ICMP {
  77. DWORD dwAFType;
  78. DWORD dwIfIndex;
  79. DWORD dwInMsgs;
  80. DWORD dwInErrors;
  81. DWORD dwOutMsgs;
  82. DWORD dwOutErrors;
  83. }MIB_INET_ICMP, *PMIB_INET_ICMP;
  84. PMIB_INET_ICMP
  85. LocateInetIcmpRow(
  86. DWORD dwQueryType,
  87. AsnAny *paaAFType,
  88. AsnAny *paaIfIndex
  89. );
  90. typedef struct _MIB_INET_ICMP_MSG {
  91. DWORD dwAFType;
  92. DWORD dwIfIndex;
  93. DWORD dwType;
  94. DWORD dwCode;
  95. DWORD dwInPkts;
  96. DWORD dwOutPkts;
  97. }MIB_INET_ICMP_MSG, *PMIB_INET_ICMP_MSG;
  98. PMIB_INET_ICMP_MSG
  99. LocateInetIcmpMsgRow(
  100. DWORD dwQueryType,
  101. AsnAny *paaAFType,
  102. AsnAny *paaIfIndex,
  103. AsnAny *paaType,
  104. AsnAny *paaCode
  105. );
  106. typedef struct _MIB_IPV6_ADDR {
  107. DWORD dwIfIndex;
  108. IN6_ADDR ipAddress;
  109. DWORD dwPrefixLength;
  110. DWORD dwType;
  111. DWORD dwAnycastFlag;
  112. DWORD dwStatus;
  113. }MIB_IPV6_ADDR, *PMIB_IPV6_ADDR;
  114. PMIB_IPV6_ADDR
  115. LocateIpv6AddrRow(
  116. DWORD dwQueryType,
  117. AsnAny *paaIfIndex,
  118. AsnAny *paaAddress
  119. );
  120. typedef struct _MIB_IPV6_ADDR_PREFIX {
  121. DWORD dwIfIndex;
  122. IN6_ADDR ipPrefix;
  123. DWORD dwPrefixLength;
  124. DWORD dwOnLinkFlag;
  125. DWORD dwAutonomousFlag;
  126. DWORD dwPreferredLifetime;
  127. DWORD dwValidLifetime;
  128. }MIB_IPV6_ADDR_PREFIX, *PMIB_IPV6_ADDR_PREFIX;
  129. PMIB_IPV6_ADDR_PREFIX
  130. LocateIpv6AddrPrefixRow(
  131. DWORD dwQueryType,
  132. AsnAny *paaIfIndex,
  133. AsnAny *paaPrefix,
  134. AsnAny *paaPrefixLength
  135. );
  136. typedef struct _MIB_IPV6_NET_TO_MEDIA {
  137. DWORD dwIfIndex;
  138. IN6_ADDR ipAddress;
  139. BOOL bPhysAddress[MAX_PHYS_ADDR_LEN];
  140. DWORD dwPhysAddressLen;
  141. DWORD dwType;
  142. DWORD dwState;
  143. DWORD dwLastUpdated;
  144. DWORD dwValid;
  145. }MIB_IPV6_NET_TO_MEDIA, *PMIB_IPV6_NET_TO_MEDIA;
  146. PMIB_IPV6_NET_TO_MEDIA
  147. LocateIpv6NetToMediaRow(
  148. DWORD dwQueryType,
  149. AsnAny *paaIfIndex,
  150. AsnAny *paaAddress
  151. );
  152. typedef struct _MIB_IPV6_ROUTE {
  153. IN6_ADDR ipPrefix;
  154. DWORD dwPrefixLength;
  155. IN6_ADDR ipNextHop;
  156. DWORD dwIndex;
  157. DWORD dwIfIndex;
  158. DWORD dwType;
  159. DWORD dwProtocol;
  160. DWORD dwPolicy;
  161. DWORD dwAge;
  162. DWORD dwNextHopRDI;
  163. DWORD dwMetric;
  164. DWORD dwWeight;
  165. DWORD dwValid;
  166. }MIB_IPV6_ROUTE, *PMIB_IPV6_ROUTE;
  167. PMIB_IPV6_ROUTE
  168. LocateIpv6RouteRow(
  169. DWORD dwQueryType,
  170. AsnAny *paaPrefix,
  171. AsnAny *paaPrefixLength,
  172. AsnAny *paaIndex
  173. );
  174. DWORD
  175. LoadSystem(VOID);
  176. DWORD
  177. LoadIfTable(VOID);
  178. DWORD
  179. LoadIpAddrTable(VOID);
  180. DWORD
  181. LoadIpNetTable(VOID);
  182. DWORD
  183. LoadIpForwardTable(VOID);
  184. DWORD
  185. LoadTcpTable(VOID);
  186. DWORD
  187. LoadTcp6Table(VOID);
  188. DWORD
  189. LoadUdpTable(VOID);
  190. DWORD
  191. LoadUdp6ListenerTable(VOID);
  192. DWORD
  193. LoadIpv6IfTable(VOID);
  194. DWORD
  195. LoadIpv6NetToMediaTable(VOID);
  196. DWORD
  197. LoadIpv6RouteTable(VOID);
  198. DWORD
  199. LoadInetIcmpTable(VOID);
  200. DWORD
  201. GetIpStats(MIB_IPSTATS *pStats);
  202. DWORD
  203. GetIcmpStats(MIB_ICMP *pStats);
  204. DWORD
  205. GetTcpStats(MIB_TCPSTATS *pStats);
  206. DWORD
  207. GetUdpStats(MIB_UDPSTATS *pStats);
  208. DWORD
  209. SetIfRow(PMIB_OPAQUE_INFO pRpcRow);
  210. DWORD
  211. CreateIpForwardRow(PMIB_OPAQUE_INFO pRpcRow);
  212. DWORD
  213. SetIpForwardRow(PMIB_OPAQUE_INFO pRpcRow);
  214. DWORD
  215. DeleteIpForwardRow(PMIB_OPAQUE_INFO pRpcRow);
  216. DWORD
  217. SetIpStats(PMIB_OPAQUE_INFO pRpcRow);
  218. DWORD
  219. CreateIpNetRow(PMIB_OPAQUE_INFO pRpcRow);
  220. DWORD
  221. SetIpNetRow(PMIB_OPAQUE_INFO pRpcRow);
  222. DWORD
  223. DeleteIpNetRow(PMIB_OPAQUE_INFO pRpcRow);
  224. DWORD
  225. SetTcpRow(PMIB_OPAQUE_INFO pRpcRow);
  226. LONG
  227. UdpCmp(
  228. DWORD dwAddr1,
  229. DWORD dwPort1,
  230. DWORD dwAddr2,
  231. DWORD dwPort2
  232. );
  233. LONG
  234. Udp6Cmp(
  235. BYTE rgbyLocalAddrEx1[20],
  236. DWORD dwLocalPort1,
  237. BYTE rgbyLocalAddrEx2[20],
  238. DWORD dwLocalPort2
  239. );
  240. LONG
  241. TcpCmp(
  242. DWORD dwLocalAddr1,
  243. DWORD dwLocalPort1,
  244. DWORD dwRemAddr1,
  245. DWORD dwRemPort1,
  246. DWORD dwLocalAddr2,
  247. DWORD dwLocalPort2,
  248. DWORD dwRemAddr2,
  249. DWORD dwRemPort2
  250. );
  251. LONG
  252. Tcp6Cmp(
  253. BYTE rgbyLocalAddrEx1[20],
  254. DWORD dwLocalPort1,
  255. BYTE rgbyRemAddrEx1[20],
  256. DWORD dwRemPort1,
  257. BYTE rgbyLocalAddrEx2[20],
  258. DWORD dwLocalPort2,
  259. BYTE rgbyRemAddrEx2[20],
  260. DWORD dwRemPort2
  261. );
  262. LONG
  263. IpForwardCmp(DWORD dwIpDest1,
  264. DWORD dwProto1,
  265. DWORD dwPolicy1,
  266. DWORD dwIpNextHop1,
  267. DWORD dwIpDest2,
  268. DWORD dwProto2,
  269. DWORD dwPolicy2,
  270. DWORD dwIpNextHop2
  271. );
  272. LONG
  273. IpNetCmp(
  274. DWORD dwIfIndex1,
  275. DWORD dwAddr1,
  276. DWORD dwIfIndex2,
  277. DWORD dwAddr2
  278. );
  279. DWORD
  280. UpdateCache(DWORD dwCache);
  281. BOOL
  282. IsRouterRunning();
  283. DWORD
  284. GetSysInfo(
  285. MIB_SYSINFO **ppRpcSysInfo,
  286. HANDLE hHeap,
  287. DWORD dwAllocFlags
  288. );
  289. DWORD
  290. GetIfIndexFromAddr(
  291. DWORD dwAddr
  292. );
  293. #endif