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