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
24 typedef enum _MIB_NOTIFICATION_TYPE
26 MibParameterNotification
,
29 MibInitialNotification
,
30 } MIB_NOTIFICATION_TYPE
, *PMIB_NOTIFICATION_TYPE
;
32 typedef struct _MIB_IF_ROW2
34 NET_LUID InterfaceLuid
;
35 NET_IFINDEX InterfaceIndex
;
37 WCHAR Alias
[IF_MAX_STRING_SIZE
+ 1];
38 WCHAR Description
[IF_MAX_STRING_SIZE
+ 1];
39 ULONG PhysicalAddressLength
;
40 UCHAR PhysicalAddress
[IF_MAX_PHYS_ADDRESS_LENGTH
];
41 UCHAR PermanentPhysicalAddress
[IF_MAX_PHYS_ADDRESS_LENGTH
];
44 TUNNEL_TYPE TunnelType
;
45 NDIS_MEDIUM MediaType
;
46 NDIS_PHYSICAL_MEDIUM PhysicalMediumType
;
47 NET_IF_ACCESS_TYPE AccessType
;
48 NET_IF_DIRECTION_TYPE DirectionType
;
51 BOOLEAN HardwareInterface
: 1;
52 BOOLEAN FilterInterface
: 1;
53 BOOLEAN ConnectorPresent
: 1;
54 BOOLEAN NotAuthenticated
: 1;
55 BOOLEAN NotMediaConnected
: 1;
58 BOOLEAN EndPointInterface
: 1;
59 } InterfaceAndOperStatusFlags
;
60 IF_OPER_STATUS OperStatus
;
61 NET_IF_ADMIN_STATUS AdminStatus
;
62 NET_IF_MEDIA_CONNECT_STATE MediaConnectState
;
63 NET_IF_NETWORK_GUID NetworkGuid
;
64 NET_IF_CONNECTION_TYPE ConnectionType
;
65 ULONG64 TransmitLinkSpeed
;
66 ULONG64 ReceiveLinkSpeed
;
72 ULONG64 InUnknownProtos
;
73 ULONG64 InUcastOctets
;
74 ULONG64 InMulticastOctets
;
75 ULONG64 InBroadcastOctets
;
78 ULONG64 OutNUcastPkts
;
81 ULONG64 OutUcastOctets
;
82 ULONG64 OutMulticastOctets
;
83 ULONG64 OutBroadcastOctets
;
85 } MIB_IF_ROW2
, *PMIB_IF_ROW2
;
87 typedef struct _MIB_IF_TABLE2
91 } MIB_IF_TABLE2
, *PMIB_IF_TABLE2
;
93 typedef struct _MIB_IPINTERFACE_ROW
95 ADDRESS_FAMILY Family
;
96 NET_LUID InterfaceLuid
;
97 NET_IFINDEX InterfaceIndex
;
98 ULONG MaxReassemblySize
;
99 ULONG64 InterfaceIdentifier
;
100 ULONG MinRouterAdvertisementInterval
;
101 ULONG MaxRouterAdvertisementInterval
;
102 BOOLEAN AdvertisingEnabled
;
103 BOOLEAN ForwardingEnabled
;
104 BOOLEAN WeakHostSend
;
105 BOOLEAN WeakHostReceive
;
106 BOOLEAN UseAutomaticMetric
;
107 BOOLEAN UseNeighborUnreachabilityDetection
;
108 BOOLEAN ManagedAddressConfigurationSupported
;
109 BOOLEAN OtherStatefulConfigurationSupported
;
110 BOOLEAN AdvertiseDefaultRoute
;
111 NL_ROUTER_DISCOVERY_BEHAVIOR RouterDiscoveryBehavior
;
113 ULONG BaseReachableTime
;
114 ULONG RetransmitTime
;
115 ULONG PathMtuDiscoveryTimeout
;
116 NL_LINK_LOCAL_ADDRESS_BEHAVIOR LinkLocalAddressBehavior
;
117 ULONG LinkLocalAddressTimeout
;
118 ULONG ZoneIndices
[ScopeLevelCount
];
119 ULONG SitePrefixLength
;
123 BOOLEAN SupportsWakeUpPatterns
;
124 BOOLEAN SupportsNeighborDiscovery
;
125 BOOLEAN SupportsRouterDiscovery
;
127 NL_INTERFACE_OFFLOAD_ROD TransmitOffload
;
128 NL_INTERFACE_OFFLOAD_ROD ReceiveOffload
;
129 BOOLEAN DisableDefaultRoutes
;
130 } MIB_IPINTERFACE_ROW
, *PMIB_IPINTERFACE_ROW
;
132 typedef struct _MIB_UNICASTIPADDRESS_ROW
134 SOCKADDR_INET Address
;
135 NET_LUID InterfaceLuid
;
136 NET_IFINDEX InterfaceIndex
;
137 NL_PREFIX_ORIGIN PrefixOrigin
;
138 NL_SUFFIX_ORIGIN SuffixOrigin
;
140 ULONG PreferredLifetime
;
141 UINT8 OnLinkPrefixLength
;
142 BOOLEAN SkipAsSource
;
143 NL_DAD_STATE DadState
;
145 LARGE_INTEGER CreationTimeStamp
;
146 } MIB_UNICASTIPADDRESS_ROW
, *PMIB_UNICASTIPADDRESS_ROW
;
148 typedef struct _MIB_UNICASTIPADDRESS_TABLE
151 MIB_UNICASTIPADDRESS_ROW Table
[1];
152 } MIB_UNICASTIPADDRESS_TABLE
, *PMIB_UNICASTIPADDRESS_TABLE
;
154 typedef VOID (WINAPI
*PIPINTERFACE_CHANGE_CALLBACK
)(PVOID
, PMIB_IPINTERFACE_ROW
,
155 MIB_NOTIFICATION_TYPE
);
156 typedef VOID (WINAPI
*PUNICAST_IPADDRESS_CHANGE_CALLBACK
)(PVOID
, PMIB_UNICASTIPADDRESS_ROW
,
157 MIB_NOTIFICATION_TYPE
);
159 DWORD WINAPI
ConvertInterfaceGuidToLuid(const GUID
*,NET_LUID
*);
160 DWORD WINAPI
ConvertInterfaceIndexToLuid(NET_IFINDEX
,NET_LUID
*);
161 DWORD WINAPI
ConvertInterfaceLuidToGuid(const NET_LUID
*,GUID
*);
162 DWORD WINAPI
ConvertInterfaceLuidToIndex(const NET_LUID
*,NET_IFINDEX
*);
163 DWORD WINAPI
ConvertInterfaceLuidToNameA(const NET_LUID
*,char*,SIZE_T
);
164 DWORD WINAPI
ConvertInterfaceLuidToNameW(const NET_LUID
*,WCHAR
*,SIZE_T
);
165 DWORD WINAPI
ConvertInterfaceNameToLuidA(const char*,NET_LUID
*);
166 DWORD WINAPI
ConvertInterfaceNameToLuidW(const WCHAR
*,NET_LUID
*);
167 void WINAPI
FreeMibTable(void*);
168 DWORD WINAPI
GetIfEntry2(MIB_IF_ROW2
*);
169 DWORD WINAPI
GetIfTable2(MIB_IF_TABLE2
**);
170 DWORD WINAPI
GetUnicastIpAddressEntry(MIB_UNICASTIPADDRESS_ROW
*);
172 #endif /* __WINE_NETIOAPI_H */