|
@@ -1897,21 +1897,28 @@ version_from_platform(const char *platform)
|
|
|
/** Helper: write the router-status information in <b>rs</b> into a newly
|
|
|
* allocated character buffer. Use the same format as in network-status
|
|
|
* documents. If <b>version</b> is non-NULL, add a "v" line for the platform.
|
|
|
+ *
|
|
|
+ * consensus_method is the current consensus method when format is
|
|
|
+ * NS_V3_CONSENSUS or NS_V3_CONSENSUS_MICRODESC. It is ignored for other
|
|
|
+ * formats: pass ROUTERSTATUS_FORMAT_NO_CONSENSUS_METHOD.
|
|
|
+ *
|
|
|
* Return 0 on success, -1 on failure.
|
|
|
*
|
|
|
* The format argument has one of the following values:
|
|
|
* NS_V2 - Output an entry suitable for a V2 NS opinion document
|
|
|
* NS_V3_CONSENSUS - Output the first portion of a V3 NS consensus entry
|
|
|
+ * for consensus_method.
|
|
|
* NS_V3_CONSENSUS_MICRODESC - Output the first portion of a V3 microdesc
|
|
|
- * consensus entry.
|
|
|
+ * consensus entry for consensus_method.
|
|
|
* NS_V3_VOTE - Output a complete V3 NS vote. If <b>vrs</b> is present,
|
|
|
* it contains additional information for the vote.
|
|
|
- * NS_CONTROL_PORT - Output a NS document for the control port
|
|
|
+ * NS_CONTROL_PORT - Output a NS document for the control port.
|
|
|
*/
|
|
|
char *
|
|
|
routerstatus_format_entry(const routerstatus_t *rs, const char *version,
|
|
|
const char *protocols,
|
|
|
routerstatus_format_type_t format,
|
|
|
+ int consensus_method,
|
|
|
const vote_routerstatus_t *vrs)
|
|
|
{
|
|
|
char *summary;
|