Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Macros | |
#define | NETWORK_DISABLED 0 |
#define | D if (0) |
#define | BUFFER_SIZE 4096 |
RZ_LIB_VERSION | ( | rz_socket | ) |
Definition at line 582 of file socket.c.
References accept, rz_socket_t::fd, free(), rz_socket_t::is_ssl, NULL, RZ_INVALID_SOCKET, RZ_NEW0, rz_socket_free(), rz_sys_perror, s, and rz_socket_t::sa.
Referenced by rz_core_rtr_cmds(), rz_core_rtr_gdb_run(), rz_core_serve(), rz_run_config_env(), rz_socket_accept_timeout(), rz_socket_http_accept(), rz_socket_rap_server_accept(), rz_write_from_socket_handler(), and tcpme().
Definition at line 626 of file socket.c.
References rz_socket_t::fd, FD_ISSET, FD_SET, FD_ZERO, NULL, r, rz_socket_accept(), s, select, and timeout.
Referenced by rz_socket_http_accept().
Definition at line 649 of file socket.c.
References F_GETFL, F_SETFL, FAR, fcntl, rz_socket_t::fd, FIONBIO, flags, O_NONBLOCK, s, SO_RCVTIMEO, SOL_SOCKET, and tv.
Referenced by runcmd(), rz_socket_connect(), rz_socket_http_accept(), rz_socket_is_connected(), rz_socket_rap_client_open(), rz_socket_rap_client_read(), and socket_slurp().
Definition at line 419 of file socket.c.
References close, rz_socket_t::fd, rz_socket_t::is_ssl, NULL, RZ_INVALID_SOCKET, rz_socket_ready(), s, and SD_SEND.
Referenced by __rap_close(), gdbr_connect(), gdbr_disconnect(), iob_net_close(), qnxr_disconnect(), rap_break(), rz_core_rtr_cmd(), rz_core_rtr_cmds(), rz_core_rtr_gdb_run(), rz_core_serve(), rz_socket_connect(), rz_socket_free(), rz_socket_gets(), rz_socket_rap_server_continue(), rz_socket_spawn(), and socket_http_answer().
Definition at line 410 of file socket.c.
References close, rz_socket_t::fd, and s.
Referenced by redirect_socket_to_pty(), and rz_run_config_env().
RZ_API bool rz_socket_connect | ( | RzSocket * | s, |
const char * | host, | ||
const char * | port, | ||
int | proto, | ||
unsigned int | timeout | ||
) |
Definition at line 257 of file socket.c.
References AF_INET, AF_UNSPEC, bind, close, EINPROGRESS, eprintf, error(), rz_socket_t::fd, FD_SET, FD_ZERO, htons, rz_socket_t::is_ssl, rz_socket_t::local, memset(), NULL, rz_socket_t::port, rp, rz_return_val_if_fail, rz_socket_block_time(), rz_socket_close(), rz_socket_is_connected(), rz_socket_port_by_name(), RZ_SOCKET_PROTO_DEFAULT, RZ_SOCKET_PROTO_NONE, RZ_SOCKET_PROTO_TCP, RZ_SOCKET_PROTO_UDP, RZ_SOCKET_PROTO_UNIX, rz_sys_perror, rz_sys_signal(), s, in_addr::s_addr, rz_socket_t::sa, select, sockaddr_in::sin_addr, sockaddr_in::sin_port, socket, timeout, and tv.
Referenced by __rap_open(), rz_core_rtr_cmd(), rz_core_rtr_cmds_query(), rz_core_rtr_http_stop(), rz_socket_spawn(), and tcpme().
Definition at line 677 of file socket.c.
References rz_socket_t::is_ssl, and s.
Referenced by __rap_system(), rz_core_serve(), rz_socket_rap_client_command(), rz_socket_rap_client_open(), rz_socket_rap_client_read(), rz_socket_rap_client_seek(), rz_socket_rap_client_write(), and rz_socket_rap_server_continue().
Definition at line 453 of file socket.c.
References free(), rz_socket_t::is_ssl, rz_socket_close(), and s.
Referenced by __rap_open(), __rtr_shell(), gdbr_cleanup(), iob_net_close(), redirect_socket_to_pty(), rz_core_rtr_add(), rz_core_rtr_cmd(), rz_core_rtr_cmds(), rz_core_rtr_cmds_query(), rz_core_rtr_gdb_run(), rz_core_rtr_http_run(), rz_core_rtr_http_stop(), rz_core_rtr_remove(), rz_core_serve(), rz_main_rz_agent(), rz_run_config_env(), rz_socket_accept(), rz_socket_http_close(), rz_socket_listen(), rz_socket_new(), rz_socket_rap_server_free(), rz_socket_rap_server_new(), rz_write_from_socket_handler(), socket_http_get_recursive(), and tcpme().
Definition at line 830 of file socket.c.
References rz_socket_t::fd, i, RZ_INVALID_SOCKET, rz_socket_close(), rz_socket_read(), and s.
Referenced by rz_socket_http_accept(), and rz_socket_proc_gets().
Definition at line 101 of file socket.c.
References error(), rz_socket_t::fd, len, rz_socket_block_time(), s, SO_ERROR, and SOL_SOCKET.
Referenced by rz_socket_connect(), rz_socket_rap_server_continue(), and send_vcont().
Definition at line 474 of file socket.c.
References AF_INET, bind, close, eprintf, rz_socket_t::fd, htons, rz_socket_t::is_ssl, listen, rz_socket_t::local, memset(), rz_socket_t::port, rz_socket_t::proto, RZ_INVALID_SOCKET, rz_socket_free(), rz_socket_port_by_name(), RZ_SOCKET_PROTO_DEFAULT, RZ_SOCKET_PROTO_NONE, RZ_SOCKET_PROTO_TCP, RZ_SOCKET_PROTO_UDP, RZ_SOCKET_PROTO_UNIX, rz_sys_perror, rz_sys_signal(), s, in_addr::s_addr, rz_socket_t::sa, sockaddr_in::sin_addr, sockaddr_in::sin_port, SO_LINGER, SO_REUSEADDR, SO_SNDBUF, SOCK_DGRAM, SOCK_STREAM, socket, SOL_SOCKET, and x.
Referenced by __rap_open(), rz_core_rtr_cmds(), rz_core_rtr_gdb_run(), rz_core_rtr_http_run(), rz_main_rz_agent(), rz_run_config_env(), rz_socket_rap_server_listen(), rz_write_from_socket_handler(), and tcpme().
Definition at line 179 of file socket.c.
References rz_socket_t::fd, rz_socket_t::is_ssl, rz_socket_t::local, NULL, rz_socket_t::port, RZ_INVALID_SOCKET, RZ_NEW0, rz_socket_free(), rz_sys_signal(), and s.
Referenced by __open(), __rap_open(), gdbr_init(), iob_net_open(), qnxr_connect(), rz_core_rtr_add(), rz_core_rtr_cmds(), rz_core_rtr_cmds_query(), rz_core_rtr_gdb_run(), rz_core_rtr_http_run(), rz_core_rtr_http_stop(), rz_main_rz_agent(), rz_run_config_env(), rz_socket_http_post(), rz_socket_rap_server_new(), rz_write_from_socket_handler(), socket_http_get_recursive(), and tcpme().
Definition at line 859 of file socket.c.
References fd, rz_socket_t::fd, rz_socket_t::proto, RZ_NEW0, RZ_SOCKET_PROTO_DEFAULT, and s.
Referenced by __rap_accept().
Definition at line 469 of file socket.c.
References ntohs, NULL, p, and rz_num_get().
Referenced by rz_socket_connect(), and rz_socket_listen().
Definition at line 772 of file socket.c.
References BUFFER_SIZE, rz_socket_t::fd, RZ_INVALID_SOCKET, rz_socket_write(), s, and vsnprintf.
Definition at line 768 of file socket.c.
References rz_socket_write(), and s.
Definition at line 783 of file socket.c.
References D, eprintf, rz_socket_t::fd, i, rz_socket_t::is_ssl, len, r, and s.
Referenced by __rap_system(), iob_net_read(), qnxr_read_packet(), read_packet(), runcmd(), rz_core_rtr_cmds(), rz_core_rtr_cmds_query(), rz_socket_gets(), rz_socket_proc_read(), rz_socket_read_block(), rz_socket_slurp(), and rz_write_from_socket_handler().
Definition at line 808 of file socket.c.
References rz_socket_t::is_ssl, len, r, rz_socket_read(), rz_socket_ready(), and s.
Referenced by __rap_system(), rz_core_rtr_cmd(), rz_core_serve(), rz_socket_http_accept(), rz_socket_rap_client_command(), rz_socket_rap_client_open(), rz_socket_rap_client_read(), rz_socket_rap_client_seek(), rz_socket_rap_client_write(), rz_socket_rap_server_continue(), socket_http_answer(), and socket_slurp().
Definition at line 688 of file socket.c.
References rz_socket_t::fd, FD_SET, FD_ZERO, NULL, RZ_INVALID_SOCKET, s, select, and tv.
Referenced by qnxr_read_packet(), read_packet(), rz_socket_close(), rz_socket_http_accept(), rz_socket_proc_ready(), rz_socket_read_block(), and socket_slurp().
Definition at line 208 of file socket.c.
References a, cmd, eprintf, test-lz4-list::exit, free(), rp, rz_num_rand(), rz_run_free(), rz_run_new(), rz_run_start(), rz_socket_close(), rz_socket_connect(), RZ_SOCKET_PROTO_TCP, rz_str_newf(), rz_str_replace(), rz_sys_cmdf(), rz_sys_fork(), rz_sys_sleep(), rz_sys_usleep(), s, sprintf, status, strdup(), and timeout.
Referenced by __open().
Definition at line 699 of file socket.c.
References a, eprintf, rz_socket_t::fd, malloc(), memset(), ntohs, NULL, rz_str_newf(), s, sockaddr_in::sin_addr, sockaddr_in::sin_port, sprintf, and cmd_descs_generate::str.
Referenced by rz_core_rtr_http_run().
Definition at line 724 of file socket.c.
References b, D, delta, eprintf, rz_socket_t::fd, i, rz_socket_t::is_ssl, len, rz_sys_signal(), s, and send.
Referenced by __rap_system(), _sendResponsePacket(), iob_net_write(), qnxr_send_ch_debug(), qnxr_send_ch_reset(), qnxr_send_ch_text(), qnxr_send_nak(), qnxr_send_packet(), rz_core_rtr_cmd(), rz_core_rtr_cmds(), rz_core_rtr_cmds_query(), rz_core_rtr_pushout(), rz_core_serve(), rz_socket_http_post(), rz_socket_http_response(), rz_socket_printf(), rz_socket_proc_printf(), rz_socket_proc_write(), rz_socket_puts(), rz_socket_rap_client_command(), rz_socket_rap_client_open(), rz_socket_rap_client_read(), rz_socket_rap_client_seek(), rz_socket_rap_client_write(), rz_socket_rap_server_continue(), send_ack(), send_packet(), and send_vcont().