Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Functions | |
void | alloc_buffer (uv_handle_t *handle, size_t suggested_size, uv_buf_t *buf) |
void | on_read (uv_udp_t *req, ssize_t nread, const uv_buf_t *buf, const struct sockaddr *addr, unsigned flags) |
uv_buf_t | make_discover_msg () |
void | on_send (uv_udp_send_t *req, int status) |
int | main () |
Variables | |
uv_loop_t * | loop |
uv_udp_t | send_socket |
uv_udp_t | recv_socket |
void alloc_buffer | ( | uv_handle_t * | handle, |
size_t | suggested_size, | ||
uv_buf_t * | buf | ||
) |
int main | ( | void | ) |
Definition at line 104 of file main.c.
References alloc_buffer(), loop, make_discover_msg(), on_read(), on_send(), recv_socket, send_socket, uv_default_loop(), uv_ip4_addr(), uv_run(), UV_RUN_DEFAULT, uv_udp_bind(), uv_udp_init(), uv_udp_recv_start(), UV_UDP_REUSEADDR, uv_udp_send(), and uv_udp_set_broadcast().
uv_buf_t make_discover_msg | ( | ) |
Definition at line 42 of file main.c.
References alloc_buffer(), buffer, int, memset(), and NULL.
Referenced by main().
void on_read | ( | uv_udp_t * | req, |
ssize_t | nread, | ||
const uv_buf_t * | buf, | ||
const struct sockaddr * | addr, | ||
unsigned | flags | ||
) |
Definition at line 17 of file main.c.
References addr, free(), i, ip, NULL, req, uv_close(), uv_err_name(), uv_ip4_name(), and uv_udp_recv_stop().
void on_send | ( | uv_udp_send_t * | req, |
int | status | ||
) |
Definition at line 97 of file main.c.
References status, and uv_strerror().
Referenced by main().