aboutsummaryrefslogtreecommitdiff
path: root/src/common/util.h
Commit message (Expand)AuthorAge
* r16279@catbus: nickm | 2007-10-30 11:14:29 -0400••• Improved skew reporting: "You are 365 days in the duture" is more useful than "You are 525600 minutes in the future". Also, when we get something that proves we are at least an hour in the past, tell the controller "CLOCK_SKEW MIN_SKEW=-3600" rather than just "CLOCK_SKEW" svn:r12283 Nick Mathewson2007-10-30
* r14359@Kushana: nickm | 2007-09-08 15:07:17 -0400••• Add some generic skew-and-tolerance functions so we can handle time more sanely. svn:r11406 Nick Mathewson2007-09-08
* r14832@catbus: nickm | 2007-08-29 15:00:27 -0400••• Use (and debug) new file-writing functions in order to simplify code that formerly built big strings in RAM. svn:r11301 Nick Mathewson2007-08-29
* r14831@catbus: nickm | 2007-08-29 14:17:42 -0400••• Refactor write_chunks_to_file_impl: break out the "pick a temporary name if it makes sense, and open the right filename" logic and the "close the file and unlink or rename if necessary" logic. This will let us write big files in a smarter way than "Build a big string" or "make a list of chunks", once we get around to using it. svn:r11300 Nick Mathewson2007-08-29
* r14093@catbus: nickm | 2007-08-08 01:49:54 -0400••• Include fewer redundant headers; use the compiler search paths better. svn:r11060 Nick Mathewson2007-08-08
* r14091@catbus: nickm | 2007-08-08 01:13:17 -0400••• Fix an annoying warning on OpenBSD: only include malloc.h if we are using it. svn:r11059 Nick Mathewson2007-08-08
* r14024@catbus: nickm | 2007-07-30 14:13:58 -0400••• Glibc (and maybe others) define a mallinfo() that can be used to see how the platform malloc is acting inside. When we have it, dump its output on dumpmemusage(). svn:r10996 Nick Mathewson2007-07-30
* r13834@catbus: nickm | 2007-07-19 15:40:42 -0400••• Another patch from croup: drop support for address masks that do not correspond to bit prefixes. Nobody has used this for a while, and we have given warnings for a long time. svn:r10881 Nick Mathewson2007-07-19
* r13827@catbus: nickm | 2007-07-19 14:42:25 -0400••• Merge in some generic address manipulation code from croup. Needs some work. svn:r10880 Nick Mathewson2007-07-19
* r13788@catbus: nickm | 2007-07-16 14:26:25 -0400••• Patch from croup: rewrite the logic of get_next_token() to do the right thing with input that ends at weird places, or aligns with block boundaries after mmap. should fix bug 455. Needs fuzzing. svn:r10847 Nick Mathewson2007-07-16
* r13687@catbus: nickm | 2007-07-10 16:08:14 -0400••• Possible partial fix for bug 455: use eos logic everywhere. svn:r10786 Nick Mathewson2007-07-10
* r13477@catbus: nickm | 2007-06-17 14:22:03 -0400••• Sun CC likes to give warnings for the do { } while(0) construction for making statement-like macros. Define STMT_BEGIN/STMT_END macros that do the right thing, and use them everywhere. svn:r10645 Nick Mathewson2007-06-17
* r13154@catbus: nickm | 2007-06-02 11:26:44 -0400••• Server-side support for If-Modified-Since in HTTP requsts for v1 stuff, and for network-status documents. svn:r10451 Nick Mathewson2007-06-02
* r12955@catbus: nickm | 2007-05-25 13:17:30 -0400••• First bare stubs of ipv6 work: commit some (untested, hence doublessly broken) implementations of inet_ntop/pton for systems that lack them. svn:r10326 Nick Mathewson2007-05-25
* r12916@catbus: nickm | 2007-05-24 12:43:45 -0400••• Add math functions to round values to the nearest power of 2. Make mempools more careful about making sure that the size of their chunks is a little less than a power of 2, not a little more. svn:r10304 Nick Mathewson2007-05-24
* r12850@catbus: nickm | 2007-05-21 22:20:42 -0400••• Partial backport candidate: do not rely on finding a \0 after an mmaped() router/extrainfo file. Also, set journal length correctly when starting up. svn:r10248 Nick Mathewson2007-05-22
* Turn bool_neq and bool_eq into macros.•••svn:r9914 Nick Mathewson2007-03-29
* r12473@Kushana: nickm | 2007-03-06 15:49:45 -0500••• Excise PREDICT and PREDICT_FALSE in favor of PREDICT_LIKELY and PREDICT_UNLIKELY. svn:r9781 Nick Mathewson2007-03-09
* r12468@Kushana: nickm | 2007-03-06 15:24:00 -0500••• More unit tests: gcov is fun. svn:r9748 Nick Mathewson2007-03-06
* cosmetic, comment, and todo fixes•••svn:r9627 Roger Dingledine2007-02-24
* r11824@catbus: nickm | 2007-02-16 13:16:47 -0500••• Move all struct-offset-manipulation macros into util.h, and use them consistently. Because there are days when "SUBTYPE_P(handle, subtype, _base)" is just easier to read and write than "(basetp*)(((handle) - STRUCT_OFFSET(subtype, _base))". svn:r9592 Nick Mathewson2007-02-16
* r11775@catbus: nickm | 2007-02-12 16:39:09 -0500••• Update copyright dates. svn:r9570 Nick Mathewson2007-02-12
* r11774@catbus: nickm | 2007-02-12 16:31:47 -0500••• Handle errors on opening cached-routers* more uniformly and sanely: log not-found errors at level INFO, and all other errors at level WARN. Needs testing on win32. svn:r9569 Nick Mathewson2007-02-12
* r11639@catbus: nickm | 2007-02-05 13:33:38 -0500••• Add documentation to src/common/*.h; improve documentation for SMARTLIST_FOREACH; remove never-used options and corresponding tests from tor_strpartition. svn:r9483 Nick Mathewson2007-02-05
* r11629@catbus: nickm | 2007-02-02 15:06:17 -0500••• Removing the last DOCDOC comment hurt so much that I had to use Doxygen to identify undocumented macros and comments, and add 150 more DOCDOCs to point out where they were. Oops. Hey, kids! Fixing some of these could be your first Tor patch! svn:r9477 Nick Mathewson2007-02-02
* r11620@catbus: nickm | 2007-02-01 13:06:27 -0500••• Call stat() slightly less often; use fstat() when possible. svn:r9472 Nick Mathewson2007-02-01
* r11749@Kushana: nickm | 2006-12-29 00:51:42 -0500••• Remove dead code; make targets of addressmap commands/configs use AllowNonRFC953Hostnames svn:r9211 Nick Mathewson2006-12-29
* r11597@Kushana: nickm | 2006-12-15 15:49:27 -0500••• Add a rudimentary line-wrapping function for use in dumping comments in config files. svn:r9132 Nick Mathewson2006-12-15
* r9274@Kushana: nickm | 2006-10-19 16:16:58 -0400••• Add unit tests for tor_mmap_file(); make tor_mmap_t.size always be the size of the file (not the size of the mapping); add an extra argument to read_file_to_str() so it can return the size of the result string. svn:r8762 Nick Mathewson2006-10-19
* r8846@totoro: nickm | 2006-10-02 16:59:57 -0400••• Move is_local_IP to config.c; have it check for same-/24; make it used only for reachability (not for banwidth, because that is probably not what we want). Fixes an XXX. svn:r8578 Nick Mathewson2006-10-02
* add missing paren in dmalloc tor_free•••svn:r8498 Nick Mathewson2006-09-25
* NEEDS REVIEW. Act on previous comment, and handle named servers differently: ...•••svn:r8433 Nick Mathewson2006-09-19
* parameterize the loudness of get_interface_address()•••svn:r8358 Roger Dingledine2006-09-09
* r7341@Kushana: nickm | 2006-08-11 00:51:05 -0700••• Amazing how much difference adding a ! to all your asserts can make. svn:r7029 Nick Mathewson2006-08-11
* r7337@Kushana: nickm | 2006-08-11 00:42:04 -0700••• Only use __builtin_offsetof with gcc 4 or later svn:r7028 Nick Mathewson2006-08-11
* r7326@Kushana: nickm | 2006-08-10 23:50:49 -0700••• And another GCC change: predict that tor_frees() are usually real frees, and tor_asserts() usually wont happen. Other test should wait till -fprofile-arcs svn:r7022 Nick Mathewson2006-08-11
* r7325@Kushana: nickm | 2006-08-10 23:37:31 -0700••• Use gcc offsetof where available. svn:r7021 Nick Mathewson2006-08-11
* r7324@Kushana: nickm | 2006-08-10 23:23:15 -0700••• Add more warnings to the list of those we tolerate. Start using GCC attributes more, for better error checking and better code generation. svn:r7020 Nick Mathewson2006-08-11
* r6980@Kushana: nickm | 2006-07-31 13:18:22 -0400••• Add a utility function to verify that a string has been through strlower. svn:r6959 Nick Mathewson2006-07-31
* Add a mem_is_zero function (I think we will need this) and a STRUCT_OFFSET ma...•••svn:r6810 Nick Mathewson2006-07-23
* when an exit node gets a malformed begin cell, don't complain to•••the node operator, since he can't do anything about it. svn:r6733 Roger Dingledine2006-07-06
* minor fixes•••svn:r6710 Roger Dingledine2006-07-04
* perhaps the reason I rail against cut-and-paste programming so vehemently is ...•••svn:r6638 Nick Mathewson2006-06-18
* Add a memdup function to util•••svn:r6635 Nick Mathewson2006-06-18
* add tor_strisprint() back in, this time with comments.•••svn:r6170 Roger Dingledine2006-03-15
* and remove now-extraneous function•••svn:r6168 Roger Dingledine2006-03-15
* Instead of listing a set of compilers that prefers __func__ to __FUNCTION__, ...•••svn:r6144 Nick Mathewson2006-03-13
* Add some functions to escape values from the network before sending them to t...•••svn:r6087 Nick Mathewson2006-03-05
* Allow private:* in routerdescs; not generated yet (because older Tors do not ...•••svn:r6086 Nick Mathewson2006-03-05
* Generate 18.0.0.0/8 address policy format in descs when we can; warn when the...•••svn:r5991 Nick Mathewson2006-02-12