summaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2023-09-08 14:10:06 +0100
committerHugo Landau <hlandau@openssl.org>2024-02-02 11:49:34 +0000
commit5849dbe52e6657db0b653b93d1eb5bab34f43351 (patch)
treead9f42fd58577e8cede8c56925eb47dfc247d673 /ssl
parentfff66adfc885c3d229333e28aa2cf225d3be098c (diff)
QLOG: Events: Implement transport:packet_received
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Neil Horman <nhorman@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22037)
Diffstat (limited to 'ssl')
-rw-r--r--ssl/quic/qlog_event_helpers.c14
-rw-r--r--ssl/quic/quic_channel.c7
2 files changed, 21 insertions, 0 deletions
diff --git a/ssl/quic/qlog_event_helpers.c b/ssl/quic/qlog_event_helpers.c
index ad2e87ff3d..16fd8ae74e 100644
--- a/ssl/quic/qlog_event_helpers.c
+++ b/ssl/quic/qlog_event_helpers.c
@@ -611,3 +611,17 @@ void ossl_qlog_event_transport_packet_sent(QLOG *qlog,
QLOG_EVENT_END()
#endif
}
+
+void ossl_qlog_event_transport_packet_received(QLOG *qlog,
+ const QUIC_PKT_HDR *hdr,
+ QUIC_PN pn,
+ const OSSL_QTX_IOVEC *iovec,
+ size_t num_iovec,
+ uint64_t datagram_id)
+{
+#ifndef OPENSSL_NO_QLOG
+ QLOG_EVENT_BEGIN(qlog, transport, packet_received)
+ log_packet(qlog, hdr, pn, iovec, num_iovec, datagram_id);
+ QLOG_EVENT_END()
+#endif
+}
diff --git a/ssl/quic/quic_channel.c b/ssl/quic/quic_channel.c
index 274765b731..b76f825d0e 100644
--- a/ssl/quic/quic_channel.c
+++ b/ssl/quic/quic_channel.c
@@ -2098,6 +2098,7 @@ static void ch_rx_handle_packet(QUIC_CHANNEL *ch, int channel_only)
{
uint32_t enc_level;
int old_have_processed_any_pkt = ch->have_processed_any_pkt;
+ OSSL_QTX_IOVEC iovec;
assert(ch->qrx_pkt != NULL);
@@ -2184,6 +2185,12 @@ static void ch_rx_handle_packet(QUIC_CHANNEL *ch, int channel_only)
return;
}
+ iovec.buf = ch->qrx_pkt->hdr->data;
+ iovec.buf_len = ch->qrx_pkt->hdr->len;
+ ossl_qlog_event_transport_packet_received(ch_get_qlog(ch), ch->qrx_pkt->hdr,
+ ch->qrx_pkt->pn, &iovec, 1,
+ ch->qrx_pkt->datagram_id);
+
/* Handle incoming packet. */
switch (ch->qrx_pkt->hdr->type) {
case QUIC_PKT_TYPE_RETRY: