Commit Graph

116 Commits

Author SHA1 Message Date
Nick Mathewson
cd753df7bf Resolve many XXXs and all DOCDOCs
svn:r2755
2004-11-09 18:22:17 +00:00
Nick Mathewson
180e0a9326 Make check_private_dir trimodal (check/create/ignore), not bimodal (create/ignore).
svn:r2733
2004-11-09 07:12:31 +00:00
Roger Dingledine
865f341708 parse_line_from_file is obsolete.
svn:r2693
2004-11-06 05:18:29 +00:00
Nick Mathewson
38ed0ce5e6 Unify tor_parse_(numeric); make sure MAX_UINT32 and MAX_UINT64 are defined
svn:r2688
2004-11-05 17:54:50 +00:00
Nick Mathewson
9d604ec615 Add code to read configuration lines from a string as well as a file
svn:r2676
2004-11-04 22:29:45 +00:00
Nick Mathewson
d5244e3872 Add a write_bytes_to_file so we can have files with NULs in them.
svn:r2662
2004-11-03 19:02:48 +00:00
Roger Dingledine
e761cc9750 my assert.h takes extra pains to be certain to _re-include_
itself if you include it twice. this is dumb, but hey.


svn:r2653
2004-11-03 07:29:03 +00:00
Nick Mathewson
67f14032b1 Handle strlcat/strlcpy correctly on platforms that have them.
svn:r2647
2004-11-02 19:25:52 +00:00
Roger Dingledine
85c79ffbc7 canonicalize "src" and "dest" arg order in crypto.c (and others)
svn:r2644
2004-11-02 02:28:51 +00:00
Nick Mathewson
ce79bab7f1 Split util into util (general utilities), container (smartlist and strmap), and compat (cross-platform compatability).
svn:r2640
2004-11-01 20:41:47 +00:00
Roger Dingledine
4689243242 make sure options.MaxConn can be reached
svn:r2638
2004-11-01 08:24:34 +00:00
Nick Mathewson
ce5709184b Pass with -Wstrict-prototypes
svn:r2614
2004-10-27 18:16:37 +00:00
Nick Mathewson
22dc19b590 snprintf wrapper with consistant (though not C99) overflow behavior
svn:r2606
2004-10-27 06:26:23 +00:00
Nick Mathewson
5d53828c57 Handle more errnos from accept() without closing the connection. This may fix a bug that could close OR listeners when (a) TCP connections were hung up before accept() could be called, or (b) during FD exhaustion.
svn:r2579
2004-10-24 00:55:18 +00:00
Nick Mathewson
6899b8001a Check for low _MSC_VER, not high. On windows, always use winsock.
svn:r2575
2004-10-20 23:30:38 +00:00
Roger Dingledine
c4c6ee7d61 add winsock if you've got it, regardless of whether you're msv
svn:r2573
2004-10-20 23:23:53 +00:00
Nick Mathewson
69d7b468b4 Refactor parse-addr-mask-and-port-range into a separate function
svn:r2540
2004-10-16 21:41:12 +00:00
Nick Mathewson
f619c4603e Add an autoconf test to make sure that memset(&ptr, 0, sizeof(ptr)) and ptr=NULL are equivalent
svn:r2536
2004-10-16 20:26:12 +00:00
Nick Mathewson
f359389866 Oops; make sure that break; and continue; work within SMARTLIST_FOREACH
svn:r2532
2004-10-15 20:49:31 +00:00
Nick Mathewson
5e80944c52 Use token-pasting magic to make nested SMARTLIST_FOREACH work.
svn:r2526
2004-10-15 04:45:47 +00:00
Nick Mathewson
c5964d6738 Basic string-join functionality
svn:r2521
2004-10-14 19:51:47 +00:00
Roger Dingledine
69830afc16 and another one
svn:r2484
2004-10-14 02:49:48 +00:00
Roger Dingledine
fe54bd00b9 ok, vim isn't the greatest editor in the world
svn:r2457
2004-10-12 20:28:53 +00:00
Roger Dingledine
a7d858bd6e start the great migration from int to size_t
and clean some deadweight from util.h


svn:r2455
2004-10-12 20:20:19 +00:00
Nick Mathewson
19da1f36c2 Make a bounds-checking replacement for strtol with slightly easier error-checking in the common case
svn:r2452
2004-10-12 19:32:41 +00:00
Nick Mathewson
8b037509f3 Add functions to parse addr[:port] consistently
svn:r2440
2004-10-12 15:48:30 +00:00
Nick Mathewson
6c970aec94 Turn tor_strpartion into a swiss-army-knife function, so it can terminate or not-terminate appropriately.
svn:r2429
2004-10-07 21:37:06 +00:00
Nick Mathewson
7b98fb58eb More complete docs for crypto.c; factor out string partitioning code
svn:r2427
2004-10-07 20:58:53 +00:00
Nick Mathewson
ce3162d035 Make base-64-encoded DER work, including workaround for ugly openssl misfeature that makes base64 decoding fail when you strip out the newlines.
svn:r2423
2004-10-07 03:11:42 +00:00
Nick Mathewson
0ef85f6dba Some platforms have weird translations when you open files in "test" mode; make read/write_str_to_file aware.
svn:r2336
2004-09-08 07:16:34 +00:00
Nick Mathewson
f311206d1d Make split function smarter; add a strcmpstart function so we can stop bungling strcmp(x, y, strlen(y));
svn:r2325
2004-09-02 18:25:50 +00:00
Roger Dingledine
d91cacb839 agree with nick: this legal-chars-in-filename stuff gets us nothing
svn:r2310
2004-08-24 21:57:12 +00:00
Nick Mathewson
015232bd39 As far as I can tell, CONFIG_LEGAL_FILENAME_CHARACTERS is both pointless and broken. #if it out, pending agreement from arma. This fixes a bug on win32 that rejected paths with a : in them.
svn:r2309
2004-08-24 20:48:22 +00:00
Nick Mathewson
7979c0277d Workaround for oddity in cygwin autoconf
svn:r2301
2004-08-19 17:21:17 +00:00
Nick Mathewson
86980cf6e2 Functions to test nickname validity
svn:r2269
2004-08-18 04:44:24 +00:00
Nick Mathewson
7cb93e5bb6 Move string-splitting into a separate function
svn:r2263
2004-08-17 21:06:36 +00:00
Nick Mathewson
8566bbb489 Add strmap_isempty
svn:r2250
2004-08-17 06:28:34 +00:00
Nick Mathewson
15a903b21c Convenience function to do a strcmp on each member of a smartlist of strings
svn:r2243
2004-08-16 20:46:00 +00:00
Nick Mathewson
6453a25567 Add replace_file to util.[ch] to survive stupidity of windows rename call
svn:r2208
2004-08-09 04:28:25 +00:00
Nick Mathewson
f6cc218742 Refactor ISO-style (yyyy-mm-dd hh:mm:ss) time parsing into util.c; rename format/parse_rfc1123_time; make rephist remember used bandwidth; published used bandwidth in descriptors in 15-minute chunks. Breaks unittests.
svn:r2182
2004-08-07 02:46:16 +00:00
Nick Mathewson
380f32f07d hex_encode is obsoleted by base16_encode, and never actually worked in the first place. (Thanks to Timo Lindfors for noticing the never-actually-worked part.)
svn:r2175
2004-08-07 01:03:33 +00:00
Nick Mathewson
14d5478f29 Add functions to format and parse RFC1123-style times, for HTTP protocol.
svn:r2129
2004-08-04 01:11:15 +00:00
Nick Mathewson
849e998ac6 It is possible to have struct timeval but not gettimeofday.
svn:r2125
2004-08-03 23:31:22 +00:00
Nick Mathewson
06c11a61ce When faking gettimeofday with ftime, do it right.
svn:r2068
2004-07-20 21:23:50 +00:00
Nick Mathewson
9364c40afd Add generic expand_filename function to handle expanding ~/
svn:r2047
2004-07-15 02:00:43 +00:00
Roger Dingledine
7e344f191a add is_local_IP() function to help distinguish which bandwidth "matters"
svn:r2040
2004-07-13 16:57:37 +00:00
Nick Mathewson
b1e9adf056 Always use get_data_directory() instead of options.DataDirectory; fix a memory leak in router.c
svn:r1991
2004-06-30 16:37:08 +00:00
Nick Mathewson
17b5b3685f Make tor build on win32 again; handle locking for server
svn:r1948
2004-06-05 01:50:35 +00:00
Nick Mathewson
7511fbf993 Resolve some XXXs
svn:r1889
2004-05-18 15:35:21 +00:00
Roger Dingledine
5dd9e60231 doxygen markup for common/*.h
svn:r1840
2004-05-10 07:54:13 +00:00