diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-07-30 14:27:29 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-07-30 14:27:29 -0400 |
commit | c2d5ec5e43c2690656ea5a5a384683108782d149 (patch) | |
tree | 0f9f9cd201c2d970170e98a5e94d713737a2e234 /src/trunnel/hs/cell_establish_intro.trunnel | |
parent | c4742b89b23d58958ee0d5ca324dac5948c94bf6 (diff) | |
parent | cdb0e6c2522aac372c9a816300dacfd62856dd48 (diff) | |
download | tor-c2d5ec5e43c2690656ea5a5a384683108782d149.tar.gz tor-c2d5ec5e43c2690656ea5a5a384683108782d149.zip |
Merge branch 'maint-0.4.2' into bug40076_042
Diffstat (limited to 'src/trunnel/hs/cell_establish_intro.trunnel')
-rw-r--r-- | src/trunnel/hs/cell_establish_intro.trunnel | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/trunnel/hs/cell_establish_intro.trunnel b/src/trunnel/hs/cell_establish_intro.trunnel index 011ee62a15..e30938f6c2 100644 --- a/src/trunnel/hs/cell_establish_intro.trunnel +++ b/src/trunnel/hs/cell_establish_intro.trunnel @@ -39,3 +39,26 @@ struct trn_cell_intro_established { /* Extension(s). Reserved fields. */ struct trn_cell_extension extensions; }; + +/* + * ESTABLISH_INTRO cell extensions. + */ + +const TRUNNEL_CELL_EXTENSION_TYPE_DOS = 0x01; + +/* DoS Parameter types. */ +const TRUNNEL_DOS_PARAM_TYPE_INTRO2_RATE_PER_SEC = 0x01; +const TRUNNEL_DOS_PARAM_TYPE_INTRO2_BURST_PER_SEC = 0x02; + +/* + * DoS Parameters Extension. See proposal 305 for more details. + */ +struct trn_cell_extension_dos_param { + u8 type; + u64 value; +}; + +struct trn_cell_extension_dos { + u8 n_params; + struct trn_cell_extension_dos_param params[n_params]; +}; |