lsquic_engine_public.h revision c44946ec
1/* Copyright (c) 2017 - 2018 LiteSpeed Technologies Inc. See LICENSE. */ 2/* 3 * lsquic_engine_public.h -- Engine's "public interface" 4 * 5 */ 6 7#ifndef LSQUIC_ENGINE_PUBLIC_H 8#define LSQUIC_ENGINE_PUBLIC_H 1 9 10struct lsquic_conn; 11struct lsquic_engine; 12 13struct lsquic_engine_public { 14 struct lsquic_mm enp_mm; 15 struct lsquic_engine_settings enp_settings; 16 const struct lsquic_packout_mem_if 17 *enp_pmi; 18 void *enp_pmi_ctx; 19 struct lsquic_engine *enp_engine; 20 enum { 21 ENPUB_PROC = (1 << 0), /* Being processed by one of the user-facing 22 * functions. 23 */ 24 ENPUB_CAN_SEND = (1 << 1), 25 } enp_flags; 26 unsigned char enp_ver_tags_buf[ sizeof(lsquic_ver_tag_t) * N_LSQVER ]; 27 unsigned enp_ver_tags_len; 28}; 29 30/* Put connection onto the Tickable Queue if it is not already on it. If 31 * connection is being destroyed, this is a no-op. 32 */ 33void 34lsquic_engine_add_conn_to_tickable (struct lsquic_engine_public *, 35 lsquic_conn_t *); 36 37/* Put connection onto Advisory Tick Time Queue if it is not already on it. 38 */ 39void 40lsquic_engine_add_conn_to_attq (struct lsquic_engine_public *enpub, 41 lsquic_conn_t *, lsquic_time_t); 42 43#endif 44