CUBRID Engine
latest
|
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 } |
enum CSS_ER_WINSOCK |
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().
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().
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().
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().
unsigned int css_gethostid | ( | void | ) |
Definition at line 1209 of file tcp.c.
References ARG_FILE_LINE, CSS_ER_WINSOCK_HOSTID, CSS_ER_WINSOCK_HOSTNAME, css_windows_shutdown(), css_windows_startup(), css_Wsa_error, CUB_MAXHOSTNAMELEN, ER_CSS_WINSOCK_HOSTID, ER_CSS_WINSOCK_HOSTNAME, ER_ERROR_SEVERITY, er_set(), INADDR_NONE, and NULL.
Referenced by log_2pc_make_global_tran_id().
int css_gethostname | ( | char * | name, |
size_t | namelen | ||
) |
Definition at line 114 of file tcp.c.
References ARG_FILE_LINE, css_windows_shutdown(), css_windows_startup(), CUB_MAXHOSTNAMELEN, ER_ERROR_SEVERITY, ER_FAILED, ER_GAI_ERROR, er_set(), err, NO_ERROR, NULL, and strlen.
int css_hostname_to_ip | ( | const char * | host, |
unsigned char * | ip_addr | ||
) |
Definition at line 227 of file tcp.c.
References ARG_FILE_LINE, css_windows_shutdown(), css_windows_startup(), ER_BO_UNABLE_TO_FIND_HOSTNAME, ER_CSS_WINSOCK_HOSTNAME, ER_CSS_WINSOCK_STARTUP, ER_ERROR_SEVERITY, er_set(), err, gethostbyname_lock, INADDR_NONE, NO_ERROR, NULL, pthread_mutex_lock, and pthread_mutex_unlock.
Referenced by boot_make_session_server_key().
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().
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().
int css_open_server_connection_socket | ( | void | ) |
Definition at line 1228 of file tcp.c.
References ARG_FILE_LINE, css_Maximum_server_count, css_Server_connection_socket, css_shutdown_socket(), css_windows_startup(), ER_ERROR_SEVERITY, er_set(), ERR_CSS_WINTCP_BIND_ABORT, ERR_CSS_WINTCP_CANNOT_CREATE_STREAM, error(), htonl(), IS_INVALID_SOCKET, ntohs(), prm_get_bool_value(), and PRM_ID_TCP_KEEPALIVE.
Referenced by css_connect_to_master_server().
Definition at line 1256 of file tcp.c.
References css_accept(), and INVALID_SOCKET.
Referenced by css_is_shutdown_timeout_expired().
void css_shutdown_socket | ( | SOCKET | fd | ) |
Definition at line 1179 of file tcp.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set_with_oserror(), IS_INVALID_SOCKET, and rc.
Referenced by css_does_master_exist(), css_master_cleanup(), css_open_server_connection_socket(), css_process_close_packet(), css_process_kill_master(), css_send_io_vector_with_socket(), css_shutdown_conn(), and css_tcp_master_open().
Definition at line 182 of file tcp.c.
References ARG_FILE_LINE, css_tcp_client_open_with_retry(), ER_ERROR_SEVERITY, er_set_with_oserror(), ERR_CSS_TCP_CANNOT_CONNECT_TO_MASTER, css_conn_entry::fd, and IS_INVALID_SOCKET.
Referenced by css_common_connect().
Definition at line 414 of file tcp.c.
References ARG_FILE_LINE, assert, css_sockaddr(), css_sockopt(), css_Tcp_max_connect_tries, ER_CSS_WINSOCK_HOSTNAME, ER_ERROR_SEVERITY, er_log_debug, er_set(), er_set_with_oserror(), err, ERR_CSS_TCP_CANNOT_CREATE_SOCKET, ERR_CSS_WINTCP_CANNOT_CREATE_STREAM, htons(), INADDR_NONE, INVALID_SOCKET, IS_INVALID_SOCKET, NO_ERROR, NULL, prm_get_bool_value(), prm_get_integer_value(), PRM_ID_TCP_CONNECTION_TIMEOUT, PRM_ID_TCP_KEEPALIVE, success(), and TCP_MIN_NUM_RETRIES.
Referenced by css_common_connect(), css_does_master_exist(), and css_tcp_client_open().
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().
Definition at line 967 of file tcp.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, er_log_debug, er_set_with_oserror(), ERR_CSS_TCP_DATAGRAM_CONNECT, ERR_CSS_TCP_DATAGRAM_SOCKET, INVALID_SOCKET, IS_INVALID_SOCKET, strlen, success(), and TCP_MIN_NUM_RETRIES.
Referenced by css_accept_new_request(), and css_accept_old_request().
int css_tcp_master_open | ( | int | port, |
SOCKET * | sockfd | ||
) |
Definition at line 663 of file tcp.c.
References ARG_FILE_LINE, css_get_master_domain_path(), css_Maximum_server_count, css_shutdown_socket(), css_windows_startup(), ER_CSS_WINSOCK_STARTUP, ER_ERROR_SEVERITY, er_set(), er_set_with_oserror(), ERR_CSS_TCP_ACCEPT_ERROR, ERR_CSS_TCP_BIND_ABORT, ERR_CSS_TCP_CANNOT_CREATE_STREAM, ERR_CSS_TCP_PORT_ERROR, ERR_CSS_UNIX_DOMAIN_SOCKET_FILE_EXIST, ERR_CSS_WINTCP_BIND_ABORT, ERR_CSS_WINTCP_CANNOT_CREATE_STREAM, ERR_CSS_WINTCP_PORT_ERROR, htonl(), htons(), IS_INVALID_SOCKET, and NO_ERROR.
Referenced by css_master_init().
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().
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().
int css_windows_startup | ( | void | ) |
Definition at line 94 of file wintcp.c.
References ARG_FILE_LINE, CSS_ER_WINSOCK_BLOCKING_HOOK, CSS_ER_WINSOCK_NOERROR, CSS_ER_WINSOCK_STARTUP, css_windows_blocking_hook(), css_Wsa_error, ER_CSS_WINSOCK_STARTUP, ER_ERROR_SEVERITY, er_set(), err, max_socket_fds, NULL, old_hook, and wsa_Init_count.
Referenced by boot_restart_client(), css_client_init(), css_gethostid(), css_gethostname(), css_hostname_to_ip(), css_init(), css_open_server_connection_socket(), css_tcp_master_open(), main(), and net_server_start().