diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-08-04 01:11:15 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-08-04 01:11:15 +0000 |
commit | 14d5478f2995e6d9e654acbeb4f36e9a57cc9194 (patch) | |
tree | cdb41d5d5ce1e687410bf887effd8a6b90bf8c55 /src/common/util.h | |
parent | 8b55f73bbee6b282a451e87820cd8f38f13046ac (diff) | |
download | tor-14d5478f2995e6d9e654acbeb4f36e9a57cc9194.tar.gz tor-14d5478f2995e6d9e654acbeb4f36e9a57cc9194.zip |
Add functions to format and parse RFC1123-style times, for HTTP protocol.
svn:r2129
Diffstat (limited to 'src/common/util.h')
-rw-r--r-- | src/common/util.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/util.h b/src/common/util.h index 2d4702312a..8ee05b2fc1 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -201,6 +201,9 @@ void tv_addms(struct timeval *a, long ms); void tv_add(struct timeval *a, struct timeval *b); int tv_cmp(struct timeval *a, struct timeval *b); time_t tor_timegm(struct tm *tm); +#define RFC1123_TIME_LEN 29 +void tor_format_rfc1123_time(char *buf, time_t t); +int tor_parse_rfc1123_time(const char *buf, time_t *t); int write_all(int fd, const char *buf, size_t count, int isSocket); int read_all(int fd, char *buf, size_t count, int isSocket); |