Skip to content

Commit a172c79

Browse files
committed
changing name of struct to QUIC_NETWORK_STATISTICS
Signed-off-by: HHN <harihara.sn@gmail.com>
1 parent cb40821 commit a172c79

File tree

12 files changed

+54
-105
lines changed

12 files changed

+54
-105
lines changed

docs/Settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ These parameters are accessed by calling [GetParam](./api/GetParam.md) or [SetPa
183183
| `QUIC_PARAM_CONN_STATISTICS_V2_PLAT`<br> 23 | QUIC_STATISTICS_V2 | Get-only | Connection-level statistics with platform-specific time format, version 2. |
184184
| `QUIC_PARAM_CONN_ORIG_DEST_CID` <br> 24 | uint8_t[] | Get-only | The original destination connection ID used by the client to connect to the server. |
185185
| `QUIC_PARAM_CONN_SEND_DSCP` <br> 25 | uint8_t | Both | The DiffServ Code Point put in the DiffServ field (formerly TypeOfService/TrafficClass) on packets sent from this connection. |
186-
| `QUIC_PARAM_CONN_NETWORK_STATISTICS` <br> 20 | NETWORK_STATISTICS | Get-only | Returns Connection level network statistics |
186+
| `QUIC_PARAM_CONN_NETWORK_STATISTICS` <br> 20 | QUIC_NETWORK_STATISTICS | Get-only | Returns Connection level network statistics |
187187

188188
### QUIC_PARAM_CONN_STATISTICS_V2
189189

docs/api/QUIC_CONNECTION_EVENT.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,7 @@ typedef struct QUIC_CONNECTION_EVENT {
112112
BOOLEAN SendNegotiated; // TRUE if sending one-way delay timestamps is negotiated.
113113
BOOLEAN ReceiveNegotiated; // TRUE if receiving one-way delay timestamps is negotiated.
114114
} ONE_WAY_DELAY_NEGOTIATED;
115-
struct {
116-
uint32_t BytesInFlight; // Bytes that were sent on the wire, but not yet acked
117-
uint64_t PostedBytes; // Total bytes queued, but not yet acked. These may contain sent bytes that may have potentially lost too.
118-
uint64_t IdealBytes; // Ideal number of bytes required to be available to avoid limiting throughput
119-
uint64_t SmoothedRTT; // Smoothed RTT value
120-
uint32_t CongestionWindow; // Congestion Window
121-
uint64_t Bandwidth; // Estimated bandwidth
122-
} NETWORK_STATISTICS;
115+
QUIC_NETWORK_STATISTICS NETWORK_STATISTICS;
123116
#endif
124117

125118
};
@@ -450,7 +443,7 @@ This event is only indicated if QUIC_SETTINGS.EnableNetStatsEvent is TRUE. This
450443

451444
### NETWORK_STATISTICS
452445

453-
Detailed networking statistics are passed in the `NETWORK_STATISTICS` struct/union.
446+
Detailed networking statistics are passed in the `QUIC_NETWORK_STATISTICS` struct/union.
454447

455448
`BytesInFlight`
456449

scripts/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ fn overwrite_bindgen() {
207207
.header(root_dir.join("src/rs/ffi/wrapper.hpp").to_str().unwrap())
208208
.clang_arg(format!("-I{}", inc_dir.to_string_lossy()))
209209
.allowlist_recursively(false)
210-
.allowlist_item("QUIC.*|BOOLEAN|BYTE|HQUIC|HRESULT|NETWORK_STATISTICS")
210+
.allowlist_item("QUIC.*|BOOLEAN|BYTE|HQUIC|HRESULT")
211211
.blocklist_type("QUIC_ADDR")
212212
// Tell cargo to invalidate the built crate whenever any of the
213213
// included header files changed.

src/core/bbr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ void
304304
BbrCongestionControlGetNetworkStatistics(
305305
_In_ const QUIC_CONNECTION* const Connection,
306306
_In_ const QUIC_CONGESTION_CONTROL* const Cc,
307-
_Out_ NETWORK_STATISTICS* NetworkStatistics
307+
_Out_ QUIC_NETWORK_STATISTICS* NetworkStatistics
308308
)
309309
{
310310
const QUIC_CONGESTION_CONTROL_BBR* Bbr = &Cc->Bbr;

src/core/congestion_control.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ typedef struct QUIC_CONGESTION_CONTROL {
158158
void (*QuicCongestionControlGetNetworkStatistics)(
159159
_In_ const QUIC_CONNECTION* const Connection,
160160
_In_ const struct QUIC_CONGESTION_CONTROL* const Cc,
161-
_Out_ struct NETWORK_STATISTICS* NetworkStatistics
161+
_Out_ struct QUIC_NETWORK_STATISTICS* NetworkStatistics
162162
);
163163

164164
//

src/core/connection.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6910,19 +6910,19 @@ QuicConnGetNetworkStatistics(
69106910
_In_ const QUIC_CONNECTION* Connection,
69116911
_Inout_ uint32_t* StatsLength,
69126912
_Out_writes_bytes_opt_(*StatsLength)
6913-
NETWORK_STATISTICS* Stats
6913+
QUIC_NETWORK_STATISTICS* Stats
69146914
)
69156915
{
6916-
if (*StatsLength < sizeof(NETWORK_STATISTICS)) {
6917-
*StatsLength = sizeof(NETWORK_STATISTICS);
6916+
if (*StatsLength < sizeof(QUIC_NETWORK_STATISTICS)) {
6917+
*StatsLength = sizeof(QUIC_NETWORK_STATISTICS);
69186918
return QUIC_STATUS_BUFFER_TOO_SMALL;
69196919
}
69206920

69216921
if (Stats == NULL) {
69226922
return QUIC_STATUS_INVALID_PARAMETER;
69236923
}
69246924

6925-
CxPlatZeroMemory(Stats, sizeof(NETWORK_STATISTICS));
6925+
CxPlatZeroMemory(Stats, sizeof(QUIC_NETWORK_STATISTICS));
69266926

69276927
Connection->CongestionControl.QuicCongestionControlGetNetworkStatistics(
69286928
Connection, &Connection->CongestionControl, Stats);
@@ -7350,7 +7350,7 @@ QuicConnParamGet(
73507350

73517351
case QUIC_PARAM_CONN_NETWORK_STATISTICS:
73527352
Status =
7353-
QuicConnGetNetworkStatistics(Connection, BufferLength, (NETWORK_STATISTICS *)Buffer);
7353+
QuicConnGetNetworkStatistics(Connection, BufferLength, (QUIC_NETWORK_STATISTICS *)Buffer);
73547354
break;
73557355

73567356
default:

src/core/cubic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ void
419419
CubicCongestionControlGetNetworkStatistics(
420420
_In_ const QUIC_CONNECTION* const Connection,
421421
_In_ const QUIC_CONGESTION_CONTROL* const Cc,
422-
_Out_ NETWORK_STATISTICS* NetworkStatistics
422+
_Out_ QUIC_NETWORK_STATISTICS* NetworkStatistics
423423
)
424424
{
425425
const QUIC_CONGESTION_CONTROL_CUBIC* Cubic = &Cc->Cubic;

src/cs/lib/msquic_generated.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ internal uint RESERVED
926926
internal uint RttVariance;
927927
}
928928

929-
internal partial struct NETWORK_STATISTICS
929+
internal partial struct QUIC_NETWORK_STATISTICS
930930
{
931931
[NativeTypeName("uint32_t")]
932932
internal uint BytesInFlight;
@@ -2783,7 +2783,7 @@ internal ref _Anonymous_e__Union._ONE_WAY_DELAY_NEGOTIATED_e__Struct ONE_WAY_DEL
27832783
}
27842784
}
27852785

2786-
internal ref NETWORK_STATISTICS NETWORK_STATISTICS
2786+
internal ref QUIC_NETWORK_STATISTICS NETWORK_STATISTICS
27872787
{
27882788
get
27892789
{
@@ -2867,7 +2867,7 @@ internal partial struct _Anonymous_e__Union
28672867
internal _ONE_WAY_DELAY_NEGOTIATED_e__Struct ONE_WAY_DELAY_NEGOTIATED;
28682868

28692869
[FieldOffset(0)]
2870-
internal NETWORK_STATISTICS NETWORK_STATISTICS;
2870+
internal QUIC_NETWORK_STATISTICS NETWORK_STATISTICS;
28712871

28722872
internal unsafe partial struct _CONNECTED_e__Struct
28732873
{

src/inc/msquic.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ typedef struct QUIC_STATISTICS_V2 {
641641

642642
} QUIC_STATISTICS_V2;
643643

644-
typedef struct NETWORK_STATISTICS
644+
typedef struct QUIC_NETWORK_STATISTICS
645645
{
646646
uint32_t BytesInFlight; // Bytes that were sent on the wire, but not yet acked
647647
uint64_t PostedBytes; // Total bytes queued, but not yet acked. These may contain sent bytes that may have potentially lost too.
@@ -650,7 +650,7 @@ typedef struct NETWORK_STATISTICS
650650
uint32_t CongestionWindow; // Congestion Window
651651
uint64_t Bandwidth; // Estimated bandwidth
652652

653-
} NETWORK_STATISTICS;
653+
} QUIC_NETWORK_STATISTICS;
654654

655655
#define QUIC_STRUCT_SIZE_THRU_FIELD(Struct, Field) \
656656
(FIELD_OFFSET(Struct, Field) + sizeof(((Struct*)0)->Field))
@@ -1023,7 +1023,7 @@ typedef struct QUIC_SCHANNEL_CREDENTIAL_ATTRIBUTE_W {
10231023
#define QUIC_PARAM_CONN_ORIG_DEST_CID 0x05000018 // uint8_t[]
10241024
#define QUIC_PARAM_CONN_SEND_DSCP 0x05000019 // uint8_t
10251025
#ifdef QUIC_API_ENABLE_PREVIEW_FEATURES
1026-
#define QUIC_PARAM_CONN_NETWORK_STATISTICS 0x05000020 // struct NETWORK_STATISTICS
1026+
#define QUIC_PARAM_CONN_NETWORK_STATISTICS 0x05000020 // struct QUIC_NETWORK_STATISTICS
10271027
#endif
10281028

10291029
//
@@ -1374,7 +1374,7 @@ typedef struct QUIC_CONNECTION_EVENT {
13741374
BOOLEAN SendNegotiated; // TRUE if sending one-way delay timestamps is negotiated.
13751375
BOOLEAN ReceiveNegotiated; // TRUE if receiving one-way delay timestamps is negotiated.
13761376
} ONE_WAY_DELAY_NEGOTIATED;
1377-
NETWORK_STATISTICS NETWORK_STATISTICS;
1377+
QUIC_NETWORK_STATISTICS NETWORK_STATISTICS;
13781378
#endif
13791379
};
13801380
} QUIC_CONNECTION_EVENT;

src/rs/ffi/linux_bindings.rs

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1579,7 +1579,7 @@ impl QUIC_STATISTICS_V2 {
15791579
}
15801580
#[repr(C)]
15811581
#[derive(Debug, Copy, Clone)]
1582-
pub struct NETWORK_STATISTICS {
1582+
pub struct QUIC_NETWORK_STATISTICS {
15831583
pub BytesInFlight: u32,
15841584
pub PostedBytes: u64,
15851585
pub IdealBytes: u64,
@@ -1589,20 +1589,21 @@ pub struct NETWORK_STATISTICS {
15891589
}
15901590
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15911591
const _: () = {
1592-
["Size of NETWORK_STATISTICS"][::std::mem::size_of::<NETWORK_STATISTICS>() - 48usize];
1593-
["Alignment of NETWORK_STATISTICS"][::std::mem::align_of::<NETWORK_STATISTICS>() - 8usize];
1594-
["Offset of field: NETWORK_STATISTICS::BytesInFlight"]
1595-
[::std::mem::offset_of!(NETWORK_STATISTICS, BytesInFlight) - 0usize];
1596-
["Offset of field: NETWORK_STATISTICS::PostedBytes"]
1597-
[::std::mem::offset_of!(NETWORK_STATISTICS, PostedBytes) - 8usize];
1598-
["Offset of field: NETWORK_STATISTICS::IdealBytes"]
1599-
[::std::mem::offset_of!(NETWORK_STATISTICS, IdealBytes) - 16usize];
1600-
["Offset of field: NETWORK_STATISTICS::SmoothedRTT"]
1601-
[::std::mem::offset_of!(NETWORK_STATISTICS, SmoothedRTT) - 24usize];
1602-
["Offset of field: NETWORK_STATISTICS::CongestionWindow"]
1603-
[::std::mem::offset_of!(NETWORK_STATISTICS, CongestionWindow) - 32usize];
1604-
["Offset of field: NETWORK_STATISTICS::Bandwidth"]
1605-
[::std::mem::offset_of!(NETWORK_STATISTICS, Bandwidth) - 40usize];
1592+
["Size of QUIC_NETWORK_STATISTICS"][::std::mem::size_of::<QUIC_NETWORK_STATISTICS>() - 48usize];
1593+
["Alignment of QUIC_NETWORK_STATISTICS"]
1594+
[::std::mem::align_of::<QUIC_NETWORK_STATISTICS>() - 8usize];
1595+
["Offset of field: QUIC_NETWORK_STATISTICS::BytesInFlight"]
1596+
[::std::mem::offset_of!(QUIC_NETWORK_STATISTICS, BytesInFlight) - 0usize];
1597+
["Offset of field: QUIC_NETWORK_STATISTICS::PostedBytes"]
1598+
[::std::mem::offset_of!(QUIC_NETWORK_STATISTICS, PostedBytes) - 8usize];
1599+
["Offset of field: QUIC_NETWORK_STATISTICS::IdealBytes"]
1600+
[::std::mem::offset_of!(QUIC_NETWORK_STATISTICS, IdealBytes) - 16usize];
1601+
["Offset of field: QUIC_NETWORK_STATISTICS::SmoothedRTT"]
1602+
[::std::mem::offset_of!(QUIC_NETWORK_STATISTICS, SmoothedRTT) - 24usize];
1603+
["Offset of field: QUIC_NETWORK_STATISTICS::CongestionWindow"]
1604+
[::std::mem::offset_of!(QUIC_NETWORK_STATISTICS, CongestionWindow) - 32usize];
1605+
["Offset of field: QUIC_NETWORK_STATISTICS::Bandwidth"]
1606+
[::std::mem::offset_of!(QUIC_NETWORK_STATISTICS, Bandwidth) - 40usize];
16061607
};
16071608
#[repr(C)]
16081609
#[derive(Debug, Copy, Clone)]
@@ -5307,7 +5308,7 @@ pub union QUIC_CONNECTION_EVENT__bindgen_ty_1 {
53075308
pub PEER_CERTIFICATE_RECEIVED: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_16,
53085309
pub RELIABLE_RESET_NEGOTIATED: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_17,
53095310
pub ONE_WAY_DELAY_NEGOTIATED: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_18,
5310-
pub NETWORK_STATISTICS: NETWORK_STATISTICS,
5311+
pub NETWORK_STATISTICS: QUIC_NETWORK_STATISTICS,
53115312
}
53125313
#[repr(C)]
53135314
#[derive(Debug, Copy, Clone)]

0 commit comments

Comments
 (0)