aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nordberg <linus@torproject.org>2012-10-31 16:38:07 +0100
committerLinus Nordberg <linus@torproject.org>2012-10-31 16:38:07 +0100
commitffddd4de2a69a896be3886b8f48a218a70babbcc (patch)
tree4c9539362694fa862abec4f05d6b0067380bd092
parente7e68b80a74faa52fbf6e551bf373a405c6cdf97 (diff)
downloadtor-ffddd4de2a69a896be3886b8f48a218a70babbcc.tar
tor-ffddd4de2a69a896be3886b8f48a218a70babbcc.tar.gz
Change some comments to reflect the multitude of GeoIP databases.
-rw-r--r--src/or/geoip.c12
-rw-r--r--src/or/routerlist.c2
-rw-r--r--src/or/routerset.c2
3 files changed, 8 insertions, 8 deletions
diff --git a/src/or/geoip.c b/src/or/geoip.c
index 606bece8b..9aba3c98b 100644
--- a/src/or/geoip.c
+++ b/src/or/geoip.c
@@ -21,7 +21,7 @@
static void clear_geoip_db(void);
static void init_geoip_countries(void);
-/** An entry from the GeoIP file: maps an IP range to a country. */
+/** An entry from the GeoIP IPv4 file: maps an IPv4 range to a country. */
typedef struct geoip_ipv4_entry_t {
uint32_t ip_low; /**< The lowest IP in the range, in host order */
uint32_t ip_high; /**< The highest IP in the range, in host order */
@@ -56,9 +56,9 @@ static smartlist_t *geoip_ipv4_entries = NULL, *geoip_ipv6_entries = NULL;
static char geoip_digest[DIGEST_LEN];
static char geoip6_digest[DIGEST_LEN];
-/** Return the index of the <b>country</b>'s entry in the GeoIP DB
- * if it is a valid 2-letter country code, otherwise return -1.
- */
+/** Return the index of the <b>country</b>'s entry in the GeoIP
+ * country list if it is a valid 2-letter country code, otherwise
+ * return -1. */
country_t
geoip_get_country(const char *country)
{
@@ -408,7 +408,7 @@ geoip_get_country_by_addr(const tor_addr_t *addr)
}
}
-/** Return the number of countries recognized by the GeoIP database. */
+/** Return the number of countries recognized by the GeoIP country list. */
int
geoip_get_n_countries(void)
{
@@ -1641,7 +1641,7 @@ getinfo_helper_geoip(control_connection_t *control_conn,
return 0;
}
-/** Release all storage held by the GeoIP database. */
+/** Release all storage held by the GeoIP databases and country list. */
static void
clear_geoip_db(void)
{
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 5327622f1..9537331c6 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -4790,7 +4790,7 @@ routers_sort_by_identity(smartlist_t *routers)
smartlist_sort(routers, _compare_routerinfo_by_id_digest);
}
-/** Called when we change a node set, or when we reload the geoip list:
+/** Called when we change a node set, or when we reload the geoip IPv4 list:
* recompute all country info in all configuration node sets and in the
* routerlist. */
void
diff --git a/src/or/routerset.c b/src/or/routerset.c
index f9e3c9a49..8a5ff218b 100644
--- a/src/or/routerset.c
+++ b/src/or/routerset.c
@@ -74,7 +74,7 @@ routerset_get_countryname(const char *c)
}
/** Update the routerset's <b>countries</b> bitarray_t. Called whenever
- * the GeoIP database is reloaded.
+ * the GeoIP IPv4 database is reloaded.
*/
void
routerset_refresh_countries(routerset_t *target)