File tree Expand file tree Collapse file tree 2 files changed +8
-16
lines changed Expand file tree Collapse file tree 2 files changed +8
-16
lines changed Original file line number Diff line number Diff line change @@ -6912,26 +6912,19 @@ QuicConnGetNetworkStatistics(
6912
6912
NETWORK_STATISTICS * Stats
6913
6913
)
6914
6914
{
6915
- const uint32_t MinimumStatsSize = sizeof (NETWORK_STATISTICS );
6916
-
6917
- if (* StatsLength == 0 ) {
6915
+ if (* StatsLength < sizeof (NETWORK_STATISTICS )) {
6918
6916
* StatsLength = sizeof (NETWORK_STATISTICS );
6919
6917
return QUIC_STATUS_BUFFER_TOO_SMALL ;
6920
6918
}
6921
6919
6922
- if (* StatsLength < MinimumStatsSize ) {
6923
- * StatsLength = MinimumStatsSize ;
6924
- return QUIC_STATUS_BUFFER_TOO_SMALL ;
6925
- }
6926
-
6927
6920
if (Stats == NULL ) {
6928
6921
return QUIC_STATUS_INVALID_PARAMETER ;
6929
6922
}
6930
6923
6931
6924
memset (Stats , 0 , MinimumStatsSize );
6932
6925
6933
6926
Connection -> CongestionControl .QuicCongestionControlGetNetworkStatistics (
6934
- Connection , & Connection -> CongestionControl , Stats );
6927
+ Connection , & Connection -> CongestionControl , Stats );
6935
6928
6936
6929
return QUIC_STATUS_SUCCESS ;
6937
6930
}
Original file line number Diff line number Diff line change @@ -643,12 +643,12 @@ typedef struct QUIC_STATISTICS_V2 {
643
643
644
644
typedef struct NETWORK_STATISTICS
645
645
{
646
- uint32_t BytesInFlight ; // Bytes that were sent on the wire, but not yet acked
647
- uint64_t PostedBytes ; // Total bytes queued, but not yet acked. These may contain sent bytes that may have potentially lost too.
648
- uint64_t IdealBytes ; // Ideal number of bytes required to be available to avoid limiting throughput
649
- uint64_t SmoothedRTT ; // Smoothed RTT value
650
- uint32_t CongestionWindow ; // Congestion Window
651
- uint64_t Bandwidth ; // Estimated bandwidth
646
+ uint32_t BytesInFlight ; // Bytes that were sent on the wire, but not yet acked
647
+ uint64_t PostedBytes ; // Total bytes queued, but not yet acked. These may contain sent bytes that may have potentially lost too.
648
+ uint64_t IdealBytes ; // Ideal number of bytes required to be available to avoid limiting throughput
649
+ uint64_t SmoothedRTT ; // Smoothed RTT value
650
+ uint32_t CongestionWindow ; // Congestion Window
651
+ uint64_t Bandwidth ; // Estimated bandwidth
652
652
653
653
} NETWORK_STATISTICS ;
654
654
@@ -1022,7 +1022,6 @@ typedef struct QUIC_SCHANNEL_CREDENTIAL_ATTRIBUTE_W {
1022
1022
#define QUIC_PARAM_CONN_STATISTICS_V2_PLAT 0x05000017 // QUIC_STATISTICS_V2
1023
1023
#define QUIC_PARAM_CONN_ORIG_DEST_CID 0x05000018 // uint8_t[]
1024
1024
#define QUIC_PARAM_CONN_SEND_DSCP 0x05000019 // uint8_t
1025
-
1026
1025
#ifdef QUIC_API_ENABLE_PREVIEW_FEATURES
1027
1026
#define QUIC_PARAM_CONN_NETWORK_STATISTICS 0x05000020 // struct NETWORK_STATISTICS
1028
1027
#endif
You can’t perform that action at this time.
0 commit comments