Comments from cat: "space" should include or exclude tabs. We include tabs, so specify that.

svn:r5635
This commit is contained in:
Nick Mathewson 2005-12-23 15:47:15 +00:00
parent 9afeacac3b
commit 4417017197
2 changed files with 17 additions and 12 deletions

View File

@ -117,12 +117,15 @@ $Id$
for clarity between sections; these blank lines are ignored. for clarity between sections; these blank lines are ignored.
Implementations MUST NOT depend on blank lines in any particular location. Implementations MUST NOT depend on blank lines in any particular location.
As used here, "whitespace" is a sequence of 1 or more tab or space
characters.
The preamble contains: The preamble contains:
"network-status-version" -- A document format version. For this "network-status-version" -- A document format version. For this
specification, the version is "2". specification, the version is "2".
"dir-source" -- The authority's hostname, current IP address, and "dir-source" -- The authority's hostname, current IP address, and
directory port, all separated by spaces. directory port, all separated by whitespace.
"fingerprint" -- A base16-encoded hash of the signing key's "fingerprint" -- A base16-encoded hash of the signing key's
fingerprint, with no additional spaces added. fingerprint, with no additional spaces added.
"contact" -- An arbitrary string describing how to contact the "contact" -- An arbitrary string describing how to contact the
@ -134,7 +137,7 @@ $Id$
"server-versions" -- A comma-separated list of recommended server "server-versions" -- A comma-separated list of recommended server
versions. versions.
"published" -- The publication time for this network-status object. "published" -- The publication time for this network-status object.
"dir-options" -- A set of flags separated by spaces: "dir-options" -- A set of flags, in any order, separated by whitespace:
"Names" if this directory authority performs name bindings. "Names" if this directory authority performs name bindings.
"Versions" if this directory authority recommends software versions. "Versions" if this directory authority recommends software versions.
@ -148,7 +151,8 @@ $Id$
For each router, the router entry contains: (This format is designed for For each router, the router entry contains: (This format is designed for
conciseness.) conciseness.)
"r" -- followed by the following elements, separated by spaces: "r" -- followed by the following elements, in order, separated by
whitespace:
- The OR's nickname, - The OR's nickname,
- A hash of its identity key, encoded in base64, with trailing = - A hash of its identity key, encoded in base64, with trailing =
signs removed. signs removed.
@ -160,7 +164,7 @@ $Id$
- An IP address - An IP address
- An OR port - An OR port
- A directory port (or "0" for none") - A directory port (or "0" for none")
"s" -- A series of space-separated status flags: "s" -- A series of whitespace-separated status flags, in any order:
"Authority" if the router is a directory authority. "Authority" if the router is a directory authority.
"Exit" if the router is useful for building general-purpose exit "Exit" if the router is useful for building general-purpose exit
circuits. circuits.

View File

@ -675,7 +675,7 @@ extensible information format.
The highest level object is a Document, which consists of one or more Items. The highest level object is a Document, which consists of one or more Items.
Every Item begins with a KeywordLine, followed by one or more Objects. A Every Item begins with a KeywordLine, followed by one or more Objects. A
KeywordLine begins with a Keyword, optionally followed by a space and more KeywordLine begins with a Keyword, optionally followed by whitespace and more
non-newline characters, and ends with a newline. A Keyword is a sequence of non-newline characters, and ends with a newline. A Keyword is a sequence of
one or more characters in the set [A-Za-z0-9-]. An Object is a block of one or more characters in the set [A-Za-z0-9-]. An Object is a block of
encoded data in pseudo-Open-PGP-style armor. (cf. RFC 2440) encoded data in pseudo-Open-PGP-style armor. (cf. RFC 2440)
@ -684,10 +684,11 @@ More formally:
Document ::= (Item | NL)+ Document ::= (Item | NL)+
Item ::= KeywordLine Object* Item ::= KeywordLine Object*
KeywordLine ::= Keyword NL | Keyword SP ArgumentsChar+ NL KeywordLine ::= Keyword NL | Keyword WS ArgumentsChar+ NL
Keyword = KeywordChar+ Keyword = KeywordChar+
KeywordChar ::= 'A' ... 'Z' | 'a' ... 'z' | '0' ... '9' | '-' KeywordChar ::= 'A' ... 'Z' | 'a' ... 'z' | '0' ... '9' | '-'
ArgumentChar ::= any printing ASCII character except NL. ArgumentChar ::= any printing ASCII character except NL.
WS = (SP | TAB)+
Object ::= BeginLine Base-64-encoded-data EndLine Object ::= BeginLine Base-64-encoded-data EndLine
BeginLine ::= "-----BEGIN " Keyword "-----" NL BeginLine ::= "-----BEGIN " Keyword "-----" NL
EndLine ::= "-----END " Keyword "-----" NL EndLine ::= "-----END " Keyword "-----" NL
@ -748,7 +749,7 @@ The items' formats are as follows:
"fingerprint" "fingerprint"
A fingerprint (20 byte SHA1 hash of asn1 encoded public key, encoded A fingerprint (20 byte SHA1 hash of asn1 encoded public key, encoded
in hex, with spaces after every 4 characters) for this router's in hex, with a single space after every 4 characters) for this router's
identity key. identity key.
[We didn't start parsing this line until Tor 0.1.0.6-rc; it should [We didn't start parsing this line until Tor 0.1.0.6-rc; it should
@ -798,9 +799,9 @@ The items' formats are as follows:
"family" names NL "family" names NL
'Names' is a space-separated list of server nicknames. If two ORs 'Names' is a whitespace-separated list of server nicknames. If two ORs
list one another in their "family" entries, then OPs should treat list one another in their "family" entries, then OPs should treat them
them as a single OR for the purpose of path selection. as a single OR for the purpose of path selection.
For example, if node A's descriptor contains "family B", and node B's For example, if node A's descriptor contains "family B", and node B's
descriptor contains "family A", then node A and node B should never descriptor contains "family A", then node A and node B should never
@ -859,7 +860,7 @@ descriptors, and a single "directory-signature" item.
A list of which versions of which implementations are currently A list of which versions of which implementations are currently
believed to be secure and compatible with the network. believed to be secure and compatible with the network.
"running-routers" space-separated-list "running-routers" whitespace-separated-list
A description of which routers are currently believed to be up or A description of which routers are currently believed to be up or
down. Every entry consists of an optional "!", followed by either an down. Every entry consists of an optional "!", followed by either an
@ -873,7 +874,7 @@ descriptors, and a single "directory-signature" item.
backward compatibility. New code should parse 'router-status' backward compatibility. New code should parse 'router-status'
instead.] instead.]
"router-status" space-separated-list "router-status" whitespace-separated-list
A description of which routers are currently believed to be up or A description of which routers are currently believed to be up or
down, and which are verified or unverified. Contains one entry for down, and which are verified or unverified. Contains one entry for