diff options
author | George Kadianakis <desnacked@gmail.com> | 2011-09-11 23:34:11 +0200 |
---|---|---|
committer | George Kadianakis <desnacked@gmail.com> | 2011-09-11 23:34:11 +0200 |
commit | c6811c57cb75b2c594b2a6fffaca0c5ae4c19e0a (patch) | |
tree | 3b60b2997c9153675e7f77861924c028caab4a02 /src/common/util.h | |
parent | 31361074216534b0a4c6377730c09b261ca4ef4e (diff) | |
download | tor-c6811c57cb75b2c594b2a6fffaca0c5ae4c19e0a.tar.gz tor-c6811c57cb75b2c594b2a6fffaca0c5ae4c19e0a.zip |
Enforce transport names being C identifiers.
Introduce string_is_C_identifier() and use it to enforce transport
names according to the 180 spec.
Diffstat (limited to 'src/common/util.h')
-rw-r--r-- | src/common/util.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/util.h b/src/common/util.h index 7e889b10c7..04ae7cbc33 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -203,6 +203,8 @@ const char *find_whitespace(const char *s) ATTR_PURE; const char *find_whitespace_eos(const char *s, const char *eos) ATTR_PURE; const char *find_str_at_start_of_line(const char *haystack, const char *needle) ATTR_PURE; +int string_is_C_identifier(const char *string); + int tor_mem_is_zero(const char *mem, size_t len) ATTR_PURE; int tor_digest_is_zero(const char *digest) ATTR_PURE; int tor_digest256_is_zero(const char *digest) ATTR_PURE; |