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__
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
,
64 DWORD WINAPI
GetIpNetTable(PMIB_IPNETTABLE pIpNetTable
, PULONG pdwSize
,
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
GetTcpStatistics(PMIB_TCPSTATS pStats
);
84 DWORD WINAPI
GetTcpStatisticsEx(PMIB_TCPSTATS pStats
, DWORD dwFamily
);
86 DWORD WINAPI
GetUdpStatistics(PMIB_UDPSTATS pStats
);
88 DWORD WINAPI
GetUdpStatisticsEx(PMIB_UDPSTATS pStats
, DWORD dwFamily
);
90 DWORD WINAPI
SetIfEntry(PMIB_IFROW pIfRow
);
92 DWORD WINAPI
CreateIpForwardEntry(PMIB_IPFORWARDROW pRoute
);
94 DWORD WINAPI
SetIpForwardEntry(PMIB_IPFORWARDROW pRoute
);
96 DWORD WINAPI
DeleteIpForwardEntry(PMIB_IPFORWARDROW pRoute
);
98 DWORD WINAPI
SetIpStatistics(PMIB_IPSTATS pIpStats
);
100 DWORD WINAPI
SetIpTTL(UINT nTTL
);
102 DWORD WINAPI
CreateIpNetEntry(PMIB_IPNETROW pArpEntry
);
104 DWORD WINAPI
SetIpNetEntry(PMIB_IPNETROW pArpEntry
);
106 DWORD WINAPI
DeleteIpNetEntry(PMIB_IPNETROW pArpEntry
);
108 DWORD WINAPI
FlushIpNetTable(DWORD dwIfIndex
);
110 DWORD WINAPI
CreateProxyArpEntry(DWORD dwAddress
, DWORD dwMask
,
113 DWORD WINAPI
DeleteProxyArpEntry(DWORD dwAddress
, DWORD dwMask
,
116 DWORD WINAPI
SetTcpEntry(PMIB_TCPROW pTcpRow
);
118 DWORD WINAPI
GetInterfaceInfo(PIP_INTERFACE_INFO pIfTable
, PULONG dwOutBufLen
);
120 DWORD WINAPI
GetUniDirectionalAdapterInfo(
121 PIP_UNIDIRECTIONAL_ADAPTER_ADDRESS pIPIfInfo
, PULONG dwOutBufLen
);
123 DWORD WINAPI
GetBestInterface(IPAddr dwDestAddr
, PDWORD pdwBestIfIndex
);
125 #ifdef __WINE_WINSOCKAPI_STDLIB_H
126 DWORD WINAPI
GetBestInterfaceEx(
128 struct WS_sockaddr
*pDestAddr
,
130 struct sockaddr
*pDestAddr
,
132 PDWORD pdwBestIfIndex
);
135 DWORD WINAPI
GetBestRoute(DWORD dwDestAddr
, DWORD dwSourceAddr
,
136 PMIB_IPFORWARDROW pBestRoute
);
138 DWORD WINAPI
NotifyAddrChange(PHANDLE Handle
, LPOVERLAPPED overlapped
);
140 DWORD WINAPI
NotifyRouteChange(PHANDLE Handle
, LPOVERLAPPED overlapped
);
142 BOOL WINAPI
CancelIPChangeNotify(LPOVERLAPPED overlapped
);
144 DWORD WINAPI
GetAdapterIndex(IN LPWSTR AdapterName
, OUT PULONG IfIndex
);
146 DWORD WINAPI
AddIPAddress(IPAddr Address
, IPMask IpMask
, DWORD IfIndex
,
147 PULONG NTEContext
, PULONG NTEInstance
);
149 DWORD WINAPI
DeleteIPAddress(ULONG NTEContext
);
151 DWORD WINAPI
GetNetworkParams(PFIXED_INFO pFixedInfo
, PULONG pOutBufLen
);
153 DWORD WINAPI
GetAdaptersInfo(PIP_ADAPTER_INFO pAdapterInfo
, PULONG pOutBufLen
);
155 DWORD WINAPI
GetPerAdapterInfo(ULONG IfIndex
,
156 PIP_PER_ADAPTER_INFO pPerAdapterInfo
, PULONG pOutBufLen
);
158 DWORD WINAPI
IpReleaseAddress(PIP_ADAPTER_INDEX_MAP AdapterInfo
);
160 DWORD WINAPI
IpRenewAddress(PIP_ADAPTER_INDEX_MAP AdapterInfo
);
162 DWORD WINAPI
SendARP(IPAddr DestIP
, IPAddr SrcIP
, PULONG pMacAddr
,
165 BOOL WINAPI
GetRTTAndHopCount(IPAddr DestIpAddress
, PULONG HopCount
,
166 ULONG MaxHops
, PULONG RTT
);
168 DWORD WINAPI
GetFriendlyIfIndex(DWORD IfIndex
);
170 DWORD WINAPI
EnableRouter(HANDLE
* pHandle
, OVERLAPPED
* pOverlapped
);
172 DWORD WINAPI
UnenableRouter(OVERLAPPED
* pOverlapped
, LPDWORD lpdwEnableCount
);
175 ULONG WINAPI
GetAdaptersAddresses(ULONG family
, ULONG flags
, PVOID reserved
,
176 PIP_ADAPTER_ADDRESSES aa
, PULONG buflen
);
179 DWORD WINAPI
AllocateAndGetUdpTableFromStack(PMIB_UDPTABLE
*ppUdpTable
, BOOL bOrder
, HANDLE heap
, DWORD flags
);
180 DWORD WINAPI
AllocateAndGetTcpTableFromStack(PMIB_TCPTABLE
*ppTcpTable
, BOOL bOrder
, HANDLE heap
, DWORD flags
);
181 DWORD WINAPI
AllocateAndGetTcpExTableFromStack(VOID
**ppTcpTable
, BOOL bOrder
, HANDLE heap
, DWORD flags
, DWORD family
);
182 DWORD WINAPI
AllocateAndGetIpNetTableFromStack(PMIB_IPNETTABLE
*ppIpNetTable
, BOOL bOrder
, HANDLE heap
, DWORD flags
);
183 DWORD WINAPI
AllocateAndGetIpForwardTableFromStack(PMIB_IPFORWARDTABLE
*ppIpForwardTable
, BOOL bOrder
, HANDLE heap
, DWORD flags
);
185 typedef enum NET_ADDRESS_FORMAT_
{
186 NET_ADDRESS_FORMAT_UNSPECIFIED
,
187 NET_ADDRESS_DNS_NAME
,
190 } NET_ADDRESS_FORMAT
;
192 #ifdef __WINE_WINDNS_H
194 typedef struct NET_ADDRESS_INFO_
196 NET_ADDRESS_FORMAT Format
;
201 WCHAR Address
[DNS_MAX_NAME_BUFFER_LENGTH
];
204 SOCKADDR_IN Ipv4Address
;
205 SOCKADDR_IN6 Ipv6Address
;
208 } NET_ADDRESS_INFO
, *PNET_ADDRESS_INFO
;
210 #endif /* __WINE_WINDNS_H */
216 #endif /* WINE_IPHLPAPI_H__ */