aboutsummaryrefslogtreecommitdiff
path: root/spec/tor-spec/opening-streams.md
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2024-02-06 11:18:31 -0500
committerNick Mathewson <nickm@torproject.org>2024-02-06 13:00:44 -0500
commitdb80b935f799ab44750ff378267b10a967af38e3 (patch)
tree12be4d952e51f6102fee807c25532025fad91def /spec/tor-spec/opening-streams.md
parentad73886e2a38255b5b0b599628f67fe820a5c440 (diff)
downloadtorspec-db80b935f799ab44750ff378267b10a967af38e3.tar.gz
torspec-db80b935f799ab44750ff378267b10a967af38e3.zip
Apply "cell" and "message" consistently
Done by grepping for "cell" and making sure it was accurate in every place where it occurs. In tor-spec, I also searched for "message". Part of #253.
Diffstat (limited to 'spec/tor-spec/opening-streams.md')
-rw-r--r--spec/tor-spec/opening-streams.md42
1 files changed, 21 insertions, 21 deletions
diff --git a/spec/tor-spec/opening-streams.md b/spec/tor-spec/opening-streams.md
index 799b4dc..8e63a62 100644
--- a/spec/tor-spec/opening-streams.md
+++ b/spec/tor-spec/opening-streams.md
@@ -7,7 +7,7 @@
To open a new anonymized TCP connection, the OP chooses an open
circuit to an exit that may be able to connect to the destination
address, selects an arbitrary StreamID not yet used on that circuit,
-and constructs a RELAY_BEGIN cell with a payload encoding the address
+and constructs a RELAY_BEGIN message with a payload encoding the address
and port of the destination host. The payload format is:
```text
@@ -48,12 +48,12 @@ FLAGS, FLAGS is omitted from the message payload.
MUST ignore them.
```
-Upon receiving this cell, the exit node resolves the address as
+Upon receiving this message, the exit node resolves the address as
necessary, and opens a new TCP connection to the target port. If the
address cannot be resolved, or a connection can't be established, the
-exit node replies with a RELAY_END cell. (See
+exit node replies with a RELAY_END message. (See
["Closing streams"](./closing-streams.md#closing-streams).)
-Otherwise, the exit node replies with a RELAY_CONNECTED cell, whose
+Otherwise, the exit node replies with a RELAY_CONNECTED message, whose
payload is in one of the following formats:
```text
@@ -88,35 +88,35 @@ attacks.\]
## Transmitting data {#transmitting}
Once a connection has been established, the OP and exit node
-package stream data in RELAY_DATA cells, and upon receiving such
-cells, echo their contents to the corresponding TCP stream.
+package stream data in RELAY_DATA message, and upon receiving such
+messages, echo their contents to the corresponding TCP stream.
If the exit node does not support optimistic data (i.e. its
version number is before 0.2.3.1-alpha), then the OP MUST wait
-for a RELAY_CONNECTED cell before sending any data. If the exit
+for a RELAY_CONNECTED message before sending any data. If the exit
node supports optimistic data (i.e. its version number is
-0.2.3.1-alpha or later), then the OP MAY send RELAY_DATA cells
-immediately after sending the RELAY_BEGIN cell (and before
-receiving either a RELAY_CONNECTED or RELAY_END cell).
+0.2.3.1-alpha or later), then the OP MAY send RELAY_DATA messages
+immediately after sending the RELAY_BEGIN message (and before
+receiving either a RELAY_CONNECTED or RELAY_END message).
-RELAY_DATA cells sent to unrecognized streams are dropped. If
-the exit node supports optimistic data, then RELAY_DATA cells it
+RELAY_DATA messages sent to unrecognized streams are dropped. If
+the exit node supports optimistic data, then RELAY_DATA messages it
receives on streams which have seen RELAY_BEGIN but have not yet
been replied to with a RELAY_CONNECTED or RELAY_END are queued.
If the stream creation succeeds with a RELAY_CONNECTED, the queue
is processed immediately afterwards; if the stream creation fails
with a RELAY_END, the contents of the queue are deleted.
-Relay RELAY_DROP cells are long-range dummies; upon receiving such
-a cell, the OR or OP must drop it.
+Relay RELAY_DROP messages are long-range dummies; upon receiving such
+a message, the OR or OP must drop it.
<a id="tor-spec.txt-6.2.1"></a>
## Opening a directory stream
If a Tor relay is a directory server, it should respond to a
-RELAY_BEGIN_DIR cell as if it had received a BEGIN cell requesting a
-connection to its directory port. RELAY_BEGIN_DIR cells ignore exit
+RELAY_BEGIN_DIR message as if it had received a BEGIN message requesting a
+connection to its directory port. RELAY_BEGIN_DIR message ignore exit
policy, since the stream is local to the Tor process.
Directory servers may be:
@@ -127,14 +127,14 @@ Directory servers may be:
- onion service directories (RELAY_BEGIN_DIR, anonymous).
If the Tor relay is not running a directory service, it should respond
-with a REASON_NOTDIRECTORY RELAY_END cell.
+with a REASON_NOTDIRECTORY RELAY_END message.
-Clients MUST generate an all-zero payload for RELAY_BEGIN_DIR cells,
+Clients MUST generate an all-zero payload for RELAY_BEGIN_DIR message,
and relays MUST ignore the payload.
-In response to a RELAY_BEGIN_DIR cell, relays respond either with a
-RELAY_CONNECTED cell on success, or a RELAY_END cell on failure. They
-MUST send a RELAY_CONNECTED cell all-zero payload, and clients MUST ignore
+In response to a RELAY_BEGIN_DIR message, relays respond either with a
+RELAY_CONNECTED message on success, or a RELAY_END message on failure. They
+MUST send a RELAY_CONNECTED message all-zero payload, and clients MUST ignore
the payload.
\[RELAY_BEGIN_DIR was not supported before Tor 0.1.2.2-alpha; clients