aboutsummaryrefslogtreecommitdiff
path: root/src/trunnel/hs/cell_establish_intro.trunnel
diff options
context:
space:
mode:
Diffstat (limited to 'src/trunnel/hs/cell_establish_intro.trunnel')
-rw-r--r--src/trunnel/hs/cell_establish_intro.trunnel23
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];
+};