9#ifndef TOR_PARSECOMMON_H
10#define TOR_PARSECOMMON_H
26 K_DIRECTORY_SIGNATURE,
27 K_RECOMMENDED_SOFTWARE,
52 K_NETWORK_STATUS_VERSION,
57 K_RECOMMENDED_CLIENT_PROTOCOLS,
58 K_RECOMMENDED_RELAY_PROTOCOLS,
59 K_REQUIRED_CLIENT_PROTOCOLS,
60 K_REQUIRED_RELAY_PROTOCOLS,
75 K_ALLOW_SINGLE_HOP_EXITS,
80 K_ONION_KEY_CROSSCERT,
81 K_NTOR_ONION_KEY_CROSSCERT,
108 K_DIR_KEY_CERTIFICATE_VERSION,
112 K_DIR_KEY_CERTIFICATION,
129 K_ADDITIONAL_SIGNATURE,
145 R_RENDEZVOUS_SERVICE_DESCRIPTOR,
151 R_INTRODUCTION_POINTS,
157 R3_DESC_SIGNING_CERT,
162 R3_INTRO_AUTH_REQUIRED,
163 R3_SINGLE_ONION_SERVICE,
164 R3_INTRODUCTION_POINT,
168 R3_INTRO_ENC_KEY_CERT,
170 R3_INTRO_LEGACY_KEY_CERT,
232#define TS_ANNOTATIONS_OK 1
234#define TS_NO_NEW_ANNOTATIONS 4
246#define END_OF_TABLE { NULL, NIL_, 0,0,0, NO_OBJ, 0, INT_MAX, 0, 0 }
248#define T(s,t,a,o) { s, t, a, o, 0, INT_MAX, 0, 0 }
250#define T0N(s,t,a,o) { s, t, a, o, 0, INT_MAX, 0, 0 }
252#define T1(s,t,a,o) { s, t, a, o, 1, 1, 0, 0 }
254#define T1_START(s,t,a,o) { s, t, a, o, 1, 1, AT_START, 0 }
256#define T1_END(s,t,a,o) { s, t, a, o, 1, 1, AT_END, 0 }
258#define T1N(s,t,a,o) { s, t, a, o, 1, INT_MAX, 0, 0 }
260#define T01(s,t,a,o) { s, t, a, o, 0, 1, 0, 0 }
262#define A01(s,t,a,o) { s, t, a, o, 0, 1, 0, 1 }
265#define ARGS 0,INT_MAX,0
269#define CONCAT_ARGS 1,1,1
271#define GE(n) n,INT_MAX,0
305 const char *start,
const char *end,
316 const char *keyword_str);
318#define find_by_keyword(s, keyword) \
319 find_by_keyword_((s), (keyword), #keyword)
smartlist_t * find_all_by_keyword(const smartlist_t *s, directory_keyword k)
directory_token_t * find_opt_by_keyword(const smartlist_t *s, directory_keyword keyword)
void token_clear(directory_token_t *tok)
directory_token_t * get_next_token(struct memarea_t *area, const char **s, const char *eos, const token_rule_t *table)
int tokenize_string(struct memarea_t *area, const char *start, const char *end, struct smartlist_t *out, const token_rule_t *table, int flags)
directory_token_t * find_by_keyword_(struct smartlist_t *s, directory_keyword keyword, const char *keyword_str)