Lines Matching refs:conn

36     QUIC_LCIDM_CONN             *conn;  member
87 static unsigned long lcidm_conn_hash(const QUIC_LCIDM_CONN *conn) in lcidm_conn_hash() argument
89 return (unsigned long)(uintptr_t)conn->opaque; in lcidm_conn_hash()
127 static void lcidm_delete_conn(QUIC_LCIDM *lcidm, QUIC_LCIDM_CONN *conn);
129 static void lcidm_delete_conn_(QUIC_LCIDM_CONN *conn, void *arg) in lcidm_delete_conn_() argument
131 lcidm_delete_conn((QUIC_LCIDM *)arg, conn); in lcidm_delete_conn_()
188 QUIC_LCIDM_CONN *conn = lcidm_get0_conn(lcidm, opaque); in lcidm_upsert_conn() local
190 if (conn != NULL) in lcidm_upsert_conn()
191 return conn; in lcidm_upsert_conn()
193 if ((conn = OPENSSL_zalloc(sizeof(*conn))) == NULL) in lcidm_upsert_conn()
196 if ((conn->lcids = lh_QUIC_LCID_new(lcid_hash, lcid_comp)) == NULL) in lcidm_upsert_conn()
199 conn->opaque = opaque; in lcidm_upsert_conn()
201 lh_QUIC_LCIDM_CONN_insert(lcidm->conns, conn); in lcidm_upsert_conn()
205 return conn; in lcidm_upsert_conn()
208 if (conn != NULL) { in lcidm_upsert_conn()
209 lh_QUIC_LCID_free(conn->lcids); in lcidm_upsert_conn()
210 OPENSSL_free(conn); in lcidm_upsert_conn()
218 lh_QUIC_LCID_delete(lcid_obj->conn->lcids, lcid_obj); in lcidm_delete_conn_lcid()
219 assert(lcid_obj->conn->num_active_lcid > 0); in lcidm_delete_conn_lcid()
220 --lcid_obj->conn->num_active_lcid; in lcidm_delete_conn_lcid()
230 static void lcidm_delete_conn(QUIC_LCIDM *lcidm, QUIC_LCIDM_CONN *conn) in lcidm_delete_conn() argument
233 lh_QUIC_LCID_set_down_load(conn->lcids, 0); in lcidm_delete_conn()
235 lh_QUIC_LCID_doall_arg(conn->lcids, lcidm_delete_conn_lcid_, lcidm); in lcidm_delete_conn()
236 lh_QUIC_LCIDM_CONN_delete(lcidm->conns, conn); in lcidm_delete_conn()
237 lh_QUIC_LCID_free(conn->lcids); in lcidm_delete_conn()
238 OPENSSL_free(conn); in lcidm_delete_conn()
241 static QUIC_LCID *lcidm_conn_new_lcid(QUIC_LCIDM *lcidm, QUIC_LCIDM_CONN *conn, in lcidm_conn_new_lcid() argument
253 lcid_obj->conn = conn; in lcidm_conn_new_lcid()
255 lh_QUIC_LCID_insert(conn->lcids, lcid_obj); in lcidm_conn_new_lcid()
256 if (lh_QUIC_LCID_error(conn->lcids)) in lcidm_conn_new_lcid()
261 lh_QUIC_LCID_delete(conn->lcids, lcid_obj); in lcidm_conn_new_lcid()
265 ++conn->num_active_lcid; in lcidm_conn_new_lcid()
281 QUIC_LCIDM_CONN *conn; in ossl_quic_lcidm_get_num_active_lcid() local
283 conn = lcidm_get0_conn(lcidm, opaque); in ossl_quic_lcidm_get_num_active_lcid()
284 if (conn == NULL) in ossl_quic_lcidm_get_num_active_lcid()
287 return conn->num_active_lcid; in ossl_quic_lcidm_get_num_active_lcid()
315 QUIC_LCIDM_CONN *conn; in lcidm_generate() local
320 if ((conn = lcidm_upsert_conn(lcidm, opaque)) == NULL) in lcidm_generate()
323 if ((type == LCID_TYPE_INITIAL && conn->next_seq_num > 0) in lcidm_generate()
324 || conn->next_seq_num > OSSL_QUIC_VLINT_MAX) in lcidm_generate()
343 if ((lcid_obj = lcidm_conn_new_lcid(lcidm, conn, lcid_out)) == NULL) in lcidm_generate()
346 lcid_obj->seq_num = conn->next_seq_num; in lcidm_generate()
352 ++conn->next_seq_num; in lcidm_generate()
360 QUIC_LCIDM_CONN *conn; in ossl_quic_lcidm_enrol_odcid() local
367 if ((conn = lcidm_upsert_conn(lcidm, opaque)) == NULL) in ossl_quic_lcidm_enrol_odcid()
370 if (conn->done_odcid) in ossl_quic_lcidm_enrol_odcid()
377 if ((lcid_obj = lcidm_conn_new_lcid(lcidm, conn, initial_odcid)) == NULL) in ossl_quic_lcidm_enrol_odcid()
383 conn->odcid_lcid_obj = lcid_obj; in ossl_quic_lcidm_enrol_odcid()
384 conn->done_odcid = 1; in ossl_quic_lcidm_enrol_odcid()
410 QUIC_LCIDM_CONN *conn; in ossl_quic_lcidm_retire_odcid() local
412 if ((conn = lcidm_upsert_conn(lcidm, opaque)) == NULL) in ossl_quic_lcidm_retire_odcid()
415 if (conn->odcid_lcid_obj == NULL) in ossl_quic_lcidm_retire_odcid()
418 lcidm_delete_conn_lcid(lcidm, conn->odcid_lcid_obj); in ossl_quic_lcidm_retire_odcid()
419 conn->odcid_lcid_obj = NULL; in ossl_quic_lcidm_retire_odcid()
451 QUIC_LCIDM_CONN key, *conn; in ossl_quic_lcidm_retire() local
460 if ((conn = lh_QUIC_LCIDM_CONN_retrieve(lcidm->conns, &key)) == NULL) in ossl_quic_lcidm_retire()
466 lh_QUIC_LCID_doall_arg(conn->lcids, retire_for_conn, &args); in ossl_quic_lcidm_retire()
487 QUIC_LCIDM_CONN key, *conn; in ossl_quic_lcidm_cull() local
491 if ((conn = lh_QUIC_LCIDM_CONN_retrieve(lcidm->conns, &key)) == NULL) in ossl_quic_lcidm_cull()
494 lcidm_delete_conn(lcidm, conn); in ossl_quic_lcidm_cull()
515 *opaque = lcid_obj->conn->opaque; in ossl_quic_lcidm_lookup()
537 QUIC_LCIDM_CONN *conn; in ossl_quic_lcidm_debug_add() local
543 if ((conn = lcidm_upsert_conn(lcidm, opaque)) == NULL) in ossl_quic_lcidm_debug_add()
550 if ((lcid_obj = lcidm_conn_new_lcid(lcidm, conn, lcid)) == NULL) in ossl_quic_lcidm_debug_add()