mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +01:00
Add corresponding rust-c coupling comments to C
This commit is contained in:
parent
edf3d6b7ee
commit
fdefda95bc
@ -34,6 +34,7 @@ static int protocol_list_contains(const smartlist_t *protos,
|
|||||||
protocol_type_t pr, uint32_t ver);
|
protocol_type_t pr, uint32_t ver);
|
||||||
|
|
||||||
/** Mapping between protocol type string and protocol type. */
|
/** Mapping between protocol type string and protocol type. */
|
||||||
|
/// C_RUST_COUPLED: src/rust/protover/protover.rs `PROTOCOL_NAMES`
|
||||||
static const struct {
|
static const struct {
|
||||||
protocol_type_t protover_type;
|
protocol_type_t protover_type;
|
||||||
const char *name;
|
const char *name;
|
||||||
@ -320,6 +321,7 @@ protocol_list_supports_protocol_or_later(const char *list,
|
|||||||
|
|
||||||
/** Return the canonical string containing the list of protocols
|
/** Return the canonical string containing the list of protocols
|
||||||
* that we support. */
|
* that we support. */
|
||||||
|
/// C_RUST_COUPLED: src/rust/protover/protover.rs `SUPPORTED_PROTOCOLS`
|
||||||
const char *
|
const char *
|
||||||
protover_get_supported_protocols(void)
|
protover_get_supported_protocols(void)
|
||||||
{
|
{
|
||||||
@ -403,6 +405,8 @@ encode_protocol_list(const smartlist_t *sl)
|
|||||||
|
|
||||||
/* We treat any protocol list with more than this many subprotocols in it
|
/* We treat any protocol list with more than this many subprotocols in it
|
||||||
* as a DoS attempt. */
|
* as a DoS attempt. */
|
||||||
|
/// C_RUST_COUPLED: src/rust/protover/protover.rs
|
||||||
|
/// `MAX_PROTOCOLS_TO_EXPAND`
|
||||||
static const int MAX_PROTOCOLS_TO_EXPAND = (1<<16);
|
static const int MAX_PROTOCOLS_TO_EXPAND = (1<<16);
|
||||||
|
|
||||||
/** Voting helper: Given a list of proto_entry_t, return a newly allocated
|
/** Voting helper: Given a list of proto_entry_t, return a newly allocated
|
||||||
@ -729,6 +733,7 @@ protocol_list_contains(const smartlist_t *protos,
|
|||||||
* Note that this is only used to infer protocols for Tor versions that
|
* Note that this is only used to infer protocols for Tor versions that
|
||||||
* can't declare their own.
|
* can't declare their own.
|
||||||
**/
|
**/
|
||||||
|
/// C_RUST_COUPLED: src/rust/protover/protover.rs `compute_for_old_tor`
|
||||||
const char *
|
const char *
|
||||||
protover_compute_for_old_tor(const char *version)
|
protover_compute_for_old_tor(const char *version)
|
||||||
{
|
{
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
* descriptors. Authorities should use this to decide whether to
|
* descriptors. Authorities should use this to decide whether to
|
||||||
* guess proto lines. */
|
* guess proto lines. */
|
||||||
/* This is a guess. */
|
/* This is a guess. */
|
||||||
|
/// C_RUST_COUPLED: src/rust/protover/protover.rs
|
||||||
|
/// `FIRST_TOR_VERSION_TO_ADVERTISE_PROTOCOLS`
|
||||||
#define FIRST_TOR_VERSION_TO_ADVERTISE_PROTOCOLS "0.2.9.3-alpha"
|
#define FIRST_TOR_VERSION_TO_ADVERTISE_PROTOCOLS "0.2.9.3-alpha"
|
||||||
|
|
||||||
/** The protover version number that signifies HSDir support for HSv3 */
|
/** The protover version number that signifies HSDir support for HSv3 */
|
||||||
@ -25,6 +27,8 @@
|
|||||||
#define PROTOVER_HS_RENDEZVOUS_POINT_V3 2
|
#define PROTOVER_HS_RENDEZVOUS_POINT_V3 2
|
||||||
|
|
||||||
/** List of recognized subprotocols. */
|
/** List of recognized subprotocols. */
|
||||||
|
/// C_RUST_COUPLED: src/rust/protover/ffi.rs `translate_to_rust`
|
||||||
|
/// C_RUST_COUPLED: src/rust/protover/protover.rs `Proto`
|
||||||
typedef enum protocol_type_t {
|
typedef enum protocol_type_t {
|
||||||
PRT_LINK,
|
PRT_LINK,
|
||||||
PRT_LINKAUTH,
|
PRT_LINKAUTH,
|
||||||
|
Loading…
Reference in New Issue
Block a user