tor  0.4.2.1-alpha-dev
Data Fields
directory_token_t Struct Reference

#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_tkey
 
char * error
 

Detailed Description

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.

Field Documentation

◆ args

char** directory_token_t::args

Array of arguments from keyword line.

Definition at line 204 of file parsecommon.h.

Referenced by router_parse_addr_policy_private().

◆ error

char* directory_token_t::error

For ERR_ tokens only.

Definition at line 212 of file parsecommon.h.

◆ key

struct crypto_pk_t* directory_token_t::key

For public keys only. Heap-allocated.

Definition at line 210 of file parsecommon.h.

Referenced by token_clear().

◆ n_args

int directory_token_t::n_args

Number of elements in args

Definition at line 203 of file parsecommon.h.

◆ object_body

char* directory_token_t::object_body

Contents of object, base64-decoded.

Definition at line 208 of file parsecommon.h.

Referenced by token_check_object().

◆ object_size

size_t directory_token_t::object_size

Bytes in object_body

Definition at line 207 of file parsecommon.h.

◆ object_type

char* directory_token_t::object_type

--—BEGIN [object_type]--—

Definition at line 206 of file parsecommon.h.

◆ tp

directory_keyword directory_token_t::tp

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().


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