summaryrefslogtreecommitdiff
path: root/src/common/compat.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-02-25 20:46:13 +0000
committerNick Mathewson <nickm@torproject.org>2005-02-25 20:46:13 +0000
commitbbaa3c7792792d9899ed36d9b0db4703c617a7a3 (patch)
treef0d37ff02bafecbad300710532f6e847cb3d8756 /src/common/compat.h
parentd21f007a8465b7c04d4ea8084501a588af4874a6 (diff)
downloadtor-bbaa3c7792792d9899ed36d9b0db4703c617a7a3.tar.gz
tor-bbaa3c7792792d9899ed36d9b0db4703c617a7a3.zip
Implement more control spec functionality
- Mapaddress - Postdescriptor - GetInfo on descriptors Required changes elsewhere: - Keep the most recent running_routers_t in the routerlist_t. That way we can learn about new routers and remember whether we were last told that they were up or down. Also enables more simplifications. - Keep the signed descriptor inside routerinfo_t. This makes descriptor_entry_t in dirservers.c unneeded. - Rename AddressMap (the verb) to MapAddress. Keep AddressMap as a noun. - Check addresses for plausibility before mapping them. svn:r3696
Diffstat (limited to 'src/common/compat.h')
-rw-r--r--src/common/compat.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/compat.h b/src/common/compat.h
index f813becbcb..801f1893f2 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -86,6 +86,8 @@ int tor_snprintf(char *str, size_t size, const char *format, ...)
CHECK_PRINTF(3,4);
int tor_vsnprintf(char *str, size_t size, const char *format, va_list args);
+#define TOR_ISAPLHA(c) isalpha((int)(unsigned char)(c))
+#define TOR_ISALNUM(c) isalnum((int)(unsigned char)(c))
#define TOR_ISSPACE(c) isspace((int)(unsigned char)(c))
#define TOR_ISXDIGIT(c) isxdigit((int)(unsigned char)(c))
#define TOR_ISDIGIT(c) isdigit((int)(unsigned char)(c))