diff options
Diffstat (limited to 'third_party/rust/qlog/src')
-rw-r--r-- | third_party/rust/qlog/src/events/mod.rs | 3 | ||||
-rw-r--r-- | third_party/rust/qlog/src/events/quic.rs | 21 | ||||
-rw-r--r-- | third_party/rust/qlog/src/lib.rs | 28 |
3 files changed, 42 insertions, 10 deletions
diff --git a/third_party/rust/qlog/src/events/mod.rs b/third_party/rust/qlog/src/events/mod.rs index ac18276fd0..dbd35183ef 100644 --- a/third_party/rust/qlog/src/events/mod.rs +++ b/third_party/rust/qlog/src/events/mod.rs @@ -203,6 +203,9 @@ impl From<EventType> for EventImportance { ConnectivityEventType::ConnectionStarted, ) => EventImportance::Base, EventType::ConnectivityEventType( + ConnectivityEventType::ConnectionClosed, + ) => EventImportance::Base, + EventType::ConnectivityEventType( ConnectivityEventType::ConnectionIdUpdated, ) => EventImportance::Base, EventType::ConnectivityEventType( diff --git a/third_party/rust/qlog/src/events/quic.rs b/third_party/rust/qlog/src/events/quic.rs index a7c1fa3225..e504125a1a 100644 --- a/third_party/rust/qlog/src/events/quic.rs +++ b/third_party/rust/qlog/src/events/quic.rs @@ -384,30 +384,43 @@ pub enum QuicFrameTypeName { // ensure it goes out on the wire. This means that deserialization of frames // also works automatically. pub enum QuicFrame { - Padding, + Padding { + length: Option<u32>, + payload_length: u32, + }, - Ping, + Ping { + length: Option<u32>, + payload_length: Option<u32>, + }, Ack { ack_delay: Option<f32>, acked_ranges: Option<AckedRanges>, ect1: Option<u64>, - ect0: Option<u64>, - ce: Option<u64>, + + length: Option<u32>, + payload_length: Option<u32>, }, ResetStream { stream_id: u64, error_code: u64, final_size: u64, + + length: Option<u32>, + payload_length: Option<u32>, }, StopSending { stream_id: u64, error_code: u64, + + length: Option<u32>, + payload_length: Option<u32>, }, Crypto { diff --git a/third_party/rust/qlog/src/lib.rs b/third_party/rust/qlog/src/lib.rs index 68ff278fcd..ed26570fe0 100644 --- a/third_party/rust/qlog/src/lib.rs +++ b/third_party/rust/qlog/src/lib.rs @@ -332,8 +332,14 @@ //! Some(&dcid), //! ); //! -//! let ping = qlog::events::quic::QuicFrame::Ping; -//! let padding = qlog::events::quic::QuicFrame::Padding; +//! let ping = qlog::events::quic::QuicFrame::Ping { +//! length: None, +//! payload_length: None, +//! }; +//! let padding = qlog::events::quic::QuicFrame::Padding { +//! length: None, +//! payload_length: 1234, +//! }; //! //! let event_data = //! qlog::events::EventData::PacketSent(qlog::events::quic::PacketSent { @@ -790,7 +796,8 @@ mod tests { }, "frames": [ { - "frame_type": "padding" + "frame_type": "padding", + "payload_length": 1234 }, { "frame_type": "ping" @@ -808,14 +815,23 @@ mod tests { let pkt_hdr = make_pkt_hdr(PacketType::Initial); - let frames = - vec![QuicFrame::Padding, QuicFrame::Ping, QuicFrame::Stream { + let frames = vec![ + QuicFrame::Padding { + payload_length: 1234, + length: None, + }, + QuicFrame::Ping { + payload_length: None, + length: None, + }, + QuicFrame::Stream { stream_id: 0, offset: 0, length: 100, fin: Some(true), raw: None, - }]; + }, + ]; let ev_data = EventData::PacketSent(PacketSent { header: pkt_hdr, |