Header file for reasons.c.
More...
Go to the source code of this file.
Header file for reasons.c.
Definition in file reasons.h.
◆ bandwidth_weight_rule_to_string()
Return a string corresponding to a bandwidth_weight_rule_t
Definition at line 439 of file reasons.c.
◆ circuit_end_reason_to_control_string()
const char* circuit_end_reason_to_control_string |
( |
int |
reason | ) |
|
Convert a numeric reason for destroying a circuit into a string for a CIRCUIT event.
Definition at line 328 of file reasons.c.
◆ end_reason_to_http_connect_response_line()
const char* end_reason_to_http_connect_response_line |
( |
int |
endreason | ) |
|
Given a RELAY_END reason value, convert it to an HTTP response to be send over an HTTP tunnel connection.
Definition at line 461 of file reasons.c.
◆ errno_to_orconn_end_reason()
int errno_to_orconn_end_reason |
( |
int |
e | ) |
|
Given an errno from a failed ORConn connection, return a reason code appropriate for use in the controller orconn events.
Definition at line 291 of file reasons.c.
Referenced by connection_handle_read_impl().
◆ errno_to_stream_end_reason()
uint8_t errno_to_stream_end_reason |
( |
int |
e | ) |
|
◆ orconn_end_reason_to_control_string()
const char* orconn_end_reason_to_control_string |
( |
int |
r | ) |
|
Convert the reason for ending an OR connection r into the format used in ORCONN events. Return "UNKNOWN" if the reason is unrecognized.
Definition at line 225 of file reasons.c.
◆ socks4_response_code_to_string()
const char* socks4_response_code_to_string |
( |
uint8_t |
code | ) |
|
Return a string corresponding to a SOCKS4 response code.
Definition at line 393 of file reasons.c.
◆ socks5_response_code_to_string()
const char* socks5_response_code_to_string |
( |
uint8_t |
code | ) |
|
Return a string corresponding to a SOCKS5 response code.
Definition at line 411 of file reasons.c.
◆ stream_end_reason_to_control_string()
const char* stream_end_reason_to_control_string |
( |
int |
reason | ) |
|
Convert the reason for ending a stream reason into the format used in STREAM events. Return NULL if the reason is unrecognized.
Definition at line 28 of file reasons.c.
◆ stream_end_reason_to_socks5_response()
Translate reason (as from a relay 'end' cell) into an appropriate SOCKS5 reply code.
A reason of 0 means that we're not actually expecting to send this code back to the socks client; we just call it 'succeeded' to keep things simple.
Definition at line 100 of file reasons.c.
◆ stream_end_reason_to_string()
const char* stream_end_reason_to_string |
( |
int |
reason | ) |
|
Translate reason, which came from a relay 'end' cell, into a static const string describing why the stream is closing. reason is -1 if no reason was provided.
Definition at line 64 of file reasons.c.
◆ tls_error_to_orconn_end_reason()
int tls_error_to_orconn_end_reason |
( |
int |
e | ) |
|
Convert a TOR_TLS_* error code into an END_OR_CONN_* reason.
Definition at line 263 of file reasons.c.