msado15: Implement Dispatch functions in Field.
[wine.git] / include / iphlpapi.h
blobda5819c84231e59271814af5677ea6400d0a54b8
1 /* WINE iphlpapi.h
2 * Copyright (C) 2003 Juan Lang
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 #ifndef WINE_IPHLPAPI_H__
19 #define WINE_IPHLPAPI_H__
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
25 #include <iprtrmib.h>
26 #include <ipexport.h>
27 #include <iptypes.h>
29 #define NET_STRING_IPV4_ADDRESS 0x00000001
30 #define NET_STRING_IPV4_SERVICE 0x00000002
31 #define NET_STRING_IPV4_NETWORK 0x00000004
32 #define NET_STRING_IPV6_ADDRESS 0x00000008
33 #define NET_STRING_IPV6_ADDRESS_NO_SCOPE 0x00000010
34 #define NET_STRING_IPV6_SERVICE 0x00000020
35 #define NET_STRING_IPV6_SERVICE_NO_SCOPE 0x00000040
36 #define NET_STRING_IPV6_NETWORK 0x00000080
37 #define NET_STRING_NAMED_ADDRESS 0x00000100
38 #define NET_STRING_NAMED_SERVICE 0x00000200
39 #define NET_STRING_IP_ADDRESS (NET_STRING_IPV4_ADDRESS|NET_STRING_IPV6_ADDRESS)
40 #define NET_STRING_IP_ADDRESS_NO_SCOPE (NET_STRING_IPV4_ADDRESS|NET_STRING_IPV6_ADDRESS_NO_SCOPE)
41 #define NET_STRING_IP_SERVICE (NET_STRING_IPV4_SERVICE|NET_STRING_IPV6_SERVICE)
42 #define NET_STRING_IP_SERVICE_NO_SCOPE (NET_STRING_IPV4_SERVICE|NET_STRING_IPV6_SERVICE_NO_SCOPE)
43 #define NET_STRING_IP_NETWORK (NET_STRING_IPV4_NETWORK|NET_STRING_IPV6_NETWORK)
44 #define NET_STRING_ANY_ADDRESS (NET_STRING_NAMED_ADDRESS|NET_STRING_IP_ADDRESS)
45 #define NET_STRING_ANY_ADDRESS_NO_SCOPE (NET_STRING_NAMED_ADDRESS|NET_STRING_IP_ADDRESS_NO_SCOPE)
46 #define NET_STRING_ANY_SERVICE (NET_STRING_NAMED_SERVICE|NET_STRING_IP_SERVICE)
47 #define NET_STRING_ANY_SERVICE_NO_SCOPE (NET_STRING_NAMED_SERVICE|NET_STRING_IP_SERVICE_NO_SCOPE)
49 DWORD WINAPI GetExtendedTcpTable(PVOID pTcpTable, PDWORD pdwSize, BOOL bOrder,
50 ULONG ulAf, TCP_TABLE_CLASS TableClass, ULONG Reserved);
52 DWORD WINAPI GetExtendedUdpTable(PVOID pUdpTable, PDWORD pdwSize, BOOL bOrder,
53 ULONG ulAf, UDP_TABLE_CLASS TableClass, ULONG Reserved);
55 DWORD WINAPI GetNumberOfInterfaces(PDWORD pdwNumIf);
57 DWORD WINAPI GetIfEntry(PMIB_IFROW pIfRow);
59 DWORD WINAPI GetIfTable(PMIB_IFTABLE pIfTable, PULONG pdwSize, BOOL bOrder);
61 DWORD WINAPI GetIpAddrTable(PMIB_IPADDRTABLE pIpAddrTable, PULONG pdwSize,
62 BOOL bOrder);
64 DWORD WINAPI GetIpNetTable(PMIB_IPNETTABLE pIpNetTable, PULONG pdwSize,
65 BOOL bOrder);
67 DWORD WINAPI GetIpForwardTable(PMIB_IPFORWARDTABLE pIpForwardTable,
68 PULONG pdwSize, BOOL bOrder);
70 DWORD WINAPI GetTcpTable(PMIB_TCPTABLE pTcpTable, PDWORD pdwSize, BOOL bOrder);
72 DWORD WINAPI GetUdpTable(PMIB_UDPTABLE pUdpTable, PDWORD pdwSize, BOOL bOrder);
74 DWORD WINAPI GetUdp6Table(PMIB_UDP6TABLE pUdpTable, PDWORD pdwSize, BOOL bOrder);
76 DWORD WINAPI GetIpStatistics(PMIB_IPSTATS pStats);
78 DWORD WINAPI GetIpStatisticsEx(PMIB_IPSTATS pStats, DWORD dwFamily);
80 DWORD WINAPI GetIcmpStatistics(PMIB_ICMP pStats);
82 DWORD WINAPI GetIcmpStatisticsEx(PMIB_ICMP_EX pStats, DWORD dwFamily);
84 DWORD WINAPI GetTcpStatistics(PMIB_TCPSTATS pStats);
86 DWORD WINAPI GetTcpStatisticsEx(PMIB_TCPSTATS pStats, DWORD dwFamily);
88 DWORD WINAPI GetUdpStatistics(PMIB_UDPSTATS pStats);
90 DWORD WINAPI GetUdpStatisticsEx(PMIB_UDPSTATS pStats, DWORD dwFamily);
92 DWORD WINAPI SetIfEntry(PMIB_IFROW pIfRow);
94 DWORD WINAPI CreateIpForwardEntry(PMIB_IPFORWARDROW pRoute);
96 DWORD WINAPI SetIpForwardEntry(PMIB_IPFORWARDROW pRoute);
98 DWORD WINAPI DeleteIpForwardEntry(PMIB_IPFORWARDROW pRoute);
100 DWORD WINAPI SetIpStatistics(PMIB_IPSTATS pIpStats);
102 DWORD WINAPI SetIpTTL(UINT nTTL);
104 DWORD WINAPI CreateIpNetEntry(PMIB_IPNETROW pArpEntry);
106 DWORD WINAPI SetIpNetEntry(PMIB_IPNETROW pArpEntry);
108 DWORD WINAPI DeleteIpNetEntry(PMIB_IPNETROW pArpEntry);
110 DWORD WINAPI FlushIpNetTable(DWORD dwIfIndex);
112 DWORD WINAPI CreateProxyArpEntry(DWORD dwAddress, DWORD dwMask,
113 DWORD dwIfIndex);
115 DWORD WINAPI DeleteProxyArpEntry(DWORD dwAddress, DWORD dwMask,
116 DWORD dwIfIndex);
118 DWORD WINAPI SetTcpEntry(PMIB_TCPROW pTcpRow);
120 DWORD WINAPI GetInterfaceInfo(PIP_INTERFACE_INFO pIfTable, PULONG dwOutBufLen);
122 DWORD WINAPI GetUniDirectionalAdapterInfo(
123 PIP_UNIDIRECTIONAL_ADAPTER_ADDRESS pIPIfInfo, PULONG dwOutBufLen);
125 DWORD WINAPI GetBestInterface(IPAddr dwDestAddr, PDWORD pdwBestIfIndex);
127 #ifdef __WINE_WINSOCKAPI_STDLIB_H
128 DWORD WINAPI GetBestInterfaceEx(
129 #ifdef USE_WS_PREFIX
130 struct WS_sockaddr *pDestAddr,
131 #else
132 struct sockaddr *pDestAddr,
133 #endif
134 PDWORD pdwBestIfIndex);
135 #endif
137 DWORD WINAPI GetBestRoute(DWORD dwDestAddr, DWORD dwSourceAddr,
138 PMIB_IPFORWARDROW pBestRoute);
140 DWORD WINAPI NotifyAddrChange(PHANDLE Handle, LPOVERLAPPED overlapped);
142 DWORD WINAPI NotifyRouteChange(PHANDLE Handle, LPOVERLAPPED overlapped);
144 BOOL WINAPI CancelIPChangeNotify(LPOVERLAPPED overlapped);
146 DWORD WINAPI GetAdapterIndex(IN LPWSTR AdapterName, OUT PULONG IfIndex);
148 DWORD WINAPI AddIPAddress(IPAddr Address, IPMask IpMask, DWORD IfIndex,
149 PULONG NTEContext, PULONG NTEInstance);
151 DWORD WINAPI DeleteIPAddress(ULONG NTEContext);
153 DWORD WINAPI GetNetworkParams(PFIXED_INFO pFixedInfo, PULONG pOutBufLen);
155 DWORD WINAPI GetAdaptersInfo(PIP_ADAPTER_INFO pAdapterInfo, PULONG pOutBufLen);
157 DWORD WINAPI GetPerAdapterInfo(ULONG IfIndex,
158 PIP_PER_ADAPTER_INFO pPerAdapterInfo, PULONG pOutBufLen);
160 DWORD WINAPI IpReleaseAddress(PIP_ADAPTER_INDEX_MAP AdapterInfo);
162 DWORD WINAPI IpRenewAddress(PIP_ADAPTER_INDEX_MAP AdapterInfo);
164 DWORD WINAPI SendARP(IPAddr DestIP, IPAddr SrcIP, PULONG pMacAddr,
165 PULONG PhyAddrLen);
167 BOOL WINAPI GetRTTAndHopCount(IPAddr DestIpAddress, PULONG HopCount,
168 ULONG MaxHops, PULONG RTT);
170 DWORD WINAPI GetFriendlyIfIndex(DWORD IfIndex);
172 DWORD WINAPI EnableRouter(HANDLE* pHandle, OVERLAPPED* pOverlapped);
174 DWORD WINAPI UnenableRouter(OVERLAPPED* pOverlapped, LPDWORD lpdwEnableCount);
176 #ifdef _WINSOCK2API_
177 ULONG WINAPI GetAdaptersAddresses(ULONG family, ULONG flags, PVOID reserved,
178 PIP_ADAPTER_ADDRESSES aa, PULONG buflen);
179 #endif
181 DWORD WINAPI AllocateAndGetUdpTableFromStack(PMIB_UDPTABLE *ppUdpTable, BOOL bOrder, HANDLE heap, DWORD flags);
182 DWORD WINAPI AllocateAndGetTcpTableFromStack(PMIB_TCPTABLE *ppTcpTable, BOOL bOrder, HANDLE heap, DWORD flags);
183 DWORD WINAPI AllocateAndGetTcpExTableFromStack(VOID **ppTcpTable, BOOL bOrder, HANDLE heap, DWORD flags, DWORD family);
184 DWORD WINAPI AllocateAndGetIpNetTableFromStack(PMIB_IPNETTABLE *ppIpNetTable, BOOL bOrder, HANDLE heap, DWORD flags);
185 DWORD WINAPI AllocateAndGetIpForwardTableFromStack(PMIB_IPFORWARDTABLE *ppIpForwardTable, BOOL bOrder, HANDLE heap, DWORD flags);
187 typedef enum NET_ADDRESS_FORMAT_ {
188 NET_ADDRESS_FORMAT_UNSPECIFIED,
189 NET_ADDRESS_DNS_NAME,
190 NET_ADDRESS_IPV4,
191 NET_ADDRESS_IPV6,
192 } NET_ADDRESS_FORMAT;
194 #ifdef __WINE_WINDNS_H
196 typedef struct NET_ADDRESS_INFO_
198 NET_ADDRESS_FORMAT Format;
199 union
201 struct
203 WCHAR Address[DNS_MAX_NAME_BUFFER_LENGTH];
204 WCHAR Port[6];
205 } NamedAddress;
206 SOCKADDR_IN Ipv4Address;
207 SOCKADDR_IN6 Ipv6Address;
208 SOCKADDR IpAddress;
209 } DUMMYUNIONNAME;
210 } NET_ADDRESS_INFO, *PNET_ADDRESS_INFO;
212 #endif /* __WINE_WINDNS_H */
214 #ifdef __cplusplus
216 #endif
218 #endif /* WINE_IPHLPAPI_H__ */