/** State for any listener connection. */
#define LISTENER_STATE_READY 0
-#define _DNSWORKER_STATE_MIN 1
-/** State for a connection to a dnsworker process that's idle. */
-#define DNSWORKER_STATE_IDLE 1
-/** State for a connection to a dnsworker process that's resolving a
- * hostname. */
-#define DNSWORKER_STATE_BUSY 2
-#define _DNSWORKER_STATE_MAX 2
-
#define _CPUWORKER_STATE_MIN 1
/** State for a connection to a cpuworker process that's idle. */
#define CPUWORKER_STATE_IDLE 1
static token_rule_t routerdesc_token_table[] = {
T0N("reject", K_REJECT, ARGS, NO_OBJ ),
T0N("accept", K_ACCEPT, ARGS, NO_OBJ ),
- T1( "router", K_ROUTER, GE(5), NO_OBJ ),
+ T1_START( "router", K_ROUTER, GE(5), NO_OBJ ),
T1( "signing-key", K_SIGNING_KEY, NO_ARGS, NEED_KEY_1024 ),
T1( "onion-key", K_ONION_KEY, NO_ARGS, NEED_KEY_1024 ),
- T1( "router-signature", K_ROUTER_SIGNATURE, NO_ARGS, NEED_OBJ ),
+ T1_END( "router-signature", K_ROUTER_SIGNATURE, NO_ARGS, NEED_OBJ ),
T1( "published", K_PUBLISHED, CONCAT_ARGS, NO_OBJ ),
T01("uptime", K_UPTIME, GE(1), NO_OBJ ),
T01("fingerprint", K_FINGERPRINT, CONCAT_ARGS, NO_OBJ ),
/** List of tokens allowable in extra-info documents. */
static token_rule_t extrainfo_token_table[] = {
- T1( "router-signature", K_ROUTER_SIGNATURE, NO_ARGS, NEED_OBJ ),
+ T1_END( "router-signature", K_ROUTER_SIGNATURE, NO_ARGS, NEED_OBJ ),
T1( "published", K_PUBLISHED, CONCAT_ARGS, NO_OBJ ),
T0N("opt", K_OPT, CONCAT_ARGS, OBJ_OK ),
T01("read-history", K_READ_HISTORY, ARGS, NO_OBJ ),
T01("write-history", K_WRITE_HISTORY, ARGS, NO_OBJ ),
- T1( "extra-info", K_EXTRA_INFO, GE(2), NO_OBJ ),
+ T1_START( "extra-info", K_EXTRA_INFO, GE(2), NO_OBJ ),
END_OF_TABLE
};
test_eq_ip6(&a1, &a2); \
} while (0)
-#define test_ntop6_reduces2(a,b,c) do { \
- r = tor_inet_pton(AF_INET6, a, &a1); \
- test_assert(r==1); \
- test_assert(tor_inet_ntop(AF_INET6, &a1, buf, sizeof(buf))); \
- test_assert(!strcmp(buf, b) || !strcmp(buf, c)); \
- r = tor_inet_pton(AF_INET6, b, &a2); \
- test_assert(r==1); \
- test_eq_ip6(&a1, &a2); \
- } while (0)
-
static void
test_ip6_helpers(void)
{