Lines Matching refs:addr
88 static int is_from_client(const struct sockaddr* addr) { in is_from_client() argument
94 if (addr != NULL) { in is_from_client()
95 ASSERT_EQ(addr->sa_family, AF_INET6); in is_from_client()
96 addr6 = (struct sockaddr_in6*) addr; in is_from_client()
97 r = uv_inet_ntop(addr->sa_family, &addr6->sin6_addr, dst, sizeof(dst)); in is_from_client()
112 const struct sockaddr* addr, in ipv6_recv_fail() argument
115 if (!is_from_client(addr) || (nread == 0 && addr == NULL)) in ipv6_recv_fail()
124 const struct sockaddr* addr, in ipv6_recv_ok() argument
129 if (!is_from_client(addr) || (nread == 0 && addr == NULL)) in ipv6_recv_ok()
147 struct sockaddr_in addr; in do_test() local
178 ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); in do_test()
179 ASSERT_OK(uv_inet_ntop(addr.sin_family, &addr.sin_addr, dst, sizeof(dst))); in do_test()
180 printf("to [%.*s]:%d\n", (int) sizeof(dst), dst, addr.sin_port); in do_test()
194 (const struct sockaddr*) &addr, in do_test()
198 addr_len = sizeof(addr); in do_test()
199 ASSERT_OK(uv_udp_getsockname(&client, (struct sockaddr*) &addr, &addr_len)); in do_test()
200 ASSERT_OK(uv_inet_ntop(addr.sin_family, &addr.sin_addr, dst, sizeof(dst))); in do_test()
201 printf("from [%.*s]:%d\n", (int) sizeof(dst), dst, addr.sin_port); in do_test()
202 client_port = addr.sin_port; in do_test()