struct quic_rx_packet {
struct list list;
struct list qc_rx_pkt_list;
+
+ /* QUIC version used in packet. */
+ const struct quic_version *version;
struct quic_conn *qc;
+
unsigned char type;
/* Initial desctination connection ID. */
struct quic_cid dcid;
TRACE_PROTO("VN packet sent", QUIC_EV_CONN_LPKT);
goto err;
}
+ pkt->version = qv;
/* For Initial packets, and for servers (QUIC clients connections),
* there is no Initial connection IDs storage.
do {
struct quic_rx_packet *pkt;
+ /* TODO replace zalloc -> alloc. */
pkt = pool_zalloc(pool_head_quic_rx_packet);
if (!pkt) {
TRACE_ERROR("RX packet allocation failed", QUIC_EV_CONN_LPKT);
+ /* TODO count lost datagram. */
goto leave;
}
+ pkt->version = NULL;
+
LIST_INIT(&pkt->qc_rx_pkt_list);
pkt->time_received = now_ms;
quic_rx_packet_refinc(pkt);