lsquic_qlog.h revision 55cd0b38
1/* Copyright (c) 2017 - 2019 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 13/* 14EventCategory 15 CONNECTIVITY 16 SECURITY 17 TRANSPORT 18 RECOVERY 19 20EventType 21 CONNECTIVITY 22 NEW_CONNECTION 23+ VERNEG 24+ HANDSHAKE 25 SECURITY 26+ CHECK_CERT 27 KEY_UPDATE 28 TRANSPORT 29+ PACKET_RX 30 STREAM_NEW 31 ACK_NEW 32 MAXDATA_NEW 33 MAXSTREAMDATA_NEW 34 RECOVERY 35 LOSS_DETECTION_ARMED 36 LOSS_DETECTION_POSTPONED 37 LOSS_DETECTION_TRIGGERED 38 BYTES_IN_FLIGHT_UPDATE 39 CWND_UPDATE 40 RTT_UPDATE 41 42EventTrigger 43 CONNECTIVITY 44 LINE 45+ PACKET_RX 46 SECURITY 47+ CERTLOG 48 KEYLOG 49 TRANSPORT 50 LINE 51 PACKET_TX 52 PACKET_RX 53 RECOVERY 54 ACK_RX 55 PACKET_RX 56 UNKNOWN 57 58EventData 59 EventNewConnection 60 EventKeyUpdate 61 EventPacketRX 62*/ 63 64void 65lsquic_qlog_create_connection (lsquic_cid_t, const struct sockaddr *, 66 const struct sockaddr *); 67 68void 69lsquic_qlog_packet_rx (lsquic_cid_t cid, const struct lsquic_packet_in *, 70 const unsigned char *, size_t); 71 72#define QLOG_PACKET_RX(...) do { \ 73 if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_QLOG)) \ 74 lsquic_qlog_packet_rx(__VA_ARGS__); \ 75} while (0) 76 77void 78lsquic_qlog_hsk_completed (lsquic_cid_t); 79 80void 81lsquic_qlog_zero_rtt (lsquic_cid_t); 82 83void 84lsquic_qlog_check_certs (lsquic_cid_t, const lsquic_str_t **, size_t); 85 86void 87lsquic_qlog_version_negotiation (lsquic_cid_t, const char *, const char *); 88 89#endif