lsquic_engine_public.h revision c44946ec
110c492f0SDmitri Tikhonov/* Copyright (c) 2017 - 2018 LiteSpeed Technologies Inc. See LICENSE. */ 250aadb33SDmitri Tikhonov/* 350aadb33SDmitri Tikhonov * lsquic_engine_public.h -- Engine's "public interface" 450aadb33SDmitri Tikhonov * 550aadb33SDmitri Tikhonov */ 650aadb33SDmitri Tikhonov 750aadb33SDmitri Tikhonov#ifndef LSQUIC_ENGINE_PUBLIC_H 850aadb33SDmitri Tikhonov#define LSQUIC_ENGINE_PUBLIC_H 1 950aadb33SDmitri Tikhonov 1050aadb33SDmitri Tikhonovstruct lsquic_conn; 1150aadb33SDmitri Tikhonovstruct lsquic_engine; 1250aadb33SDmitri Tikhonov 1350aadb33SDmitri Tikhonovstruct lsquic_engine_public { 1450aadb33SDmitri Tikhonov struct lsquic_mm enp_mm; 1550aadb33SDmitri Tikhonov struct lsquic_engine_settings enp_settings; 1650aadb33SDmitri Tikhonov const struct lsquic_packout_mem_if 1750aadb33SDmitri Tikhonov *enp_pmi; 1850aadb33SDmitri Tikhonov void *enp_pmi_ctx; 1950aadb33SDmitri Tikhonov struct lsquic_engine *enp_engine; 2050aadb33SDmitri Tikhonov enum { 2150aadb33SDmitri Tikhonov ENPUB_PROC = (1 << 0), /* Being processed by one of the user-facing 2250aadb33SDmitri Tikhonov * functions. 2350aadb33SDmitri Tikhonov */ 24c44946ecSDmitri Tikhonov ENPUB_CAN_SEND = (1 << 1), 2550aadb33SDmitri Tikhonov } enp_flags; 2650aadb33SDmitri Tikhonov unsigned char enp_ver_tags_buf[ sizeof(lsquic_ver_tag_t) * N_LSQVER ]; 2750aadb33SDmitri Tikhonov unsigned enp_ver_tags_len; 2850aadb33SDmitri Tikhonov}; 2950aadb33SDmitri Tikhonov 30e8bd737dSDmitri Tikhonov/* Put connection onto the Tickable Queue if it is not already on it. If 3150aadb33SDmitri Tikhonov * connection is being destroyed, this is a no-op. 3250aadb33SDmitri Tikhonov */ 3350aadb33SDmitri Tikhonovvoid 34e8bd737dSDmitri Tikhonovlsquic_engine_add_conn_to_tickable (struct lsquic_engine_public *, 35e8bd737dSDmitri Tikhonov lsquic_conn_t *); 3650aadb33SDmitri Tikhonov 3750aadb33SDmitri Tikhonov/* Put connection onto Advisory Tick Time Queue if it is not already on it. 3850aadb33SDmitri Tikhonov */ 3950aadb33SDmitri Tikhonovvoid 4050aadb33SDmitri Tikhonovlsquic_engine_add_conn_to_attq (struct lsquic_engine_public *enpub, 4150aadb33SDmitri Tikhonov lsquic_conn_t *, lsquic_time_t); 4250aadb33SDmitri Tikhonov 4350aadb33SDmitri Tikhonov#endif 44