A structure for socks requests. More...
Data Fields | |
| struct Socks5Request * | next |
| DLL. | |
| struct Socks5Request * | prev |
| DLL. | |
| struct GNUNET_NETWORK_Handle * | sock |
| The client socket. | |
| struct GNUNET_GNS_LookupWithTldRequest * | gns_lookup |
| Handle to GNS lookup, during SOCKS5_RESOLVING phase. | |
| struct GNUNET_SCHEDULER_Task * | rtask |
| Client socket read task. | |
| struct GNUNET_SCHEDULER_Task * | wtask |
| Client socket write task. | |
| struct GNUNET_SCHEDULER_Task * | timeout_task |
| Timeout task. | |
| char | rbuf [(256+32)] |
| Read buffer. | |
| char | wbuf [(256+32)] |
| Write buffer. | |
| char | io_buf [CURL_MAX_WRITE_SIZE] |
| Buffer we use for moving data between MHD and curl (in both directions). | |
| struct MhdHttpList * | hd |
| MHD HTTP instance handling this request, NULL for none. | |
| struct MHD_Connection * | con |
| MHD connection for this request. | |
| struct MHD_Response * | response |
| MHD response object for this request. | |
| char * | domain |
| the domain name to server (only important for TLS) | |
| char * | leho |
| DNS Legacy Host Name as given by GNS, NULL if not given. | |
| char * | dane_data [32+1] |
| Payload of the DANE records encountered. | |
| char * | url |
| The URL to fetch. | |
| CURL * | curl |
| Handle to cURL. | |
| struct curl_slist * | headers |
| HTTP request headers for the curl request. | |
| struct curl_slist * | hosts |
| DNS->IP mappings resolved through GNS. | |
| unsigned int | response_code |
| HTTP response code to give to MHD for the response. | |
| int | dane_data_len [32+1] |
| Number of bytes in dane_data. | |
| unsigned int | num_danes |
| Number of entries used in dane_data_len and dane_data. | |
| size_t | rbuf_len |
| Number of bytes already in read buffer. | |
| size_t | wbuf_len |
| Number of bytes already in write buffer. | |
| size_t | io_len |
| Number of bytes already in the IO buffer. | |
| struct sockaddr_storage | destination_address |
| Once known, what's the target address for the connection? | |
| enum SocksPhase | state |
| The socks state. | |
| uint16_t | port |
| Desired destination port. | |
| struct HttpResponseHeader * | header_head |
| Headers from response. | |
| struct HttpResponseHeader * | header_tail |
| Headers from response. | |
| int | ssl_checked |
| X.509 Certificate status. | |
| int | is_gns |
| Was the hostname resolved via GNS? | |
| int | is_tls |
| This is (probably) a TLS connection. | |
| int | suspended |
| Did we suspend MHD processing? | |
| int | curl_paused |
| Did we pause CURL processing? | |
A structure for socks requests.
Definition at line 465 of file gnunet-gns-proxy.c.
| struct Socks5Request* Socks5Request::next |
DLL.
Definition at line 470 of file gnunet-gns-proxy.c.
Referenced by do_shutdown(), and mhd_connection_cb().
| struct Socks5Request* Socks5Request::prev |
DLL.
Definition at line 475 of file gnunet-gns-proxy.c.
| struct GNUNET_NETWORK_Handle* Socks5Request::sock |
The client socket.
Definition at line 480 of file gnunet-gns-proxy.c.
Referenced by cleanup_s5r(), do_accept(), do_s5r_read(), do_write(), mhd_connection_cb(), setup_data_transfer(), signal_socks_failure(), and signal_socks_success().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| char* Socks5Request::domain |
the domain name to server (only important for TLS)
Definition at line 535 of file gnunet-gns-proxy.c.
Referenced by check_ssl_certificate(), cleanup_s5r(), create_mhd_response_from_s5r(), create_response(), curl_check_hdr(), curl_download_cb(), curl_upload_cb(), do_s5r_read(), mhd_content_cb(), and setup_data_transfer().
| 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().
| 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().
| char* Socks5Request::url |
The URL to fetch.
Definition at line 550 of file gnunet-gns-proxy.c.
Referenced by cleanup_s5r(), create_mhd_response_from_s5r(), create_response(), curl_download_cb(), curl_upload_cb(), mhd_completed_cb(), mhd_content_cb(), and mhd_log_callback().
| CURL* Socks5Request::curl |
Handle to cURL.
Definition at line 555 of file gnunet-gns-proxy.c.
Referenced by check_ssl_certificate(), cleanup_s5r(), create_mhd_response_from_s5r(), create_response(), curl_upload_cb(), mhd_completed_cb(), and mhd_content_cb().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| enum SocksPhase Socks5Request::state |
The socks state.
Definition at line 606 of file gnunet-gns-proxy.c.
Referenced by create_response(), curl_download_cb(), curl_upload_cb(), do_accept(), do_s5r_read(), do_write(), handle_gns_result(), mhd_completed_cb(), mhd_content_cb(), mhd_log_callback(), setup_data_transfer(), and signal_socks_failure().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().