lsquic_engine_public.h revision 229fce07
1229fce07SDmitri Tikhonov/* Copyright (c) 2017 - 2019 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; 127f2bd84cSDmitri Tikhonovstruct stack_st_X509; 1350aadb33SDmitri Tikhonov 1450aadb33SDmitri Tikhonovstruct lsquic_engine_public { 1550aadb33SDmitri Tikhonov struct lsquic_mm enp_mm; 1650aadb33SDmitri Tikhonov struct lsquic_engine_settings enp_settings; 173b55e6aeSDmitri Tikhonov const struct lsquic_hset_if *enp_hsi_if; 183b55e6aeSDmitri Tikhonov void *enp_hsi_ctx; 197f2bd84cSDmitri Tikhonov int (*enp_verify_cert)(void *verify_ctx, 207f2bd84cSDmitri Tikhonov struct stack_st_X509 *chain); 217f2bd84cSDmitri Tikhonov void *enp_verify_ctx; 2250aadb33SDmitri Tikhonov const struct lsquic_packout_mem_if 2350aadb33SDmitri Tikhonov *enp_pmi; 2450aadb33SDmitri Tikhonov void *enp_pmi_ctx; 2550aadb33SDmitri Tikhonov struct lsquic_engine *enp_engine; 2650aadb33SDmitri Tikhonov enum { 2750aadb33SDmitri Tikhonov ENPUB_PROC = (1 << 0), /* Being processed by one of the user-facing 2850aadb33SDmitri Tikhonov * functions. 2950aadb33SDmitri Tikhonov */ 30c44946ecSDmitri Tikhonov ENPUB_CAN_SEND = (1 << 1), 3150aadb33SDmitri Tikhonov } enp_flags; 3250aadb33SDmitri Tikhonov}; 3350aadb33SDmitri Tikhonov 34e8bd737dSDmitri Tikhonov/* Put connection onto the Tickable Queue if it is not already on it. If 3550aadb33SDmitri Tikhonov * connection is being destroyed, this is a no-op. 3650aadb33SDmitri Tikhonov */ 3750aadb33SDmitri Tikhonovvoid 38e8bd737dSDmitri Tikhonovlsquic_engine_add_conn_to_tickable (struct lsquic_engine_public *, 39e8bd737dSDmitri Tikhonov lsquic_conn_t *); 4050aadb33SDmitri Tikhonov 4150aadb33SDmitri Tikhonov/* Put connection onto Advisory Tick Time Queue if it is not already on it. 4250aadb33SDmitri Tikhonov */ 4350aadb33SDmitri Tikhonovvoid 4450aadb33SDmitri Tikhonovlsquic_engine_add_conn_to_attq (struct lsquic_engine_public *enpub, 4550aadb33SDmitri Tikhonov lsquic_conn_t *, lsquic_time_t); 4650aadb33SDmitri Tikhonov 4750aadb33SDmitri Tikhonov#endif 48