user32: Implement Get/SetThreadDpiAwarenessContext().
[wine.git] / include / netioapi.h
blob11cadf6e374d057db1e59f836a94444c6c9b40be
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 typedef enum _MIB_IF_TABLE_LEVEL
26 MibIfTableNormal,
27 MibIfTableRaw,
28 MibIfTableNormalWithoutStatistics,
29 } MIB_IF_TABLE_LEVEL, *PMIB_IF_TABLE_LEVEL;
31 typedef enum _MIB_NOTIFICATION_TYPE
33 MibParameterNotification,
34 MibAddInstance,
35 MibDeleteInstance,
36 MibInitialNotification,
37 } MIB_NOTIFICATION_TYPE, *PMIB_NOTIFICATION_TYPE;
39 typedef struct _MIB_IF_ROW2
41 NET_LUID InterfaceLuid;
42 NET_IFINDEX InterfaceIndex;
43 GUID InterfaceGuid;
44 WCHAR Alias[IF_MAX_STRING_SIZE + 1];
45 WCHAR Description[IF_MAX_STRING_SIZE + 1];
46 ULONG PhysicalAddressLength;
47 UCHAR PhysicalAddress[IF_MAX_PHYS_ADDRESS_LENGTH];
48 UCHAR PermanentPhysicalAddress[IF_MAX_PHYS_ADDRESS_LENGTH];
49 ULONG Mtu;
50 IFTYPE Type;
51 TUNNEL_TYPE TunnelType;
52 NDIS_MEDIUM MediaType;
53 NDIS_PHYSICAL_MEDIUM PhysicalMediumType;
54 NET_IF_ACCESS_TYPE AccessType;
55 NET_IF_DIRECTION_TYPE DirectionType;
56 struct
58 BOOLEAN HardwareInterface : 1;
59 BOOLEAN FilterInterface : 1;
60 BOOLEAN ConnectorPresent : 1;
61 BOOLEAN NotAuthenticated : 1;
62 BOOLEAN NotMediaConnected : 1;
63 BOOLEAN Paused : 1;
64 BOOLEAN LowPower : 1;
65 BOOLEAN EndPointInterface : 1;
66 } InterfaceAndOperStatusFlags;
67 IF_OPER_STATUS OperStatus;
68 NET_IF_ADMIN_STATUS AdminStatus;
69 NET_IF_MEDIA_CONNECT_STATE MediaConnectState;
70 NET_IF_NETWORK_GUID NetworkGuid;
71 NET_IF_CONNECTION_TYPE ConnectionType;
72 ULONG64 TransmitLinkSpeed;
73 ULONG64 ReceiveLinkSpeed;
74 ULONG64 InOctets;
75 ULONG64 InUcastPkts;
76 ULONG64 InNUcastPkts;
77 ULONG64 InDiscards;
78 ULONG64 InErrors;
79 ULONG64 InUnknownProtos;
80 ULONG64 InUcastOctets;
81 ULONG64 InMulticastOctets;
82 ULONG64 InBroadcastOctets;
83 ULONG64 OutOctets;
84 ULONG64 OutUcastPkts;
85 ULONG64 OutNUcastPkts;
86 ULONG64 OutDiscards;
87 ULONG64 OutErrors;
88 ULONG64 OutUcastOctets;
89 ULONG64 OutMulticastOctets;
90 ULONG64 OutBroadcastOctets;
91 ULONG64 OutQLen;
92 } MIB_IF_ROW2, *PMIB_IF_ROW2;
94 typedef struct _MIB_IF_TABLE2
96 ULONG NumEntries;
97 MIB_IF_ROW2 Table[1];
98 } MIB_IF_TABLE2, *PMIB_IF_TABLE2;
100 typedef struct _MIB_IPINTERFACE_ROW
102 ADDRESS_FAMILY Family;
103 NET_LUID InterfaceLuid;
104 NET_IFINDEX InterfaceIndex;
105 ULONG MaxReassemblySize;
106 ULONG64 InterfaceIdentifier;
107 ULONG MinRouterAdvertisementInterval;
108 ULONG MaxRouterAdvertisementInterval;
109 BOOLEAN AdvertisingEnabled;
110 BOOLEAN ForwardingEnabled;
111 BOOLEAN WeakHostSend;
112 BOOLEAN WeakHostReceive;
113 BOOLEAN UseAutomaticMetric;
114 BOOLEAN UseNeighborUnreachabilityDetection;
115 BOOLEAN ManagedAddressConfigurationSupported;
116 BOOLEAN OtherStatefulConfigurationSupported;
117 BOOLEAN AdvertiseDefaultRoute;
118 NL_ROUTER_DISCOVERY_BEHAVIOR RouterDiscoveryBehavior;
119 ULONG DadTransmits;
120 ULONG BaseReachableTime;
121 ULONG RetransmitTime;
122 ULONG PathMtuDiscoveryTimeout;
123 NL_LINK_LOCAL_ADDRESS_BEHAVIOR LinkLocalAddressBehavior;
124 ULONG LinkLocalAddressTimeout;
125 ULONG ZoneIndices[ScopeLevelCount];
126 ULONG SitePrefixLength;
127 ULONG Metric;
128 ULONG NlMtu;
129 BOOLEAN Connected;
130 BOOLEAN SupportsWakeUpPatterns;
131 BOOLEAN SupportsNeighborDiscovery;
132 BOOLEAN SupportsRouterDiscovery;
133 ULONG ReachableTime;
134 NL_INTERFACE_OFFLOAD_ROD TransmitOffload;
135 NL_INTERFACE_OFFLOAD_ROD ReceiveOffload;
136 BOOLEAN DisableDefaultRoutes;
137 } MIB_IPINTERFACE_ROW, *PMIB_IPINTERFACE_ROW;
139 typedef struct _MIB_UNICASTIPADDRESS_ROW
141 SOCKADDR_INET Address;
142 NET_LUID InterfaceLuid;
143 NET_IFINDEX InterfaceIndex;
144 NL_PREFIX_ORIGIN PrefixOrigin;
145 NL_SUFFIX_ORIGIN SuffixOrigin;
146 ULONG ValidLifetime;
147 ULONG PreferredLifetime;
148 UINT8 OnLinkPrefixLength;
149 BOOLEAN SkipAsSource;
150 NL_DAD_STATE DadState;
151 SCOPE_ID ScopeId;
152 LARGE_INTEGER CreationTimeStamp;
153 } MIB_UNICASTIPADDRESS_ROW, *PMIB_UNICASTIPADDRESS_ROW;
155 typedef struct _MIB_UNICASTIPADDRESS_TABLE
157 ULONG NumEntries;
158 MIB_UNICASTIPADDRESS_ROW Table[1];
159 } MIB_UNICASTIPADDRESS_TABLE, *PMIB_UNICASTIPADDRESS_TABLE;
161 typedef VOID (WINAPI *PIPINTERFACE_CHANGE_CALLBACK)(PVOID, PMIB_IPINTERFACE_ROW,
162 MIB_NOTIFICATION_TYPE);
163 typedef VOID (WINAPI *PUNICAST_IPADDRESS_CHANGE_CALLBACK)(PVOID, PMIB_UNICASTIPADDRESS_ROW,
164 MIB_NOTIFICATION_TYPE);
166 DWORD WINAPI ConvertInterfaceGuidToLuid(const GUID*,NET_LUID*);
167 DWORD WINAPI ConvertInterfaceIndexToLuid(NET_IFINDEX,NET_LUID*);
168 DWORD WINAPI ConvertInterfaceLuidToGuid(const NET_LUID*,GUID*);
169 DWORD WINAPI ConvertInterfaceLuidToIndex(const NET_LUID*,NET_IFINDEX*);
170 DWORD WINAPI ConvertInterfaceLuidToNameA(const NET_LUID*,char*,SIZE_T);
171 DWORD WINAPI ConvertInterfaceLuidToNameW(const NET_LUID*,WCHAR*,SIZE_T);
172 DWORD WINAPI ConvertInterfaceNameToLuidA(const char*,NET_LUID*);
173 DWORD WINAPI ConvertInterfaceNameToLuidW(const WCHAR*,NET_LUID*);
174 DWORD WINAPI ConvertLengthToIpv4Mask(ULONG,ULONG*);
175 void WINAPI FreeMibTable(void*);
176 DWORD WINAPI GetIfEntry2(MIB_IF_ROW2*);
177 DWORD WINAPI GetIfTable2(MIB_IF_TABLE2**);
178 DWORD WINAPI GetUnicastIpAddressEntry(MIB_UNICASTIPADDRESS_ROW*);
179 PCHAR WINAPI if_indextoname(NET_IFINDEX,PCHAR);
180 NET_IFINDEX WINAPI if_nametoindex(PCSTR);
182 #endif /* __WINE_NETIOAPI_H */