xref: /reactos/sdk/include/psdk/netioapi.h (revision 1734f297)
1 #ifndef _NETIOAPI_H_
2 #define _NETIOAPI_H_
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
8 #ifdef _IPHLPAPI_H
9     #define NETIO_STATUS DWORD
10     #define NETIOAPI_API_ WINAPI
11 #else
12     #define NETIO_STATUS NTSTATUS
13     #define NETIOAPI_API_ NTAPI
14 #endif
15 
16 #define NETIOAPI_API NETIO_STATUS NETIOAPI_API_
17 
18 #ifdef _WS2IPDEF_
19 #include <ntddndis.h>
20 #include <ifdef.h>
21 
22 typedef struct _MIB_IF_ROW2 {
23     NET_LUID InterfaceLuid;
24     NET_IFINDEX InterfaceIndex;
25     GUID InterfaceGuid;
26     WCHAR Alias[IF_MAX_STRING_SIZE + 1];
27     WCHAR Description[IF_MAX_STRING_SIZE + 1];
28     ULONG PhysicalAddressLength;
29     UCHAR PhysicalAddress[IF_MAX_PHYS_ADDRESS_LENGTH];
30     UCHAR PermanentPhysicalAddress[IF_MAX_PHYS_ADDRESS_LENGTH];
31     ULONG Mtu;
32     IFTYPE Type;
33     TUNNEL_TYPE TunnelType;
34     NDIS_MEDIUM MediaType;
35     NDIS_PHYSICAL_MEDIUM PhysicalMediumType;
36     NET_IF_ACCESS_TYPE AccessType;
37     NET_IF_DIRECTION_TYPE DirectionType;
38     struct {
39         BOOLEAN HardwareInterface : 1;
40         BOOLEAN FilterInterface : 1;
41         BOOLEAN ConnectorPresent : 1;
42         BOOLEAN NotAuthenticated : 1;
43         BOOLEAN NotMediaConnected : 1;
44         BOOLEAN Paused : 1;
45         BOOLEAN LowPower : 1;
46         BOOLEAN EndPointInterface : 1;
47     } InterfaceAndOperStatusFlags;
48     IF_OPER_STATUS OperStatus;
49     NET_IF_ADMIN_STATUS AdminStatus;
50     NET_IF_MEDIA_CONNECT_STATE MediaConnectState;
51     NET_IF_NETWORK_GUID NetworkGuid;
52     NET_IF_CONNECTION_TYPE ConnectionType;
53     ULONG64 TransmitLinkSpeed;
54     ULONG64 ReceiveLinkSpeed;
55     ULONG64 InOctets;
56     ULONG64 InUcastPkts;
57     ULONG64 InNUcastPkts;
58     ULONG64 InDiscards;
59     ULONG64 InErrors;
60     ULONG64 InUnknownProtos;
61     ULONG64 InUcastOctets;
62     ULONG64 InMulticastOctets;
63     ULONG64 InBroadcastOctets;
64     ULONG64 OutOctets;
65     ULONG64 OutUcastPkts;
66     ULONG64 OutNUcastPkts;
67     ULONG64 OutDiscards;
68     ULONG64 OutErrors;
69     ULONG64 OutUcastOctets;
70     ULONG64 OutMulticastOctets;
71     ULONG64 OutBroadcastOctets;
72     ULONG64 OutQLen;
73 } MIB_IF_ROW2, *PMIB_IF_ROW2;
74 
75 typedef struct _MIB_IF_TABLE2
76 {
77     ULONG NumEntries;
78     MIB_IF_ROW2 Table[1];
79 } MIB_IF_TABLE2, *PMIB_IF_TABLE2;
80 
81 NETIOAPI_API GetIfEntry2(IN OUT PMIB_IF_ROW2 Row);
82 NETIOAPI_API GetIfTable2(OUT PMIB_IF_TABLE2 *Table);
83 
84 #endif
85 
86 #ifdef __cplusplus
87 }
88 #endif
89 
90 #endif
91