diff options
author | Nick Mathewson <nickm@torproject.org> | 2023-01-27 12:10:02 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2023-01-27 15:55:14 -0500 |
commit | 63cb0fc1ef97ee9848b508a1e95316f02f2472a2 (patch) | |
tree | 61eb6174e56a05022212bb3f56b53724dea8c3cd | |
parent | e7878316891312f3ad81202ba115bd631f7ddd9a (diff) | |
download | torspec-63cb0fc1ef97ee9848b508a1e95316f02f2472a2.tar.gz torspec-63cb0fc1ef97ee9848b508a1e95316f02f2472a2.zip |
prop339: trunnel changes from review
* The syntax `IN [a,b]` means that a and b are the only valid options,
which isn't what we want to say here.
* I'm changing the hostname tag to 0, which is the same as we have for
RESOLVED cells.
-rw-r--r-- | proposals/339-udp-over-tor.md | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/proposals/339-udp-over-tor.md b/proposals/339-udp-over-tor.md index 7bebba0..5993bdc 100644 --- a/proposals/339-udp-over-tor.md +++ b/proposals/339-udp-over-tor.md @@ -161,20 +161,23 @@ Defines an IP or Hostname address along with its port. This can be seen as the format. ``` -/* Address types */ -const T_HOSTNAME = 0x01; +/* Address types. + + Note that these are the same as in RESOLVED cells. +*/ +const T_HOSTNAME = 0x00; const T_IPV4 = 0x04; const T_IPV6 = 0x06; struct address { u8 type IN [T_IPV4, T_IPV6, T_HOSTNAME]; - u8 len IN [0, 255]; + u8 len; union addr[type] with length len { T_IPV4: u32 ipv4; T_IPV6: u8 ipv6[16]; T_HOSTNAME: u8 hostname[]; }; - u16 port IN [1, 65535]; + u16 port; } ``` |