diff options
author | Nick Mathewson <nickm@torproject.org> | 2003-09-30 22:44:33 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2003-09-30 22:44:33 +0000 |
commit | bd7db5bd87c0282f37f92b35ca88b4e1a2f61a1d (patch) | |
tree | a9290806e6d3dd03ca45a999e04cbc08c13ff9dd /src/or/routers.c | |
parent | 8551509d5c2979c435d32e21591247682b0f8e41 (diff) | |
download | tor-bd7db5bd87c0282f37f92b35ca88b4e1a2f61a1d.tar tor-bd7db5bd87c0282f37f92b35ca88b4e1a2f61a1d.tar.gz |
Add "platform" to router descriptors.
svn:r522
Diffstat (limited to 'src/or/routers.c')
-rw-r--r-- | src/or/routers.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/routers.c b/src/or/routers.c index a991a3933..5e0d609aa 100644 --- a/src/or/routers.c +++ b/src/or/routers.c @@ -275,6 +275,7 @@ typedef enum { K_ROUTER_SIGNATURE, K_PUBLISHED, K_RUNNING_ROUTERS, + K_PLATFORM, _SIGNATURE, _PUBLIC_KEY, _ERR, @@ -296,6 +297,7 @@ static struct token_table_ent token_table[] = { { "router-signature", K_ROUTER_SIGNATURE }, { "published", K_PUBLISHED }, { "running-routers", K_RUNNING_ROUTERS }, + { "platform", K_PLATFORM }, { NULL, -1 } }; @@ -453,6 +455,7 @@ router_dump_token(directory_token_t *tok) { case K_ROUTER_SIGNATURE: printf("Router-signature"); break; case K_PUBLISHED: printf("Published"); break; case K_RUNNING_ROUTERS: printf("Running-routers"); break; + case K_PLATFORM: printf("Platform"); break; default: printf("?????? %d\n", tok->tp); return; } @@ -886,7 +889,12 @@ routerinfo_t *router_get_entry_from_string(char**s) { log_fn(LOG_DEBUG,"or_port %d, ap_port %d, dir_port %d, bandwidth %d.", router->or_port, router->ap_port, router->dir_port, router->bandwidth); + /* XXX Later, require platform before published. */ NEXT_TOKEN(); + if (tok->tp == K_PLATFORM) { + NEXT_TOKEN(); + } + if (tok->tp != K_PUBLISHED) { log_fn(LOG_WARNING, "Missing published time"); goto err; } |