|
Tor 0.5.0.0-alpha-dev
|
#include <parsecommon.h>
Data Fields | |
| directory_keyword | tp |
| int | n_args:30 |
| char ** | args |
| char * | object_type |
| size_t | object_size |
| char * | object_body |
| struct crypto_pk_t * | key |
| char * | error |
Structure to hold a single directory token.
We parse a directory by breaking it into "tokens", each consisting of a keyword, a line full of arguments, and a binary object. The arguments and object are both optional, depending on the keyword type.
This structure is only allocated in memareas; do not allocate it on the heap, or token_clear() won't work.
Definition at line 205 of file parsecommon.h.
| char** args |
Array of arguments from keyword line.
Definition at line 208 of file parsecommon.h.
Referenced by authority_cert_parse_from_string(), decode_auth_client(), decode_introduction_point(), desc_decode_encrypted_v3(), desc_decode_plaintext_v3(), desc_decode_superencrypted_v3(), extrainfo_parse_entry_from_string(), get_next_token(), get_token_arguments(), hs_desc_decode_plaintext(), microdesc_parse_fields(), networkstatus_parse_detached_signatures(), networkstatus_parse_vote_from_string(), router_add_exit_policy(), router_parse_addr_policy(), router_parse_addr_policy_item_from_string(), router_parse_addr_policy_private(), and router_parse_entry_from_string().
| char* error |
For ERR_ tokens only.
Definition at line 216 of file parsecommon.h.
Referenced by router_parse_addr_policy_item_from_string(), and tokenize_string().
| struct crypto_pk_t* key |
For public keys only. Heap-allocated.
Definition at line 214 of file parsecommon.h.
Referenced by authority_cert_parse_from_string(), decode_intro_legacy_key(), get_next_token(), microdesc_parse_fields(), router_parse_entry_from_string(), token_check_object(), and token_clear().
| int n_args |
Number of elements in args
Definition at line 207 of file parsecommon.h.
Referenced by authority_cert_parse_from_string(), decode_auth_client(), decode_introduction_point(), desc_decode_encrypted_v3(), desc_decode_plaintext_v3(), desc_decode_superencrypted_v3(), extrainfo_parse_entry_from_string(), get_next_token(), get_token_arguments(), hs_desc_decode_plaintext(), microdesc_parse_fields(), networkstatus_parse_detached_signatures(), networkstatus_parse_vote_from_string(), router_add_exit_policy(), router_parse_addr_policy(), router_parse_addr_policy_item_from_string(), router_parse_addr_policy_private(), and router_parse_entry_from_string().
| char* object_body |
Contents of object, base64-decoded.
Definition at line 212 of file parsecommon.h.
Referenced by check_signature_token(), decode_intro_legacy_key(), decode_introduction_point(), desc_decode_plaintext_v3(), desc_decode_superencrypted_v3(), extrainfo_parse_entry_from_string(), get_next_token(), networkstatus_parse_detached_signatures(), networkstatus_parse_vote_from_string(), router_parse_entry_from_string(), and token_check_object().
| size_t object_size |
Bytes in object_body
Definition at line 211 of file parsecommon.h.
Referenced by check_signature_token(), decode_intro_legacy_key(), decode_introduction_point(), desc_decode_plaintext_v3(), desc_decode_superencrypted_v3(), extrainfo_parse_entry_from_string(), get_next_token(), networkstatus_parse_detached_signatures(), networkstatus_parse_vote_from_string(), and router_parse_entry_from_string().
| char* object_type |
--—BEGIN [object_type]--—
Definition at line 210 of file parsecommon.h.
Referenced by check_signature_token(), decode_intro_legacy_key(), decode_introduction_point(), desc_decode_plaintext_v3(), desc_decode_superencrypted_v3(), extrainfo_parse_entry_from_string(), get_next_token(), networkstatus_parse_detached_signatures(), networkstatus_parse_vote_from_string(), and router_parse_entry_from_string().
Type of the token.
Definition at line 206 of file parsecommon.h.
Referenced by authority_cert_parse_from_string(), extrainfo_parse_entry_from_string(), get_next_token(), networkstatus_parse_detached_signatures(), networkstatus_parse_vote_from_string(), router_add_exit_policy(), router_parse_addr_policy(), router_parse_addr_policy_item_from_string(), router_parse_addr_policy_private(), and tokenize_string().