aboutsummaryrefslogtreecommitdiff
path: root/src/or/geoip.c
Commit message (Collapse)AuthorAge
...
* | Create geoip.hSebastian Hahn2010-07-27
| |
* | Split headers for dnsserv.c functions out of or.hSebastian Hahn2010-07-27
| | | | | | | | | | | | | | The next series of commits begins addressing the issue that we're currently including the complete or.h file in all of our source files. To change that, we're splitting function definitions into new header files (one header file per source file).
* | Make the controller act more usefully when GETINFO failsNick Mathewson2010-07-18
| | | | | | | | | | | | | | | | | | | | | | Right now it says "552 internal error" because there's no way for getinfo_helper_*() countries to specify an error message. This patch changes the getinfo_helper_*() interface, and makes most of the getinfo helpers give useful error messages in response to failures. This should prevent recurrences of bug 1699, where a missing GeoIPFile line in the torrc made GETINFO ip-to-county/* fail in a "not obvious how to fix" way.
* | Make rotate_request_period use BEGIN/END versions of FOREACHNick Mathewson2010-05-17
| | | | | | | | | | This appeases some versions of MSVC, which don't like it when you have preprocessor commands inside a set of macro arguments.
* | Switch geoip_get_request_history to asprintf; fix bug 1365Nick Mathewson2010-04-20
| |
* | Merge branch 'asprintf'Nick Mathewson2010-04-02
|\ \
| * | Tweak users of snprintf to use asprintf where appropriateNick Mathewson2010-02-28
| | |
* | | Merge remote branch 'origin/maint-0.2.1'Nick Mathewson2010-02-27
|\ \ \ | |/ / |/| / | |/ | | | | Conflicts: src/common/test.h src/or/test.c
| * Update Tor Project copyright yearsNick Mathewson2010-02-27
| |
* | Fix a memory corruption bug while collecting bridge statsKarsten Loesing2010-01-26
| | | | | | | | | | | | | | | | | | | | We accidentally freed the internal buffer for bridge stats when we were writing the bridge stats file or honoring a control port request for said data. Change the interfaces for geoip_get_bridge_stats* to prevent these problems, and remove the offending free/add a tor_strdup. Fixes bug 1208.
* | don't warn if stats/bridge-stats is missingRoger Dingledine2010-01-15
| | | | | | | | | | | | | | if we try to read it to publish stats and it's not there, that means there are no stats to publish. reported by swisstorexit.
* | when loading bridge stats, mkdir $datadir/stats firstRoger Dingledine2010-01-02
| |
* | Permit an empty "bridge-ips" line when parsing bridge stats.Karsten Loesing2009-12-18
| |
* | Refactor out the 'find string at start of any line' logic.Nick Mathewson2009-12-17
| | | | | | | | | | | | | | | | We do this in too many places throughout the code; it's time to start clamping down. Also, refactor Karsten's patch to use strchr-then-strndup, rather than malloc-then-strlcpy-then-strchr-then-clear.
* | Make changes to latest bridge-stats fixes as suggested by Nick.Karsten Loesing2009-12-17
| |
* | Fix bridge statistics.Karsten Loesing2009-12-17
| | | | | | | | | | | | Fix statistics on client numbers by country as seen by bridges that were broken in 0.2.2.1-alpha. Also switch to reporting full 24-hour intervals instead of variable 12-to-48-hour intervals.
* | Now that FOO_free(NULL) always works, remove checks before calling it.Nick Mathewson2009-12-12
| |
* | Fix a couple of smaller issues with gathering statistics.Karsten Loesing2009-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Avoid memmoving 0 bytes which might lead to compiler warnings. - Don't require relays to be entry node AND bridge at the same to time to record clients. - Fix a memory leak when writing dirreq-stats. - Don't say in the stats files that measurement intervals are twice as long as they really are. - Reduce minimum observation time for requests to 12 hours, or we might never record usage. - Clear exit stats correctly after writing them, or we accumulate old stats over time. - Reset interval start for buffer stats, too.
* | Fix compile warnings on Snow LeopardSebastian Hahn2009-09-01
| | | | | | | | Big thanks to nickm and arma for helping me with this!
* | Merge commit 'karsten/proposal-166-impl-master'Nick Mathewson2009-08-26
|\ \
| * | Add some fixes after discussion with Nick.Karsten Loesing2009-08-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Refactor geoip.c by moving duplicate code into rotate_request_period(). - Don't leak memory when cleaning up cell queues. - Make sure that exit_(streams|bytes_(read|written)) are initialized in all places accessing these arrays. - Read only the last block from *stats files and ensure that its timestamp is not more than 25 hours in the past and not more than 1 hour in the future. - Stop truncating the last character when reading *stats files. The only thing that's left now is to avoid reading whole *stats files into memory.
| * | Some final (?) cleanups of proposal 166 implementation.Karsten Loesing2009-08-19
| | |
| * | Move all *-stats file to subdirectory stats/.Karsten Loesing2009-08-19
| | |
| * | Write all statistics to disk exactly every 24 hours.Karsten Loesing2009-08-19
| | |
| * | Include contents of *-stats files in descriptor.Karsten Loesing2009-08-17
| | |
| * | Remove ./configure option for entry and dir request statistics.Karsten Loesing2009-08-17
| | |
* | | Refactor geoip_get_dirreq_history() some more.Nick Mathewson2009-08-21
| | | | | | | | | | | | | | | This patch avoids a bunch of allocations, and avoids using unallocated memory.
* | | Fix a memory leak in summarizing directory request timing.Nick Mathewson2009-08-21
|/ / | | | | | | Spotted by Coverity Scan.
* | Fix dirreq and cell stats on 32-bit architectures.Karsten Loesing2009-07-27
| | | | | | | | | | | | | | | | | | When determining how long directory requests take or how long cells spend in queues, we were comparing timestamps on microsecond detail only to convert results to second or millisecond detail later on. But on 32-bit architectures this means that 2^31 microseconds only cover time differences of up to 36 minutes. Instead, compare timestamps on millisecond detail.
* | Switch dirreq_map to use HT_ functions rather than strmap.Nick Mathewson2009-07-16
| |
* | Some tweaks to statistics.Karsten Loesing2009-07-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes to directory request statistics: - Rename GEOIP statistics to DIRREQ statistics, because they now include more than only GeoIP-based statistics, whereas other statistics are GeoIP-dependent, too. - Rename output file from geoip-stats to dirreq-stats. - Add new config option DirReqStatistics that is required to measure directory request statistics. - Clean up ChangeLog. Also ensure that entry guards statistics have access to a local GeoIP database.
* | Some tweaks to directory request download times.Karsten Loesing2009-07-15
| | | | | | | | | | - Use common prefixes DIRREQ_* and dirreq_*. - Replace enums in structs with bitfields.
* | Round up results to the next multiple of 4.Karsten Loesing2009-07-15
| |
* | Right, the u in uint stands for unsigned.Karsten Loesing2009-07-15
| |
* | Directories now also measure download times of network statuses.Karsten Loesing2009-07-15
| |
* | make it compile without warningsRoger Dingledine2009-07-14
| |
* | Merge commit 'karsten/geoipstats-download-resp-master'Nick Mathewson2009-07-14
|\ \ | | | | | | | | | | | | Conflicts: src/or/geoip.c
| * | Handle unsigned ints correctly.Karsten Loesing2009-07-14
| | |
| * | Write number of rejected requests to geoip-stats file.Karsten Loesing2009-07-14
| | |
* | | Merge commit 'karsten/geoipstats-shares-master'Nick Mathewson2009-07-14
|\ \ \
| * | | Estimate v2 and v3 shares as mean values over measurement interval.Karsten Loesing2009-07-04
| | | |
* | | | Merge commit 'karsten/geoipstats-newoverthereistan-master'Nick Mathewson2009-07-14
|\ \ \ \ | |_|/ / |/| | |
| * | | List unresolved requests in geoip stats as country '??'.Karsten Loesing2009-07-09
| | | |
* | | | Simplify the math to round up to the next multiple of some value.Karsten Loesing2009-07-11
|/ / /
* / / If configured, write entry-node statistics to disk periodically.Karsten Loesing2009-07-05
|/ /
* | Merge commit 'origin/maint-0.2.1'Nick Mathewson2009-05-27
|\|
| * Improve documentation for the last fix of bug 932.Karsten Loesing2009-05-27
| |
| * Fix bug 932 even more.Karsten Loesing2009-05-27
| | | | | | | | Ignore connections two hours after switching from bridge to relay or back.
| * Update copyright to 2009.Karsten Loesing2009-05-04
| |
* | Fix a signed/unsigned comparison warningNick Mathewson2009-05-27
| |