socks4-client.c
Go to the documentation of this file.
284 status->io = padico_io_register(fd, PADICO_IO_EVENT_READ, &socks4client_proxy_reply_notifier, status);
assert(slab_size > 0)
void(* padico_socketfactory_connector_t)(void *key, int fd)
Definition SocketFactory.h:34
static void puk_instance_context_indirect_SocketFactory(puk_instance_t instance, const char *label, struct puk_receptacle_SocketFactory_s *receptacle)
Definition SocketFactory.h:77
@ padico_vsock_caps_directconnect
don't attempt to send an assembly request- directconnect only (through real sockets)
Definition VLink-API.h:179
@ padico_vsock_caps_clientonly
only usable as client- no server-side implementation
Definition VLink-API.h:183
struct padico_addrkey_hash_entry_block_lfstack_s __attribute__
hint whether the queue is empty.
Definition bench_lfqueue.c:32
static const struct padico_socketfactory_s socks4client_sf_driver
'SocketFactory' facet for SocketFactory-plain
Definition socks4-client.c:50
static const struct puk_component_driver_s socks4client_component_driver
instanciation facet for SocketFactory-plain
Definition socks4-client.c:67
void padico_io_activate(padico_sysio_t io)
Activates the I/O handle - when not activated, the callback is not triggered.
Definition sysio.c:278
padico_sysio_t padico_io_register(int fd, unsigned int what, padico_sysio_callback_t callback, void *key)
Registers a file descriptor for polling.
Definition sysio.c:205
ssize_t padico_sysio_out(int fildes, const void *buf, size_t nbyte)
Definition sysio.c:808
const struct in_addr * padico_topo_host_getaddr(padico_topo_host_t host)
Get the canonical IP address of a host.
Definition topology.c:1977
padico_topo_host_t padico_topo_host_resolvebyname(const char *hostname)
resolve a host from name
Definition topology.c:2681
static void socks4client_proxy_connect_notifier(void *key, int fd)
notification handler when proxy is connected (connection started in create())
Definition socks4-client.c:279
static int socks4client_connect(void *_status, const struct sockaddr *addr, socklen_t addrlen, padico_socketfactory_connector_t notifier, void *key)
Definition socks4-client.c:193
static void socks4client_send_request(struct socks4client_status_s *status)
send a CONNECT request to SOCKS proxy when: – socketfactory has issued a connect() – proxy is connect...
Definition socks4-client.c:261
static int socks4client_proxy_reply_notifier(int fd, void *key)
notification handler when reply from proxy is received.
Definition socks4-client.c:292
static int socks4client_create(void *_status, int family, int type, int protocol)
Definition socks4-client.c:159
static void * socks4client_instantiate(puk_instance_t, puk_context_t)
Definition socks4-client.c:132
Definition SocketFactory.h:37
int(* create)(void *_status, int family, int type, int protocol)
create the socket attached to the SocketFactory instance
Definition SocketFactory.h:41
int(* connect)(void *_status, const struct sockaddr *addr, socklen_t addrlen, padico_socketfactory_connector_t notifier, void *key)
connects the socket to the given address
Definition SocketFactory.h:64
Definition sysio.c:86
struct padico_socketfactory_s * driver
Definition SocketFactory.h:77
Definition socks4-client.c:74
struct socks4client_status_s::@79 connector
padico_socketfactory_connector_t notifier
Definition socks4-client.c:83
struct socks4client_status_s::@80 state
struct puk_receptacle_SocketFactory_s socket
Definition socks4-client.c:75