Tor  0.4.7.0-alpha-dev
Public Member Functions | Data Fields
microdesc_t Struct Reference

#include <microdesc_st.h>

Public Member Functions

 HT_ENTRY (microdesc_t) node
 

Data Fields

time_t last_listed
 
saved_location_bitfield_t saved_location: 3
 
unsigned int no_save: 1
 
unsigned int held_in_map: 1
 
unsigned int policy_is_reject_star: 1
 
unsigned int held_by_nodes
 
off_t off
 
char * body
 
size_t bodylen
 
char digest [DIGEST256_LEN]
 
char * onion_pkey
 
size_t onion_pkey_len
 
struct curve25519_public_key_tonion_curve25519_pkey
 
struct ed25519_public_key_ted25519_identity_pkey
 
tor_addr_t ipv6_addr
 
uint16_t ipv6_orport
 
struct nodefamily_tfamily
 
struct short_policy_texit_policy
 
struct short_policy_tipv6_exit_policy
 

Detailed Description

A microdescriptor is the smallest amount of information needed to build a circuit through a router. They are generated by the directory authorities, using information from the uploaded routerinfo documents. They are not self-signed, but are rather authenticated by having their hash in a signed networkstatus document.

Definition at line 27 of file microdesc_st.h.

Member Function Documentation

◆ HT_ENTRY()

HT_ENTRY ( microdesc_t  )

Hashtable node, used to look up the microdesc by its digest.

Field Documentation

◆ body

char* body

A pointer to the encoded body of the microdescriptor. If the saved_location is SAVED_IN_CACHE, then the body is a pointer into an mmap'd region. Otherwise, it is a malloc'd string. The string might not be NUL-terminated; take the length from bodylen.

Definition at line 58 of file microdesc_st.h.

Referenced by dump_microdescriptor(), and microdesc_wipe_body().

◆ bodylen

size_t bodylen

The length of the microdescriptor in body.

Definition at line 60 of file microdesc_st.h.

Referenced by microdesc_wipe_body().

◆ digest

char digest[DIGEST256_LEN]

A SHA256-digest of the microdescriptor.

Definition at line 62 of file microdesc_st.h.

Referenced by microdesc_cache_lookup_by_digest256(), microdesc_eq_(), and microdesc_hash_().

◆ ed25519_identity_pkey

struct ed25519_public_key_t* ed25519_identity_pkey

Ed25519 identity key, if included.

Definition at line 77 of file microdesc_st.h.

◆ exit_policy

struct short_policy_t* exit_policy

IPv4 exit policy summary

Definition at line 85 of file microdesc_st.h.

Referenced by compare_tor_addr_to_node_policy().

◆ family

struct nodefamily_t* family

As routerinfo_t.family, with readable members parsed.

Definition at line 83 of file microdesc_st.h.

Referenced by node_family_contains().

◆ held_by_nodes

unsigned int held_by_nodes

Reference count: how many node_ts have a reference to this microdesc?

Definition at line 46 of file microdesc_st.h.

Referenced by microdesc_check_counts(), node_free_(), and nodelist_remove_microdesc().

◆ held_in_map

unsigned int held_in_map

If true, this microdesc has an entry in the microdesc_map

Definition at line 42 of file microdesc_st.h.

Referenced by microdesc_cache_clear(), and microdesc_free_().

◆ ipv6_addr

tor_addr_t ipv6_addr

As routerinfo_t.ipv6_addr

Definition at line 79 of file microdesc_st.h.

Referenced by node_add_to_address_set(), and node_describe().

◆ ipv6_exit_policy

struct short_policy_t* ipv6_exit_policy

IPv6 exit policy summary

Definition at line 87 of file microdesc_st.h.

Referenced by compare_tor_addr_to_node_policy().

◆ ipv6_orport

uint16_t ipv6_orport

As routerinfo_t.ipv6_orport

Definition at line 81 of file microdesc_st.h.

Referenced by node_add_to_address_set().

◆ last_listed

time_t last_listed

When was this microdescriptor last listed in a consensus document? Once a microdesc has been unlisted long enough, we can drop it.

Definition at line 36 of file microdesc_st.h.

Referenced by dump_microdescriptor(), and microdescs_add_to_cache().

◆ no_save

unsigned int no_save

If true, do not attempt to cache this microdescriptor on disk.

Definition at line 40 of file microdesc_st.h.

Referenced by microdesc_wipe_body().

◆ off

off_t off

If saved_location == SAVED_IN_CACHE, this field holds the offset of the microdescriptor in the cache.

Definition at line 50 of file microdesc_st.h.

Referenced by microdesc_wipe_body().

◆ onion_curve25519_pkey

struct curve25519_public_key_t* onion_curve25519_pkey

◆ onion_pkey

char* onion_pkey

Public RSA TAP key for onions, ASN.1 encoded. We store this in its encoded format since storing it as a crypto_pk_t uses significantly more memory.

Definition at line 70 of file microdesc_st.h.

◆ onion_pkey_len

size_t onion_pkey_len

Length of onion_pkey, in bytes.

Definition at line 72 of file microdesc_st.h.

◆ policy_is_reject_star

unsigned int policy_is_reject_star

True iff the exit policy for this router rejects everything.

Definition at line 44 of file microdesc_st.h.

Referenced by node_exit_policy_rejects_all().

◆ saved_location

saved_location_bitfield_t saved_location

Where is this microdescriptor currently stored?

Definition at line 38 of file microdesc_st.h.

Referenced by microdesc_wipe_body().


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