Lines Matching refs:ai

34   addrinfo* ai = nullptr;  in TEST()  local
35 ASSERT_EQ(0, getaddrinfo(nullptr, "smtp", nullptr, &ai)); in TEST()
37 ASSERT_EQ(25U, ntohs(reinterpret_cast<sockaddr_in*>(ai->ai_addr)->sin_port)); in TEST()
38 freeaddrinfo(ai); in TEST()
43 addrinfo* ai = nullptr; in TEST() local
44 ASSERT_EQ(0, getaddrinfo("localhost", nullptr, nullptr, &ai)); in TEST()
45 ASSERT_TRUE(ai != nullptr); in TEST()
46 freeaddrinfo(ai); in TEST()
50 addrinfo* ai = nullptr; in TEST() local
51 ASSERT_EQ(0, getaddrinfo("localhost", "9999", nullptr, &ai)); in TEST()
55 for (addrinfo* p = ai; p != nullptr; p = p->ai_next) { in TEST()
68 freeaddrinfo(ai); in TEST()
72 addrinfo* ai = nullptr; in TEST() local
73 ASSERT_EQ(0, getaddrinfo("localhost", "smtp", nullptr, &ai)); in TEST()
74 ASSERT_EQ(SOCK_STREAM, ai->ai_socktype); in TEST()
75 ASSERT_EQ(IPPROTO_TCP, ai->ai_protocol); in TEST()
76 ASSERT_EQ(25, ntohs(reinterpret_cast<sockaddr_in*>(ai->ai_addr)->sin_port)); in TEST()
77 freeaddrinfo(ai); in TEST()
87 addrinfo* ai = nullptr; in TEST() local
88 ASSERT_EQ(0, getaddrinfo( "localhost", "9999", &hints, &ai)); in TEST()
89 ASSERT_TRUE(ai != nullptr); in TEST()
92 addrinfo* tai = ai; in TEST()
99 freeaddrinfo(ai); in TEST()
103 addrinfo* ai = nullptr; in TEST() local
104 ASSERT_EQ(0, getaddrinfo("ip6-localhost", nullptr, nullptr, &ai)); in TEST()
105 ASSERT_TRUE(ai != nullptr); in TEST()
106 ASSERT_GE(ai->ai_addrlen, static_cast<socklen_t>(sizeof(sockaddr_in6))); in TEST()
107 ASSERT_TRUE(ai->ai_addr != nullptr); in TEST()
108 sockaddr_in6 *addr = reinterpret_cast<sockaddr_in6*>(ai->ai_addr); in TEST()
111 freeaddrinfo(ai); in TEST()