1a74702c6SGeorge Wang/* Copyright (c) 2017 - 2022 LiteSpeed Technologies Inc. See LICENSE. */ 255cd0b38SDmitri Tikhonov/* 355cd0b38SDmitri Tikhonov * lsquic_qlog.h -- QLOG Event logger 455cd0b38SDmitri Tikhonov */ 555cd0b38SDmitri Tikhonov 655cd0b38SDmitri Tikhonov#ifndef LSQUIC_QLOG_H 755cd0b38SDmitri Tikhonov#define LSQUIC_QLOG_H 1 855cd0b38SDmitri Tikhonov 955cd0b38SDmitri Tikhonov#include "lsquic_int_types.h" 1055cd0b38SDmitri Tikhonov#include "lsquic_packet_common.h" 1155cd0b38SDmitri Tikhonov#include "lsquic_str.h" 1255cd0b38SDmitri Tikhonov 13b55a5117SDmitri Tikhonovstruct stack_st_X509; 14b55a5117SDmitri Tikhonov 1555cd0b38SDmitri Tikhonov/* 1655cd0b38SDmitri TikhonovEventCategory 1755cd0b38SDmitri Tikhonov CONNECTIVITY 1855cd0b38SDmitri Tikhonov SECURITY 1955cd0b38SDmitri Tikhonov TRANSPORT 2055cd0b38SDmitri Tikhonov RECOVERY 2155cd0b38SDmitri Tikhonov 2255cd0b38SDmitri TikhonovEventType 2355cd0b38SDmitri Tikhonov CONNECTIVITY 2455cd0b38SDmitri Tikhonov NEW_CONNECTION 2555cd0b38SDmitri Tikhonov+ VERNEG 2655cd0b38SDmitri Tikhonov+ HANDSHAKE 2755cd0b38SDmitri Tikhonov SECURITY 2855cd0b38SDmitri Tikhonov+ CHECK_CERT 2955cd0b38SDmitri Tikhonov KEY_UPDATE 3055cd0b38SDmitri Tikhonov TRANSPORT 3155cd0b38SDmitri Tikhonov+ PACKET_RX 3255cd0b38SDmitri Tikhonov STREAM_NEW 3355cd0b38SDmitri Tikhonov ACK_NEW 3455cd0b38SDmitri Tikhonov MAXDATA_NEW 3555cd0b38SDmitri Tikhonov MAXSTREAMDATA_NEW 3655cd0b38SDmitri Tikhonov RECOVERY 3755cd0b38SDmitri Tikhonov LOSS_DETECTION_ARMED 3855cd0b38SDmitri Tikhonov LOSS_DETECTION_POSTPONED 3955cd0b38SDmitri Tikhonov LOSS_DETECTION_TRIGGERED 4055cd0b38SDmitri Tikhonov BYTES_IN_FLIGHT_UPDATE 4155cd0b38SDmitri Tikhonov CWND_UPDATE 4255cd0b38SDmitri Tikhonov RTT_UPDATE 4355cd0b38SDmitri Tikhonov 4455cd0b38SDmitri TikhonovEventTrigger 4555cd0b38SDmitri Tikhonov CONNECTIVITY 4655cd0b38SDmitri Tikhonov LINE 4755cd0b38SDmitri Tikhonov+ PACKET_RX 4855cd0b38SDmitri Tikhonov SECURITY 4955cd0b38SDmitri Tikhonov+ CERTLOG 5055cd0b38SDmitri Tikhonov KEYLOG 5155cd0b38SDmitri Tikhonov TRANSPORT 5255cd0b38SDmitri Tikhonov LINE 5355cd0b38SDmitri Tikhonov PACKET_TX 5455cd0b38SDmitri Tikhonov PACKET_RX 5555cd0b38SDmitri Tikhonov RECOVERY 5655cd0b38SDmitri Tikhonov ACK_RX 5755cd0b38SDmitri Tikhonov PACKET_RX 5855cd0b38SDmitri Tikhonov UNKNOWN 5955cd0b38SDmitri Tikhonov 6055cd0b38SDmitri TikhonovEventData 6155cd0b38SDmitri Tikhonov EventNewConnection 6255cd0b38SDmitri Tikhonov EventKeyUpdate 6355cd0b38SDmitri Tikhonov EventPacketRX 6455cd0b38SDmitri Tikhonov*/ 6555cd0b38SDmitri Tikhonov 6655cd0b38SDmitri Tikhonovvoid 675392f7a3SLiteSpeed Techlsquic_qlog_create_connection (const lsquic_cid_t *, const struct sockaddr *, 6855cd0b38SDmitri Tikhonov const struct sockaddr *); 6955cd0b38SDmitri Tikhonov 7055cd0b38SDmitri Tikhonovvoid 715392f7a3SLiteSpeed Techlsquic_qlog_packet_rx (const lsquic_cid_t * cid, const struct lsquic_packet_in *, 7255cd0b38SDmitri Tikhonov const unsigned char *, size_t); 7355cd0b38SDmitri Tikhonov 7455cd0b38SDmitri Tikhonov#define QLOG_PACKET_RX(...) do { \ 7555cd0b38SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_QLOG)) \ 7655cd0b38SDmitri Tikhonov lsquic_qlog_packet_rx(__VA_ARGS__); \ 7755cd0b38SDmitri Tikhonov} while (0) 7855cd0b38SDmitri Tikhonov 7955cd0b38SDmitri Tikhonovvoid 805392f7a3SLiteSpeed Techlsquic_qlog_hsk_completed (const lsquic_cid_t *); 8155cd0b38SDmitri Tikhonov 8255cd0b38SDmitri Tikhonovvoid 837483dee0SDmitri Tikhonovlsquic_qlog_sess_resume (const lsquic_cid_t *); 8455cd0b38SDmitri Tikhonov 8555cd0b38SDmitri Tikhonovvoid 865392f7a3SLiteSpeed Techlsquic_qlog_check_certs (const lsquic_cid_t *, const lsquic_str_t **, size_t); 8755cd0b38SDmitri Tikhonov 8855cd0b38SDmitri Tikhonovvoid 89b55a5117SDmitri Tikhonovlsquic_qlog_cert_chain (const lsquic_cid_t *, struct stack_st_X509 *); 90b55a5117SDmitri Tikhonov 91b55a5117SDmitri Tikhonovvoid 925392f7a3SLiteSpeed Techlsquic_qlog_version_negotiation (const lsquic_cid_t *, const char *, const char *); 9355cd0b38SDmitri Tikhonov 945392f7a3SLiteSpeed Tech#endif 95