GNUnet 0.22.2
Socks5Request Struct Reference

A structure for socks requests. More...

Collaboration diagram for Socks5Request:
[legend]

Data Fields

struct Socks5Requestnext
 DLL. More...
 
struct Socks5Requestprev
 DLL. More...
 
struct GNUNET_NETWORK_Handlesock
 The client socket. More...
 
struct GNUNET_GNS_LookupWithTldRequestgns_lookup
 Handle to GNS lookup, during SOCKS5_RESOLVING phase. More...
 
struct GNUNET_SCHEDULER_Taskrtask
 Client socket read task. More...
 
struct GNUNET_SCHEDULER_Taskwtask
 Client socket write task. More...
 
struct GNUNET_SCHEDULER_Tasktimeout_task
 Timeout task. More...
 
char rbuf [(256+32)]
 Read buffer. More...
 
char wbuf [(256+32)]
 Write buffer. More...
 
char io_buf [CURL_MAX_WRITE_SIZE]
 Buffer we use for moving data between MHD and curl (in both directions). More...
 
struct MhdHttpListhd
 MHD HTTP instance handling this request, NULL for none. More...
 
struct MHD_Connection * con
 MHD connection for this request. More...
 
struct MHD_Response * response
 MHD response object for this request. More...
 
char * domain
 the domain name to server (only important for TLS) More...
 
char * leho
 DNS Legacy Host Name as given by GNS, NULL if not given. More...
 
char * dane_data [32+1]
 Payload of the DANE records encountered. More...
 
char * url
 The URL to fetch. More...
 
CURL * curl
 Handle to cURL. More...
 
struct curl_slist * headers
 HTTP request headers for the curl request. More...
 
struct curl_slist * hosts
 DNS->IP mappings resolved through GNS. More...
 
unsigned int response_code
 HTTP response code to give to MHD for the response. More...
 
int dane_data_len [32+1]
 Number of bytes in dane_data. More...
 
unsigned int num_danes
 Number of entries used in dane_data_len and dane_data. More...
 
size_t rbuf_len
 Number of bytes already in read buffer. More...
 
size_t wbuf_len
 Number of bytes already in write buffer. More...
 
size_t io_len
 Number of bytes already in the IO buffer. More...
 
struct sockaddr_storage destination_address
 Once known, what's the target address for the connection? More...
 
enum SocksPhase state
 The socks state. More...
 
uint16_t port
 Desired destination port. More...
 
struct HttpResponseHeaderheader_head
 Headers from response. More...
 
struct HttpResponseHeaderheader_tail
 Headers from response. More...
 
int ssl_checked
 X.509 Certificate status. More...
 
int is_gns
 Was the hostname resolved via GNS? More...
 
int is_tls
 This is (probably) a TLS connection. More...
 
int suspended
 Did we suspend MHD processing? More...
 
int curl_paused
 Did we pause CURL processing? More...
 

Detailed Description

A structure for socks requests.

Definition at line 465 of file gnunet-gns-proxy.c.

Field Documentation

◆ next

struct Socks5Request* Socks5Request::next

DLL.

Definition at line 470 of file gnunet-gns-proxy.c.

Referenced by do_shutdown(), and mhd_connection_cb().

◆ prev

struct Socks5Request* Socks5Request::prev

DLL.

Definition at line 475 of file gnunet-gns-proxy.c.

◆ sock

◆ gns_lookup

struct GNUNET_GNS_LookupWithTldRequest* Socks5Request::gns_lookup

Handle to GNS lookup, during SOCKS5_RESOLVING phase.

Definition at line 485 of file gnunet-gns-proxy.c.

Referenced by cleanup_s5r(), do_s5r_read(), and handle_gns_result().

◆ rtask

struct GNUNET_SCHEDULER_Task* Socks5Request::rtask

Client socket read task.

Definition at line 490 of file gnunet-gns-proxy.c.

Referenced by cleanup_s5r(), do_accept(), do_s5r_read(), and do_write().

◆ wtask

struct GNUNET_SCHEDULER_Task* Socks5Request::wtask

Client socket write task.

Definition at line 495 of file gnunet-gns-proxy.c.

Referenced by cleanup_s5r(), do_s5r_read(), do_write(), signal_socks_failure(), and signal_socks_success().

◆ timeout_task

struct GNUNET_SCHEDULER_Task* Socks5Request::timeout_task

Timeout task.

Definition at line 500 of file gnunet-gns-proxy.c.

Referenced by cleanup_s5r(), mhd_log_callback(), setup_data_transfer(), and timeout_s5r_handshake().

◆ rbuf

char Socks5Request::rbuf[(256+32)]

Read buffer.

Definition at line 505 of file gnunet-gns-proxy.c.

Referenced by clear_from_s5r_rbuf(), and do_s5r_read().

◆ wbuf

char Socks5Request::wbuf[(256+32)]

Write buffer.

Definition at line 510 of file gnunet-gns-proxy.c.

Referenced by do_s5r_read(), do_write(), signal_socks_failure(), and signal_socks_success().

◆ io_buf

char Socks5Request::io_buf[CURL_MAX_WRITE_SIZE]

Buffer we use for moving data between MHD and curl (in both directions).

Definition at line 515 of file gnunet-gns-proxy.c.

Referenced by create_response(), curl_download_cb(), curl_upload_cb(), and mhd_content_cb().

◆ hd

struct MhdHttpList* Socks5Request::hd

MHD HTTP instance handling this request, NULL for none.

Definition at line 520 of file gnunet-gns-proxy.c.

Referenced by create_response(), curl_download_cb(), curl_upload_cb(), and setup_data_transfer().

◆ con

struct MHD_Connection* Socks5Request::con

MHD connection for this request.

Definition at line 525 of file gnunet-gns-proxy.c.

Referenced by cleanup_s5r(), create_mhd_response_from_s5r(), create_response(), curl_download_cb(), and mhd_content_cb().

◆ response

struct MHD_Response* Socks5Request::response

MHD response object for this request.

Definition at line 530 of file gnunet-gns-proxy.c.

Referenced by cleanup_s5r(), create_mhd_response_from_s5r(), create_response(), curl_download_cb(), and mhd_completed_cb().

◆ domain

◆ leho

char* Socks5Request::leho

DNS Legacy Host Name as given by GNS, NULL if not given.

Definition at line 540 of file gnunet-gns-proxy.c.

Referenced by check_ssl_certificate(), cleanup_s5r(), con_val_iter(), create_response(), curl_check_hdr(), and handle_gns_result().

◆ dane_data

char* Socks5Request::dane_data[32+1]

Payload of the DANE records encountered.

Definition at line 545 of file gnunet-gns-proxy.c.

Referenced by check_ssl_certificate(), cleanup_s5r(), and handle_gns_result().

◆ url

◆ curl

CURL* Socks5Request::curl

◆ headers

struct curl_slist* Socks5Request::headers

HTTP request headers for the curl request.

Definition at line 560 of file gnunet-gns-proxy.c.

Referenced by cleanup_s5r(), con_val_iter(), create_response(), and mhd_completed_cb().

◆ hosts

struct curl_slist* Socks5Request::hosts

DNS->IP mappings resolved through GNS.

Definition at line 565 of file gnunet-gns-proxy.c.

Referenced by cleanup_s5r(), and create_response().

◆ response_code

unsigned int Socks5Request::response_code

HTTP response code to give to MHD for the response.

Definition at line 570 of file gnunet-gns-proxy.c.

Referenced by create_mhd_response_from_s5r(), and create_response().

◆ dane_data_len

int Socks5Request::dane_data_len[32+1]

Number of bytes in dane_data.

Definition at line 575 of file gnunet-gns-proxy.c.

Referenced by check_ssl_certificate(), and handle_gns_result().

◆ num_danes

unsigned int Socks5Request::num_danes

Number of entries used in dane_data_len and dane_data.

Definition at line 581 of file gnunet-gns-proxy.c.

Referenced by check_ssl_certificate(), cleanup_s5r(), create_response(), and handle_gns_result().

◆ rbuf_len

size_t Socks5Request::rbuf_len

Number of bytes already in read buffer.

Definition at line 586 of file gnunet-gns-proxy.c.

Referenced by clear_from_s5r_rbuf(), do_s5r_read(), and mhd_completed_cb().

◆ wbuf_len

size_t Socks5Request::wbuf_len

Number of bytes already in write buffer.

Definition at line 591 of file gnunet-gns-proxy.c.

Referenced by do_s5r_read(), do_write(), mhd_completed_cb(), signal_socks_failure(), and signal_socks_success().

◆ io_len

size_t Socks5Request::io_len

Number of bytes already in the IO buffer.

Definition at line 596 of file gnunet-gns-proxy.c.

Referenced by create_response(), curl_download_cb(), curl_upload_cb(), mhd_completed_cb(), and mhd_content_cb().

◆ destination_address

struct sockaddr_storage Socks5Request::destination_address

Once known, what's the target address for the connection?

Definition at line 601 of file gnunet-gns-proxy.c.

Referenced by create_response(), do_s5r_read(), and handle_gns_result().

◆ state

◆ port

uint16_t Socks5Request::port

Desired destination port.

Definition at line 611 of file gnunet-gns-proxy.c.

Referenced by create_response(), do_s5r_read(), and handle_gns_result().

◆ header_head

struct HttpResponseHeader* Socks5Request::header_head

Headers from response.

Definition at line 616 of file gnunet-gns-proxy.c.

Referenced by create_mhd_response_from_s5r(), curl_check_hdr(), and mhd_completed_cb().

◆ header_tail

struct HttpResponseHeader* Socks5Request::header_tail

Headers from response.

Definition at line 621 of file gnunet-gns-proxy.c.

Referenced by curl_check_hdr(), and mhd_completed_cb().

◆ ssl_checked

int Socks5Request::ssl_checked

X.509 Certificate status.

Definition at line 626 of file gnunet-gns-proxy.c.

Referenced by check_ssl_certificate(), curl_check_hdr(), and mhd_connection_cb().

◆ is_gns

int Socks5Request::is_gns

Was the hostname resolved via GNS?

Definition at line 631 of file gnunet-gns-proxy.c.

Referenced by create_response(), and handle_gns_result().

◆ is_tls

int Socks5Request::is_tls

This is (probably) a TLS connection.

Definition at line 636 of file gnunet-gns-proxy.c.

Referenced by create_response(), curl_check_hdr(), do_s5r_read(), handle_gns_result(), and setup_data_transfer().

◆ suspended

int Socks5Request::suspended

Did we suspend MHD processing?

Definition at line 641 of file gnunet-gns-proxy.c.

Referenced by cleanup_s5r(), create_mhd_response_from_s5r(), create_response(), curl_download_cb(), and mhd_content_cb().

◆ curl_paused

int Socks5Request::curl_paused

Did we pause CURL processing?

Definition at line 646 of file gnunet-gns-proxy.c.

Referenced by create_response(), curl_download_cb(), curl_upload_cb(), and mhd_content_cb().


The documentation for this struct was generated from the following file: