aboutsummaryrefslogtreecommitdiff
path: root/src/feature/nodelist/nodefamily.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-11-24 10:53:38 -0500
committerNick Mathewson <nickm@torproject.org>2018-11-24 10:53:38 -0500
commitd29e3a02d57aef402a1aaf9747ef44393b043d98 (patch)
tree167123ebf54d20cc8ed7cb938c30b77977a7c17d /src/feature/nodelist/nodefamily.h
parent0e9a963b6b87282011fe204e81b5c2530153a935 (diff)
downloadtor-d29e3a02d57aef402a1aaf9747ef44393b043d98.tar.gz
tor-d29e3a02d57aef402a1aaf9747ef44393b043d98.zip
Add a function to canonicalize nodefamilies per prop298
This is the same as the regular canonical nodefamily format, except that unrecognized elements are preserved.
Diffstat (limited to 'src/feature/nodelist/nodefamily.h')
-rw-r--r--src/feature/nodelist/nodefamily.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/feature/nodelist/nodefamily.h b/src/feature/nodelist/nodefamily.h
index 342f161a07..ea1076876d 100644
--- a/src/feature/nodelist/nodefamily.h
+++ b/src/feature/nodelist/nodefamily.h
@@ -27,7 +27,8 @@ nodefamily_t *nodefamily_parse(const char *s,
unsigned flags);
nodefamily_t *nodefamily_from_members(const struct smartlist_t *members,
const uint8_t *rsa_id_self,
- unsigned flags);
+ unsigned flags,
+ smartlist_t *unrecognized_out);
void nodefamily_free_(nodefamily_t *family);
#define nodefamily_free(family) \
FREE_AND_NULL(nodefamily_t, nodefamily_free_, (family))
@@ -41,6 +42,8 @@ bool nodefamily_contains_node(const nodefamily_t *family,
void nodefamily_add_nodes_to_smartlist(const nodefamily_t *family,
struct smartlist_t *out);
char *nodefamily_format(const nodefamily_t *family);
+char *nodefamily_canonicalize(const char *s, const uint8_t *rsa_id_self,
+ unsigned flags);
void nodefamily_free_all(void);