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.

325 lines
5.3 KiB

  1. #include "netpch.h"
  2. #pragma hdrstop
  3. #include <winsock2.h>
  4. #include <iphlpapi.h>
  5. static
  6. DWORD
  7. WINAPI
  8. GetIfTable(
  9. OUT PMIB_IFTABLE pIfTable,
  10. IN OUT PULONG pdwSize,
  11. IN BOOL bOrder
  12. )
  13. {
  14. return ERROR_PROC_NOT_FOUND;
  15. }
  16. static
  17. DWORD
  18. WINAPI
  19. GetInterfaceInfo(
  20. IN PIP_INTERFACE_INFO pIfTable,
  21. OUT PULONG dwOutBufLen
  22. )
  23. {
  24. return ERROR_PROC_NOT_FOUND;
  25. }
  26. static
  27. DWORD
  28. WINAPI
  29. GetIpAddrTable(
  30. OUT PMIB_IPADDRTABLE pIpAddrTable,
  31. IN OUT PULONG pdwSize,
  32. IN BOOL bOrder
  33. )
  34. {
  35. return ERROR_PROC_NOT_FOUND;
  36. }
  37. static
  38. DWORD
  39. WINAPI
  40. GetIpNetTable(
  41. OUT PMIB_IPNETTABLE pIpNetTable,
  42. IN OUT PULONG pdwSize,
  43. IN BOOL bOrder
  44. )
  45. {
  46. return ERROR_PROC_NOT_FOUND;
  47. }
  48. static
  49. DWORD
  50. WINAPI
  51. GetIpForwardTable(
  52. OUT PMIB_IPFORWARDTABLE pIpForwardTable,
  53. IN OUT PULONG pdwSize,
  54. IN BOOL bOrder
  55. )
  56. {
  57. return ERROR_PROC_NOT_FOUND;
  58. }
  59. static
  60. DWORD
  61. WINAPI
  62. GetIpStatistics(
  63. OUT PMIB_IPSTATS pStats
  64. )
  65. {
  66. return ERROR_PROC_NOT_FOUND;
  67. }
  68. static
  69. DWORD
  70. WINAPI
  71. GetIpStatisticsEx(
  72. OUT PMIB_IPSTATS pStats,
  73. IN DWORD dwFamily
  74. )
  75. {
  76. return ERROR_PROC_NOT_FOUND;
  77. }
  78. static
  79. DWORD
  80. WINAPI
  81. GetIcmpStatistics(
  82. OUT PMIB_ICMP pStats
  83. )
  84. {
  85. return ERROR_PROC_NOT_FOUND;
  86. }
  87. static
  88. DWORD
  89. WINAPI
  90. GetNumberOfInterfaces(
  91. OUT PDWORD pdwNumIf
  92. )
  93. {
  94. return ERROR_PROC_NOT_FOUND;
  95. }
  96. static
  97. DWORD
  98. WINAPI
  99. GetTcpStatistics(
  100. OUT PMIB_TCPSTATS pStats
  101. )
  102. {
  103. return ERROR_PROC_NOT_FOUND;
  104. }
  105. static
  106. DWORD
  107. WINAPI
  108. GetTcpStatisticsEx(
  109. OUT PMIB_TCPSTATS pStats,
  110. IN DWORD dwFamily
  111. )
  112. {
  113. return ERROR_PROC_NOT_FOUND;
  114. }
  115. static
  116. DWORD
  117. WINAPI
  118. GetUdpStatistics(
  119. OUT PMIB_UDPSTATS pStats
  120. )
  121. {
  122. return ERROR_PROC_NOT_FOUND;
  123. }
  124. static
  125. DWORD
  126. WINAPI
  127. GetUdpStatisticsEx(
  128. OUT PMIB_UDPSTATS pStats,
  129. IN DWORD dwFamily
  130. )
  131. {
  132. return ERROR_PROC_NOT_FOUND;
  133. }
  134. static
  135. DWORD
  136. WINAPI
  137. GetBestInterface(
  138. IN IPAddr dwDestAddr,
  139. OUT PDWORD pdwBestIfIndex
  140. )
  141. {
  142. return ERROR_PROC_NOT_FOUND;
  143. }
  144. static
  145. DWORD
  146. WINAPI
  147. GetBestInterfaceEx(
  148. IN struct sockaddr *pDestAddr,
  149. OUT PDWORD pdwBestIfIndex
  150. )
  151. {
  152. return ERROR_PROC_NOT_FOUND;
  153. }
  154. static
  155. DWORD
  156. WINAPI
  157. GetBestRoute(
  158. IN DWORD dwDestAddr,
  159. IN DWORD dwSourceAddr, OPTIONAL
  160. OUT PMIB_IPFORWARDROW pBestRoute
  161. )
  162. {
  163. return ERROR_PROC_NOT_FOUND;
  164. }
  165. static
  166. DWORD
  167. WINAPI
  168. NotifyAddrChange(
  169. OUT PHANDLE Handle,
  170. IN LPOVERLAPPED overlapped
  171. )
  172. {
  173. return ERROR_PROC_NOT_FOUND;
  174. }
  175. static
  176. DWORD
  177. WINAPI
  178. NotifyRouteChange(
  179. OUT PHANDLE Handle,
  180. IN LPOVERLAPPED overlapped
  181. )
  182. {
  183. return ERROR_PROC_NOT_FOUND;
  184. }
  185. static
  186. BOOL
  187. WINAPI
  188. GetRTTAndHopCount(
  189. IPAddr DestIpAddress,
  190. PULONG HopCount,
  191. ULONG MaxHops,
  192. PULONG RTT
  193. )
  194. {
  195. SetLastError(ERROR_PROC_NOT_FOUND);
  196. return FALSE;
  197. }
  198. static
  199. DWORD
  200. WINAPI
  201. GetFriendlyIfIndex(
  202. DWORD IfIndex
  203. )
  204. {
  205. return ERROR_PROC_NOT_FOUND;
  206. }
  207. static
  208. DWORD
  209. WINAPI
  210. GetAdaptersAddresses(
  211. IN ULONG Family,
  212. IN DWORD Flags,
  213. IN PVOID Reserved,
  214. OUT PIP_ADAPTER_ADDRESSES pAdapterAddresses,
  215. IN OUT PULONG pOutBufLen
  216. )
  217. {
  218. return ERROR_PROC_NOT_FOUND;
  219. }
  220. static
  221. DWORD
  222. WINAPI
  223. GetAdaptersInfo(
  224. PIP_ADAPTER_INFO pAdapterInfo,
  225. PULONG pOutBufLen
  226. )
  227. {
  228. return ERROR_PROC_NOT_FOUND;
  229. }
  230. static
  231. DWORD
  232. WINAPI
  233. GetIfEntry(
  234. IN OUT PMIB_IFROW pIfRow
  235. )
  236. {
  237. return ERROR_PROC_NOT_FOUND;
  238. }
  239. static
  240. DWORD
  241. WINAPI
  242. GetPerAdapterInfo(
  243. ULONG IfIndex,
  244. PIP_PER_ADAPTER_INFO pPerAdapterInfo,
  245. PULONG pOutBufLen
  246. )
  247. {
  248. return ERROR_PROC_NOT_FOUND;
  249. }
  250. static
  251. DWORD
  252. NhGetInterfaceNameFromDeviceGuid(
  253. IN GUID *pGuid,
  254. OUT PWCHAR pwszBuffer,
  255. IN OUT PULONG pulBufferSize,
  256. IN BOOL bCache,
  257. IN BOOL bRefresh
  258. )
  259. {
  260. return ERROR_PROC_NOT_FOUND;
  261. }
  262. //
  263. // !! WARNING !! The entries below must be in alphabetical order, and are CASE SENSITIVE (eg lower case comes last!)
  264. //
  265. DEFINE_PROCNAME_ENTRIES(iphlpapi)
  266. {
  267. DLPENTRY(GetAdaptersAddresses)
  268. DLPENTRY(GetAdaptersInfo)
  269. DLPENTRY(GetBestInterface)
  270. DLPENTRY(GetBestInterfaceEx)
  271. DLPENTRY(GetBestRoute)
  272. DLPENTRY(GetFriendlyIfIndex)
  273. DLPENTRY(GetIcmpStatistics)
  274. DLPENTRY(GetIfEntry)
  275. DLPENTRY(GetIfTable)
  276. DLPENTRY(GetInterfaceInfo)
  277. DLPENTRY(GetIpAddrTable)
  278. DLPENTRY(GetIpForwardTable)
  279. DLPENTRY(GetIpNetTable)
  280. DLPENTRY(GetIpStatistics)
  281. DLPENTRY(GetIpStatisticsEx)
  282. DLPENTRY(GetNumberOfInterfaces)
  283. DLPENTRY(GetPerAdapterInfo)
  284. DLPENTRY(GetRTTAndHopCount)
  285. DLPENTRY(GetTcpStatistics)
  286. DLPENTRY(GetTcpStatisticsEx)
  287. DLPENTRY(GetUdpStatistics)
  288. DLPENTRY(GetUdpStatisticsEx)
  289. DLPENTRY(NhGetInterfaceNameFromDeviceGuid)
  290. DLPENTRY(NotifyAddrChange)
  291. DLPENTRY(NotifyRouteChange)
  292. };
  293. DEFINE_PROCNAME_MAP(iphlpapi)