diff options
author | Mike Perry <mikeperry-git@torproject.org> | 2021-08-06 18:47:05 +0000 |
---|---|---|
committer | Mike Perry <mikeperry-git@torproject.org> | 2021-09-28 21:26:10 +0000 |
commit | 6868f30cedf783bc6ba883206899ae7d59473c0c (patch) | |
tree | c5ae3f2ad477e09c328824d449f838eedc925a9d /src/trunnel/flow_control_cells.trunnel | |
parent | ecb91e75e4770fa76c64c7b1932985de024d693e (diff) | |
download | tor-6868f30cedf783bc6ba883206899ae7d59473c0c.tar.gz tor-6868f30cedf783bc6ba883206899ae7d59473c0c.zip |
Add trunnel definitions for xon/xoff cells.
Diffstat (limited to 'src/trunnel/flow_control_cells.trunnel')
-rw-r--r-- | src/trunnel/flow_control_cells.trunnel | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/trunnel/flow_control_cells.trunnel b/src/trunnel/flow_control_cells.trunnel new file mode 100644 index 0000000000..9d07b568a9 --- /dev/null +++ b/src/trunnel/flow_control_cells.trunnel @@ -0,0 +1,20 @@ +/* This file contains the xon and xoff cell definitions, for flow control. */ + +/* xoff cell definition. Tells the other endpoint to stop sending, because + * we have too much data queued for this stream. */ +struct xoff_cell { + /* Version field. */ + u8 version IN [0x00]; +} + +/* xon cell declaration. Tells the other endpoint to resume sending and/or + * update its sending rate on this stream based on advisory information. */ +struct xon_cell { + /* Version field. */ + u8 version IN [0x00]; + + /* Advisory field: The ewma rate of socket drain we have seen so far + * on this stream, in kilobytes/sec (1000 bytes/sec). May be zero, + * which means no rate advice. */ + u32 kbps_ewma; +} |