h2olog/quic: support the stateless_reset_receive probe
@@ -161,6 +161,23 @@ int trace_idle_timeout(struct pt_regs *ctx) {
return 0;
}
+int trace_stateless_reset_receive(struct pt_regs *ctx) {
+ void *pos = NULL;
+ struct quic_event_t event = {};
+ struct st_quicly_conn_t conn = {};
+ sprintf(event.type, "stateless_reset_receive");
+
+ bpf_usdt_readarg(1, ctx, &pos);
+ bpf_probe_read(&conn, sizeof(conn), pos);
+ event.master_conn_id = conn.master_id;
+ bpf_usdt_readarg(2, ctx, &event.at);
+
+ if (events.perf_submit(ctx, &event, sizeof(event)) < 0)
+ bpf_trace_printk("failed to perf_submit\\n");
+
+ return 0;
+}
+
int trace_packet_prepare(struct pt_regs *ctx) {
void *pos = NULL;
struct quic_event_t event = {};
@@ -329,6 +346,7 @@ if sys.argv[1] == "quic":
u.enable_probe(probe="accept", fn_name="trace_accept")
u.enable_probe(probe="receive", fn_name="trace_receive")
u.enable_probe(probe="idle_timeout", fn_name="trace_idle_timeout")
+ u.enable_probe(probe="stateless_reset_receive", fn_name="trace_stateless_reset_receive")
u.enable_probe(probe="packet_prepare", fn_name="trace_packet_prepare")
u.enable_probe(probe="packet_commit", fn_name="trace_packet_commit")
u.enable_probe(probe="packet_acked", fn_name="trace_packet_acked")
