fmt_serverstatus.h File Reference

Go to the source code of this file.


int list_server_status_v1 (smartlist_t *routers, char **router_status_out, int for_controller)

Detailed Description

Header file for fmt_serverstatus.c.

Definition in file fmt_serverstatus.h.

Function Documentation

◆ list_server_status_v1()

int list_server_status_v1 ( smartlist_t routers,
char **  router_status_out,
int  for_controller 

Based on the routerinfo_ts in routers, allocate the contents of a v1-style router-status line, and store it in *router_status_out. Return 0 on success, -1 on failure.

If for_controller is true, include the routers with very old descriptors.

This is deprecated: it's only used for controllers that want outputs in the old format.

Definition at line 61 of file fmt_serverstatus.c.

References node_t::is_running, MAX_VERBOSE_NICKNAME_LEN, router_get_verbose_nickname(), ROUTER_MAX_AGE_TO_PUBLISH, smartlist_add(), smartlist_add_strdup(), SMARTLIST_FOREACH_BEGIN, and tor_assert().