#include <P_Socks.h>
Inherits Continuation.

| Public Member Functions | |
| int | startEvent (int event, void *data) | 
| int | mainEvent (int event, void *data) | 
| void | findServer () | 
| void | init (ProxyMutex *m, SocksNetVC *netvc, unsigned char socks_support, unsigned char ver) | 
| void | free () | 
| SocksEntry () | |
| Data Fields | |
| MIOBuffer * | buf | 
| IOBufferReader * | reader | 
| SocksNetVC * | netVConnection | 
| IpEndpoint | target_addr | 
| Original target address. | |
| IpEndpoint | server_addr | 
| Origin server address. | |
| int | nattempts | 
| Action | action_ | 
| int | lerrno | 
| Event * | timeout | 
| unsigned char | version | 
| bool | write_done | 
| SocksAuthHandler | auth_handler | 
| unsigned char | socks_cmd | 
| ParentConfigParams * | server_params | 
| HttpRequestData | req_data | 
| ParentResult | server_result | 
Definition at line 103 of file P_Socks.h.
| SocksEntry::SocksEntry | ( | ) |  [inline] | 
Definition at line 142 of file P_Socks.h.
References server_addr, and target_addr.
| void SocksEntry::findServer | ( | ) | 
Definition at line 82 of file Socks.cc.
References ats_ip_copy(), ats_ip_ntop(), ats_ip_port_cast(), ats_ip_port_host_order(), ats_ip_pton(), socks_conf_struct::connection_attempts, Debug, ParentConfigParams::findParent(), ParentResult::hostname, ink_assert, ParentConfigParams::markParentDown(), nattempts, netProcessor, ParentConfigParams::nextParent(), PARENT_DIRECT, PARENT_FAIL, PARENT_SPECIFIED, PARENT_UNDEFINED, socks_conf_struct::per_server_connection_attempts, ParentResult::port, ParentResult::r, req_data, IpEndpoint::sa, server_addr, server_params, server_result, and NetProcessor::socks_conf_stuff.
Referenced by init(), and startEvent().
| void SocksEntry::free | ( | ) | 
Definition at line 136 of file Socks.cc.
References UnixNetVConnection::action_, action_, ats_ip_copy(), buf, Action::cancel(), Action::cancelled, Action::continuation, Debug, UnixNetVConnection::do_io_close(), UnixNetVConnection::do_io_read(), UnixNetVConnection::do_io_write(), free_MIOBuffer(), Continuation::handleEvent(), ink_assert, lerrno, Continuation::mutex, Action::mutex, MUTEX_TRY_LOCK, NET_EVENT_OPEN, NET_EVENT_OPEN_FAILED, NET_INCREMENT_DYN_STAT, netVConnection, ParentConfigParams::recordRetrySuccess(), SocksServerConfig::release(), ParentResult::retry, server_addr, UnixNetVConnection::server_addr, server_params, server_result, socks_connections_successful_stat, socks_connections_unsuccessful_stat, socksAllocator, this_ethread(), and timeout.
Referenced by UnixNetProcessor::connect_re_internal(), mainEvent(), and startEvent().
| void SocksEntry::init | ( | ProxyMutex * | m, | |
| SocksNetVC * | netvc, | |||
| unsigned char | socks_support, | |||
| unsigned char | ver | |||
| ) | 
Definition at line 42 of file Socks.cc.
References SocksServerConfig::acquire(), MIOBuffer::alloc_reader(), HttpRequestData::api_info, assert, ats_ip_copy(), ats_is_ip4(), buf, socks_conf_struct::default_version, HttpRequestData::dest_ip, findServer(), NetVConnection::get_local_addr(), HttpRequestData::hdr, HttpRequestData::hostname_str, HRTIME_SECONDS, Continuation::mutex, nattempts, netProcessor, new_MIOBuffer, reader, req_data, EThread::schedule_in(), socks_conf_struct::server_connect_timeout, server_params, SET_HANDLER, socks_cmd, NetProcessor::socks_conf_stuff, SOCKS_DEFAULT_VERSION, HttpRequestData::src_ip, startEvent(), target_addr, this_ethread(), timeout, version, write_done, and HttpRequestData::xact_start.
Referenced by UnixNetProcessor::connect_re_internal().
| int SocksEntry::mainEvent | ( | int | event, | |
| void * | data | |||
| ) | 
Definition at line 234 of file Socks.cc.
References ats_ip_port_cast(), ats_is_ip4(), ats_is_ip6(), auth_handler, buf, Action::cancel(), Debug, UnixNetVConnection::do_io_read(), UnixNetVConnection::do_io_write(), EVENT_CONT, EVENT_INTERVAL, MIOBuffer::fill(), free(), get_vc_event_name(), HRTIME_SECONDS, ink_assert, invokeSocksAuthHandler(), lerrno, memcpy, VIO::nbytes, VIO::ndone, NET_EVENT_OPEN, NET_EVENT_OPEN_FAILED, netProcessor, netVConnection, NORMAL_SOCKS, reader, MIOBuffer::reset(), EThread::schedule_in(), server_addr, SET_HANDLER, IpEndpoint::sin, IpEndpoint::sin6, SOCKS4_REP_LEN, SOCKS4_VERSION, SOCKS5_REP_LEN, SOCKS5_VERSION, SOCKS_ATYPE_FQHN, SOCKS_ATYPE_IPV4, SOCKS_ATYPE_IPV6, SOCKS_AUTH_OPEN, SOCKS_AUTH_READ_COMPLETE, SOCKS_AUTH_WRITE_COMPLETE, socks_cmd, NetProcessor::socks_conf_stuff, SOCKS_CONNECT, socks_conf_struct::socks_timeout, MIOBuffer::start(), startEvent(), this_ethread(), timeout, TS_IP6_SIZE, VC_EVENT_ACTIVE_TIMEOUT, VC_EVENT_EOS, VC_EVENT_ERROR, VC_EVENT_INACTIVITY_TIMEOUT, VC_EVENT_READ_COMPLETE, VC_EVENT_READ_READY, VC_EVENT_WRITE_COMPLETE, VC_EVENT_WRITE_READY, version, and write_done.
Referenced by startEvent().
| int SocksEntry::startEvent | ( | int | event, | |
| void * | data | |||
| ) | 
Definition at line 183 of file Socks.cc.
References ats_ip_nptop(), ats_is_ip(), auth_handler, Action::cancel(), NetProcessor::connect_re(), Debug, UnixNetVConnection::do_io_close(), findServer(), free(), HRTIME_SECONDS, INET6_ADDRPORTSTRLEN, lerrno, mainEvent(), NET_EVENT_OPEN, netProcessor, netVConnection, IpEndpoint::sa, EThread::schedule_in(), server_addr, socks_conf_struct::server_connect_timeout, SET_HANDLER, SOCKS5_VERSION, NetProcessor::socks_conf_stuff, NetVCOptions::socks_support, this_ethread(), timeout, version, and write_done.
Referenced by init(), and mainEvent().
Definition at line 119 of file P_Socks.h.
Referenced by UnixNetProcessor::connect_re_internal(), and free().
Definition at line 126 of file P_Socks.h.
Referenced by mainEvent(), and startEvent().
Definition at line 107 of file P_Socks.h.
Referenced by free(), init(), and mainEvent().
Definition at line 120 of file P_Socks.h.
Referenced by UnixNetProcessor::connect_re_internal(), free(), mainEvent(), and startEvent().
Definition at line 117 of file P_Socks.h.
Referenced by findServer(), and init().
Definition at line 110 of file P_Socks.h.
Referenced by free(), mainEvent(), and startEvent().
Definition at line 108 of file P_Socks.h.
Referenced by init(), and mainEvent().
Definition at line 132 of file P_Socks.h.
Referenced by findServer(), and init().
Origin server address.
Definition at line 115 of file P_Socks.h.
Referenced by UnixNetProcessor::connect_re_internal(), findServer(), free(), mainEvent(), SocksEntry(), and startEvent().
Definition at line 131 of file P_Socks.h.
Referenced by findServer(), free(), and init().
Definition at line 133 of file P_Socks.h.
Referenced by findServer(), and free().
| unsigned char SocksEntry::socks_cmd | 
Definition at line 127 of file P_Socks.h.
Referenced by init(), and mainEvent().
Original target address.
Definition at line 113 of file P_Socks.h.
Referenced by init(), and SocksEntry().
Definition at line 121 of file P_Socks.h.
Referenced by free(), init(), mainEvent(), and startEvent().
| unsigned char SocksEntry::version | 
Definition at line 122 of file P_Socks.h.
Referenced by init(), mainEvent(), and startEvent().
Definition at line 124 of file P_Socks.h.
Referenced by init(), mainEvent(), and startEvent().
 1.7.1
 1.7.1