Tor
0.4.7.0-alpha-dev
|
Data Fields | |
char * | new_address |
time_t | expires |
addressmap_entry_source_bitfield_t | source:3 |
unsigned | src_wildcard:1 |
unsigned | dst_wildcard:1 |
short | num_resolve_failures |
A client-side struct to remember requests to rewrite addresses to new addresses. These structs are stored in the hash table "addressmap" below.
There are 5 ways to set an address mapping:
When an addressmap request is made but one is already registered, the new one is replaced only if the currently registered one has no "new_address" (that is, it's in the process of DNS resolve), or if the new one is permanent (expires==0 or 1).
(We overload the 'expires' field, using "0" for mappings set via the configuration file, "1" for mappings set from the control interface, and other values for DNS and TrackHostExit mappings that can expire.)
A mapping may be 'wildcarded'. If "src_wildcard" is true, then any address that ends with a . followed by the key for this entry will get remapped by it. If "dst_wildcard" is also true, then only the matching suffix of such addresses will get replaced by new_address.
Definition at line 57 of file addressmap.c.