1 /***********************************************************************\
2 *                               iphlpapi.d                              *
3 *                                                                       *
4 *                       Windows API header module                       *
5 *                                                                       *
6 *                 Translated from MinGW Windows headers                 *
7 *                           by Stewart Gordon                           *
8 *                                                                       *
9 *                       Placed into public domain                       *
10 \***********************************************************************/
11 module win32.iphlpapi;
12 version(Windows):
13 
14 import win32.ipexport, win32.iprtrmib, win32.iptypes;
15 private import win32.winbase, win32.windef;
16 
17 extern (Windows) {
18 	DWORD AddIPAddress(IPAddr, IPMask, DWORD, PULONG, PULONG);
19 	DWORD CreateIpForwardEntry(PMIB_IPFORWARDROW);
20 	DWORD CreateIpNetEntry(PMIB_IPNETROW);
21 	DWORD CreateProxyArpEntry(DWORD, DWORD, DWORD);
22 	DWORD DeleteIPAddress(ULONG);
23 	DWORD DeleteIpForwardEntry(PMIB_IPFORWARDROW);
24 	DWORD DeleteIpNetEntry(PMIB_IPNETROW);
25 	DWORD DeleteProxyArpEntry(DWORD, DWORD, DWORD);
26 	DWORD EnableRouter(HANDLE*, OVERLAPPED*);
27 	DWORD FlushIpNetTable(DWORD);
28 	DWORD GetAdapterIndex(LPWSTR, PULONG);
29 	DWORD GetAdaptersInfo(PIP_ADAPTER_INFO, PULONG);
30 	DWORD GetBestInterface(IPAddr, PDWORD);
31 	DWORD GetBestRoute(DWORD, DWORD, PMIB_IPFORWARDROW);
32 	DWORD GetFriendlyIfIndex(DWORD);
33 	DWORD GetIcmpStatistics(PMIB_ICMP);
34 	DWORD GetIfEntry(PMIB_IFROW);
35 	DWORD GetIfTable(PMIB_IFTABLE, PULONG, BOOL);
36 	DWORD GetInterfaceInfo(PIP_INTERFACE_INFO, PULONG);
37 	DWORD GetIpAddrTable(PMIB_IPADDRTABLE, PULONG, BOOL);
38 	DWORD GetIpForwardTable(PMIB_IPFORWARDTABLE, PULONG, BOOL);
39 	DWORD GetIpNetTable(PMIB_IPNETTABLE, PULONG, BOOL);
40 	DWORD GetIpStatistics(PMIB_IPSTATS);
41 	DWORD GetNetworkParams(PFIXED_INFO, PULONG);
42 	DWORD GetNumberOfInterfaces(PDWORD);
43 	DWORD GetPerAdapterInfo(ULONG, PIP_PER_ADAPTER_INFO, PULONG);
44 	BOOL GetRTTAndHopCount(IPAddr, PULONG, ULONG, PULONG);
45 	DWORD GetTcpStatistics(PMIB_TCPSTATS);
46 	DWORD GetTcpTable(PMIB_TCPTABLE, PDWORD, BOOL);
47 	DWORD GetUniDirectionalAdapterInfo(PIP_UNIDIRECTIONAL_ADAPTER_ADDRESS,
48 	  PULONG);
49 	DWORD GetUdpStatistics(PMIB_UDPSTATS);
50 	DWORD GetUdpTable(PMIB_UDPTABLE, PDWORD, BOOL);
51 	DWORD IpReleaseAddress(PIP_ADAPTER_INDEX_MAP);
52 	DWORD IpRenewAddress(PIP_ADAPTER_INDEX_MAP);
53 	DWORD NotifyAddrChange(PHANDLE, LPOVERLAPPED);
54 	DWORD NotifyRouteChange(PHANDLE, LPOVERLAPPED);
55 	DWORD SendARP(IPAddr, IPAddr, PULONG, PULONG);
56 	DWORD SetIfEntry(PMIB_IFROW);
57 	DWORD SetIpForwardEntry(PMIB_IPFORWARDROW);
58 	DWORD SetIpNetEntry(PMIB_IPNETROW);
59 	DWORD SetIpStatistics(PMIB_IPSTATS);
60 	DWORD SetIpTTL(UINT);
61 	DWORD SetTcpEntry(PMIB_TCPROW);
62 	DWORD UnenableRouter(OVERLAPPED*, LPDWORD);
63 }