Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iphlpapi support #802

Merged
merged 26 commits into from
Apr 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
8b193f1
Iphlpapi addition
BlackHoleFox Jun 2, 2019
0fd9b46
comply to pr comments in #772
hankbao Aug 26, 2019
31f5abc
replace SIZEOF_* macros with functions
hankbao Aug 26, 2019
6fac11e
feat: netioapi support
hankbao Aug 26, 2019
a9f1b66
fix typo & improve code
hankbao Aug 27, 2019
77cc497
avoid using keyword in macro
hankbao Aug 27, 2019
0ac32b8
specify enum values
hankbao Aug 27, 2019
c09eb9e
add missing functions in iphlpapi.h
hankbao Aug 27, 2019
cac4b31
add missing struct & SIZEOF_* functions in tcpmib
hankbao Aug 27, 2019
583f6ad
use latest defines & add SIZEOF_* functions
hankbao Aug 27, 2019
8186c4a
add missing parts and fix naming, sizing, packing issues
hankbao Aug 27, 2019
385fbce
add tests
hankbao Aug 27, 2019
3b5121f
remove comments & use DECLARE_HANDLE macro
hankbao Aug 28, 2019
f0e54ba
replace all SIZEOF_* functions with FIXME comments
hankbao Aug 28, 2019
a5fb87c
fix callback return type in netioapi & iphlpapi
hankbao Sep 9, 2019
ed70765
Update src/shared/ifdef.rs
hankbao Apr 6, 2020
5b4a0c0
Update src/shared/ifdef.rs
hankbao Apr 6, 2020
33062ce
Update src/shared/ifdef.rs
hankbao Apr 6, 2020
7a31121
Update src/shared/netioapi.rs
hankbao Apr 6, 2020
bfc5bc1
Update src/shared/netioapi.rs
hankbao Apr 6, 2020
216da0a
Update src/shared/nldef.rs
hankbao Apr 6, 2020
fdae58b
Update src/shared/nldef.rs
hankbao Apr 6, 2020
66706f9
fix field type error in MIB_IF_ROW2
hankbao Apr 6, 2020
68e6bf2
fix imports sorting
hankbao Apr 6, 2020
db0602d
fix imports
hankbao Apr 6, 2020
2f2d3fe
have the bitfield applied directly to a Flags field in IP_ADAPTER_ADD…
hankbao Apr 6, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,25 @@ hidpi = []
hidsdi = []
hidusage = []
ifdef = []
ifmib = []
in6addr = []
inaddr = []
intsafe = []
ipifcons = []
ipmib = []
iprtrmib = []
ks = []
ksmedia = []
ktmtypes = []
lmcons = []
minwindef = []
mmreg = []
mprapidef = []
mstcpip = []
mswsockdef = []
netioapi = []
nldef = []
ntddndis = []
ntddscsi = []
ntddser = []
ntdef = []
Expand All @@ -95,8 +102,11 @@ sddl = []
spellcheck = []
sspi = []
stralign = []
tcpestats = []
tcpmib = []
transportsettingcommon = []
tvout = []
udpmib = []
usb = []
usbiodef = []
usbspec = []
Expand All @@ -111,6 +121,7 @@ ws2ipdef = []
wtypes = []
wtypesbase = []
#ucrt
corecrt = []
#um
accctrl = []
aclapi = []
Expand Down Expand Up @@ -226,6 +237,9 @@ http = []
imm = []
interlockedapi = []
ioapiset = []
ipexport = []
iphlpapi = []
iptypes = []
jobapi = []
jobapi2 = []
knownfolders = []
Expand Down Expand Up @@ -302,6 +316,7 @@ reason = []
restartmanager = []
restrictederrorinfo = []
rmxfguid = []
rtinfo = []
sapi = []
sapi51 = []
sapi53 = []
Expand Down
19 changes: 17 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,26 @@ const DATA: &'static [(&'static str, &'static [&'static str], &'static [&'static
("hidpi", &["hidusage", "minwindef", "ntdef", "ntstatus", "winnt"], &["hid"]),
("hidsdi", &["guiddef", "hidpi", "minwindef", "winnt"], &["hid"]),
("hidusage", &["minwindef"], &[]),
("ifdef", &["basetsd", "minwindef"], &[]),
("ifdef", &["basetsd", "guiddef", "ntdef"], &[]),
("ifmib", &["ifdef", "ipifcons", "minwindef", "ntdef"], &[]),
("in6addr", &["minwindef"], &[]),
("inaddr", &["minwindef"], &[]),
("intsafe", &[], &[]),
("ipifcons", &["minwindef"], &[]),
("ipmib", &["ifdef", "ifmib", "minwindef", "nldef", "ntdef"], &[]),
("iprtrmib", &["ipmib", "minwindef", "ntdef"], &[]),
("ks", &[], &[]),
("ksmedia", &["minwindef"], &[]),
("ktmtypes", &["guiddef", "minwindef", "winnt"], &[]),
("lmcons", &["minwindef", "winnt"], &[]),
("minwindef", &["basetsd", "ntdef"], &[]),
("mmreg", &["guiddef", "minwindef"], &[]),
("mprapidef", &[], &[]),
("mstcpip", &["basetsd", "guiddef", "in6addr", "inaddr", "minwindef", "winnt", "ws2def"], &["ntdll"]),
("mswsockdef", &["minwindef", "winnt", "ws2def"], &[]),
("netioapi", &["basetsd", "guiddef", "ifdef", "minwindef", "ntdef"], &["iphlpapi"]),
("netioapi", &["basetsd", "guiddef", "ifdef", "ipifcons", "minwindef", "nldef", "ntddndis", "ntdef", "ws2def", "ws2ipdef"], &["iphlpapi"]),
("nldef", &["basetsd", "minwindef", "ntdef"], &[]),
("ntddndis", &["ifdef"], &[]),
("ntddscsi", &["basetsd", "minwindef", "ntdef", "winioctl", "winnt"], &[]),
("ntddser", &["devpropdef"], &[]),
("ntdef", &["basetsd", "guiddef"], &[]),
Expand All @@ -70,8 +77,11 @@ const DATA: &'static [(&'static str, &'static [&'static str], &'static [&'static
("sddl", &["basetsd", "minwindef", "winnt"], &["advapi32"]),
("sspi", &["basetsd", "guiddef", "minwindef", "subauth", "wincred", "winnt"], &["credui", "secur32"]),
("stralign", &["vcruntime", "winnt"], &["kernel32"]),
("tcpestats", &["basetsd", "ntdef"], &[]),
("tcpmib", &["basetsd", "in6addr", "minwindef", "ntdef"], &[]),
("transportsettingcommon", &["guiddef"], &[]),
("tvout", &["guiddef", "minwindef"], &[]),
("udpmib", &["basetsd", "in6addr", "minwindef", "ntdef"], &[]),
("usb", &["minwindef", "usbspec", "winnt"], &[]),
("usbiodef", &["guiddef", "minwindef", "winioctl", "winnt"], &[]),
("usbspec", &["basetsd", "guiddef", "minwindef", "winnt"], &[]),
Expand All @@ -86,6 +96,7 @@ const DATA: &'static [(&'static str, &'static [&'static str], &'static [&'static
("wtypes", &["guiddef", "minwindef", "ntdef", "rpcndr", "wingdi", "wtypesbase"], &[]),
("wtypesbase", &["minwindef", "rpcndr", "winnt"], &[]),
// ucrt
("corecrt", &[], &[]),
// um
("accctrl", &["guiddef", "minwindef", "winbase", "winnt"], &[]),
("aclapi", &["accctrl", "guiddef", "minwindef", "winnt"], &["advapi32"]),
Expand Down Expand Up @@ -202,6 +213,9 @@ const DATA: &'static [(&'static str, &'static [&'static str], &'static [&'static
("imm", &["minwindef", "windef"], &["imm32"]),
("interlockedapi", &["minwindef", "winnt"], &["kernel32"]),
("ioapiset", &["basetsd", "minwinbase", "minwindef", "winnt"], &["kernel32"]),
("ipexport", &["basetsd", "in6addr", "ntdef"], &[]),
("iphlpapi", &["basetsd", "ifdef", "ifmib", "ipexport", "ipmib", "iprtrmib", "iptypes", "minwinbase", "minwindef", "ntdef", "tcpestats", "tcpmib", "udpmib", "ws2def", "ws2ipdef"], &["iphlpapi"]),
("iptypes", &["basetsd", "corecrt", "guiddef", "ifdef", "ipifcons", "minwindef", "nldef", "ntdef", "ws2def"], &[]),
("jobapi", &["minwindef", "winnt"], &["kernel32"]),
("jobapi2", &["basetsd", "minwinbase", "minwindef", "ntdef", "winnt"], &["kernel32"]),
("knownfolders", &[], &[]),
Expand Down Expand Up @@ -278,6 +292,7 @@ const DATA: &'static [(&'static str, &'static [&'static str], &'static [&'static
("restartmanager", &["minwindef", "winnt"], &["rstrtmgr"]),
("restrictederrorinfo", &["unknwnbase", "winnt", "wtypes"], &[]),
("rmxfguid", &[], &[]),
("rtinfo", &["basetsd"], &[]),
("sapi", &["guiddef", "minwindef", "sapi53", "unknwnbase", "winnt"], &[]),
("sapi51", &["guiddef", "minwindef", "mmreg", "oaidl", "objidlbase", "rpcndr", "servprov", "unknwnbase", "windef", "winnt", "wtypes", "wtypesbase"], &[]),
("sapi53", &["guiddef", "minwindef", "oaidl", "sapi51", "unknwnbase", "urlmon", "winnt", "wtypes"], &[]),
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pub extern crate core as _core;
mod macros;
pub mod km;
pub mod shared;
pub mod ucrt;
pub mod um;
pub mod vc;
pub mod winrt;
Expand Down
191 changes: 184 additions & 7 deletions src/shared/ifdef.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,197 @@
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
// All files in the project carrying such notice may not be copied, modified, or distributed
// except according to those terms.
use shared::basetsd::{UINT16, ULONG64};
use shared::minwindef::ULONG;
STRUCT!{struct NET_LUID_LH {
Value: ULONG64,
use shared::basetsd::{UINT16, UINT32, ULONG32, ULONG64};
use shared::guiddef::GUID;
use shared::ntdef::{BOOLEAN, UCHAR, ULONG, USHORT, WCHAR};
pub type NET_IF_COMPARTMENT_ID = UINT32;
pub type PNET_IF_COMPARTMENT_ID = *mut NET_IF_COMPARTMENT_ID;
pub const NET_IF_COMPARTMENT_ID_UNSPECIFIED: NET_IF_COMPARTMENT_ID = 0;
pub const NET_IF_COMPARTMENT_ID_PRIMARY: NET_IF_COMPARTMENT_ID = 1;
pub type NET_IF_NETWORK_GUID = GUID;
pub type PNET_IF_NETWORK_GUID = *mut NET_IF_NETWORK_GUID;
ENUM!{enum NET_IF_OPER_STATUS {
NET_IF_OPER_STATUS_UP = 1,
NET_IF_OPER_STATUS_DOWN = 2,
NET_IF_OPER_STATUS_TESTING = 3,
NET_IF_OPER_STATUS_UNKNOWN = 4,
NET_IF_OPER_STATUS_DORMANT = 5,
NET_IF_OPER_STATUS_NOT_PRESENT = 6,
NET_IF_OPER_STATUS_LOWER_LAYER_DOWN = 7,
}}
BITFIELD!{NET_LUID_LH Value: ULONG64 [
pub type PNET_IF_OPER_STATUS = *mut NET_IF_OPER_STATUS;
pub type NET_IF_OBJECT_ID = ULONG32;
pub type PNET_IF_OBJECT_ID = *mut NET_IF_OBJECT_ID;
ENUM!{enum NET_IF_ADMIN_STATUS {
NET_IF_ADMIN_STATUS_UP = 1,
NET_IF_ADMIN_STATUS_DOWN = 2,
NET_IF_ADMIN_STATUS_TESTING = 3,
}}
pub type PNET_IF_ADMIN_STATUS = *mut NET_IF_ADMIN_STATUS;
pub type NET_IF_COMPARTMENT_SCOPE = UINT32;
pub type PNET_IF_COMPARTMENT_SCOPE = *mut NET_IF_COMPARTMENT_SCOPE;
pub const NET_IF_COMPARTMENT_SCOPE_UNSPECIFIED: NET_IF_COMPARTMENT_SCOPE = 0;
pub const NET_IF_COMPARTMENT_SCOPE_ALL: NET_IF_COMPARTMENT_SCOPE = -1i32 as u32;
ENUM!{enum NET_IF_RCV_ADDRESS_TYPE {
NET_IF_RCV_ADDRESS_TYPE_OTHER = 1,
NET_IF_RCV_ADDRESS_TYPE_VOLATILE = 2,
NET_IF_RCV_ADDRESS_TYPE_NON_VOLATILE = 3,
}}
pub type PNET_IF_RCV_ADDRESS_TYPE = *mut NET_IF_RCV_ADDRESS_TYPE;
STRUCT!{struct NET_IF_RCV_ADDRESS_LH {
ifRcvAddressType: NET_IF_RCV_ADDRESS_TYPE,
ifRcvAddressLength: USHORT,
ifRcvAddressOffset: USHORT,
}}
pub type PNET_IF_RCV_ADDRESS_LH = *mut NET_IF_RCV_ADDRESS_LH;
STRUCT!{struct NET_IF_ALIAS_LH {
ifAliasLength: USHORT,
ifAliasOffset: USHORT,
}}
pub type PNET_IF_ALIAS_LH = *mut NET_IF_ALIAS_LH;
STRUCT!{struct NET_LUID_LH_Info {
bitfield: ULONG64,
}}
BITFIELD!{NET_LUID_LH_Info bitfield: ULONG64 [
Reserved set_Reserved[0..24],
NetLuidIndex set_NetLuidIndex[24..48],
IfType set_IfType[48..64],
]}
UNION!{union NET_LUID_LH {
[u64; 1],
Value Value_mut: ULONG64,
Info Info_mut: NET_LUID_LH_Info,
}}
pub type PNET_LUID_LH = *mut NET_LUID_LH;
pub type NET_IF_RCV_ADDRESS = NET_IF_RCV_ADDRESS_LH;
pub type PNET_IF_RCV_ADDRESS = *mut NET_IF_RCV_ADDRESS;
pub type NET_IF_ALIAS = NET_IF_ALIAS_LH;
pub type PNET_IF_ALIAS = *mut NET_IF_ALIAS;
pub type NET_LUID = NET_LUID_LH;
pub type PNET_LUID = *mut NET_LUID;
pub type IF_LUID = NET_LUID;
pub type PIF_LUID = *mut NET_LUID;
pub type NET_IFINDEX = ULONG;
pub type PNET_IFINDEX = *mut ULONG;
pub type PNET_IFINDEX = *mut NET_IFINDEX;
pub type NET_IFTYPE = UINT16;
pub type PNET_IFTYPE = *mut UINT16;
pub type PNET_IFTYPE = *mut NET_IFTYPE;
pub type IF_INDEX = NET_IFINDEX;
pub type PIF_INDEX = *mut NET_IFINDEX;
ENUM!{enum NET_IF_CONNECTION_TYPE {
NET_IF_CONNECTION_DEDICATED = 1,
NET_IF_CONNECTION_PASSIVE = 2,
NET_IF_CONNECTION_DEMAND = 3,
NET_IF_CONNECTION_MAXIMUM = 4,
}}
pub type PNET_IF_CONNECTION_TYPE = *mut NET_IF_CONNECTION_TYPE;
ENUM!{enum TUNNEL_TYPE {
TUNNEL_TYPE_NONE = 0,
TUNNEL_TYPE_OTHER = 1,
TUNNEL_TYPE_DIRECT = 2,
TUNNEL_TYPE_6TO4 = 11,
TUNNEL_TYPE_ISATAP = 13,
TUNNEL_TYPE_TEREDO = 14,
TUNNEL_TYPE_IPHTTPS = 15,
}}
pub type PTUNNEL_TYPE = *mut TUNNEL_TYPE;
ENUM!{enum NET_IF_ACCESS_TYPE {
NET_IF_ACCESS_LOOPBACK = 1,
NET_IF_ACCESS_BROADCAST = 2,
NET_IF_ACCESS_POINT_TO_POINT = 3,
NET_IF_ACCESS_POINT_TO_MULTI_POINT = 4,
NET_IF_ACCESS_MAXIMUM = 5,
}}
pub type PNET_IF_ACCESS_TYPE = *mut NET_IF_ACCESS_TYPE;
ENUM!{enum NET_IF_DIRECTION_TYPE {
NET_IF_DIRECTION_SENDRECEIVE = 0,
NET_IF_DIRECTION_SENDONLY = 1,
NET_IF_DIRECTION_RECEIVEONLY = 2,
NET_IF_DIRECTION_MAXIMUM = 3,
}}
pub type PNET_IF_DIRECTION_TYPE = *mut NET_IF_DIRECTION_TYPE;
ENUM!{enum NET_IF_MEDIA_CONNECT_STATE {
MediaConnectStateUnknown = 0,
MediaConnectStateConnected = 1,
MediaConnectStateDisconnected = 2,
}}
pub type PNET_IF_MEDIA_CONNECT_STATE = *mut NET_IF_MEDIA_CONNECT_STATE;
ENUM!{enum NET_IF_MEDIA_DUPLEX_STATE {
MediaDuplexStateUnknown = 0,
MediaDuplexStateHalf = 1,
MediaDuplexStateFull = 2,
}}
pub type PNET_IF_MEDIA_DUPLEX_STATE = *mut NET_IF_MEDIA_DUPLEX_STATE;
STRUCT!{struct NET_PHYSICAL_LOCATION_LH {
BusNumber: ULONG,
SlotNumber: ULONG,
FunctionNumber: ULONG,
}}
pub type PNET_PHYSICAL_LOCATION_LH = *mut NET_PHYSICAL_LOCATION_LH;
pub const IF_MAX_STRING_SIZE: usize = 256;
pub const IF_MAX_PHYS_ADDRESS_LENGTH: usize = 32;
STRUCT!{struct IF_COUNTED_STRING_LH {
Length: USHORT,
String: [WCHAR; IF_MAX_STRING_SIZE + 1],
}}
pub type PIF_COUNTED_STRING_LH = *mut IF_COUNTED_STRING_LH;
STRUCT!{struct IF_PHYSICAL_ADDRESS_LH {
Length: USHORT,
Address: [UCHAR; IF_MAX_PHYS_ADDRESS_LENGTH],
}}
pub type PIF_PHYSICAL_ADDRESS_LH = *mut IF_PHYSICAL_ADDRESS_LH;
pub type NET_PHYSICAL_LOCATION = NET_PHYSICAL_LOCATION_LH;
pub type PNET_PHYSICAL_LOCATION = *mut NET_PHYSICAL_LOCATION;
pub type IF_COUNTED_STRING = IF_COUNTED_STRING_LH;
pub type PIF_COUNTED_STRING = *mut IF_COUNTED_STRING;
pub type IF_PHYSICAL_ADDRESS = IF_PHYSICAL_ADDRESS_LH;
pub type PIF_PHYSICAL_ADDRESS = *mut IF_PHYSICAL_ADDRESS;
ENUM!{enum IF_ADMINISTRATIVE_STATE {
IF_ADMINISTRATIVE_DISABLED = 0,
IF_ADMINISTRATIVE_ENABLED = 1,
IF_ADMINISTRATIVE_DEMANDDIAL = 2,
}}
pub type PIF_ADMINISTRATIVE_STATE = *mut IF_ADMINISTRATIVE_STATE;
ENUM!{enum IF_OPER_STATUS {
IfOperStatusUp = 1,
IfOperStatusDown,
IfOperStatusTesting,
IfOperStatusUnknown,
IfOperStatusDormant,
IfOperStatusNotPresent,
IfOperStatusLowerLayerDown,
}}
STRUCT!{struct NDIS_INTERFACE_INFORMATION {
ifOperStatus: NET_IF_OPER_STATUS,
ifOperStatusFlags: ULONG,
MediaConnectState: NET_IF_MEDIA_CONNECT_STATE,
MediaDuplexState: NET_IF_MEDIA_DUPLEX_STATE,
ifMtu: ULONG,
ifPromiscuousMode: BOOLEAN,
ifDeviceWakeUpEnable: BOOLEAN,
XmitLinkSpeed: ULONG64,
RcvLinkSpeed: ULONG64,
ifLastChange: ULONG64,
ifCounterDiscontinuityTime: ULONG64,
ifInUnknownProtos: ULONG64,
ifInDiscards: ULONG64,
ifInErrors: ULONG64,
ifHCInOctets: ULONG64,
ifHCInUcastPkts: ULONG64,
ifHCInMulticastPkts: ULONG64,
ifHCInBroadcastPkts: ULONG64,
ifHCOutOctets: ULONG64,
ifHCOutUcastPkts: ULONG64,
ifHCOutMulticastPkts: ULONG64,
ifHCOutBroadcastPkts: ULONG64,
ifOutErrors: ULONG64,
ifOutDiscards: ULONG64,
ifHCInUcastOctets: ULONG64,
ifHCInMulticastOctets: ULONG64,
ifHCInBroadcastOctets: ULONG64,
ifHCOutUcastOctets: ULONG64,
ifHCOutMulticastOctets: ULONG64,
ifHCOutBroadcastOctets: ULONG64,
CompartmentId: NET_IF_COMPARTMENT_ID,
SupportedStatistics: ULONG,
}}
pub type PNDIS_INTERFACE_INFORMATION = *mut NDIS_INTERFACE_INFORMATION;
53 changes: 53 additions & 0 deletions src/shared/ifmib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// Licensed under the Apache License, Version 2.0
// <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
// All files in the project carrying such notice may not be copied, modified, or distributed
// except according to those terms.
//! Contains the public definitions and structures for the non-TCP/IP specific parts of MIB-II.
// #include <winapifamily.h>
// #include <ifdef.h>
use shared::ifdef::IF_INDEX;
use shared::ipifcons::{IFTYPE, INTERNAL_IF_OPER_STATUS};
use shared::minwindef::DWORD;
use shared::ntdef::{UCHAR, WCHAR};
const ANY_SIZE: usize = 1;
STRUCT!{struct MIB_IFNUMBER {
dwValue: DWORD,
}}
pub type PMIB_IFNUMBER = *mut MIB_IFNUMBER;
pub const MAXLEN_PHYSADDR: usize = 8;
pub const MAXLEN_IFDESCR: usize = 256;
pub const MAX_INTERFACE_NAME_LEN: usize = 256;
STRUCT!{struct MIB_IFROW {
wszName: [WCHAR; MAX_INTERFACE_NAME_LEN],
dwIndex: IF_INDEX,
dwType: IFTYPE,
dwMtu: DWORD,
dwSpeed: DWORD,
dwPhysAddrLen: DWORD,
bPhysAddr: [UCHAR; MAXLEN_PHYSADDR],
dwAdminStatus: DWORD,
dwOperStatus: INTERNAL_IF_OPER_STATUS,
dwLastChange: DWORD,
dwInOctets: DWORD,
dwInUcastPkts: DWORD,
dwInNUcastPkts: DWORD,
dwInDiscards: DWORD,
dwInErrors: DWORD,
dwInUnknownProtos: DWORD,
dwOutOctets: DWORD,
dwOutUcastPkts: DWORD,
dwOutNUcastPkts: DWORD,
dwOutDiscards: DWORD,
dwOutErrors: DWORD,
dwOutQLen: DWORD,
dwDescrLen: DWORD,
bDescr: [UCHAR; MAXLEN_IFDESCR],
}}
pub type PMIB_IFROW = *mut MIB_IFROW;
STRUCT!{struct MIB_IFTABLE {
dwNumEntries: DWORD,
table: [MIB_IFROW; ANY_SIZE],
}}
pub type PMIB_IFTABLE = *mut MIB_IFTABLE;
// FIXME: SIZEOF_IFTABLE(x)
Loading