Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | RzPipe |
struct | rz_socket_t |
struct | rz_socket_http_options |
struct | rz_socket_proc_t |
struct | rz_socket_http_request |
struct | rz_socket_rap_server_t |
struct | rz_run_profile_t |
Macros | |
#define | MSG_DONTWAIT 0 |
#define | SD_RECEIVE 0 |
#define | SD_SEND 1 |
#define | SD_BOTH 2 |
#define | RZ_INVALID_SOCKET -1 |
#define | RZ_SOCKET_PROTO_TCP IPPROTO_TCP |
#define | RZ_SOCKET_PROTO_UDP IPPROTO_UDP |
#define | RZ_SOCKET_PROTO_UNIX 0x1337 |
#define | RZ_SOCKET_PROTO_NONE 0 |
#define | RZ_SOCKET_PROTO_DEFAULT RZ_SOCKET_PROTO_TCP |
#define | rz_socket_connect_tcp(a, b, c, d) rz_socket_connect(a, b, c, RZ_SOCKET_PROTO_TCP, d) |
#define | rz_socket_connect_udp(a, b, c, d) rz_socket_connect(a, b, c, RZ_SOCKET_PROTO_UDP, d) |
#define | rz_socket_connect_unix(a, b) (false) |
#define | RZ_RUN_PROFILE_NARGS 512 |
Typedefs | |
typedef struct rz_socket_t | RzSocket |
typedef struct rz_socket_http_options | RzSocketHTTPOptions |
typedef struct rz_socket_proc_t | RzSocketProc |
typedef struct rz_socket_http_request | RzSocketHTTPRequest |
typedef int(* | rap_server_open) (void *user, const char *file, int flg, int mode) |
typedef int(* | rap_server_seek) (void *user, ut64 offset, int whence) |
typedef int(* | rap_server_read) (void *user, ut8 *buf, int len) |
typedef int(* | rap_server_write) (void *user, ut8 *buf, int len) |
typedef char *(* | rap_server_cmd) (void *user, const char *command) |
typedef int(* | rap_server_close) (void *user, int fd) |
typedef struct rz_socket_rap_server_t | RzSocketRapServer |
typedef struct rz_run_profile_t | RzRunProfile |
Enumerations | |
enum | { RAP_PACKET_OPEN = 1 , RAP_PACKET_READ = 2 , RAP_PACKET_WRITE = 3 , RAP_PACKET_SEEK = 4 , RAP_PACKET_CLOSE = 5 , RAP_PACKET_CMD = 7 , RAP_PACKET_REPLY = 0x80 , RAP_PACKET_MAX = 4096 } |
#define MSG_DONTWAIT 0 |
Definition at line 37 of file rz_socket.h.
#define RZ_INVALID_SOCKET -1 |
Definition at line 48 of file rz_socket.h.
#define RZ_RUN_PROFILE_NARGS 512 |
Definition at line 211 of file rz_socket.h.
#define rz_socket_connect_tcp | ( | a, | |
b, | |||
c, | |||
d | |||
) | rz_socket_connect(a, b, c, RZ_SOCKET_PROTO_TCP, d) |
Definition at line 99 of file rz_socket.h.
#define rz_socket_connect_udp | ( | a, | |
b, | |||
c, | |||
d | |||
) | rz_socket_connect(a, b, c, RZ_SOCKET_PROTO_UDP, d) |
Definition at line 100 of file rz_socket.h.
Definition at line 104 of file rz_socket.h.
#define RZ_SOCKET_PROTO_DEFAULT RZ_SOCKET_PROTO_TCP |
Definition at line 91 of file rz_socket.h.
#define RZ_SOCKET_PROTO_NONE 0 |
Definition at line 90 of file rz_socket.h.
#define RZ_SOCKET_PROTO_TCP IPPROTO_TCP |
Definition at line 87 of file rz_socket.h.
#define RZ_SOCKET_PROTO_UDP IPPROTO_UDP |
Definition at line 88 of file rz_socket.h.
#define RZ_SOCKET_PROTO_UNIX 0x1337 |
Definition at line 89 of file rz_socket.h.
#define SD_BOTH 2 |
Definition at line 42 of file rz_socket.h.
#define SD_RECEIVE 0 |
Definition at line 40 of file rz_socket.h.
#define SD_SEND 1 |
Definition at line 41 of file rz_socket.h.
Definition at line 168 of file rz_socket.h.
Definition at line 167 of file rz_socket.h.
Definition at line 163 of file rz_socket.h.
Definition at line 165 of file rz_socket.h.
Definition at line 164 of file rz_socket.h.
Definition at line 166 of file rz_socket.h.
typedef struct rz_run_profile_t RzRunProfile |
typedef struct rz_socket_t RzSocket |
typedef struct rz_socket_http_options RzSocketHTTPOptions |
typedef struct rz_socket_http_request RzSocketHTTPRequest |
typedef struct rz_socket_proc_t RzSocketProc |
typedef struct rz_socket_rap_server_t RzSocketRapServer |
anonymous enum |
Enumerator | |
---|---|
RAP_PACKET_OPEN | |
RAP_PACKET_READ | |
RAP_PACKET_WRITE | |
RAP_PACKET_SEEK | |
RAP_PACKET_CLOSE | |
RAP_PACKET_CMD | |
RAP_PACKET_REPLY | |
RAP_PACKET_MAX |
Definition at line 170 of file rz_socket.h.
RZ_LIB_VERSION_HEADER | ( | rz_socket | ) |
RZ_API int rz_run_config_env | ( | RzRunProfile * | p | ) |
Definition at line 809 of file run.c.
References chdir, chroot, close, dup2, eprintf, test-lz4-list::exit, autogen_x86imm::f2, fd, free(), getstr(), handle_redirection(), kill, NULL, p, redirect_socket_to_pty(), redirect_socket_to_stdio(), rz_file_path_join(), RZ_LIB_EXT, rz_path_libdir(), rz_socket_accept(), rz_socket_close_fd(), rz_socket_connect_tcp, rz_socket_free(), rz_socket_listen(), rz_socket_new(), rz_str_newf(), rz_sys_fork(), rz_sys_getenv(), rz_sys_pipe(), rz_sys_pipe_close(), rz_sys_setenv(), rz_sys_sleep(), rz_th_new(), setASLR(), setgid, setgroups, SIGKILL, and write.
Referenced by rz_main_rz_run().
RZ_API void rz_run_free | ( | RzRunProfile * | r | ) |
RZ_API char* rz_run_get_environ_profile | ( | char ** | env | ) |
Definition at line 1329 of file run.c.
References env, RzStrEscOptions::esc_bslash, free(), k, NULL, rz_str_escape_8bit(), rz_strbuf_appendf(), rz_strbuf_drain(), rz_strbuf_new(), sb, RzStrEscOptions::show_asciidot, strdup(), and v.
Referenced by rz_main_rizin().
RZ_API RzRunProfile* rz_run_new | ( | const char * | str | ) |
Definition at line 86 of file run.c.
References p, RZ_NEW0, rz_run_parsefile(), rz_run_reset(), and cmd_descs_generate::str.
Referenced by rz_main_rz_run(), and rz_socket_spawn().
RZ_API bool rz_run_parse | ( | RzRunProfile * | pf, |
const char * | profile | ||
) |
Definition at line 103 of file run.c.
References free(), p, rz_return_val_if_fail, rz_run_parseline(), rz_str_replace_char(), cmd_descs_generate::str, and strdup().
Referenced by rz_run_parsefile().
RZ_API bool rz_run_parsefile | ( | RzRunProfile * | p, |
const char * | b | ||
) |
Definition at line 468 of file run.c.
References b, free(), NULL, p, rz_file_slurp(), rz_return_val_if_fail, rz_run_parse(), and s.
Referenced by rz_run_new().
RZ_API bool rz_run_parseline | ( | RzRunProfile * | p, |
const char * | b | ||
) |
Definition at line 479 of file run.c.
References b, e, eprintf, fd, benchmark::FILE, free(), getstr(), len, n, NULL, p, parseBool(), RZ_RUN_PROFILE_NARGS, rz_signal_from_string(), rz_sys_clearenv(), rz_sys_fopen(), rz_sys_getenv(), rz_sys_setenv(), strdup(), v, and V.
Referenced by rz_main_rz_run(), and rz_run_parse().
RZ_API void rz_run_reset | ( | RzRunProfile * | p | ) |
Definition at line 97 of file run.c.
References memset(), p, and rz_return_if_fail.
Referenced by rz_run_new().
RZ_API int rz_run_start | ( | RzRunProfile * | p | ) |
Definition at line 1081 of file run.c.
References addr, close, cpu, CPU_ARCH_ABI64, CPU_TYPE_ANY, CPU_TYPE_I386, eprintf, test-lz4-list::exit, free(), i, kill, nice, NULL, p, pid, rz_file_binsh(), rz_file_dump(), rz_file_exists(), rz_file_path(), rz_lib_dl_close(), rz_lib_dl_open(), rz_lib_dl_sym(), rz_run_call1(), rz_run_call10(), rz_run_call2(), rz_run_call3(), rz_run_call4(), rz_run_call5(), rz_run_call6(), rz_run_call7(), rz_run_call8(), rz_run_call9(), rz_sys_execl(), rz_sys_execv(), rz_sys_fork(), rz_sys_get_environ(), rz_sys_system(), setgid, SIGKILL, and snprintf.
Referenced by rz_main_rz_run(), and rz_socket_spawn().
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 63 of file socket_serial.c.
Referenced by gdbr_connect().
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().
RZ_API RzSocketHTTPRequest* rz_socket_http_accept | ( | RzSocket * | s, |
RzSocketHTTPOptions * | so | ||
) |
Definition at line 13 of file socket_http_server.c.
References rz_socket_http_options::accept_timeout, rz_socket_http_request::agent, rz_socket_http_request::auth, rz_socket_http_options::authtokens, breaked, calloc(), rz_socket_http_request::data, rz_socket_http_request::data_length, eprintf, free(), rz_socket_http_request::host, rz_socket_http_options::httpauth, malloc(), memset(), rz_socket_http_request::method, NULL, p, rz_socket_http_request::path, rz_socket_http_request::referer, rz_base64_decode(), RZ_NEW0, rz_socket_accept(), rz_socket_accept_timeout(), rz_socket_block_time(), rz_socket_gets(), rz_socket_http_close(), rz_socket_read_block(), rz_socket_ready(), s, rz_socket_http_request::s, ST32_ADD_OVFCHK, strdup(), and rz_socket_http_options::timeout.
Referenced by rz_core_rtr_http_run(), and rz_main_rz_agent().
RZ_API void rz_socket_http_close | ( | RzSocketHTTPRequest * | rs | ) |
Definition at line 191 of file socket_http_server.c.
References free(), rs, and rz_socket_free().
Referenced by rz_core_rtr_http_run(), rz_main_rz_agent(), and rz_socket_http_accept().
Definition at line 287 of file socket_http.c.
References socket_http_get_recursive(), SOCKET_HTTP_MAX_REDIRECTS, and setup::url.
Referenced by __open(), __read(), __rtr_shell(), __system(), __write(), download_and_write(), rtrcmd(), rz_core_rtr_add(), rz_core_rtr_cmd(), and rz_core_rtr_http_run().
Definition at line 144 of file socket_http_server.c.
References test_evm::end, len, malloc(), memcpy(), NULL, and cmd_descs_generate::str.
Referenced by rz_core_rtr_http_run().
Definition at line 291 of file socket_http.c.
References eprintf, free(), NULL, path, printf(), rz_socket_connect_tcp, rz_socket_new(), rz_socket_printf(), rz_socket_write(), rz_str_startswith(), RZ_VERSION, s, socket_http_answer(), strdup(), and setup::url.
RZ_API void rz_socket_http_response | ( | RzSocketHTTPRequest * | rs, |
int | code, | ||
const char * | out, | ||
int | x, | ||
const char * | headers | ||
) |
Definition at line 122 of file socket_http_server.c.
References len, out, rs, rz_socket_printf(), and rz_socket_write().
Referenced by rz_core_rtr_http_run(), and rz_main_rz_agent().
Definition at line 9 of file socket_http_server.c.
Referenced by rz_core_rtr_http_stop().
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().
Referenced by runcmd(), rz_core_serve(), rz_socket_http_post(), rz_socket_http_response(), and socket_http_get_recursive().
RZ_API int rz_socket_proc_close | ( | RzSocketProc * | sp | ) |
Definition at line 60 of file socket_proc.c.
References close, kill, NULL, SIGKILL, and sp.
Referenced by rz_socket_proc_open().
RZ_API int rz_socket_proc_gets | ( | RzSocketProc * | sp, |
char * | buf, | ||
int | size | ||
) |
Definition at line 82 of file socket_proc.c.
References rz_socket_t::fd, rz_socket_t::is_ssl, rz_socket_gets(), s, and sp.
RZ_API RzSocketProc* rz_socket_proc_open | ( | char *const | argv[] | ) |
Definition at line 17 of file socket_proc.c.
References argv, close, dup2, error(), test-lz4-list::exit, free(), NULL, RZ_NEW, rz_socket_proc_close(), rz_sys_execv(), rz_sys_fork(), rz_sys_pipe(), and sp.
RZ_API void rz_socket_proc_printf | ( | RzSocketProc * | sp, |
const char * | fmt, | ||
... | |||
) |
RZ_API int rz_socket_proc_read | ( | RzSocketProc * | sp, |
unsigned char * | buf, | ||
int | len | ||
) |
Definition at line 75 of file socket_proc.c.
References rz_socket_t::fd, rz_socket_t::is_ssl, len, rz_socket_read(), s, and sp.
Definition at line 110 of file socket_proc.c.
References rz_socket_t::fd, rz_socket_t::is_ssl, rz_socket_ready(), s, and sp.
RZ_API int rz_socket_proc_write | ( | RzSocketProc * | sp, |
void * | buf, | ||
int | len | ||
) |
Definition at line 89 of file socket_proc.c.
References rz_socket_t::fd, rz_socket_t::is_ssl, len, rz_socket_write(), s, and sp.
RZ_API char* rz_socket_rap_client_command | ( | RzSocket * | s, |
const char * | cmd, | ||
RzCoreBind * | c | ||
) |
Definition at line 58 of file socket_rap_client.c.
References c, calloc(), cmd, eprintf, free(), i, malloc(), memcpy(), NULL, RAP_PACKET_CMD, RAP_PACKET_REPLY, rz_rap_packet(), rz_rap_packet_fill(), rz_read_at_be32(), rz_socket_flush(), rz_socket_read_block(), rz_socket_write(), rz_write_be32(), and s.
Referenced by __rap_system(), and rz_core_rtr_cmd().
Definition at line 23 of file socket_rap_client.c.
References eprintf, fd, free(), malloc(), memcpy(), memset(), r, RAP_PACKET_OPEN, RAP_PACKET_REPLY, rz_read_at_be32(), rz_socket_block_time(), rz_socket_flush(), rz_socket_read_block(), rz_socket_write(), s, and ut8.
Referenced by __rap_open(), and rz_core_rtr_add().
Definition at line 149 of file socket_rap_client.c.
References count, eprintf, i, RAP_PACKET_MAX, RAP_PACKET_READ, RAP_PACKET_REPLY, rz_read_at_be32(), rz_socket_block_time(), rz_socket_flush(), rz_socket_read_block(), rz_socket_write(), rz_write_be32(), s, and autogen_x86imm::tmp.
Referenced by __rap_read().
Definition at line 181 of file socket_rap_client.c.
References eprintf, RAP_PACKET_REPLY, RAP_PACKET_SEEK, rz_read_at_be64(), rz_socket_flush(), rz_socket_read_block(), rz_socket_write(), rz_write_be64(), s, autogen_x86imm::tmp, and ut8.
Referenced by __rap_lseek().
Definition at line 116 of file socket_rap_client.c.
References count, eprintf, free(), malloc(), memcpy(), RAP_PACKET_MAX, RAP_PACKET_WRITE, rz_read_be32(), rz_socket_flush(), rz_socket_read_block(), rz_socket_write(), rz_write_be32(), s, and autogen_x86imm::tmp.
Referenced by __rap_write().
RZ_API RzSocket* rz_socket_rap_server_accept | ( | RzSocketRapServer * | rap_s | ) |
Definition at line 48 of file socket_rap_server.c.
References rz_socket_t::fd, NULL, rz_return_val_if_fail, rz_socket_accept(), and s.
RZ_API bool rz_socket_rap_server_continue | ( | RzSocketRapServer * | rap_s | ) |
Definition at line 53 of file socket_rap_server.c.
References eprintf, fd, rz_socket_t::fd, i, NULL, RAP_PACKET_CLOSE, RAP_PACKET_CMD, RAP_PACKET_MAX, RAP_PACKET_OPEN, RAP_PACKET_READ, RAP_PACKET_REPLY, RAP_PACKET_SEEK, RAP_PACKET_WRITE, RZ_FREE, rz_read_be32(), rz_read_be64(), rz_return_val_if_fail, rz_socket_close(), rz_socket_flush(), rz_socket_is_connected(), rz_socket_read_block(), rz_socket_write(), rz_write_be32(), rz_write_be64(), s, and ut64().
RZ_API RzSocketRapServer* rz_socket_rap_server_create | ( | const char * | pathname | ) |
Definition at line 23 of file socket_rap_server.c.
References NULL, pathname, rz_return_val_if_fail, and rz_socket_rap_server_new().
RZ_API void rz_socket_rap_server_free | ( | RzSocketRapServer * | rap_s | ) |
Definition at line 36 of file socket_rap_server.c.
References rz_socket_t::fd, free(), rz_socket_free(), and s.
RZ_API bool rz_socket_rap_server_listen | ( | RzSocketRapServer * | rap_s, |
const char * | certfile | ||
) |
Definition at line 43 of file socket_rap_server.c.
References rz_socket_t::fd, rz_socket_t::port, rz_return_val_if_fail, rz_socket_listen(), and s.
RZ_API RzSocketRapServer* rz_socket_rap_server_new | ( | bool | is_ssl, |
const char * | port | ||
) |
Definition at line 8 of file socket_rap_server.c.
References rz_socket_t::fd, free(), NULL, rz_socket_t::port, RZ_NEW0, rz_return_val_if_fail, rz_socket_free(), rz_socket_new(), s, and strdup().
Referenced by rz_socket_rap_server_create().
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().
Definition at line 110 of file rzpipe.c.
References RzPipe::child, free(), RzPipe::input, kill, NULL, RzPipe::output, and rz_sys_pipe_close().
Referenced by __close(), and rzpipe_open().
Definition at line 316 of file rzpipe.c.
References NULL, rz_return_val_if_fail, rzpipe_read(), rzpipe_write(), and cmd_descs_generate::str.
Referenced by rzpipe_cmdf().
Definition at line 235 of file rzpipe.c.
References RzPipe::child, close, cmd, dup2, env(), eprintf, test-lz4-list::exit, RzPipe::input, int, NULL, RzPipe::output, r, read(), RZ_STR_ISEMPTY, rz_sys_fork(), rz_sys_pipe(), rz_sys_pipe_close(), rz_sys_system(), rz_xwrite, rzp_open_spawn(), rzpipe_close(), and rzpipe_new().
Referenced by __open().
RZ_API RzPipe* rzpipe_open_corebind | ( | RzCoreBind * | coreb | ) |
Definition at line 209 of file rzpipe.c.
References RzPipe::coreb, memcpy(), and rzpipe_new().
Definition at line 217 of file rzpipe.c.
References c, cmd, rz_core_bind_t::cmdstr, rz_core_bind_t::core, RzPipe::coreb, eprintf, NULL, rz_lib_dl_open(), rz_lib_dl_sym(), and rzpipe_new().
Definition at line 61 of file rzpipe.c.
References calloc(), DWORD, FALSE, i, NULL, RzPipe::output, read(), realloc(), and RZ_FREE.
Referenced by __read(), __system(), __write(), and rzpipe_cmd().
Definition at line 36 of file rzpipe.c.
References cmd, DWORD, free(), RzPipe::input, len, malloc(), memcpy(), NULL, cmd_descs_generate::str, and write.
Referenced by __read(), __system(), __write(), and rzpipe_cmd().