Teonet library
0.4.7
|
Go to the source code of this file.
Data Structures | |
struct | ksnTCPProxyHeader |
TCP Proxy packet(message) header structure. More... | |
struct | ksnTCPProxyPacketData |
TCP Proxy packet data structure. More... | |
struct | ksnTCPProxyData |
ksnTCPProxyClass map data More... | |
struct | ksnTCPProxyClass |
TCP Proxy class data. More... | |
Typedefs | |
typedef struct ksnTCPProxyHeader | ksnTCPProxyHeader |
TCP Proxy packet(message) header structure. More... | |
typedef struct ksnTCPProxyPacketData | ksnTCPProxyPacketData |
TCP Proxy packet data structure. More... | |
typedef struct ksnTCPProxyData | ksnTCPProxyData |
ksnTCPProxyClass map data More... | |
typedef struct ksnTCPProxyClass | ksnTCPProxyClass |
TCP Proxy class data. More... | |
Enumerations | |
enum | ksnTCPProxyBufferStage { WAIT_FOR_START, WAIT_FOR_END, PROCESS_PACKET } |
TCP Proxy buffer stage. More... | |
enum | ksnTCPProxyCommand { CMD_TCPP_PROXY } |
TCP Proxy protocol command. More... | |
Functions | |
ksnTCPProxyClass * | ksnTCPProxyInit (void *ke) |
Initialize TCP Proxy module. More... | |
void | ksnTCPProxyDestroy (ksnTCPProxyClass *tp) |
Destroy TCP Proxy module. More... | |
int | ksnTCPProxyClientConnect (ksnTCPProxyClass *tp) |
Connect to TCP Proxy server. More... | |
Teonet TCP Proxy module
Created on September 8, 2015, 2:00 AM
typedef struct ksnTCPProxyClass ksnTCPProxyClass |
TCP Proxy class data.
typedef struct ksnTCPProxyData ksnTCPProxyData |
ksnTCPProxyClass map data
typedef struct ksnTCPProxyHeader ksnTCPProxyHeader |
TCP Proxy packet(message) header structure.
typedef struct ksnTCPProxyPacketData ksnTCPProxyPacketData |
TCP Proxy packet data structure.
enum ksnTCPProxyCommand |
int ksnTCPProxyClientConnect | ( | ksnTCPProxyClass * | tp | ) |
Connect to TCP Proxy server.
Get address and port from teonet configuration and connect to R-Host TCP Server
tp | Pointer to ksnTCPProxyClass |
References ksnTCPProxyPacketData::buffer, cmd_tcppc_read_cb(), DEBUG, ksnTCPProxyClass::fd_client, ksnTCPProxyPacketData::header, kev, ksn_printf, ksnTcpClientCreate(), ksnTCPProxyPacketData::length, MODULE, ksnTCPProxyClass::packet, ksnTCPProxyPacketData::ptr, ksnTCPProxyPacketData::stage, ksnTCPProxyClass::w_client, and WAIT_FOR_START.
Referenced by connect_r_host_cb(), and ksnTCPProxyInit().
void ksnTCPProxyDestroy | ( | ksnTCPProxyClass * | tp | ) |
Destroy TCP Proxy module.
tp | Pointer to ksnTCPProxyClass |
References free(), ksnTCPProxyClientStop(), ksnTCPProxyServerStop(), and ksnTCPProxyClass::map.
Referenced by modules_destroy(), test_5_1(), and test_5_2().
ksnTCPProxyClass* ksnTCPProxyInit | ( | void * | ke | ) |
Initialize TCP Proxy module.
ke | Pointer to the ksnTCPProxyClass |
References ksnTCPProxyClass::fd, ksnTCPProxyClass::fd_client, ke, ksnTCPProxyClass::ke, ksnTCPProxyClientConnect(), ksnTCPProxyServerStart(), malloc(), and ksnTCPProxyClass::map.
Referenced by modules_init(), test_5_1(), and test_5_2().