CUBRID Engine  latest
wintcp.h File Reference
#include "config.h"
#include "connection_defs.h"
Include dependency graph for wintcp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  CSS_ER_WINSOCK {
  CSS_ER_WINSOCK_NOERROR = 0, CSS_ER_WINSOCK_STARTUP = -1, CSS_ER_WINSOCK_HOSTNAME = -2, CSS_ER_WINSOCK_HOSTID = -3,
  CSS_ER_WINSOCK_BLOCKING_HOOK = -4
}
 

Functions

int css_windows_startup (void)
 
void css_windows_shutdown (void)
 
int css_gethostname (char *name, size_t namelen)
 
SOCKET css_tcp_client_open (const char *hostname, int port)
 
SOCKET css_tcp_client_open_with_retry (const char *hostname, int port, bool willretry)
 
void css_shutdown_socket (SOCKET fd)
 
unsigned int css_gethostid (void)
 
bool css_tcp_setup_server_datagram (char *pathname, SOCKET *sockfd)
 
bool css_tcp_listen_server_datagram (SOCKET sockfd, SOCKET *newfd)
 
bool css_tcp_master_datagram (char *pathname, SOCKET *sockfd)
 
SOCKET css_open_new_socket_from_master (SOCKET fd, unsigned short *rid)
 
bool css_transfer_fd (SOCKET server_fd, SOCKET client_fd, unsigned short rid, CSS_SERVER_REQUEST request)
 
int css_tcp_master_open (int port, SOCKET *sockfd)
 
SOCKET css_master_accept (SOCKET sockfd)
 
int css_open_server_connection_socket (void)
 
void css_close_server_connection_socket (void)
 
SOCKET css_server_accept (SOCKET sockfd)
 
int css_get_max_socket_fds (void)
 
int css_get_peer_name (SOCKET sockfd, char *hostname, size_t len)
 
int css_get_sock_name (SOCKET sockfd, char *hostname, size_t len)
 
int css_hostname_to_ip (const char *host, unsigned char *ip_addr)
 

Enumeration Type Documentation

Enumerator
CSS_ER_WINSOCK_NOERROR 
CSS_ER_WINSOCK_STARTUP 
CSS_ER_WINSOCK_HOSTNAME 
CSS_ER_WINSOCK_HOSTID 
CSS_ER_WINSOCK_BLOCKING_HOOK 

Definition at line 36 of file wintcp.h.

Function Documentation

void css_close_server_connection_socket ( void  )

Definition at line 1242 of file tcp.c.

References css_Server_connection_socket, INVALID_SOCKET, and IS_INVALID_SOCKET.

Referenced by css_init().

Here is the caller graph for this function:

int css_get_max_socket_fds ( void  )

Definition at line 1315 of file tcp.c.

References max_socket_fds.

Referenced by crash_handler(), css_daemon_start(), and sysprm_final().

Here is the caller graph for this function:

int css_get_peer_name ( SOCKET  sockfd,
char *  hostname,
size_t  len 
)

Definition at line 1592 of file tcp.c.

References NULL.

Referenced by css_process_deact_stop_all(), css_process_deactivate_heartbeat(), and css_send_error().

Here is the caller graph for this function:

int css_get_sock_name ( SOCKET  sockfd,
char *  hostname,
size_t  len 
)

Definition at line 1618 of file tcp.c.

References NULL.

Referenced by css_send_error().

Here is the caller graph for this function:

unsigned int css_gethostid ( void  )
int css_gethostname ( char *  name,
size_t  namelen 
)
int css_hostname_to_ip ( const char *  host,
unsigned char *  ip_addr 
)
SOCKET css_master_accept ( SOCKET  sockfd)

Definition at line 836 of file tcp.c.

References ARG_FILE_LINE, css_accept(), ER_ERROR_SEVERITY, er_set_with_oserror(), ERR_CSS_TCP_ACCEPT_ERROR, INVALID_SOCKET, and IS_INVALID_SOCKET.

Referenced by css_check_master_socket_input().

Here is the caller graph for this function:

SOCKET css_open_new_socket_from_master ( SOCKET  fd,
unsigned short *  rid 
)

Definition at line 1059 of file tcp.c.

References ARG_FILE_LINE, CONTROLLEN, css_sockopt(), ER_ERROR_SEVERITY, er_set_with_oserror(), ERR_CSS_TCP_RECVMSG, INVALID_SOCKET, ntohs(), NULL, pid, rc, and TPRINTF.

Referenced by css_process_new_client().

Here is the caller graph for this function:

SOCKET css_server_accept ( SOCKET  sockfd)

Definition at line 1256 of file tcp.c.

References css_accept(), and INVALID_SOCKET.

Referenced by css_is_shutdown_timeout_expired().

Here is the caller graph for this function:

SOCKET css_tcp_client_open ( const char *  hostname,
int  port 
)
bool css_tcp_listen_server_datagram ( SOCKET  sockfd,
SOCKET newfd 
)

Definition at line 930 of file tcp.c.

References ARG_FILE_LINE, ER_ERROR_SEVERITY, er_set_with_oserror(), ERR_CSS_TCP_DATAGRAM_ACCEPT, and IS_INVALID_SOCKET.

Referenced by css_connect_to_master_server().

Here is the caller graph for this function:

bool css_tcp_master_datagram ( char *  pathname,
SOCKET sockfd 
)
bool css_tcp_setup_server_datagram ( char *  pathname,
SOCKET sockfd 
)

Definition at line 447 of file wintcp.c.

bool css_transfer_fd ( SOCKET  server_fd,
SOCKET  client_fd,
unsigned short  rid,
CSS_SERVER_REQUEST  request 
)

Definition at line 1122 of file tcp.c.

References ARG_FILE_LINE, CONTROLLEN, ER_ERROR_SEVERITY, er_set_with_oserror(), ERR_CSS_TCP_PASSING_FD, htonl(), htons(), and NULL.

Referenced by css_send_new_request_to_server().

Here is the caller graph for this function:

void css_windows_shutdown ( void  )

Definition at line 140 of file wintcp.c.

References err, NULL, old_hook, and wsa_Init_count.

Referenced by boot_shutdown_client(), css_gethostid(), css_gethostname(), css_hostname_to_ip(), css_init(), css_terminate(), main(), and net_server_start().

Here is the caller graph for this function: