Tor
0.4.7.0-alpha-dev
|
Convert circuit, stream, and orconn error reasons to and/or from strings and errno values. More...
#include "core/or/or.h"
#include "app/config/config.h"
#include "core/or/reasons.h"
#include "feature/nodelist/node_select.h"
#include "lib/tls/tortls.h"
Go to the source code of this file.
Macros | |
#define | E_CASE(s) case s |
#define | S_CASE(s) case s |
Functions | |
const char * | stream_end_reason_to_control_string (int reason) |
const char * | stream_end_reason_to_string (int reason) |
socks5_reply_status_t | stream_end_reason_to_socks5_response (int reason) |
uint8_t | errno_to_stream_end_reason (int e) |
const char * | orconn_end_reason_to_control_string (int r) |
int | tls_error_to_orconn_end_reason (int e) |
int | errno_to_orconn_end_reason (int e) |
const char * | circuit_end_reason_to_control_string (int reason) |
const char * | socks4_response_code_to_string (uint8_t code) |
const char * | socks5_response_code_to_string (uint8_t code) |
const char * | bandwidth_weight_rule_to_string (bandwidth_weight_rule_t rule) |
const char * | end_reason_to_http_connect_response_line (int endreason) |
Convert circuit, stream, and orconn error reasons to and/or from strings and errno values.
This module is just a bunch of functions full of case statements that convert from one representation of our error codes to another. These are mainly used in generating log messages, in sending messages to the controller in control.c, and in converting errors from one protocol layer to another.
Definition in file reasons.c.
const char* bandwidth_weight_rule_to_string | ( | bandwidth_weight_rule_t | rule | ) |
const char* circuit_end_reason_to_control_string | ( | int | reason | ) |
const char* end_reason_to_http_connect_response_line | ( | int | endreason | ) |
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().
uint8_t errno_to_stream_end_reason | ( | int | e | ) |
Given an errno from a failed exit connection, return a reason code appropriate for use in a RELAY END cell.
Definition at line 177 of file reasons.c.
Referenced by connection_edge_end_errno().
const char* orconn_end_reason_to_control_string | ( | int | r | ) |
const char* socks4_response_code_to_string | ( | uint8_t | code | ) |
const char* socks5_response_code_to_string | ( | uint8_t | code | ) |
const char* stream_end_reason_to_control_string | ( | int | reason | ) |
socks5_reply_status_t stream_end_reason_to_socks5_response | ( | int | reason | ) |
const char* stream_end_reason_to_string | ( | int | reason | ) |