Lines Matching refs:addr

292     if (req->addr.ss_family == AF_UNSPEC) {  in uv__udp_sendmsg_one()
296 h.msg_name = &req->addr; in uv__udp_sendmsg_one()
297 if (req->addr.ss_family == AF_INET6) in uv__udp_sendmsg_one()
299 else if (req->addr.ss_family == AF_INET) in uv__udp_sendmsg_one()
301 else if (req->addr.ss_family == AF_UNIX) in uv__udp_sendmsg_one()
356 if (req->addr.ss_family == AF_UNSPEC) { in uv__udp_sendmsg_many()
360 p->msg_hdr.msg_name = &req->addr; in uv__udp_sendmsg_many()
361 if (req->addr.ss_family == AF_INET6) in uv__udp_sendmsg_many()
363 else if (req->addr.ss_family == AF_INET) in uv__udp_sendmsg_many()
365 else if (req->addr.ss_family == AF_UNIX) in uv__udp_sendmsg_many()
515 const struct sockaddr* addr, in uv__udp_bind() argument
528 if ((flags & UV_UDP_IPV6ONLY) && addr->sa_family != AF_INET6) in uv__udp_bind()
533 err = uv__socket(addr->sa_family, SOCK_DGRAM, 0); in uv__udp_bind()
541 err = uv__set_recverr(fd, addr->sa_family); in uv__udp_bind()
571 if (bind(fd, addr, addrlen)) { in uv__udp_bind()
580 if (addr->sa_family == AF_INET6) in uv__udp_bind()
600 struct sockaddr_in* addr = &taddr.in; in uv__udp_maybe_deferred_bind() local
601 memset(addr, 0, sizeof *addr); in uv__udp_maybe_deferred_bind()
602 addr->sin_family = AF_INET; in uv__udp_maybe_deferred_bind()
603 addr->sin_addr.s_addr = INADDR_ANY; in uv__udp_maybe_deferred_bind()
604 addrlen = sizeof *addr; in uv__udp_maybe_deferred_bind()
609 struct sockaddr_in6* addr = &taddr.in6; in uv__udp_maybe_deferred_bind() local
610 memset(addr, 0, sizeof *addr); in uv__udp_maybe_deferred_bind()
611 addr->sin6_family = AF_INET6; in uv__udp_maybe_deferred_bind()
612 addr->sin6_addr = in6addr_any; in uv__udp_maybe_deferred_bind()
613 addrlen = sizeof *addr; in uv__udp_maybe_deferred_bind()
621 return uv__udp_bind(handle, &taddr.addr, addrlen, flags); in uv__udp_maybe_deferred_bind()
626 const struct sockaddr* addr, in uv__udp_connect() argument
630 err = uv__udp_maybe_deferred_bind(handle, addr->sa_family, 0); in uv__udp_connect()
636 err = connect(handle->io_watcher.fd, addr, addrlen); in uv__udp_connect()
681 struct sockaddr_storage addr; in uv__udp_disconnect() local
683 struct sockaddr addr; in uv__udp_disconnect() local
686 memset(&addr, 0, sizeof(addr)); in uv__udp_disconnect()
689 addr.ss_family = AF_UNSPEC; in uv__udp_disconnect()
691 addr.sa_family = AF_UNSPEC; in uv__udp_disconnect()
704 r = connect(handle->io_watcher.fd, (struct sockaddr*) &addr, sizeof(addr)); in uv__udp_disconnect()
725 const struct sockaddr* addr, in uv__udp_send() argument
733 if (addr) { in uv__udp_send()
734 err = uv__udp_maybe_deferred_bind(handle, addr->sa_family, 0); in uv__udp_send()
746 assert(addrlen <= sizeof(req->addr)); in uv__udp_send()
747 if (addr == NULL) in uv__udp_send()
748 req->addr.ss_family = AF_UNSPEC; in uv__udp_send()
750 memcpy(&req->addr, addr, addrlen); in uv__udp_send()
790 const struct sockaddr* addr, in uv__udp_try_send() argument
802 if (addr) { in uv__udp_try_send()
803 err = uv__udp_maybe_deferred_bind(handle, addr->sa_family, 0); in uv__udp_try_send()
811 h.msg_name = (struct sockaddr*) addr; in uv__udp_try_send()