Tor  0.4.7.0-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** 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().

◆ error

char* error

For ERR_ tokens only.

Definition at line 212 of file parsecommon.h.

◆ key

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

◆ n_args

int n_args

Number of elements in args

Definition at line 203 of file parsecommon.h.

Referenced by decode_auth_client().

◆ object_body

char* object_body

Contents of object, base64-decoded.

Definition at line 208 of file parsecommon.h.

Referenced by token_check_object().

◆ object_size

size_t object_size

Bytes in object_body

Definition at line 207 of file parsecommon.h.

◆ object_type

char* object_type

--—BEGIN [object_type]--—

Definition at line 206 of file parsecommon.h.

◆ 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: