1 /* Copyright (c) 2016-2021, The Tor Project, Inc. */
2 /* See LICENSE for licensing information */
5 * \file protover_rust.c
6 * \brief Provide a C wrapper for functions exposed in /src/rust/protover,
7 * and safe translation/handling between the Rust/C boundary.
10 #include "core/or/or.h"
11 #include "core/or/protover.h"
15 /* Define for compatibility, used in main.c */
17 protover_free_all(void)
21 int protover_contains_long_protocol_names_(const char *s
);
24 * Return true if the unparsed protover in <b>s</b> would contain a protocol
25 * name longer than MAX_PROTOCOL_NAME_LENGTH, and false otherwise.
28 protover_list_is_invalid(const char *s
)
30 return protover_contains_long_protocol_names_(s
) != 0;
33 #endif /* defined(HAVE_RUST) */