9 #ifndef TOR_PARSECOMMON_H 10 #define TOR_PARSECOMMON_H 12 #include "container.h" 24 K_DIRECTORY_SIGNATURE,
25 K_RECOMMENDED_SOFTWARE,
50 K_NETWORK_STATUS_VERSION,
55 K_RECOMMENDED_CLIENT_PROTOCOLS,
56 K_RECOMMENDED_RELAY_PROTOCOLS,
57 K_REQUIRED_CLIENT_PROTOCOLS,
58 K_REQUIRED_RELAY_PROTOCOLS,
73 K_ALLOW_SINGLE_HOP_EXITS,
78 K_ONION_KEY_CROSSCERT,
79 K_NTOR_ONION_KEY_CROSSCERT,
106 K_DIR_KEY_CERTIFICATE_VERSION,
110 K_DIR_KEY_CERTIFICATION,
127 K_ADDITIONAL_SIGNATURE,
143 R_RENDEZVOUS_SERVICE_DESCRIPTOR,
149 R_INTRODUCTION_POINTS,
155 R3_DESC_SIGNING_CERT,
160 R3_INTRO_AUTH_REQUIRED,
161 R3_SINGLE_ONION_SERVICE,
162 R3_INTRODUCTION_POINT,
166 R3_INTRO_ENC_KEY_CERT,
168 R3_INTRO_LEGACY_KEY_CERT,
228 #define TS_ANNOTATIONS_OK 1 230 #define TS_NO_NEW_ANNOTATIONS 4 242 #define END_OF_TABLE { NULL, NIL_, 0,0,0, NO_OBJ, 0, INT_MAX, 0, 0 } 244 #define T(s,t,a,o) { s, t, a, o, 0, INT_MAX, 0, 0 } 246 #define T0N(s,t,a,o) { s, t, a, o, 0, INT_MAX, 0, 0 } 248 #define T1(s,t,a,o) { s, t, a, o, 1, 1, 0, 0 } 250 #define T1_START(s,t,a,o) { s, t, a, o, 1, 1, AT_START, 0 } 252 #define T1_END(s,t,a,o) { s, t, a, o, 1, 1, AT_END, 0 } 254 #define T1N(s,t,a,o) { s, t, a, o, 1, INT_MAX, 0, 0 } 256 #define T01(s,t,a,o) { s, t, a, o, 0, 1, 0, 0 } 258 #define A01(s,t,a,o) { s, t, a, o, 0, 1, 0, 1 } 261 #define ARGS 0,INT_MAX,0 263 #define NO_ARGS 0,0,0 265 #define CONCAT_ARGS 1,1,1 267 #define GE(n) n,INT_MAX,0 301 const char *start,
const char *end,
312 const char *keyword_str);
314 #define find_by_keyword(s, keyword) \ 315 find_by_keyword_((s), (keyword), #keyword) Definition: memarea.c:112
const char * t
Definition: parsecommon.h:275
Definition: parsecommon.h:220
crypto_pk_t * key
Definition: parsecommon.h:208
int max_args
Definition: parsecommon.h:281
int max_cnt
Definition: parsecommon.h:290
char ** args
Definition: parsecommon.h:202
struct token_rule_t token_rule_t
Definition: parsecommon.h:218
directory_keyword v
Definition: parsecommon.h:277
directory_token_t * get_next_token(memarea_t *area, const char **s, const char *eos, token_rule_t *table)
Definition: parsecommon.c:251
Definition: container.h:18
directory_token_t * find_by_keyword_(smartlist_t *s, directory_keyword keyword, const char *keyword_str)
Definition: parsecommon.c:413
Definition: parsecommon.h:219
Definition: parsecommon.h:217
char * object_body
Definition: parsecommon.h:206
int n_args
Definition: parsecommon.h:201
int min_args
Definition: parsecommon.h:279
int concat_args
Definition: parsecommon.h:284
directory_token_t * find_opt_by_keyword(const smartlist_t *s, directory_keyword keyword)
Definition: parsecommon.c:429
int min_cnt
Definition: parsecommon.h:288
Definition: parsecommon.h:222
int tokenize_string(memarea_t *area, const char *start, const char *end, smartlist_t *out, token_rule_t *table, int flags)
Definition: parsecommon.c:44
int is_annotation
Definition: parsecommon.h:295
char * object_type
Definition: parsecommon.h:204
char * error
Definition: parsecommon.h:210
directory_keyword
Definition: parsecommon.h:21
obj_syntax
Definition: parsecommon.h:216
Definition: crypto_rsa.c:41
int pos
Definition: parsecommon.h:293
Definition: parsecommon.h:221
Definition: parsecommon.h:199
smartlist_t * find_all_by_keyword(const smartlist_t *s, directory_keyword k)
Definition: parsecommon.c:440
directory_keyword tp
Definition: parsecommon.h:200
void token_clear(directory_token_t *tok)
Definition: parsecommon.c:32
obj_syntax os
Definition: parsecommon.h:286
Definition: parsecommon.h:273
size_t object_size
Definition: parsecommon.h:205
struct directory_token_t directory_token_t