routerset_t Struct Reference


Data Fields

smartlist_tlist
strmap_t * names
digestmap_t * digests
smartlist_tpolicies
char * description
smartlist_tcountry_names
int n_countries
bitarray_t * countries

Detailed Description

A routerset specifies constraints on a set of possible routerinfos, based on their names, identities, or addresses. It is optimized for determining whether a router is a member or not, in O(1+P) time, where P is the number of address policy constraints.

Field Documentation

A list of strings for the elements of the policy. Each string is either a nickname, a hexadecimal identity fingerprint, or an address policy. A router belongs to the set if its nickname OR its identity OR its address matches an entry here.

Referenced by routerset_equal(), routerset_free(), routerset_get_all_routers(), routerset_new(), routerset_parse(), and routerset_union().

strmap_t* routerset_t::names

A map from lowercase nicknames of routers in the set to (void*)1

Referenced by routerset_free(), routerset_new(), and routerset_parse().

digestmap_t* routerset_t::digests

A map from identity digests routers in the set to (void*)1

Referenced by routerset_free(), routerset_new(), and routerset_parse().

An address policy for routers in the set. For implementation reasons, a router belongs to the set if it is _rejected_ by this policy.

Referenced by routerset_free(), routerset_new(), and routerset_parse().

A human-readable description of what this routerset is for. Used in log messages.

A list of the country codes in this set.

Referenced by routerset_free(), routerset_new(), routerset_parse(), and routerset_refresh_countries().

Total number of countries we knew about when we built countries.

Referenced by routerset_refresh_countries().

Bit array mapping the return value of geoip_get_country() to 1 iff the country is a member of this routerset. Note that we MUST call routerset_refresh_countries() whenever the geoip country list is reloaded.

Referenced by routerset_free(), and routerset_refresh_countries().


The documentation for this struct was generated from the following file:

Generated on Tue May 25 00:31:21 2010 for tor by  doxygen 1.5.6