From 63cb0fc1ef97ee9848b508a1e95316f02f2472a2 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 27 Jan 2023 12:10:02 -0500 Subject: 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. --- proposals/339-udp-over-tor.md | 11 +++++++---- 1 file 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; } ``` -- cgit v1.2.3-54-g00ecf