lsquic_ev_log.h revision 7d09751d
17d09751dSDmitri Tikhonov/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */ 250aadb33SDmitri Tikhonov/* 350aadb33SDmitri Tikhonov * lsquic_ev_log.h -- Event logger 450aadb33SDmitri Tikhonov */ 550aadb33SDmitri Tikhonov 650aadb33SDmitri Tikhonov#ifndef LSQUIC_EV_LOG_H 750aadb33SDmitri Tikhonov#define LSQUIC_EV_LOG_H 1 850aadb33SDmitri Tikhonov 950aadb33SDmitri Tikhonov#include "lsquic_int_types.h" 1055cd0b38SDmitri Tikhonov#include "lsquic_qlog.h" 1150aadb33SDmitri Tikhonov 1250aadb33SDmitri Tikhonovstruct ack_info; 1350aadb33SDmitri Tikhonovstruct http_prio_frame; 1450aadb33SDmitri Tikhonovstruct lsquic_http_headers; 1550aadb33SDmitri Tikhonovstruct lsquic_packet_in; 1650aadb33SDmitri Tikhonovstruct lsquic_packet_out; 1750aadb33SDmitri Tikhonovstruct parse_funcs; 1850aadb33SDmitri Tikhonovstruct stream_frame; 1950aadb33SDmitri Tikhonovstruct uncompressed_headers; 2050aadb33SDmitri Tikhonov 2150aadb33SDmitri Tikhonov 2250aadb33SDmitri Tikhonov/* Log a generic event not tied to any particular connection */ 23b93f59beSBob Perper#define EV_LOG_GENERIC_EVENT(...) do { \ 2450aadb33SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 25b93f59beSBob Perper lsquic_logger_log1(LSQ_LOG_DEBUG, LSQLM_EVENT, __VA_ARGS__); \ 2650aadb33SDmitri Tikhonov} while (0) 2750aadb33SDmitri Tikhonov 2850aadb33SDmitri Tikhonov/* Log a generic event associated with connection `cid' */ 29b93f59beSBob Perper#define EV_LOG_CONN_EVENT(cid, ...) do { \ 3050aadb33SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 31b93f59beSBob Perper lsquic_logger_log2(LSQ_LOG_DEBUG, LSQLM_EVENT, cid, __VA_ARGS__); \ 3250aadb33SDmitri Tikhonov} while (0) 3350aadb33SDmitri Tikhonov 3450aadb33SDmitri Tikhonovvoid 355392f7a3SLiteSpeed Techlsquic_ev_log_packet_in (const lsquic_cid_t *, const struct lsquic_packet_in *); 3650aadb33SDmitri Tikhonov 37b93f59beSBob Perper#define EV_LOG_PACKET_IN(...) do { \ 3850aadb33SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 39b93f59beSBob Perper lsquic_ev_log_packet_in(__VA_ARGS__); \ 4050aadb33SDmitri Tikhonov} while (0) 4150aadb33SDmitri Tikhonov 4250aadb33SDmitri Tikhonovvoid 435392f7a3SLiteSpeed Techlsquic_ev_log_ack_frame_in (const lsquic_cid_t *, const struct ack_info *); 4450aadb33SDmitri Tikhonov 45b93f59beSBob Perper#define EV_LOG_ACK_FRAME_IN(...) do { \ 4650aadb33SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 47b93f59beSBob Perper lsquic_ev_log_ack_frame_in(__VA_ARGS__); \ 4850aadb33SDmitri Tikhonov} while (0) 4950aadb33SDmitri Tikhonov 5050aadb33SDmitri Tikhonovvoid 515392f7a3SLiteSpeed Techlsquic_ev_log_stream_frame_in (const lsquic_cid_t *, 525392f7a3SLiteSpeed Tech const struct stream_frame *); 5350aadb33SDmitri Tikhonov 54b93f59beSBob Perper#define EV_LOG_STREAM_FRAME_IN(...) do { \ 5550aadb33SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 56b93f59beSBob Perper lsquic_ev_log_stream_frame_in(__VA_ARGS__); \ 5750aadb33SDmitri Tikhonov} while (0) 5850aadb33SDmitri Tikhonov 5950aadb33SDmitri Tikhonovvoid 605392f7a3SLiteSpeed Techlsquic_ev_log_crypto_frame_in (const lsquic_cid_t *, 615392f7a3SLiteSpeed Tech const struct stream_frame *, unsigned enc_level); 625392f7a3SLiteSpeed Tech 635392f7a3SLiteSpeed Tech#define EV_LOG_CRYPTO_FRAME_IN(...) do { \ 645392f7a3SLiteSpeed Tech if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 655392f7a3SLiteSpeed Tech lsquic_ev_log_crypto_frame_in(__VA_ARGS__); \ 665392f7a3SLiteSpeed Tech} while (0) 675392f7a3SLiteSpeed Tech 685392f7a3SLiteSpeed Techvoid 695392f7a3SLiteSpeed Techlsquic_ev_log_window_update_frame_in (const lsquic_cid_t *, lsquic_stream_id_t, 7050aadb33SDmitri Tikhonov uint64_t offset); 7150aadb33SDmitri Tikhonov 72b93f59beSBob Perper#define EV_LOG_WINDOW_UPDATE_FRAME_IN(...) do { \ 7350aadb33SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 74b93f59beSBob Perper lsquic_ev_log_window_update_frame_in(__VA_ARGS__); \ 7550aadb33SDmitri Tikhonov} while (0) 7650aadb33SDmitri Tikhonov 7750aadb33SDmitri Tikhonovvoid 785392f7a3SLiteSpeed Techlsquic_ev_log_blocked_frame_in (const lsquic_cid_t *, lsquic_stream_id_t); 7950aadb33SDmitri Tikhonov 80b93f59beSBob Perper#define EV_LOG_BLOCKED_FRAME_IN(...) do { \ 8150aadb33SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 82b93f59beSBob Perper lsquic_ev_log_blocked_frame_in(__VA_ARGS__); \ 8350aadb33SDmitri Tikhonov} while (0) 8450aadb33SDmitri Tikhonov 8550aadb33SDmitri Tikhonovvoid 865392f7a3SLiteSpeed Techlsquic_ev_log_stop_waiting_frame_in (const lsquic_cid_t *, lsquic_packno_t); 8750aadb33SDmitri Tikhonov 88b93f59beSBob Perper#define EV_LOG_STOP_WAITING_FRAME_IN(...) do { \ 8950aadb33SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 90b93f59beSBob Perper lsquic_ev_log_stop_waiting_frame_in(__VA_ARGS__); \ 9150aadb33SDmitri Tikhonov} while (0) 9250aadb33SDmitri Tikhonov 9350aadb33SDmitri Tikhonovvoid 945392f7a3SLiteSpeed Techlsquic_ev_log_connection_close_frame_in (const lsquic_cid_t *, 955392f7a3SLiteSpeed Tech uint64_t error_code, int reason_len, const char *reason); 9650aadb33SDmitri Tikhonov 97b93f59beSBob Perper#define EV_LOG_CONNECTION_CLOSE_FRAME_IN(...) do { \ 9850aadb33SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 99b93f59beSBob Perper lsquic_ev_log_connection_close_frame_in(__VA_ARGS__); \ 10050aadb33SDmitri Tikhonov} while (0) 10150aadb33SDmitri Tikhonov 10250aadb33SDmitri Tikhonovvoid 1035392f7a3SLiteSpeed Techlsquic_ev_log_goaway_frame_in (const lsquic_cid_t *, uint32_t error_code, 1045392f7a3SLiteSpeed Tech lsquic_stream_id_t, int reason_len, const char *reason); 10550aadb33SDmitri Tikhonov 106b93f59beSBob Perper#define EV_LOG_GOAWAY_FRAME_IN(...) do { \ 10750aadb33SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 108b93f59beSBob Perper lsquic_ev_log_goaway_frame_in(__VA_ARGS__); \ 10950aadb33SDmitri Tikhonov} while (0) 11050aadb33SDmitri Tikhonov 11150aadb33SDmitri Tikhonovvoid 1125392f7a3SLiteSpeed Techlsquic_ev_log_rst_stream_frame_in (const lsquic_cid_t *, lsquic_stream_id_t, 1135392f7a3SLiteSpeed Tech uint64_t offset, uint64_t error_code); 11450aadb33SDmitri Tikhonov 115b93f59beSBob Perper#define EV_LOG_RST_STREAM_FRAME_IN(...) do { \ 11650aadb33SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 117b93f59beSBob Perper lsquic_ev_log_rst_stream_frame_in(__VA_ARGS__); \ 11850aadb33SDmitri Tikhonov} while (0) 11950aadb33SDmitri Tikhonov 12050aadb33SDmitri Tikhonovvoid 1215392f7a3SLiteSpeed Techlsquic_ev_log_stop_sending_frame_in (const lsquic_cid_t *,lsquic_stream_id_t, 1225392f7a3SLiteSpeed Tech uint64_t error_code); 1235392f7a3SLiteSpeed Tech 1245392f7a3SLiteSpeed Tech#define EV_LOG_STOP_SENDING_FRAME_IN(...) do { \ 1255392f7a3SLiteSpeed Tech if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 1265392f7a3SLiteSpeed Tech lsquic_ev_log_stop_sending_frame_in(__VA_ARGS__); \ 1275392f7a3SLiteSpeed Tech} while (0) 1285392f7a3SLiteSpeed Tech 1295392f7a3SLiteSpeed Techvoid 1305392f7a3SLiteSpeed Techlsquic_ev_log_padding_frame_in (const lsquic_cid_t *, size_t len); 13150aadb33SDmitri Tikhonov 132b93f59beSBob Perper#define EV_LOG_PADDING_FRAME_IN(...) do { \ 13350aadb33SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 134b93f59beSBob Perper lsquic_ev_log_padding_frame_in(__VA_ARGS__); \ 13550aadb33SDmitri Tikhonov} while (0) 13650aadb33SDmitri Tikhonov 13750aadb33SDmitri Tikhonovvoid 1385392f7a3SLiteSpeed Techlsquic_ev_log_ping_frame_in (const lsquic_cid_t *); 13950aadb33SDmitri Tikhonov 140b93f59beSBob Perper#define EV_LOG_PING_FRAME_IN(...) do { \ 14150aadb33SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 142b93f59beSBob Perper lsquic_ev_log_ping_frame_in(__VA_ARGS__); \ 14350aadb33SDmitri Tikhonov} while (0) 14450aadb33SDmitri Tikhonov 14550aadb33SDmitri Tikhonovvoid 1465392f7a3SLiteSpeed Techlsquic_ev_log_packet_created (const lsquic_cid_t *, 1475392f7a3SLiteSpeed Tech const struct lsquic_packet_out *); 14850aadb33SDmitri Tikhonov 149b93f59beSBob Perper#define EV_LOG_PACKET_CREATED(...) do { \ 15050aadb33SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 151b93f59beSBob Perper lsquic_ev_log_packet_created(__VA_ARGS__); \ 15250aadb33SDmitri Tikhonov} while (0) 15350aadb33SDmitri Tikhonov 15450aadb33SDmitri Tikhonovvoid 1555392f7a3SLiteSpeed Techlsquic_ev_log_packet_sent (const lsquic_cid_t *, 1565392f7a3SLiteSpeed Tech const struct lsquic_packet_out *); 15750aadb33SDmitri Tikhonov 158b93f59beSBob Perper#define EV_LOG_PACKET_SENT(...) do { \ 15950aadb33SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 160b93f59beSBob Perper lsquic_ev_log_packet_sent(__VA_ARGS__); \ 16150aadb33SDmitri Tikhonov} while (0) 16250aadb33SDmitri Tikhonov 16350aadb33SDmitri Tikhonovvoid 1645392f7a3SLiteSpeed Techlsquic_ev_log_packet_not_sent (const lsquic_cid_t *, 1655392f7a3SLiteSpeed Tech const struct lsquic_packet_out *); 16650aadb33SDmitri Tikhonov 167b93f59beSBob Perper#define EV_LOG_PACKET_NOT_SENT(...) do { \ 16850aadb33SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 169b93f59beSBob Perper lsquic_ev_log_packet_not_sent(__VA_ARGS__); \ 17050aadb33SDmitri Tikhonov} while (0) 17150aadb33SDmitri Tikhonov 17250aadb33SDmitri Tikhonovvoid 1735392f7a3SLiteSpeed Techlsquic_ev_log_http_headers_in (const lsquic_cid_t *, int is_server, 17450aadb33SDmitri Tikhonov const struct uncompressed_headers *); 17550aadb33SDmitri Tikhonov 176b93f59beSBob Perper#define EV_LOG_HTTP_HEADERS_IN(...) do { \ 17750aadb33SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 178b93f59beSBob Perper lsquic_ev_log_http_headers_in(__VA_ARGS__); \ 17950aadb33SDmitri Tikhonov} while (0) 18050aadb33SDmitri Tikhonov 18150aadb33SDmitri Tikhonovvoid 1825392f7a3SLiteSpeed Techlsquic_ev_log_action_stream_frame (const lsquic_cid_t *, 1835392f7a3SLiteSpeed Tech const struct parse_funcs *pf, 184c51ce338SDmitri Tikhonov const unsigned char *, size_t len, const char *action); 18550aadb33SDmitri Tikhonov 186b93f59beSBob Perper#define EV_LOG_GENERATED_STREAM_FRAME(...) do { \ 18750aadb33SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 188b93f59beSBob Perper lsquic_ev_log_action_stream_frame(__VA_ARGS__, "generated"); \ 189c51ce338SDmitri Tikhonov} while (0) 190c51ce338SDmitri Tikhonov 191b93f59beSBob Perper#define EV_LOG_UPDATED_STREAM_FRAME(...) do { \ 192c51ce338SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 193b93f59beSBob Perper lsquic_ev_log_action_stream_frame(__VA_ARGS__, "updated"); \ 19450aadb33SDmitri Tikhonov} while (0) 19550aadb33SDmitri Tikhonov 19650aadb33SDmitri Tikhonovvoid 1975392f7a3SLiteSpeed Techlsquic_ev_log_generated_crypto_frame (const lsquic_cid_t *, 1985392f7a3SLiteSpeed Tech const struct parse_funcs *pf, 1995392f7a3SLiteSpeed Tech const unsigned char *, size_t len); 2005392f7a3SLiteSpeed Tech 2015392f7a3SLiteSpeed Tech#define EV_LOG_GENERATED_CRYPTO_FRAME(...) do { \ 2025392f7a3SLiteSpeed Tech if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 2035392f7a3SLiteSpeed Tech lsquic_ev_log_generated_crypto_frame(__VA_ARGS__); \ 2045392f7a3SLiteSpeed Tech} while (0) 2055392f7a3SLiteSpeed Tech 2065392f7a3SLiteSpeed Techvoid 2075392f7a3SLiteSpeed Techlsquic_ev_log_generated_ack_frame (const lsquic_cid_t *, 2085392f7a3SLiteSpeed Tech const struct parse_funcs *, const unsigned char *, size_t len); 20950aadb33SDmitri Tikhonov 210b93f59beSBob Perper#define EV_LOG_GENERATED_ACK_FRAME(...) do { \ 21150aadb33SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 212b93f59beSBob Perper lsquic_ev_log_generated_ack_frame(__VA_ARGS__); \ 21350aadb33SDmitri Tikhonov} while (0) 21450aadb33SDmitri Tikhonov 21550aadb33SDmitri Tikhonovvoid 2165392f7a3SLiteSpeed Techlsquic_ev_log_generated_new_token_frame (const lsquic_cid_t *, 2175392f7a3SLiteSpeed Tech const struct parse_funcs *, const unsigned char *, size_t len); 2185392f7a3SLiteSpeed Tech 2195392f7a3SLiteSpeed Tech#define EV_LOG_GENERATED_NEW_TOKEN_FRAME(...) do { \ 2205392f7a3SLiteSpeed Tech if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 2215392f7a3SLiteSpeed Tech lsquic_ev_log_generated_new_token_frame(__VA_ARGS__); \ 2225392f7a3SLiteSpeed Tech} while (0) 2235392f7a3SLiteSpeed Tech 2245392f7a3SLiteSpeed Techvoid 2255392f7a3SLiteSpeed Techlsquic_ev_log_generated_path_chal_frame (const lsquic_cid_t *, 2265392f7a3SLiteSpeed Tech const struct parse_funcs *, const unsigned char *, size_t len); 2275392f7a3SLiteSpeed Tech 2285392f7a3SLiteSpeed Tech#define EV_LOG_GENERATED_PATH_CHAL_FRAME(...) do { \ 2295392f7a3SLiteSpeed Tech if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 2305392f7a3SLiteSpeed Tech lsquic_ev_log_generated_path_chal_frame(__VA_ARGS__); \ 2315392f7a3SLiteSpeed Tech} while (0) 2325392f7a3SLiteSpeed Tech 2335392f7a3SLiteSpeed Techvoid 2345392f7a3SLiteSpeed Techlsquic_ev_log_generated_path_resp_frame (const lsquic_cid_t *, 2355392f7a3SLiteSpeed Tech const struct parse_funcs *, const unsigned char *, size_t len); 2365392f7a3SLiteSpeed Tech 2375392f7a3SLiteSpeed Tech#define EV_LOG_GENERATED_PATH_RESP_FRAME(...) do { \ 2385392f7a3SLiteSpeed Tech if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 2395392f7a3SLiteSpeed Tech lsquic_ev_log_generated_path_resp_frame(__VA_ARGS__); \ 2405392f7a3SLiteSpeed Tech} while (0) 2415392f7a3SLiteSpeed Tech 2425392f7a3SLiteSpeed Techvoid 2435392f7a3SLiteSpeed Techlsquic_ev_log_generated_new_connection_id_frame (const lsquic_cid_t *, 2445392f7a3SLiteSpeed Tech const struct parse_funcs *, const unsigned char *, size_t len); 2455392f7a3SLiteSpeed Tech 2465392f7a3SLiteSpeed Tech#define EV_LOG_GENERATED_NEW_CONNECTION_ID_FRAME(...) do { \ 2475392f7a3SLiteSpeed Tech if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 2485392f7a3SLiteSpeed Tech lsquic_ev_log_generated_new_connection_id_frame(__VA_ARGS__); \ 2495392f7a3SLiteSpeed Tech} while (0) 2505392f7a3SLiteSpeed Tech 2515392f7a3SLiteSpeed Techvoid 2525392f7a3SLiteSpeed Techlsquic_ev_log_generated_stop_waiting_frame (const lsquic_cid_t *, 2535392f7a3SLiteSpeed Tech lsquic_packno_t); 25450aadb33SDmitri Tikhonov 255b93f59beSBob Perper#define EV_LOG_GENERATED_STOP_WAITING_FRAME(...) do { \ 25650aadb33SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 257b93f59beSBob Perper lsquic_ev_log_generated_stop_waiting_frame(__VA_ARGS__); \ 25850aadb33SDmitri Tikhonov} while (0) 25950aadb33SDmitri Tikhonov 26050aadb33SDmitri Tikhonovvoid 2615392f7a3SLiteSpeed Techlsquic_ev_log_generated_stop_sending_frame (const lsquic_cid_t *, 2625392f7a3SLiteSpeed Tech lsquic_stream_id_t, uint16_t); 2635392f7a3SLiteSpeed Tech 2645392f7a3SLiteSpeed Tech#define EV_LOG_GENERATED_STOP_SENDING_FRAME(...) do { \ 2655392f7a3SLiteSpeed Tech if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 2665392f7a3SLiteSpeed Tech lsquic_ev_log_generated_stop_sending_frame(__VA_ARGS__); \ 2675392f7a3SLiteSpeed Tech} while (0) 2685392f7a3SLiteSpeed Tech 2695392f7a3SLiteSpeed Techvoid 2705392f7a3SLiteSpeed Techlsquic_ev_log_generated_http_headers (const lsquic_cid_t *, lsquic_stream_id_t, 27150aadb33SDmitri Tikhonov int is_server, const struct http_prio_frame *, 27250aadb33SDmitri Tikhonov const struct lsquic_http_headers *); 27350aadb33SDmitri Tikhonov 27450aadb33SDmitri Tikhonov 275b93f59beSBob Perper#define EV_LOG_GENERATED_HTTP_HEADERS(...) do { \ 27650aadb33SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 277b93f59beSBob Perper lsquic_ev_log_generated_http_headers(__VA_ARGS__); \ 27850aadb33SDmitri Tikhonov} while (0) 27950aadb33SDmitri Tikhonov 28050aadb33SDmitri Tikhonovvoid 2815392f7a3SLiteSpeed Techlsquic_ev_log_generated_http_push_promise (const lsquic_cid_t *, 2825392f7a3SLiteSpeed Tech lsquic_stream_id_t stream_id, lsquic_stream_id_t promised_stream_id, 2835392f7a3SLiteSpeed Tech const struct lsquic_http_headers *headers, 2845392f7a3SLiteSpeed Tech const struct lsquic_http_headers *extra_headers); 28550aadb33SDmitri Tikhonov 286b93f59beSBob Perper#define EV_LOG_GENERATED_HTTP_PUSH_PROMISE(...) do { \ 28750aadb33SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 288b93f59beSBob Perper lsquic_ev_log_generated_http_push_promise(__VA_ARGS__); \ 28950aadb33SDmitri Tikhonov} while (0) 29050aadb33SDmitri Tikhonov 29155cd0b38SDmitri Tikhonovvoid 2925392f7a3SLiteSpeed Techlsquic_ev_log_create_connection (const lsquic_cid_t *, const struct sockaddr *, 29355cd0b38SDmitri Tikhonov const struct sockaddr *); 29455cd0b38SDmitri Tikhonov 29555cd0b38SDmitri Tikhonov#define EV_LOG_CREATE_CONN(...) do { \ 29655cd0b38SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 29755cd0b38SDmitri Tikhonov lsquic_ev_log_create_connection(__VA_ARGS__); \ 29855cd0b38SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_QLOG)) \ 29955cd0b38SDmitri Tikhonov lsquic_qlog_create_connection(__VA_ARGS__); \ 30055cd0b38SDmitri Tikhonov} while (0) 30155cd0b38SDmitri Tikhonov 30255cd0b38SDmitri Tikhonovvoid 3035392f7a3SLiteSpeed Techlsquic_ev_log_hsk_completed (const lsquic_cid_t *); 30455cd0b38SDmitri Tikhonov 30555cd0b38SDmitri Tikhonov#define EV_LOG_HSK_COMPLETED(...) do { \ 30655cd0b38SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 30755cd0b38SDmitri Tikhonov lsquic_ev_log_hsk_completed(__VA_ARGS__); \ 30855cd0b38SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_QLOG)) \ 30955cd0b38SDmitri Tikhonov lsquic_qlog_hsk_completed(__VA_ARGS__); \ 31055cd0b38SDmitri Tikhonov} while (0) 31155cd0b38SDmitri Tikhonov 31255cd0b38SDmitri Tikhonov 31355cd0b38SDmitri Tikhonovvoid 3145392f7a3SLiteSpeed Techlsquic_ev_log_zero_rtt (const lsquic_cid_t *); 31555cd0b38SDmitri Tikhonov 31655cd0b38SDmitri Tikhonov#define EV_LOG_ZERO_RTT(...) do { \ 31755cd0b38SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 31855cd0b38SDmitri Tikhonov lsquic_ev_log_zero_rtt(__VA_ARGS__); \ 31955cd0b38SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_QLOG)) \ 32055cd0b38SDmitri Tikhonov lsquic_qlog_zero_rtt(__VA_ARGS__); \ 32155cd0b38SDmitri Tikhonov} while (0) 32255cd0b38SDmitri Tikhonov 32355cd0b38SDmitri Tikhonovvoid 3245392f7a3SLiteSpeed Techlsquic_ev_log_check_certs (const lsquic_cid_t *, const lsquic_str_t **, size_t); 32555cd0b38SDmitri Tikhonov 32655cd0b38SDmitri Tikhonov#define EV_LOG_CHECK_CERTS(...) do { \ 32755cd0b38SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 32855cd0b38SDmitri Tikhonov lsquic_ev_log_check_certs(__VA_ARGS__); \ 32955cd0b38SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_QLOG)) \ 33055cd0b38SDmitri Tikhonov lsquic_qlog_check_certs(__VA_ARGS__); \ 33155cd0b38SDmitri Tikhonov} while (0) 33255cd0b38SDmitri Tikhonov 33355cd0b38SDmitri Tikhonovvoid 3345392f7a3SLiteSpeed Techlsquic_ev_log_version_negotiation (const lsquic_cid_t *, const char *, const char *); 33555cd0b38SDmitri Tikhonov 33655cd0b38SDmitri Tikhonov#define EV_LOG_VER_NEG(...) do { \ 33755cd0b38SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_EVENT)) \ 33855cd0b38SDmitri Tikhonov lsquic_ev_log_version_negotiation(__VA_ARGS__); \ 33955cd0b38SDmitri Tikhonov if (LSQ_LOG_ENABLED_EXT(LSQ_LOG_DEBUG, LSQLM_QLOG)) \ 34055cd0b38SDmitri Tikhonov lsquic_qlog_version_negotiation(__VA_ARGS__); \ 34155cd0b38SDmitri Tikhonov} while (0) 34255cd0b38SDmitri Tikhonov 34350aadb33SDmitri Tikhonov#endif 344