lsquic_tokgen.h revision 7d09751d
1/* Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc. See LICENSE. */ 2#ifndef LSQUIC_TOKEN_H 3#define LSQUIC_TOKEN_H 1 4 5struct lsquic_engine_public; 6struct sockaddr; 7struct lsquic_packet_in; 8struct lsquic_cid; 9 10enum token_type { TOKEN_RETRY, TOKEN_RESUME, N_TOKEN_TYPES, }; 11 12struct token_generator; 13 14struct token_generator * 15lsquic_tg_new (struct lsquic_engine_public *); 16 17void 18lsquic_tg_destroy (struct token_generator *); 19 20/* `reset_token' must be IQUIC_SRESET_TOKEN_SZ bytes in length */ 21void 22lsquic_tg_generate_sreset (struct token_generator *, 23 const struct lsquic_cid *cid, unsigned char *reset_token); 24 25#endif 26