microdesc_parse.h File Reference

Header file for microdesc_parse.c. More...

Go to the source code of this file.


smartlist_tmicrodescs_parse_from_string (const char *s, const char *eos, int allow_annotations, saved_location_t where, smartlist_t *invalid_digests_out)

Detailed Description

Header file for microdesc_parse.c.

Definition in file microdesc_parse.h.

Function Documentation

◆ microdescs_parse_from_string()

smartlist_t* microdescs_parse_from_string ( const char *  s,
const char *  eos,
int  allow_annotations,
saved_location_t  where,
smartlist_t invalid_digests_out 

Parse as many microdescriptors as are found from the string starting at s and ending at eos. If allow_annotations is set, read any annotations we recognize and ignore ones we don't.

If saved_location isn't SAVED_IN_CACHE, make a local copy of each descriptor in the body field of each microdesc_t.

Return all newly parsed microdescriptors in a newly allocated smartlist_t. If invalid_disgests_out is provided, add a SHA256 microdesc digest to it for every microdesc that we found to be badly formed. (This may cause duplicates)

Definition at line 291 of file microdesc_parse.c.

Referenced by microdescs_add_to_cache().