commit f3f9465587b0ef3db58d42ed70ae16c96f926177
parent 3c2364790c5a1cf836c15227a9f28b948918d8d3
Author: Nick Mathewson <nickm@torproject.org>
Date: Thu, 17 Apr 2025 09:50:33 -0400
or.h: Extend comment about cell format to include v1 format.
Diffstat:
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/core/or/or.h b/src/core/or/or.h
@@ -454,13 +454,20 @@ typedef enum {
#define SOCKS4_NETWORK_LEN 8
/*
- * Relay payload:
+ * Relay cell body (V0):
* Relay command [1 byte]
* Recognized [2 bytes]
* Stream ID [2 bytes]
* Partial SHA-1 [4 bytes]
* Length [2 bytes]
* Relay payload [498 bytes]
+ *
+ * Relay cell body (V1):
+ * Tag [16 bytes]
+ * Command [1 byte]
+ * Length [2 bytes]
+ * Stream ID [2 bytes, Optional, depends on command]
+ * Relay payload [488 bytes _or_ 490 bytes]
*/
/** Number of bytes in a cell, minus cell header. */