|
Tor
0.4.7.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 201 of file parsecommon.h.
| char** args |
Array of arguments from keyword line.
Definition at line 204 of file parsecommon.h.
Referenced by decode_auth_client(), and router_parse_addr_policy_private().
| char* error |
For ERR_ tokens only.
Definition at line 212 of file parsecommon.h.
| struct crypto_pk_t* key |
For public keys only. Heap-allocated.
Definition at line 210 of file parsecommon.h.
Referenced by decode_intro_legacy_key(), and token_clear().
| int n_args |
Number of elements in args
Definition at line 203 of file parsecommon.h.
Referenced by decode_auth_client().
| char* object_body |
Contents of object, base64-decoded.
Definition at line 208 of file parsecommon.h.
Referenced by token_check_object().
| size_t object_size |
Bytes in object_body
Definition at line 207 of file parsecommon.h.
| char* object_type |
--—BEGIN [object_type]--—
Definition at line 206 of file parsecommon.h.
Type of the token.
Definition at line 202 of file parsecommon.h.
Referenced by router_add_exit_policy(), router_parse_addr_policy(), and router_parse_addr_policy_private().