/** True iff this router supports ntorv3 subproto request extension. Requires
* Relay=5. */
unsigned int supports_ntorv3_subproto : 1;
+
+ /** True iff this router supports the RelayCell=1 protocol. */
+ unsigned int supports_relay_cell_proto : 1;
} protover_summary_flags_t;
typedef struct routerinfo_t routerinfo_t;
{ PRT_CONS, "Cons" },
{ PRT_FLOWCTRL, "FlowCtrl"},
{ PRT_CONFLUX, "Conflux"},
+ { PRT_RELAY_CELL, "RelayCell"},
};
#define N_PROTOCOL_NAMES ARRAY_LENGTH(PROTOCOL_NAMES)
#endif
#define PR_MICRODESC_V "1-2"
#define PR_PADDING_V "2"
-#define PR_RELAY_V "1-4"
+#define PR_RELAY_V "1-5"
+#define PR_RELAY_CELL_V "1"
/** Return the string containing the supported version for the given protocol
* type. */
case PRT_MICRODESC: return PR_MICRODESC_V;
case PRT_PADDING: return PR_PADDING_V;
case PRT_RELAY: return PR_RELAY_V;
+ case PRT_RELAY_CELL: return PR_RELAY_CELL_V;
default:
tor_assert_unreached();
}
"LinkAuth=" PR_LINKAUTH_V " "
"Microdesc=" PR_MICRODESC_V " "
"Padding=" PR_PADDING_V " "
- "Relay=" PR_RELAY_V;
+ "Relay=" PR_RELAY_V " "
+ "RelayCell=" PR_RELAY_CELL_V;
}
/*
/** The protover that signals support for ntorv3 subprotocol request. */
#define PROTOVER_RELAY_NTORV3_SUBPROTO 5
+/** The protover that signals support for relay cell protocol. */
+#define PROTOVER_RELAY_CELL_PROTO 1
+
/** 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 {
- PRT_LINK = 0,
- PRT_LINKAUTH = 1,
- PRT_RELAY = 2,
- PRT_DIRCACHE = 3,
- PRT_HSDIR = 4,
- PRT_HSINTRO = 5,
- PRT_HSREND = 6,
- PRT_DESC = 7,
- PRT_MICRODESC = 8,
- PRT_CONS = 9,
- PRT_PADDING = 10,
- PRT_FLOWCTRL = 11,
- PRT_CONFLUX = 12,
+ PRT_LINK = 0,
+ PRT_LINKAUTH = 1,
+ PRT_RELAY = 2,
+ PRT_DIRCACHE = 3,
+ PRT_HSDIR = 4,
+ PRT_HSINTRO = 5,
+ PRT_HSREND = 6,
+ PRT_DESC = 7,
+ PRT_MICRODESC = 8,
+ PRT_CONS = 9,
+ PRT_PADDING = 10,
+ PRT_FLOWCTRL = 11,
+ PRT_CONFLUX = 12,
+ PRT_RELAY_CELL = 13,
} protocol_type_t;
bool protover_list_is_invalid(const char *s);
protocol_list_supports_protocol(protocols, PRT_RELAY,
PROTOVER_RELAY_NTORV3_SUBPROTO);
+ out->supports_relay_cell_proto =
+ protocol_list_supports_protocol(protocols, PRT_RELAY_CELL,
+ PROTOVER_RELAY_CELL_PROTO);
+
protover_summary_flags_t *new_cached = tor_memdup(out, sizeof(*out));
cached = strmap_set(protover_summary_map, protocols, new_cached);
tor_assert(!cached);
/** Dummy object that should be unreturnable. Used to ensure that
* node_get_protover_summary_flags() always returns non-NULL. */
static const protover_summary_flags_t zero_protover_flags = {
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
};
/** Return the protover_summary_flags for a given node. */