Packages
hackney
3.0.2
4.7.2
4.7.1
4.7.0
4.6.1
4.6.0
4.5.2
4.5.1
4.5.0
4.4.5
4.4.3
4.4.2
4.4.1
4.4.0
4.3.0
4.2.3
4.2.2
4.2.1
4.2.0
4.1.0
4.0.3
4.0.2
4.0.1
4.0.0
3.2.1
3.2.0
3.1.2
3.1.1
3.1.0
3.0.3
3.0.2
3.0.1
3.0.0
retired
2.0.1
2.0.0
2.0.0-beta.1
1.25.0
1.24.1
1.24.0
1.23.0
1.22.0
1.21.0
1.20.1
1.20.0
1.19.1
1.19.0
1.18.2
1.18.1
1.18.0
1.17.4
1.17.3
1.17.2
1.17.1
1.17.0
1.16.0
1.15.2
1.15.1
1.15.0
1.14.3
1.14.2
1.14.0
1.13.0
1.12.1
1.12.0
1.11.0
1.10.1
1.10.0
1.9.0
1.8.6
1.8.5
1.8.4
1.8.3
1.8.2
1.8.0
1.7.1
1.7.0
1.6.6
retired
1.6.5
1.6.4
retired
1.6.3
1.6.2
1.6.1
1.6.0
1.5.7
1.5.6
1.5.5
1.5.4
1.5.3
1.5.2
1.5.1
1.5.0
1.4.10
1.4.8
1.4.7
1.4.6
1.4.5
1.4.4
1.4.3
1.4.2
1.4.1
1.4.0
1.3.2
1.3.1
1.3.0
1.2.0
1.1.0
1.0.6
1.0.5
1.0.2
1.0.1
0.15.2
0.15.0
0.14.3
0.14.2
0.14.1
0.14.0
0.13.1
Simple HTTP client with HTTP/1.1, HTTP/2, and HTTP/3 support
Security advisory:
This version has known vulnerabilities.
View advisories
Current section
Files
Jump to
Current section
Files
c_src/lsquic/src/liblsquic/lsquic_purga.h
/* Copyright (c) 2017 - 2022 LiteSpeed Technologies Inc. See LICENSE. */
/*
* lsquic_purga.h -- Purgatory for CIDs
*
* This module keeps a set of CIDs that should be ignored for a period
* of time. It is used when a connection is closed: this way, late
* packets will not create a new connection.
*/
#ifndef LSQUIC_PURGA_H
#define LSQUIC_PURGA_H 1
struct lsquic_purga;
/* Purgatory type is used to tell what action to take when a packet whose
* CID is in the purgatory is received.
*/
enum purga_type
{
PUTY_CONN_DELETED, /* Connection was deleted */
PUTY_CONN_DRAIN, /* Connection is in the "Drain" state */
PUTY_CID_RETIRED, /* CID was retired */
};
/* User can set these values freely */
struct purga_el
{
enum purga_type puel_type;
/* When puel_type is PUTY_CONN_DRAIN or PUTY_CID_RETIRED, puel_time
* specifies the time until the end of the drain period.
*
* When puel_type is PUTY_CONN_DELETED, puel_time specifies the time
* until the next time stateless reset can be sent. puel_count is the
* number of times puel_time was updated.
*/
unsigned puel_count;
lsquic_time_t puel_time;
};
struct lsquic_purga *
lsquic_purga_new (lsquic_time_t min_life, lsquic_cids_update_f remove_cids,
void *remove_ctx);
struct purga_el *
lsquic_purga_add (struct lsquic_purga *, const lsquic_cid_t *, void *peer_ctx,
enum purga_type, lsquic_time_t);
struct purga_el *
lsquic_purga_contains (struct lsquic_purga *, const lsquic_cid_t *);
void
lsquic_purga_destroy (struct lsquic_purga *);
unsigned
lsquic_purga_cids_per_page (void);
#ifndef NDEBUG
struct purga_bloom_stats
{
unsigned long searches;
unsigned long false_hits;
};
struct purga_bloom_stats *
lsquic_purga_get_bloom_stats (struct lsquic_purga *);
#endif
#endif