[tor-commits] [torspec/master] Standardize use of 'NUM' for non-negative integers in extrainfo
atagar at torproject.org
atagar at torproject.org
Mon Jul 3 18:57:42 UTC 2017
commit fec237389e9f5beef8eb80da7ee4716385f4bd39
Author: Damian Johnson <atagar at torproject.org>
Date: Mon Jul 3 11:55:12 2017 -0700
Standardize use of 'NUM' for non-negative integers in extrainfo
Fields used 'NUM', 'num', 'N', and in one case had a 'nul' typo. I'm not
entirely clear what formally indicates 'non-negative integer' but at least
we can standardize this.
Back in May I reached out to Mike to confirm padding-counts are and will
always be integers, so specifying that.
---
dir-spec.txt | 52 ++++++++++++++++++++++++++--------------------------
1 file changed, 26 insertions(+), 26 deletions(-)
diff --git a/dir-spec.txt b/dir-spec.txt
index fb35a24..c3f9563 100644
--- a/dir-spec.txt
+++ b/dir-spec.txt
@@ -805,7 +805,7 @@
resolve IPv6 addresses to country codes.
("geoip-start-time" YYYY-MM-DD HH:MM:SS NL)
- ("geoip-client-origins" CC=N,CC=N,... NL)
+ ("geoip-client-origins" CC=NUM,CC=NUM,... NL)
Only generated by bridge routers (see blocking.pdf), and only
when they have been configured with a geoip database.
@@ -837,7 +837,7 @@
is only added when the relay has been running as a bridge for at
least 24 hours.
- "bridge-ips" CC=N,CC=N,... NL
+ "bridge-ips" CC=NUM,CC=NUM,... NL
[At most once.]
List of mappings from two-letter country codes to the number of
@@ -845,13 +845,13 @@
bridge and which are no known relays, rounded up to the nearest
multiple of 8.
- "bridge-ip-versions" FAM=N,FAM=N,... NL
+ "bridge-ip-versions" FAM=NUM,FAM=NUM,... NL
[At most once.]
List of unique IP addresses that have connected to the bridge
per protocol family.
- "bridge-ip-transports" PT=N,PT=N,... NL
+ "bridge-ip-transports" PT=NUM,PT=NUM,... NL
[At most once.]
List of mappings from pluggable transport names to the number
@@ -883,9 +883,9 @@
is only added when the relay has opened its Dir port and after 24
hours of measuring directory requests.
- "dirreq-v2-ips" CC=N,CC=N,... NL
+ "dirreq-v2-ips" CC=NUM,CC=NUM,... NL
[At most once.]
- "dirreq-v3-ips" CC=N,CC=N,... NL
+ "dirreq-v3-ips" CC=NUM,CC=NUM,... NL
[At most once.]
List of mappings from two-letter country codes to the number of
@@ -896,9 +896,9 @@
versions, as of 0.2.5.2-alpha, no longer cache or serve v2
networkstatus documents.)
- "dirreq-v2-reqs" CC=N,CC=N,... NL
+ "dirreq-v2-reqs" CC=NUM,CC=NUM,... NL
[At most once.]
- "dirreq-v3-reqs" CC=N,CC=N,... NL
+ "dirreq-v3-reqs" CC=NUM,CC=NUM,... NL
[At most once.]
List of mappings from two-letter country codes to the number of
@@ -906,9 +906,9 @@
to the nearest multiple of 8. Only those requests are counted that
the directory can answer with a 200 OK status code.
- "dirreq-v2-share" num% NL
+ "dirreq-v2-share" NUM% NL
[At most once.]
- "dirreq-v3-share" num% NL
+ "dirreq-v3-share" NUM% NL
[At most once.]
The share of v2/v3 network status requests that the directory
@@ -917,9 +917,9 @@
formatted in percent with two decimal places. Shares are
calculated as means over the whole 24-hour interval.
- "dirreq-v2-resp" status=num,... NL
+ "dirreq-v2-resp" status=NUM,... NL
[At most once.]
- "dirreq-v3-resp" status=nul,... NL
+ "dirreq-v3-resp" status=NUM,... NL
[At most once.]
List of mappings from response statuses to the number of requests
@@ -941,13 +941,13 @@
If-Modified-Since time that is included in the request.
"busy": the directory is busy.
- "dirreq-v2-direct-dl" key=val,... NL
+ "dirreq-v2-direct-dl" key=NUM,... NL
[At most once.]
- "dirreq-v3-direct-dl" key=val,... NL
+ "dirreq-v3-direct-dl" key=NUM,... NL
[At most once.]
- "dirreq-v2-tunneled-dl" key=val,... NL
+ "dirreq-v2-tunneled-dl" key=NUM,... NL
[At most once.]
- "dirreq-v3-tunneled-dl" key=val,... NL
+ "dirreq-v3-tunneled-dl" key=NUM,... NL
[At most once.]
List of statistics about possible failures in the download process
@@ -1004,7 +1004,7 @@
line, is first added after the relay has been running for at least
24 hours.
- "entry-ips" CC=N,CC=N,... NL
+ "entry-ips" CC=NUM,CC=NUM,... NL
[At most once.]
List of mappings from two-letter country codes to the number of
@@ -1022,14 +1022,14 @@
is first added after the relay has been running for at least 24
hours.
- "cell-processed-cells" num,...,num NL
+ "cell-processed-cells" NUM,...,NUM NL
[At most once.]
Mean number of processed cells per circuit, subdivided into
deciles of circuits by the number of cells they have processed in
descending order from loudest to quietest circuits.
- "cell-queued-cells" num,...,num NL
+ "cell-queued-cells" NUM,...,NUM NL
[At most once.]
Mean number of cells contained in queues by circuit decile. These
@@ -1042,7 +1042,7 @@
Note that this statistic can be inaccurate for circuits that had
queued cells at the start or end of the measurement interval.
- "cell-time-in-queue" num,...,num NL
+ "cell-time-in-queue" NUM,...,NUM NL
[At most once.]
Mean time cells spend in circuit queues in milliseconds. Times are
@@ -1054,7 +1054,7 @@
Note that this statistic can be inaccurate for circuits that had
queued cells at the start or end of the measurement interval.
- "cell-circuits-per-decile" num NL
+ "cell-circuits-per-decile" NUM NL
[At most once.]
Mean number of circuits that are included in any of the deciles,
@@ -1114,7 +1114,7 @@
is first added after the relay has been running for at least 24
hours.
- "hidserv-rend-relayed-cells" SP num SP key=val SP key=val ... NL
+ "hidserv-rend-relayed-cells" SP NUM SP key=val SP key=val ... NL
[At most once.]
Approximate number of RELAY cells seen in either direction on a
@@ -1129,10 +1129,10 @@
mu = 0 and b = (delta_f / epsilon) with 'delta_f' and 'epsilon'
being reported in the key=val part, too; third, the result of the
previous obfuscation steps is truncated to the next smaller
- integer and included as 'num'. Note that the overall reported
+ integer and included as 'NUM'. Note that the overall reported
value can be negative.
- "hidserv-dir-onions-seen" SP num SP key=val SP key=val ... NL
+ "hidserv-dir-onions-seen" SP NUM SP key=val SP key=val ... NL
[At most once.]
Approximate number of unique hidden-service identities seen in
@@ -1140,7 +1140,7 @@
directory.
The original measurement value is obfuscated in the same way as
- the 'num' value reported in "hidserv-rend-relayed-cells", but
+ the 'NUM' value reported in "hidserv-rend-relayed-cells", but
possibly with different parameters as reported in the key=val part
of this line. Note that the overall reported value can be
negative.
@@ -1156,7 +1156,7 @@
Pluggable transports are only relevant to bridges, but these entries
can appear in non-bridge relays as well.
- "padding-counts" YYYY-MM-DD HH:MM:SS (NSEC s) key=val key=val ... NL
+ "padding-counts" YYYY-MM-DD HH:MM:SS (NSEC s) key=NUM key=NUM ... NL
[At most once.]
YYYY-MM-DD HH:MM:SS defines the end of the included measurement
More information about the tor-commits
mailing list