diff options
author | rl1987 <rl1987@sdf.lonestar.org> | 2018-12-06 15:05:31 +0200 |
---|---|---|
committer | rl1987 <rl1987@sdf.lonestar.org> | 2018-12-06 15:05:31 +0200 |
commit | 11d0fb3de4935bc6b60c65924a245977257d3237 (patch) | |
tree | f41f7ccbb6c826ae2ba8b584f0c6c663bafdd481 /tor-spec.txt | |
parent | 7282e122886e9198e8a9fb368252e9e99dde6eb9 (diff) | |
download | torspec-11d0fb3de4935bc6b60c65924a245977257d3237.tar.gz torspec-11d0fb3de4935bc6b60c65924a245977257d3237.zip |
Update syntax that describes NETINFO cell
Diffstat (limited to 'tor-spec.txt')
-rw-r--r-- | tor-spec.txt | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/tor-spec.txt b/tor-spec.txt index 9203842..07b2c42 100644 --- a/tor-spec.txt +++ b/tor-spec.txt @@ -852,20 +852,23 @@ see tor-design.pdf. If version 2 or higher is negotiated, each party sends the other a NETINFO cell. The cell's payload is: - Timestamp [4 bytes] - Other OR's address [variable] - Number of addresses [1 byte] - This OR's addresses [variable] - - The address format is as follows: - Type [1 byte] - * 0x04 - IPv4 - * 0x06 - IPv6 - Length (size of Value field) [1 byte] - * 4 if Type is IPv4 - * 16 if Type is IPv6 - Value [Variable-width] - * Address value in network byte order. + TIME (Timestamp) [4 bytes] + OTHERADDR (Other OR's address) [variable] + ATYPE (Address type) [1 byte] + ALEN (Adress length) [1 byte] + AVAL (Address value in NBO) [ALEN bytes] + NMYADDR (Number of this OR's addresses) [1 byte] + NMYADDR times: + ATYPE (Address type) [1 byte] + ALEN (Adress length) [1 byte] + AVAL (Address value in NBO)) [ALEN bytes] + + Recognized address types (ATYPE) are: + [04] IPv4. + [06] IPv6. + + ALEN MUST be 4 when ATYPE is 0x04 (IPv4) and 16 when ATYPE is 0x06 + (IPv6). The timestamp is a big-endian unsigned integer number of seconds since the Unix epoch. Implementations MUST ignore unexpected bytes |