lsquic_engine_public.h revision 3b55e6ae
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; 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 unsigned char enp_ver_tags_buf[ sizeof(lsquic_ver_tag_t) * N_LSQVER ]; 3350aadb33SDmitri Tikhonov unsigned enp_ver_tags_len; 3450aadb33SDmitri Tikhonov}; 3550aadb33SDmitri Tikhonov 36e8bd737dSDmitri Tikhonov/* Put connection onto the Tickable Queue if it is not already on it. If 3750aadb33SDmitri Tikhonov * connection is being destroyed, this is a no-op. 3850aadb33SDmitri Tikhonov */ 3950aadb33SDmitri Tikhonovvoid 40e8bd737dSDmitri Tikhonovlsquic_engine_add_conn_to_tickable (struct lsquic_engine_public *, 41e8bd737dSDmitri Tikhonov lsquic_conn_t *); 4250aadb33SDmitri Tikhonov 4350aadb33SDmitri Tikhonov/* Put connection onto Advisory Tick Time Queue if it is not already on it. 4450aadb33SDmitri Tikhonov */ 4550aadb33SDmitri Tikhonovvoid 4650aadb33SDmitri Tikhonovlsquic_engine_add_conn_to_attq (struct lsquic_engine_public *enpub, 4750aadb33SDmitri Tikhonov lsquic_conn_t *, lsquic_time_t); 4850aadb33SDmitri Tikhonov 4950aadb33SDmitri Tikhonov#endif 50