wired
libc-free QUIC/HTTP3 SDK in C for x86_64-linux
Loading...
Searching...
No Matches
moqtss.h
Go to the documentation of this file.
1#ifndef WIRED_MOQTSS_H
2#define WIRED_MOQTSS_H
3
6
13
17#define WIRED_MOQTRUN_SSTS_SETS 8
18
22#define WIRED_MOQTRUN_SSTS_RING 8
23
26#define WIRED_MOQTRUN_SSTS_KEEP 5
27
29#define MOQTSS_PICK_NONE (~(u64)0)
30
40
43typedef struct {
51
80
103
104#endif
Sender-side track switching (SSTS) decision algorithms, ported from moqtail's moqtail-ssts crate (ee9...
#define MOQSSTS_MAX_MEMBERS
Members per switching set.
Definition moqssts.h:24
#define WIRED_MOQTRUN_SSTS_SETS
Switching sets one subscriber session holds at once.
Definition moqtss.h:17
#define WIRED_MOQTRUN_SSTS_RING
Recent group decisions kept per switching set.
Definition moqtss.h:22
Per-connection backpressure state; reset it with moqssts_bp_init.
Definition moqssts.h:99
The final decision for one group of one set: the alias forwarded (MOQTSS_PICK_NONE: nothing).
Definition moqtss.h:43
u8 used
1 while the ring entry holds a decision; 0 is a free slot.
Definition moqtss.h:49
u64 group
Group ID (the set's own numbering) this decision is for.
Definition moqtss.h:45
u64 pick
Track Alias forwarded for the group, or MOQTSS_PICK_NONE.
Definition moqtss.h:47
One member: a subscription of the session, named by the Track Alias the hub gave it on that session (...
Definition moqtss.h:33
u64 threshold_kbps
Throughput (kbit/s) the member's encoding needs to be eligible, from SWITCHING_SET_ASSIGNMENT.
Definition moqtss.h:38
u64 alias
Track Alias of the member subscription on this session.
Definition moqtss.h:35
One subscriber session's SSTS state (wired_moqtrun_peer.ssts).
Definition moqtss.h:82
u64 next_obs_ms
wired_moqt_tick clock of the next tick observation (valid while obs_armed).
Definition moqtss.h:96
int obs_armed
1 once a tick saw the current pacing set; cleared the moment the session has no pacing set,...
Definition moqtss.h:99
u8 algs
Negotiated algorithms: bit 0 default (0), bit 1 backpressure (0xff01).
Definition moqtss.h:85
moqssts_bp bp
Backpressure tier state (one tier shared by the session's sets).
Definition moqtss.h:93
u64 timeouts
Subscriber streams of this session the hub reset (busy shed, DELIVERY_TIMEOUT, reliable stall) since ...
Definition moqtss.h:91
moqtss_set sets[WIRED_MOQTRUN_SSTS_SETS]
Switching-set slots; a slot is live while its in_use is 1.
Definition moqtss.h:101
One switching set (moqtail switching_set.rs).
Definition moqtss.h:56
moqtss_dec dec[WIRED_MOQTRUN_SSTS_RING]
Ring of recent per-group decisions (stale entries pruned).
Definition moqtss.h:78
moqtss_member m[MOQSSTS_MAX_MEMBERS]
Members, sorted ascending by threshold_kbps.
Definition moqtss.h:76
u64 set_id
Switching set ID chosen by the subscriber in the assignment.
Definition moqtss.h:58
u64 algorithm_id
Selection algorithm (MOQCTL_SSTS_ALG_*) the set runs under.
Definition moqtss.h:60
u64 activate
Member count at which the set becomes active; 0 never activates.
Definition moqtss.h:64
u8 has_largest
1 once largest holds a decided group.
Definition moqtss.h:68
u8 n
Members in use: m[0..n).
Definition moqtss.h:72
u8 in_use
1 while this slot holds a set; cleared when its last member leaves.
Definition moqtss.h:74
u8 rank
Strict priority tier: rank 0 is served first.
Definition moqtss.h:70
u64 largest
Largest group decided for this set, valid when has_largest.
Definition moqtss.h:66
u64 weight
Share inside the rank tier, 1..10 (last assignment wins).
Definition moqtss.h:62
Linux direct syscalls.
unsigned char u8
unsigned 8-bit integer / byte
Definition types.h:18
unsigned long u64
unsigned 64-bit integer
Definition types.h:13