Home
last modified time | relevance | path

Searched refs:resolved_addr (Results 1 – 25 of 25) sorted by relevance

/external/grpc-grpc/src/core/lib/iomgr/
Dsockaddr_utils.cc40 int grpc_sockaddr_is_v4mapped(const grpc_resolved_address* resolved_addr, in grpc_sockaddr_is_v4mapped() argument
42 GPR_ASSERT(resolved_addr != resolved_addr4_out); in grpc_sockaddr_is_v4mapped()
44 reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr); in grpc_sockaddr_is_v4mapped()
70 int grpc_sockaddr_to_v4mapped(const grpc_resolved_address* resolved_addr, in grpc_sockaddr_to_v4mapped() argument
72 GPR_ASSERT(resolved_addr != resolved_addr6_out); in grpc_sockaddr_to_v4mapped()
74 reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr); in grpc_sockaddr_to_v4mapped()
91 int grpc_sockaddr_is_wildcard(const grpc_resolved_address* resolved_addr, in grpc_sockaddr_is_wildcard() argument
95 if (grpc_sockaddr_is_v4mapped(resolved_addr, &addr4_normalized)) { in grpc_sockaddr_is_wildcard()
96 resolved_addr = &addr4_normalized; in grpc_sockaddr_is_wildcard()
98 addr = reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr); in grpc_sockaddr_is_wildcard()
[all …]
Dunix_sockets_posix.cc69 int grpc_is_unix_socket(const grpc_resolved_address* resolved_addr) { in grpc_is_unix_socket() argument
71 reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr); in grpc_is_unix_socket()
76 const grpc_resolved_address* resolved_addr) { in grpc_unlink_if_unix_domain_socket() argument
78 reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr); in grpc_unlink_if_unix_domain_socket()
83 const_cast<char*>(resolved_addr->addr)); in grpc_unlink_if_unix_domain_socket()
92 const grpc_resolved_address* resolved_addr) { in grpc_sockaddr_to_uri_unix_if_possible() argument
94 reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr); in grpc_sockaddr_to_uri_unix_if_possible()
Dunix_sockets_posix.h35 int grpc_is_unix_socket(const grpc_resolved_address* resolved_addr);
38 const grpc_resolved_address* resolved_addr);
41 const grpc_resolved_address* resolved_addr);
Dsocket_utils_linux.cc33 int grpc_accept4(int sockfd, grpc_resolved_address* resolved_addr, int nonblock, in grpc_accept4() argument
38 return accept4(sockfd, reinterpret_cast<grpc_sockaddr*>(resolved_addr->addr), in grpc_accept4()
39 &resolved_addr->len, flags); in grpc_accept4()
Dsocket_utils_posix.cc34 int grpc_accept4(int sockfd, grpc_resolved_address* resolved_addr, int nonblock, in grpc_accept4() argument
37 fd = accept(sockfd, reinterpret_cast<grpc_sockaddr*>(resolved_addr->addr), in grpc_accept4()
38 &resolved_addr->len); in grpc_accept4()
Dsocket_utils_common_posix.cc381 const grpc_resolved_address* resolved_addr, int type, int protocol, in grpc_create_dualstack_socket() argument
384 nullptr, resolved_addr, type, protocol, dsmode, newfd); in grpc_create_dualstack_socket()
395 grpc_socket_factory* factory, const grpc_resolved_address* resolved_addr, in grpc_create_dualstack_socket_using_factory() argument
398 reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr); in grpc_create_dualstack_socket_using_factory()
413 if (!grpc_sockaddr_is_v4mapped(resolved_addr, nullptr)) { in grpc_create_dualstack_socket_using_factory()
415 return error_for_fd(*newfd, resolved_addr); in grpc_create_dualstack_socket_using_factory()
425 return error_for_fd(*newfd, resolved_addr); in grpc_create_dualstack_socket_using_factory()
Dtcp_client_custom.cc106 const grpc_resolved_address* resolved_addr, in tcp_connect() argument
130 connect->addr_name = grpc_sockaddr_to_uri(resolved_addr); in tcp_connect()
147 socket, (const grpc_sockaddr*)resolved_addr->addr, resolved_addr->len, in tcp_connect()
Dtcp_client_cfstream.cc159 const grpc_resolved_address* resolved_addr, in CFStreamClientConnect() argument
166 connect->addr_name = grpc_sockaddr_to_uri(resolved_addr); in CFStreamClientConnect()
194 ParseResolvedAddress(resolved_addr, &host, &port); in CFStreamClientConnect()
Dsockaddr_utils.h82 int grpc_sockaddr_get_family(const grpc_resolved_address* resolved_addr);
Dsocket_utils_posix.h35 int grpc_accept4(int sockfd, grpc_resolved_address* resolved_addr, int nonblock,
/external/grpc-grpc/test/core/iomgr/
Dudp_server_test.cc210 grpc_resolved_address resolved_addr; in test_no_op_with_port() local
212 reinterpret_cast<struct sockaddr_in*>(resolved_addr.addr); in test_no_op_with_port()
216 memset(&resolved_addr, 0, sizeof(resolved_addr)); in test_no_op_with_port()
217 resolved_addr.len = static_cast<socklen_t>(sizeof(struct sockaddr_in)); in test_no_op_with_port()
219 GPR_ASSERT(grpc_udp_server_add_port(s, &resolved_addr, rcv_buf_size, in test_no_op_with_port()
234 grpc_resolved_address resolved_addr; in test_no_op_with_port_and_socket_factory() local
236 reinterpret_cast<struct sockaddr_in*>(resolved_addr.addr); in test_no_op_with_port_and_socket_factory()
248 memset(&resolved_addr, 0, sizeof(resolved_addr)); in test_no_op_with_port_and_socket_factory()
249 resolved_addr.len = static_cast<socklen_t>(sizeof(struct sockaddr_in)); in test_no_op_with_port_and_socket_factory()
251 GPR_ASSERT(grpc_udp_server_add_port(s, &resolved_addr, rcv_buf_size, in test_no_op_with_port_and_socket_factory()
[all …]
Dtcp_client_posix_test.cc80 grpc_resolved_address resolved_addr; in test_succeeds() local
82 reinterpret_cast<struct sockaddr_in*>(resolved_addr.addr); in test_succeeds()
91 memset(&resolved_addr, 0, sizeof(resolved_addr)); in test_succeeds()
92 resolved_addr.len = static_cast<socklen_t>(sizeof(struct sockaddr_in)); in test_succeeds()
99 0 == bind(svr_fd, (struct sockaddr*)addr, (socklen_t)resolved_addr.len)); in test_succeeds()
108 (socklen_t*)&resolved_addr.len) == 0); in test_succeeds()
111 &resolved_addr, GRPC_MILLIS_INF_FUTURE); in test_succeeds()
115 resolved_addr.len = static_cast<socklen_t>(sizeof(addr)); in test_succeeds()
117 reinterpret_cast<socklen_t*>(&resolved_addr.len)); in test_succeeds()
140 grpc_resolved_address resolved_addr; in test_fails() local
[all …]
Dtcp_server_uv_test.cc135 grpc_resolved_address resolved_addr; in test_no_op_with_port() local
136 struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr; in test_no_op_with_port()
141 memset(&resolved_addr, 0, sizeof(resolved_addr)); in test_no_op_with_port()
142 resolved_addr.len = sizeof(struct sockaddr_in); in test_no_op_with_port()
145 GPR_ASSERT(grpc_tcp_server_add_port(s, &resolved_addr, &port) == in test_no_op_with_port()
154 grpc_resolved_address resolved_addr; in test_no_op_with_port_and_start() local
155 struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr; in test_no_op_with_port_and_start()
161 memset(&resolved_addr, 0, sizeof(resolved_addr)); in test_no_op_with_port_and_start()
162 resolved_addr.len = sizeof(struct sockaddr_in); in test_no_op_with_port_and_start()
164 GPR_ASSERT(grpc_tcp_server_add_port(s, &resolved_addr, &port) == in test_no_op_with_port_and_start()
[all …]
Dtcp_client_uv_test.cc85 grpc_resolved_address resolved_addr; in test_succeeds() local
86 struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr; in test_succeeds()
94 memset(&resolved_addr, 0, sizeof(resolved_addr)); in test_succeeds()
95 resolved_addr.len = sizeof(struct sockaddr_in); in test_succeeds()
109 (int*)&resolved_addr.len) == 0); in test_succeeds()
111 grpc_tcp_client_connect(&done, &g_connecting, NULL, NULL, &resolved_addr, in test_succeeds()
135 grpc_resolved_address resolved_addr; in test_fails() local
136 struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr; in test_fails()
143 memset(&resolved_addr, 0, sizeof(resolved_addr)); in test_fails()
144 resolved_addr.len = sizeof(struct sockaddr_in); in test_fails()
[all …]
Dtcp_server_posix_test.cc183 grpc_resolved_address resolved_addr; in test_no_op_with_port() local
185 reinterpret_cast<struct sockaddr_in*>(resolved_addr.addr); in test_no_op_with_port()
190 memset(&resolved_addr, 0, sizeof(resolved_addr)); in test_no_op_with_port()
191 resolved_addr.len = static_cast<socklen_t>(sizeof(struct sockaddr_in)); in test_no_op_with_port()
194 GPR_ASSERT(grpc_tcp_server_add_port(s, &resolved_addr, &port) == in test_no_op_with_port()
203 grpc_resolved_address resolved_addr; in test_no_op_with_port_and_start() local
205 reinterpret_cast<struct sockaddr_in*>(resolved_addr.addr); in test_no_op_with_port_and_start()
211 memset(&resolved_addr, 0, sizeof(resolved_addr)); in test_no_op_with_port_and_start()
212 resolved_addr.len = static_cast<socklen_t>(sizeof(struct sockaddr_in)); in test_no_op_with_port_and_start()
214 GPR_ASSERT(grpc_tcp_server_add_port(s, &resolved_addr, &port) == in test_no_op_with_port_and_start()
[all …]
/external/grpc-grpc/test/core/iomgr/ios/CFStreamTests/
DCFStreamClientTests.mm79 grpc_resolved_address resolved_addr;
80 struct sockaddr_in* addr = reinterpret_cast<struct sockaddr_in*>(resolved_addr.addr);
89 memset(&resolved_addr, 0, sizeof(resolved_addr));
90 resolved_addr.len = sizeof(struct sockaddr_in);
96 GPR_ASSERT(0 == bind(svr_fd, (struct sockaddr*)addr, (socklen_t)resolved_addr.len));
104 GPR_ASSERT(getsockname(svr_fd, (struct sockaddr*)addr, (socklen_t*)&resolved_addr.len) == 0);
106 grpc_tcp_client_connect(&done, &g_connecting, nullptr, nullptr, &resolved_addr,
111 resolved_addr.len = sizeof(addr);
113 reinterpret_cast<socklen_t*>(&resolved_addr.len));
136 grpc_resolved_address resolved_addr;
[all …]
DCFStreamEndpointTests.mm106 grpc_resolved_address resolved_addr;
107 struct sockaddr_in *addr = reinterpret_cast<struct sockaddr_in *>(resolved_addr.addr);
115 memset(&resolved_addr, 0, sizeof(resolved_addr));
116 resolved_addr.len = sizeof(struct sockaddr_in);
122 XCTAssertEqual(bind(svr_fd, (struct sockaddr *)addr, (socklen_t)resolved_addr.len), 0);
126 XCTAssertEqual(getsockname(svr_fd, (struct sockaddr *)addr, (socklen_t *)&resolved_addr.len), 0);
128 grpc_tcp_client_connect(&done, &ep_, nullptr, nullptr, &resolved_addr, GRPC_MILLIS_INF_FUTURE);
132 resolved_addr.len = sizeof(addr);
134 reinterpret_cast<socklen_t *>(&resolved_addr.len));
/external/grpc-grpc/src/core/ext/filters/client_channel/
Dparse_address.cc41 grpc_resolved_address* resolved_addr) { in grpc_parse_unix() argument
47 reinterpret_cast<struct sockaddr_un*>(resolved_addr->addr); in grpc_parse_unix()
53 resolved_addr->len = static_cast<socklen_t>(sizeof(*un)); in grpc_parse_unix()
60 grpc_resolved_address* resolved_addr) { in grpc_parse_unix() argument
101 grpc_resolved_address* resolved_addr) { in grpc_parse_ipv4() argument
108 return grpc_parse_ipv4_hostport(host_port, resolved_addr, in grpc_parse_ipv4()
185 grpc_resolved_address* resolved_addr) { in grpc_parse_ipv6() argument
192 return grpc_parse_ipv6_hostport(host_port, resolved_addr, in grpc_parse_ipv6()
196 bool grpc_parse_uri(const grpc_uri* uri, grpc_resolved_address* resolved_addr) { in grpc_parse_uri() argument
198 return grpc_parse_unix(uri, resolved_addr); in grpc_parse_uri()
[all …]
Dparse_address.h31 bool grpc_parse_unix(const grpc_uri* uri, grpc_resolved_address* resolved_addr);
35 bool grpc_parse_ipv4(const grpc_uri* uri, grpc_resolved_address* resolved_addr);
39 bool grpc_parse_ipv6(const grpc_uri* uri, grpc_resolved_address* resolved_addr);
42 bool grpc_parse_uri(const grpc_uri* uri, grpc_resolved_address* resolved_addr);
/external/grpc-grpc/third_party/address_sorting/
Daddress_sorting.c147 static int get_label_value(const address_sorting_address* resolved_addr) { in get_label_value() argument
148 if (address_sorting_abstract_get_family(resolved_addr) == in get_label_value()
151 } else if (address_sorting_abstract_get_family(resolved_addr) != in get_label_value()
155 struct sockaddr_in6* ipv6_addr = (struct sockaddr_in6*)&resolved_addr->addr; in get_label_value()
176 static int get_precedence_value(const address_sorting_address* resolved_addr) { in get_precedence_value() argument
177 if (address_sorting_abstract_get_family(resolved_addr) == in get_precedence_value()
180 } else if (address_sorting_abstract_get_family(resolved_addr) != in get_precedence_value()
184 struct sockaddr_in6* ipv6_addr = (struct sockaddr_in6*)&resolved_addr->addr; in get_precedence_value()
203 static int sockaddr_get_scope(const address_sorting_address* resolved_addr) { in sockaddr_get_scope() argument
204 if (address_sorting_abstract_get_family(resolved_addr) == in sockaddr_get_scope()
[all …]
/external/grpc-grpc/test/core/surface/
Dconcurrent_connectivity_test.cc126 grpc_resolved_address resolved_addr; in bad_server_thread() local
127 grpc_sockaddr* addr = reinterpret_cast<grpc_sockaddr*>(resolved_addr.addr); in bad_server_thread()
132 memset(&resolved_addr, 0, sizeof(resolved_addr)); in bad_server_thread()
134 error = grpc_tcp_server_add_port(s, &resolved_addr, &port); in bad_server_thread()
/external/grpc-grpc/test/core/util/
Dtest_tcp_server.cc57 grpc_resolved_address resolved_addr; in test_tcp_server_start() local
59 reinterpret_cast<grpc_sockaddr_in*>(resolved_addr.addr); in test_tcp_server_start()
71 grpc_tcp_server_add_port(server->tcp_server, &resolved_addr, &port_added); in test_tcp_server_start()
/external/grpc-grpc/test/cpp/naming/
Daddress_sorting_test.cc67 grpc_resolved_address resolved_addr; in TestAddressToGrpcResolvedAddress() local
75 memcpy(&resolved_addr.addr, &in_dest, sizeof(sockaddr_in)); in TestAddressToGrpcResolvedAddress()
76 resolved_addr.len = sizeof(sockaddr_in); in TestAddressToGrpcResolvedAddress()
84 memcpy(&resolved_addr.addr, &in6_dest, sizeof(sockaddr_in6)); in TestAddressToGrpcResolvedAddress()
85 resolved_addr.len = sizeof(sockaddr_in6); in TestAddressToGrpcResolvedAddress()
89 return resolved_addr; in TestAddressToGrpcResolvedAddress()
/external/grpc-grpc/test/core/end2end/fixtures/
Dhttp_proxy_fixture.cc543 grpc_resolved_address resolved_addr; in grpc_end2end_http_proxy_create() local
545 reinterpret_cast<grpc_sockaddr_in*>(resolved_addr.addr); in grpc_end2end_http_proxy_create()
546 memset(&resolved_addr, 0, sizeof(resolved_addr)); in grpc_end2end_http_proxy_create()
548 grpc_sockaddr_set_port(&resolved_addr, proxy_port); in grpc_end2end_http_proxy_create()
550 error = grpc_tcp_server_add_port(proxy->server, &resolved_addr, &port); in grpc_end2end_http_proxy_create()
/external/grpc-grpc/src/python/grpcio/grpc/_cython/_cygrpc/
Dgrpc_gevent.pxd.pxi122 int grpc_sockaddr_set_port(const grpc_resolved_address *resolved_addr,
124 const char* grpc_sockaddr_get_uri_scheme(const grpc_resolved_address* resolved_addr)