Tor  0.4.6.0-alpha-dev
Functions
metrics.h File Reference

Header for feature/metrics/metrics.c. More...

#include "lib/buf/buffers.h"
#include "lib/container/smartlist.h"
#include "app/config/or_options_st.h"
#include "lib/metrics/metrics_common.h"

Go to the source code of this file.

Functions

void metrics_init (void)
 
void metrics_cleanup (void)
 
buf_t * metrics_get_output (const metrics_format_t fmt)
 
int metrics_connection_process_inbuf (struct connection_t *conn)
 
int metrics_parse_ports (or_options_t *options, smartlist_t *ports, char **err_msg_out)
 

Detailed Description

Header for feature/metrics/metrics.c.

Definition in file metrics.h.

Function Documentation

◆ metrics_cleanup()

void metrics_cleanup ( void  )

Cleanup and free any global memory of this subsystem.

Definition at line 254 of file metrics.c.

◆ metrics_connection_process_inbuf()

int metrics_connection_process_inbuf ( connection_t conn)

Process what is in the inbuf of this connection of type metrics.

Return 0 on success else -1 on error which will close the connection.

Definition at line 98 of file metrics.c.

Referenced by connection_process_inbuf().

◆ metrics_get_output()

buf_t* metrics_get_output ( const metrics_format_t  fmt)

Return newly allocated buffer containing the output of all subsystems having metrics.

This is used to output the content on the MetricsPort.

Definition at line 70 of file metrics.c.

◆ metrics_init()

void metrics_init ( void  )

Initialize the subsystem.

Definition at line 248 of file metrics.c.

◆ metrics_parse_ports()

int metrics_parse_ports ( or_options_t options,
smartlist_t ports,
char **  err_msg_out 
)

Parse metrics ports from options. On success, add the port to the ports list and return 0. On failure, set err_msg_out to a newly allocated string describing the problem and return -1.

Definition at line 171 of file metrics.c.