Rizin
unix-like reverse engineering framework and cli tools
|
#include "uv.h"
#include "internal.h"
#include <assert.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/un.h>
Go to the source code of this file.
Classes | |
union | uv__sockaddr |
Macros | |
#define | UV__UDP_DGRAM_MAXSIZE (64 * 1024) |
Definition at line 480 of file udp.c.
References AF_UNIX, fd, SO_REUSEADDR, sockfd, SOL_SOCKET, and UV__ERR.
Referenced by uv__udp_bind(), and uv_udp_open().
|
static |
Definition at line 1084 of file udp.c.
References handle, r, UV__ERR, UV_HANDLE_IPV6, and val.
Referenced by uv__setsockopt_maybe_char(), uv_udp_set_multicast_loop(), uv_udp_set_multicast_ttl(), and uv_udp_set_ttl().
|
static |
Definition at line 1109 of file udp.c.
References handle, uv__setsockopt(), and val.
Referenced by uv_udp_set_multicast_loop(), uv_udp_set_multicast_ttl(), and uv_udp_set_ttl().
int uv__udp_bind | ( | uv_udp_t * | handle, |
const struct sockaddr * | addr, | ||
unsigned int | addrlen, | ||
unsigned int | flags | ||
) |
Definition at line 508 of file udp.c.
References addr, addrlen, AF_INET6, bind, EAFNOSUPPORT, err, fd, flags, handle, IPV6_V6ONLY, SOCK_DGRAM, UV__ERR, uv__set_reuse(), uv__socket(), UV_HANDLE_BOUND, UV_HANDLE_IPV6, UV_UDP_IPV6ONLY, and UV_UDP_REUSEADDR.
Referenced by uv__udp_maybe_deferred_bind(), and uv_udp_bind().
void uv__udp_close | ( | uv_udp_t * | handle | ) |
Definition at line 90 of file udp.c.
References handle, uv__close(), uv__handle_stop, and uv__io_close().
Referenced by uv_close().
Definition at line 606 of file udp.c.
References addr, addrlen, EINTR, err, handle, UV__ERR, uv__udp_maybe_deferred_bind(), and UV_HANDLE_UDP_CONNECTED.
Referenced by uv_udp_connect().
Definition at line 629 of file udp.c.
References addr, AF_UNSPEC, EAFNOSUPPORT, EINTR, handle, memset(), r, UV__ERR, and UV_HANDLE_UDP_CONNECTED.
Referenced by uv_udp_connect().
void uv__udp_finish_close | ( | uv_udp_t * | handle | ) |
Definition at line 101 of file udp.c.
References assert(), handle, NULL, queue, QUEUE_DATA, QUEUE_EMPTY, QUEUE_HEAD, QUEUE_INSERT_TAIL, QUEUE_REMOVE, req, uv__io_active(), and uv__udp_run_completed().
Referenced by uv__finish_close().
Definition at line 954 of file udp.c.
References AF_UNSPEC, domain, fd, handle, loop, NULL, QUEUE_INIT, SOCK_DGRAM, uv__handle_init, uv__io_init(), uv__socket(), and uv__udp_io().
Referenced by uv_udp_init_ex().
Definition at line 173 of file udp.c.
References assert(), container_of, handle, uv__udp_recvmsg(), uv__udp_run_completed(), uv__udp_sendmsg(), and w.
Referenced by uv__udp_init_ex().
Definition at line 569 of file udp.c.
References addr, uv__sockaddr::addr, addrlen, AF_INET, AF_INET6, assert(), domain, flags, handle, uv__sockaddr::in, uv__sockaddr::in6, in6addr_any, memset(), and uv__udp_bind().
Referenced by uv__udp_connect(), uv__udp_recv_start(), uv__udp_send(), uv__udp_set_source_membership4(), uv__udp_set_source_membership6(), uv__udp_try_send(), and uv_udp_set_membership().
int uv__udp_recv_start | ( | uv_udp_t * | handle, |
uv_alloc_cb | alloc_cb, | ||
uv_udp_recv_cb | recv_cb | ||
) |
Definition at line 1297 of file udp.c.
References AF_INET, err, handle, NULL, uv__handle_start, uv__io_active(), uv__io_start(), and uv__udp_maybe_deferred_bind().
Referenced by uv_udp_recv_start().
Definition at line 1322 of file udp.c.
Referenced by uv_udp_recv_stop().
|
static |
Definition at line 247 of file udp.c.
References assert(), count, EAGAIN, EINTR, flags, h, handle, memset(), NULL, UV__ERR, UV__UDP_DGRAM_MAXSIZE, uv_buf_init(), UV_UDP_PARTIAL, and uv_udp_using_recvmmsg().
Referenced by uv__udp_io().
|
static |
Definition at line 129 of file udp.c.
References assert(), handle, NULL, queue, QUEUE_DATA, QUEUE_EMPTY, QUEUE_HEAD, QUEUE_REMOVE, req, uv__count_bufs(), uv__free(), uv__handle_stop, uv__io_active(), uv__io_stop(), uv__req_unregister, and UV_HANDLE_UDP_PROCESSING.
Referenced by uv__udp_finish_close(), and uv__udp_io().
int uv__udp_send | ( | uv_udp_send_t * | req, |
uv_udp_t * | handle, | ||
const uv_buf_t | bufs[], | ||
unsigned int | nbufs, | ||
const struct sockaddr * | addr, | ||
unsigned int | addrlen, | ||
uv_udp_send_cb | send_cb | ||
) |
Definition at line 650 of file udp.c.
References addr, addrlen, AF_UNSPEC, ARRAY_SIZE, assert(), bufs, err, handle, memcpy(), NULL, QUEUE_EMPTY, QUEUE_INSERT_TAIL, req, uv__count_bufs(), uv__handle_start, uv__io_start(), uv__malloc(), uv__req_init, uv__req_unregister, uv__udp_maybe_deferred_bind(), uv__udp_sendmsg(), and UV_HANDLE_UDP_PROCESSING.
Referenced by uv_udp_send().
|
static |
Definition at line 406 of file udp.c.
References AF_INET, AF_INET6, AF_UNIX, AF_UNSPEC, assert(), EAGAIN, EINTR, ENOBUFS, h, handle, memset(), NULL, once, queue, QUEUE_DATA, QUEUE_EMPTY, QUEUE_HEAD, QUEUE_INSERT_TAIL, QUEUE_REMOVE, req, UV__ERR, uv__io_feed(), and uv_once().
Referenced by uv__udp_io(), and uv__udp_send().
|
static |
Definition at line 760 of file udp.c.
References AF_INET, ENXIO, err, handle, memset(), in_addr::s_addr, sockaddr_in::sin_addr, UV__ERR, uv_inet_pton(), UV_JOIN_GROUP, and UV_LEAVE_GROUP.
Referenced by uv_udp_set_membership().
|
static |
Definition at line 807 of file udp.c.
References ENXIO, handle, memset(), sockaddr_in6::sin6_addr, sockaddr_in6::sin6_scope_id, UV__ERR, uv_ip6_addr(), UV_JOIN_GROUP, and UV_LEAVE_GROUP.
Referenced by uv_udp_set_membership().
|
static |
Definition at line 859 of file udp.c.
References AF_INET, err, handle, memset(), NULL, in_addr::s_addr, sockaddr_in::sin_addr, UV__ERR, uv__udp_maybe_deferred_bind(), uv_inet_pton(), UV_JOIN_GROUP, UV_LEAVE_GROUP, and UV_UDP_REUSEADDR.
Referenced by uv_udp_set_source_membership().
|
static |
Definition at line 904 of file udp.c.
References AF_INET6, err, handle, MCAST_JOIN_SOURCE_GROUP, MCAST_LEAVE_SOURCE_GROUP, memcpy(), memset(), NULL, sockaddr_in6::sin6_scope_id, STATIC_ASSERT, UV__ERR, uv__udp_maybe_deferred_bind(), uv_ip6_addr(), UV_JOIN_GROUP, UV_LEAVE_GROUP, and UV_UDP_REUSEADDR.
Referenced by uv_udp_set_source_membership().
int uv__udp_try_send | ( | uv_udp_t * | handle, |
const uv_buf_t | bufs[], | ||
unsigned int | nbufs, | ||
const struct sockaddr * | addr, | ||
unsigned int | addrlen | ||
) |
Definition at line 1276 of file udp.c.
int uv_udp_open | ( | uv_udp_t * | handle, |
uv_os_sock_t | sock | ||
) |
int uv_udp_set_membership | ( | uv_udp_t * | handle, |
const char * | multicast_addr, | ||
const char * | interface_addr, | ||
uv_membership | membership | ||
) |
Definition at line 1017 of file udp.c.
Definition at line 1203 of file udp.c.
References handle, uv__setsockopt(), uv__setsockopt_maybe_char(), and UV_HANDLE_IPV6.
Definition at line 1178 of file udp.c.
References handle, uv__setsockopt(), uv__setsockopt_maybe_char(), and UV_HANDLE_IPV6.
int uv_udp_set_source_membership | ( | uv_udp_t * | handle, |
const char * | multicast_addr, | ||
const char * | interface_addr, | ||
const char * | source_addr, | ||
uv_membership | membership | ||
) |
Definition at line 1041 of file udp.c.
Definition at line 1141 of file udp.c.
References handle, uv__setsockopt(), uv__setsockopt_maybe_char(), and UV_HANDLE_IPV6.