Tor 0.4.9.8
Loading...
Searching...
No Matches
control_fmt.c File Reference

Formatting functions for controller data. More...

Go to the source code of this file.

Functions

int write_stream_target_to_buf (entry_connection_t *conn, char *buf, size_t len)
 
void orconn_target_get_name (char *name, size_t len, or_connection_t *conn)
 
char * circuit_describe_status_for_controller (origin_circuit_t *circ)
 
char * entry_connection_describe_status_for_controller (const entry_connection_t *conn)
 
const char * node_describe_longname_by_id (const char *id_digest)
 

Detailed Description

Formatting functions for controller data.

Definition in file control_fmt.c.

Function Documentation

◆ circuit_describe_status_for_controller()

char * circuit_describe_status_for_controller ( origin_circuit_t * circ)

Allocate and return a description of circ's current status, including its path (if any).

Definition at line 74 of file control_fmt.c.

Referenced by control_event_circuit_status(), control_event_circuit_status_minor(), and getinfo_helper_events().

◆ entry_connection_describe_status_for_controller()

char * entry_connection_describe_status_for_controller ( const entry_connection_t * conn)

Allocate and return a description of conn's current status.

Definition at line 202 of file control_fmt.c.

Referenced by control_event_stream_status().

◆ node_describe_longname_by_id()

const char * node_describe_longname_by_id ( const char * id_digest)

Return a longname the node whose identity is id_digest. If node_get_by_id() returns NULL, base 16 encoding of id_digest is returned instead.

This function is not thread-safe. Each call to this function invalidates previous values returned by this function.

Definition at line 303 of file control_fmt.c.

Referenced by control_event_hs_descriptor_content(), control_event_hs_descriptor_requested(), control_event_hs_descriptor_upload(), control_event_hs_descriptor_upload_end(), and event_hs_descriptor_receive_end().

◆ orconn_target_get_name()

void orconn_target_get_name ( char * name,
size_t len,
or_connection_t * conn )

Figure out the best name for the target router of an OR connection conn, and write it into the len-character buffer name.

Definition at line 55 of file control_fmt.c.

Referenced by control_event_or_conn_status(), and getinfo_helper_events().

◆ write_stream_target_to_buf()

int write_stream_target_to_buf ( entry_connection_t * conn,
char * buf,
size_t len )

Given an AP connection conn and a len-character buffer buf, determine the address:port combination requested on conn, and write it to buf. Return 0 on success, -1 on failure.

Definition at line 33 of file control_fmt.c.

Referenced by control_event_stream_status(), and getinfo_helper_events().