Public Types | Public Member Functions

SocksProxy Struct Reference

Inherits Continuation.

Collaboration diagram for SocksProxy:
Collaboration graph
[legend]

Public Types

enum  {
  SOCKS_INIT = 1, SOCKS_ACCEPT, AUTH_DONE, SERVER_TUNNEL,
  HTTP_REQ, RESP_TO_CLIENT, ALL_DONE, SOCKS_ERROR
}
typedef int(SocksProxy::* EventHandler )(int event, void *data)

Public Member Functions

 SocksProxy ()
 ~SocksProxy ()
int mainEvent (int event, void *data)
int setupHttpRequest (unsigned char *p)
int sendResp (bool granted)
void init (NetVConnection *netVC)
void free ()

Detailed Description

Definition at line 48 of file SocksProxy.cc.


Member Typedef Documentation

typedef int(SocksProxy::* SocksProxy::EventHandler)(int event, void *data)

Definition at line 50 of file SocksProxy.cc.


Member Enumeration Documentation

anonymous enum
Enumerator:
SOCKS_INIT 
SOCKS_ACCEPT 
AUTH_DONE 
SERVER_TUNNEL 
HTTP_REQ 
RESP_TO_CLIENT 
ALL_DONE 
SOCKS_ERROR 

Definition at line 52 of file SocksProxy.cc.


Constructor & Destructor Documentation

SocksProxy::SocksProxy (  )  [inline]

Definition at line 57 of file SocksProxy.cc.

SocksProxy::~SocksProxy (  )  [inline]

Definition at line 63 of file SocksProxy.cc.


Member Function Documentation

void SocksProxy::free ( void   ) 

Definition at line 113 of file SocksProxy.cc.

References free_MIOBuffer(), Continuation::mutex, and socksProxyAllocator.

Referenced by mainEvent().

void SocksProxy::init ( NetVConnection netVC  ) 
int SocksProxy::mainEvent ( int  event,
void *  data 
)

Definition at line 124 of file SocksProxy.cc.

References ACTION_RESULT_DONE, ALL_DONE, ats_ip4_set(), ats_ip_sa_cast(), NetVConnection::attributes, AUTH_DONE, IOBufferReader::block_read_avail(), Action::cancel(), NetProcessor::connect_re(), IOBufferReader::consume(), Debug, NetVConnection::do_io_close(), NetVConnection::do_io_read(), NetVConnection::do_io_write(), EVENT_DONE, EVENT_INTERVAL, MIOBuffer::fill(), free(), get_vc_event_name(), HRTIME_SECONDS, socks_conf_struct::http_port, HTTP_REQ, OneWayTunnel::init(), ink_assert, INT64_MAX, invokeSocksAuthHandler(), HttpSessionAccept::mainEvent(), memcpy, Continuation::mutex, VIO::nbytes, VIO::ndone, NET_EVENT_ACCEPT, NET_EVENT_OPEN, NET_EVENT_OPEN_FAILED, netProcessor, OneWayTunnel::OneWayTunnel_alloc(), IOBufferReader::read_avail(), MIOBuffer::reset(), SocksAddrType::reset(), RESP_TO_CLIENT, EThread::schedule_in(), sendResp(), SERVER_TUNNEL, setupHttpRequest(), OneWayTunnel::SetupTwoWayTunnel(), SOCKS4_VERSION, SOCKS5_VERSION, SOCKS_ACCEPT, NetVConnection::socks_addr, SOCKS_ATYPE_FQHN, SOCKS_ATYPE_IPV4, SOCKS_ATYPE_IPV6, SOCKS_AUTH_FILL_WRITE_BUF, SOCKS_AUTH_READ_COMPLETE, NetProcessor::socks_conf_stuff, SOCKS_CONNECT, SOCKS_ERROR, NetVCOptions::socks_support, socks_conf_struct::socks_timeout, NetVCOptions::socks_version, socksproxy_http_connections_stat, SOCKSPROXY_INC_STAT, socksproxy_tunneled_connections_stat, MIOBuffer::start(), IOBufferReader::start(), this_ethread(), detail::HttpSessionAcceptOptions::transport_type, SocksAddrType::type, 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, and Warning.

Referenced by init().

int SocksProxy::sendResp ( bool  granted  ) 
int SocksProxy::setupHttpRequest ( unsigned char *  p  ) 

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