msi: Make MsiSetInstallLevel() RPC-compatible.
[wine.git] / include / netioapi.h
blobf15a80fdc80051be66e4d0fc0bc683903409c010
1 /*
2 * Copyright 2015 Hans Leidekker for CodeWeavers
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
19 #ifndef __WINE_NETIOAPI_H
20 #define __WINE_NETIOAPI_H
22 #include <ntddndis.h>
24 #ifndef ANY_SIZE
25 #define ANY_SIZE 1
26 #endif
28 typedef enum _MIB_IF_TABLE_LEVEL
30 MibIfTableNormal,
31 MibIfTableRaw,
32 MibIfTableNormalWithoutStatistics,
33 } MIB_IF_TABLE_LEVEL, *PMIB_IF_TABLE_LEVEL;
35 typedef enum _MIB_NOTIFICATION_TYPE
37 MibParameterNotification,
38 MibAddInstance,
39 MibDeleteInstance,
40 MibInitialNotification,
41 } MIB_NOTIFICATION_TYPE, *PMIB_NOTIFICATION_TYPE;
43 typedef struct _MIB_IF_ROW2
45 NET_LUID InterfaceLuid;
46 NET_IFINDEX InterfaceIndex;
47 GUID InterfaceGuid;
48 WCHAR Alias[IF_MAX_STRING_SIZE + 1];
49 WCHAR Description[IF_MAX_STRING_SIZE + 1];
50 ULONG PhysicalAddressLength;
51 UCHAR PhysicalAddress[IF_MAX_PHYS_ADDRESS_LENGTH];
52 UCHAR PermanentPhysicalAddress[IF_MAX_PHYS_ADDRESS_LENGTH];
53 ULONG Mtu;
54 IFTYPE Type;
55 TUNNEL_TYPE TunnelType;
56 NDIS_MEDIUM MediaType;
57 NDIS_PHYSICAL_MEDIUM PhysicalMediumType;
58 NET_IF_ACCESS_TYPE AccessType;
59 NET_IF_DIRECTION_TYPE DirectionType;
60 struct
62 BOOLEAN HardwareInterface : 1;
63 BOOLEAN FilterInterface : 1;
64 BOOLEAN ConnectorPresent : 1;
65 BOOLEAN NotAuthenticated : 1;
66 BOOLEAN NotMediaConnected : 1;
67 BOOLEAN Paused : 1;
68 BOOLEAN LowPower : 1;
69 BOOLEAN EndPointInterface : 1;
70 } InterfaceAndOperStatusFlags;
71 IF_OPER_STATUS OperStatus;
72 NET_IF_ADMIN_STATUS AdminStatus;
73 NET_IF_MEDIA_CONNECT_STATE MediaConnectState;
74 NET_IF_NETWORK_GUID NetworkGuid;
75 NET_IF_CONNECTION_TYPE ConnectionType;
76 ULONG64 TransmitLinkSpeed;
77 ULONG64 ReceiveLinkSpeed;
78 ULONG64 InOctets;
79 ULONG64 InUcastPkts;
80 ULONG64 InNUcastPkts;
81 ULONG64 InDiscards;
82 ULONG64 InErrors;
83 ULONG64 InUnknownProtos;
84 ULONG64 InUcastOctets;
85 ULONG64 InMulticastOctets;
86 ULONG64 InBroadcastOctets;
87 ULONG64 OutOctets;
88 ULONG64 OutUcastPkts;
89 ULONG64 OutNUcastPkts;
90 ULONG64 OutDiscards;
91 ULONG64 OutErrors;
92 ULONG64 OutUcastOctets;
93 ULONG64 OutMulticastOctets;
94 ULONG64 OutBroadcastOctets;
95 ULONG64 OutQLen;
96 } MIB_IF_ROW2, *PMIB_IF_ROW2;
98 typedef struct _MIB_IF_TABLE2
100 ULONG NumEntries;
101 MIB_IF_ROW2 Table[1];
102 } MIB_IF_TABLE2, *PMIB_IF_TABLE2;
104 typedef struct _MIB_IPINTERFACE_ROW
106 ADDRESS_FAMILY Family;
107 NET_LUID InterfaceLuid;
108 NET_IFINDEX InterfaceIndex;
109 ULONG MaxReassemblySize;
110 ULONG64 InterfaceIdentifier;
111 ULONG MinRouterAdvertisementInterval;
112 ULONG MaxRouterAdvertisementInterval;
113 BOOLEAN AdvertisingEnabled;
114 BOOLEAN ForwardingEnabled;
115 BOOLEAN WeakHostSend;
116 BOOLEAN WeakHostReceive;
117 BOOLEAN UseAutomaticMetric;
118 BOOLEAN UseNeighborUnreachabilityDetection;
119 BOOLEAN ManagedAddressConfigurationSupported;
120 BOOLEAN OtherStatefulConfigurationSupported;
121 BOOLEAN AdvertiseDefaultRoute;
122 NL_ROUTER_DISCOVERY_BEHAVIOR RouterDiscoveryBehavior;
123 ULONG DadTransmits;
124 ULONG BaseReachableTime;
125 ULONG RetransmitTime;
126 ULONG PathMtuDiscoveryTimeout;
127 NL_LINK_LOCAL_ADDRESS_BEHAVIOR LinkLocalAddressBehavior;
128 ULONG LinkLocalAddressTimeout;
129 ULONG ZoneIndices[ScopeLevelCount];
130 ULONG SitePrefixLength;
131 ULONG Metric;
132 ULONG NlMtu;
133 BOOLEAN Connected;
134 BOOLEAN SupportsWakeUpPatterns;
135 BOOLEAN SupportsNeighborDiscovery;
136 BOOLEAN SupportsRouterDiscovery;
137 ULONG ReachableTime;
138 NL_INTERFACE_OFFLOAD_ROD TransmitOffload;
139 NL_INTERFACE_OFFLOAD_ROD ReceiveOffload;
140 BOOLEAN DisableDefaultRoutes;
141 } MIB_IPINTERFACE_ROW, *PMIB_IPINTERFACE_ROW;
143 typedef struct _MIB_UNICASTIPADDRESS_ROW
145 SOCKADDR_INET Address;
146 NET_LUID InterfaceLuid;
147 NET_IFINDEX InterfaceIndex;
148 NL_PREFIX_ORIGIN PrefixOrigin;
149 NL_SUFFIX_ORIGIN SuffixOrigin;
150 ULONG ValidLifetime;
151 ULONG PreferredLifetime;
152 UINT8 OnLinkPrefixLength;
153 BOOLEAN SkipAsSource;
154 NL_DAD_STATE DadState;
155 SCOPE_ID ScopeId;
156 LARGE_INTEGER CreationTimeStamp;
157 } MIB_UNICASTIPADDRESS_ROW, *PMIB_UNICASTIPADDRESS_ROW;
159 typedef struct _MIB_UNICASTIPADDRESS_TABLE
161 ULONG NumEntries;
162 MIB_UNICASTIPADDRESS_ROW Table[1];
163 } MIB_UNICASTIPADDRESS_TABLE, *PMIB_UNICASTIPADDRESS_TABLE;
165 typedef struct _IP_ADDRESS_PREFIX
167 SOCKADDR_INET Prefix;
168 UINT8 PrefixLength;
169 } IP_ADDRESS_PREFIX, *PIP_ADDRESS_PREFIX;
171 typedef struct _MIB_IPFORWARD_ROW2
173 NET_LUID InterfaceLuid;
174 NET_IFINDEX InterfaceIndex;
175 IP_ADDRESS_PREFIX DestinationPrefix;
176 SOCKADDR_INET NextHop;
177 UCHAR SitePrefixLength;
178 ULONG ValidLifetime;
179 ULONG PreferredLifetime;
180 ULONG Metric;
181 NL_ROUTE_PROTOCOL Protocol;
182 BOOLEAN Loopback;
183 BOOLEAN AutoconfigureAddress;
184 BOOLEAN Publish;
185 BOOLEAN Immortal;
186 ULONG Age;
187 NL_ROUTE_ORIGIN Origin;
188 } MIB_IPFORWARD_ROW2, *PMIB_IPFORWARD_ROW2;
190 typedef struct _MIB_IPFORWARD_TABLE2
192 ULONG NumEntries;
193 MIB_IPFORWARD_ROW2 Table[ANY_SIZE];
194 } MIB_IPFORWARD_TABLE2, *PMIB_IPFORWARD_TABLE2;
196 typedef VOID (WINAPI *PIPINTERFACE_CHANGE_CALLBACK)(PVOID, PMIB_IPINTERFACE_ROW,
197 MIB_NOTIFICATION_TYPE);
198 typedef VOID (WINAPI *PUNICAST_IPADDRESS_CHANGE_CALLBACK)(PVOID, PMIB_UNICASTIPADDRESS_ROW,
199 MIB_NOTIFICATION_TYPE);
201 DWORD WINAPI ConvertInterfaceGuidToLuid(const GUID*,NET_LUID*);
202 DWORD WINAPI ConvertInterfaceIndexToLuid(NET_IFINDEX,NET_LUID*);
203 DWORD WINAPI ConvertInterfaceLuidToGuid(const NET_LUID*,GUID*);
204 DWORD WINAPI ConvertInterfaceLuidToIndex(const NET_LUID*,NET_IFINDEX*);
205 DWORD WINAPI ConvertInterfaceLuidToNameA(const NET_LUID*,char*,SIZE_T);
206 DWORD WINAPI ConvertInterfaceLuidToNameW(const NET_LUID*,WCHAR*,SIZE_T);
207 DWORD WINAPI ConvertInterfaceNameToLuidA(const char*,NET_LUID*);
208 DWORD WINAPI ConvertInterfaceNameToLuidW(const WCHAR*,NET_LUID*);
209 DWORD WINAPI ConvertLengthToIpv4Mask(ULONG,ULONG*);
210 void WINAPI FreeMibTable(void*);
211 DWORD WINAPI GetIfEntry2(MIB_IF_ROW2*);
212 DWORD WINAPI GetIfTable2(MIB_IF_TABLE2**);
213 DWORD WINAPI GetUnicastIpAddressEntry(MIB_UNICASTIPADDRESS_ROW*);
214 PCHAR WINAPI if_indextoname(NET_IFINDEX,PCHAR);
215 NET_IFINDEX WINAPI if_nametoindex(PCSTR);
217 #endif /* __WINE_NETIOAPI_H */