1/* Copyright (c) 2017 - 2022 LiteSpeed Technologies Inc. See LICENSE. */ 2/* 3 * lsquic_qlog.h -- QLOG Event logger 4 */ 5 6#ifndef LSQUIC_QLOG_H 7#define LSQUIC_QLOG_H 1 8 9#include "lsquic_int_types.h" 10#include "lsquic_packet_common.h" 11#include "lsquic_str.h" 12 13struct stack_st_X509; 14 15/* 16EventCategory 17 CONNECTIVITY 18 SECURITY 19 TRANSPORT 20 RECOVERY 21 22EventType 23 CONNECTIVITY 24 NEW_CONNECTION 25+ VERNEG 26+ HANDSHAKE 27 SECURITY 28+ CHECK_CERT 29 KEY_UPDATE 30 TRANSPORT 31+ PACKET_RX 32 STREAM_NEW 33 ACK_NEW 34 MAXDATA_NEW 35 MAXSTREAMDATA_NEW 36 RECOVERY 37 LOSS_DETECTION_ARMED 38 LOSS_DETECTION_POSTPONED 39 LOSS_DETECTION_TRIGGERED 40 BYTES_IN_FLIGHT_UPDATE 41 CWND_UPDATE 42 RTT_UPDATE 43 44EventTrigger 45 CONNECTIVITY 46 LINE 47+ PACKET_RX 48 SECURITY 49+ CERTLOG 50 KEYLOG 51 TRANSPORT 52 LINE 53 PACKET_TX 54 PACKET_RX 55 RECOVERY 56 ACK_RX 57 PACKET_RX 58 UNKNOWN 59 60EventData 61 EventNewConnection 62 EventKeyUpdate 63 EventPacketRX 64*/ 65 66void 67lsquic_qlog_create_connection (const lsquic_cid_t *, const struct sockaddr *, 68 const struct sockaddr *); 69 70void 71lsquic_qlog_packet_rx (const lsquic_cid_t * cid, const struct lsquic_packet_in *, 72 const unsigned char *, size_t); 73 74#define QLOG_PACKET_RX(...) do { \ 75 if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_QLOG)) \ 76 lsquic_qlog_packet_rx(__VA_ARGS__); \ 77} while (0) 78 79void 80lsquic_qlog_hsk_completed (const lsquic_cid_t *); 81 82void 83lsquic_qlog_sess_resume (const lsquic_cid_t *); 84 85void 86lsquic_qlog_check_certs (const lsquic_cid_t *, const lsquic_str_t **, size_t); 87 88void 89lsquic_qlog_cert_chain (const lsquic_cid_t *, struct stack_st_X509 *); 90 91void 92lsquic_qlog_version_negotiation (const lsquic_cid_t *, const char *, const char *); 93 94#endif 95