1 // Licensed under the Apache License, Version 2.0
2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
4 // All files in the project carrying such notice may not be copied, modified, or distributed
5 // except according to those terms
6 use shared
::lmcons
::NET_API_STATUS
;
7 use shared
::minwindef
::{DWORD, LPBYTE}
;
8 use um
::winnt
::{LARGE_INTEGER, LPCWSTR}
;
10 pub fn NetStatisticsGet(
18 STRUCT
!{struct STAT_WORKSTATION_0
{
19 StatisticsStartTime
: LARGE_INTEGER
,
20 BytesReceived
: LARGE_INTEGER
,
21 SmbsReceived
: LARGE_INTEGER
,
22 PagingReadBytesRequested
: LARGE_INTEGER
,
23 NonPagingReadBytesRequested
: LARGE_INTEGER
,
24 CacheReadBytesRequested
: LARGE_INTEGER
,
25 NetworkReadBytesRequested
: LARGE_INTEGER
,
26 BytesTransmitted
: LARGE_INTEGER
,
27 SmbsTransmitted
: LARGE_INTEGER
,
28 PagingWriteBytesRequested
: LARGE_INTEGER
,
29 NonPagingWriteBytesRequested
: LARGE_INTEGER
,
30 CacheWriteBytesRequested
: LARGE_INTEGER
,
31 NetworkWriteBytesRequested
: LARGE_INTEGER
,
32 InitiallyFailedOperations
: DWORD
,
33 FailedCompletionOperations
: DWORD
,
34 ReadOperations
: DWORD
,
35 RandomReadOperations
: DWORD
,
39 WriteOperations
: DWORD
,
40 RandomWriteOperations
: DWORD
,
42 LargeWriteSmbs
: DWORD
,
43 SmallWriteSmbs
: DWORD
,
44 RawReadsDenied
: DWORD
,
45 RawWritesDenied
: DWORD
,
48 FailedSessions
: DWORD
,
51 Lanman20Connects
: DWORD
,
52 Lanman21Connects
: DWORD
,
53 LanmanNtConnects
: DWORD
,
54 ServerDisconnects
: DWORD
,
57 FailedUseCount
: DWORD
,
58 CurrentCommands
: DWORD
,
60 pub type PSTAT_WORKSTATION_0
= *mut STAT_WORKSTATION_0
;
61 pub type LPSTAT_WORKSTATION_0
= *mut STAT_WORKSTATION_0
;
62 STRUCT
!{struct STAT_SERVER_0
{
66 sts0_jobsqueued
: DWORD
,
68 sts0_stimedout
: DWORD
,
69 sts0_serrorout
: DWORD
,
71 sts0_permerrors
: DWORD
,
72 sts0_syserrors
: DWORD
,
73 sts0_bytessent_low
: DWORD
,
74 sts0_bytessent_high
: DWORD
,
75 sts0_bytesrcvd_low
: DWORD
,
76 sts0_bytesrcvd_high
: DWORD
,
77 sts0_avresponse
: DWORD
,
78 sts0_reqbufneed
: DWORD
,
79 sts0_bigbufneed
: DWORD
,
81 pub type PSTAT_SERVER_0
= *mut STAT_SERVER_0
;
82 pub type LPSTAT_SERVER_0
= *mut STAT_SERVER_0
;
83 pub const STATSOPT_CLR
: DWORD
= 1;
84 pub const STATS_NO_VALUE
: DWORD
= -1i32 as u32;
85 pub const STATS_OVERFLOW
: DWORD
= -2i32 as u32;