Home
last modified time | relevance | path

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

12

/third_party/grpc/src/core/lib/iomgr/
Dsockaddr_utils.cc44 int grpc_sockaddr_is_v4mapped(const grpc_resolved_address* resolved_addr, in grpc_sockaddr_is_v4mapped() argument
46 GPR_ASSERT(resolved_addr != resolved_addr4_out); in grpc_sockaddr_is_v4mapped()
48 reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr); in grpc_sockaddr_is_v4mapped()
74 int grpc_sockaddr_to_v4mapped(const grpc_resolved_address* resolved_addr, in grpc_sockaddr_to_v4mapped() argument
76 GPR_ASSERT(resolved_addr != resolved_addr6_out); in grpc_sockaddr_to_v4mapped()
78 reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr); in grpc_sockaddr_to_v4mapped()
95 int grpc_sockaddr_is_wildcard(const grpc_resolved_address* resolved_addr, in grpc_sockaddr_is_wildcard() argument
99 if (grpc_sockaddr_is_v4mapped(resolved_addr, &addr4_normalized)) { in grpc_sockaddr_is_wildcard()
100 resolved_addr = &addr4_normalized; in grpc_sockaddr_is_wildcard()
102 addr = reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr); in grpc_sockaddr_is_wildcard()
[all …]
Dparse_address.cc49 grpc_resolved_address* resolved_addr) { in grpc_parse_unix() argument
56 grpc_core::UnixSockaddrPopulate(uri.path(), resolved_addr); in grpc_parse_unix()
66 grpc_resolved_address* resolved_addr) { in grpc_parse_unix_abstract() argument
73 grpc_core::UnixAbstractSockaddrPopulate(uri.path(), resolved_addr); in grpc_parse_unix_abstract()
85 grpc_resolved_address* resolved_addr) { in UnixSockaddrPopulate() argument
87 reinterpret_cast<struct sockaddr_un*>(resolved_addr->addr); in UnixSockaddrPopulate()
98 resolved_addr->len = static_cast<socklen_t>(sizeof(*un)); in UnixSockaddrPopulate()
103 grpc_resolved_address* resolved_addr) { in UnixAbstractSockaddrPopulate() argument
105 reinterpret_cast<struct sockaddr_un*>(resolved_addr->addr); in UnixAbstractSockaddrPopulate()
116 resolved_addr->len = in UnixAbstractSockaddrPopulate()
[all …]
Dparse_address.h34 grpc_resolved_address* resolved_addr);
39 grpc_resolved_address* resolved_addr);
44 grpc_resolved_address* resolved_addr);
49 grpc_resolved_address* resolved_addr);
53 grpc_resolved_address* resolved_addr);
68 grpc_resolved_address* resolved_addr);
73 grpc_resolved_address* resolved_addr);
Dunix_sockets_posix.cc65 int grpc_is_unix_socket(const grpc_resolved_address* resolved_addr) { in grpc_is_unix_socket() argument
67 reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr); in grpc_is_unix_socket()
72 const grpc_resolved_address* resolved_addr) { in grpc_unlink_if_unix_domain_socket() argument
74 reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr); in grpc_unlink_if_unix_domain_socket()
79 const_cast<char*>(resolved_addr->addr)); in grpc_unlink_if_unix_domain_socket()
93 const grpc_resolved_address* resolved_addr) { in grpc_sockaddr_to_uri_unix_if_possible() argument
95 reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr); in grpc_sockaddr_to_uri_unix_if_possible()
105 resolved_addr->len - sizeof(unix_addr->sun_family) - 1)); in grpc_sockaddr_to_uri_unix_if_possible()
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()
Dunix_sockets_posix.h42 int grpc_is_unix_socket(const grpc_resolved_address* resolved_addr);
45 const grpc_resolved_address* resolved_addr);
48 const grpc_resolved_address* resolved_addr);
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()
Dtcp_client_custom.cc117 const grpc_resolved_address* resolved_addr, in tcp_connect() argument
140 connect->addr_name = grpc_sockaddr_to_uri(resolved_addr); in tcp_connect()
157 socket, reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr), in tcp_connect()
158 resolved_addr->len, custom_connect_callback); in tcp_connect()
Dsocket_utils_common_posix.cc450 const grpc_resolved_address* resolved_addr, int type, int protocol, in grpc_create_dualstack_socket() argument
453 nullptr, resolved_addr, type, protocol, dsmode, newfd); in grpc_create_dualstack_socket()
464 grpc_socket_factory* factory, const grpc_resolved_address* resolved_addr, in grpc_create_dualstack_socket_using_factory() argument
467 reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr); in grpc_create_dualstack_socket_using_factory()
482 if (!grpc_sockaddr_is_v4mapped(resolved_addr, nullptr)) { in grpc_create_dualstack_socket_using_factory()
484 return error_for_fd(*newfd, resolved_addr); in grpc_create_dualstack_socket_using_factory()
494 return error_for_fd(*newfd, resolved_addr); in grpc_create_dualstack_socket_using_factory()
Dtcp_client_cfstream.cc158 const grpc_resolved_address* resolved_addr, in CFStreamClientConnect() argument
163 connect->addr_name = grpc_sockaddr_to_uri(resolved_addr); in CFStreamClientConnect()
191 ParseResolvedAddress(resolved_addr, &host, &port); in CFStreamClientConnect()
/third_party/grpc/test/core/iomgr/
Dudp_server_test.cc213 grpc_resolved_address resolved_addr; in test_no_op_with_port() local
215 reinterpret_cast<struct sockaddr_in*>(resolved_addr.addr); in test_no_op_with_port()
219 memset(&resolved_addr, 0, sizeof(resolved_addr)); in test_no_op_with_port()
220 resolved_addr.len = static_cast<socklen_t>(sizeof(struct sockaddr_in)); in test_no_op_with_port()
222 GPR_ASSERT(grpc_udp_server_add_port(s, &resolved_addr, rcv_buf_size, in test_no_op_with_port()
237 grpc_resolved_address resolved_addr; in test_no_op_with_port_and_socket_factory() local
239 reinterpret_cast<struct sockaddr_in*>(resolved_addr.addr); in test_no_op_with_port_and_socket_factory()
251 memset(&resolved_addr, 0, sizeof(resolved_addr)); in test_no_op_with_port_and_socket_factory()
252 resolved_addr.len = static_cast<socklen_t>(sizeof(struct sockaddr_in)); in test_no_op_with_port_and_socket_factory()
254 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.cc137 grpc_resolved_address resolved_addr; in test_no_op_with_port() local
138 struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr; in test_no_op_with_port()
143 memset(&resolved_addr, 0, sizeof(resolved_addr)); in test_no_op_with_port()
144 resolved_addr.len = sizeof(struct sockaddr_in); in test_no_op_with_port()
147 GPR_ASSERT(grpc_tcp_server_add_port(s, &resolved_addr, &port) == in test_no_op_with_port()
157 grpc_resolved_address resolved_addr; in test_no_op_with_port_and_start() local
158 struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr; in test_no_op_with_port_and_start()
164 memset(&resolved_addr, 0, sizeof(resolved_addr)); in test_no_op_with_port_and_start()
165 resolved_addr.len = sizeof(struct sockaddr_in); in test_no_op_with_port_and_start()
167 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()
136 grpc_resolved_address resolved_addr; in test_fails() local
137 struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr; in test_fails()
144 memset(&resolved_addr, 0, sizeof(resolved_addr)); in test_fails()
145 resolved_addr.len = sizeof(struct sockaddr_in); in test_fails()
[all …]
Dtcp_server_posix_test.cc182 grpc_resolved_address resolved_addr; in test_no_op_with_port() local
184 reinterpret_cast<struct sockaddr_in*>(resolved_addr.addr); in test_no_op_with_port()
189 memset(&resolved_addr, 0, sizeof(resolved_addr)); in test_no_op_with_port()
190 resolved_addr.len = static_cast<socklen_t>(sizeof(struct sockaddr_in)); in test_no_op_with_port()
193 GPR_ASSERT(grpc_tcp_server_add_port(s, &resolved_addr, &port) == in test_no_op_with_port()
202 grpc_resolved_address resolved_addr; in test_no_op_with_port_and_start() local
204 reinterpret_cast<struct sockaddr_in*>(resolved_addr.addr); in test_no_op_with_port_and_start()
210 memset(&resolved_addr, 0, sizeof(resolved_addr)); in test_no_op_with_port_and_start()
211 resolved_addr.len = static_cast<socklen_t>(sizeof(struct sockaddr_in)); in test_no_op_with_port_and_start()
213 GPR_ASSERT(grpc_tcp_server_add_port(s, &resolved_addr, &port) == in test_no_op_with_port_and_start()
[all …]
/third_party/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));
/third_party/grpc/src/core/ext/filters/client_channel/
Dparse_address.cc47 grpc_resolved_address* resolved_addr) { in grpc_parse_unix() argument
53 reinterpret_cast<struct sockaddr_un*>(resolved_addr->addr); in grpc_parse_unix()
59 resolved_addr->len = static_cast<socklen_t>(sizeof(*un)); in grpc_parse_unix()
66 grpc_resolved_address* resolved_addr) { in grpc_parse_unix() argument
113 grpc_resolved_address* resolved_addr) { in grpc_parse_ipv4() argument
120 return grpc_parse_ipv4_hostport(host_port, resolved_addr, in grpc_parse_ipv4()
208 grpc_resolved_address* resolved_addr) { in grpc_parse_ipv6() argument
215 return grpc_parse_ipv6_hostport(host_port, resolved_addr, in grpc_parse_ipv6()
219 bool grpc_parse_uri(const grpc_uri* uri, grpc_resolved_address* resolved_addr) { in grpc_parse_uri() argument
221 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);
/third_party/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 …]
/third_party/grpc/src/core/lib/security/security_connector/local/
Dlocal_security_connector.cc74 grpc_resolved_address resolved_addr; in local_check_peer() local
75 memset(&resolved_addr, 0, sizeof(resolved_addr)); in local_check_peer()
76 resolved_addr.len = GRPC_MAX_SOCKADDR_SIZE; in local_check_peer()
78 if (getsockname(fd, reinterpret_cast<grpc_sockaddr*>(resolved_addr.addr), in local_check_peer()
79 &resolved_addr.len) == 0) { in local_check_peer()
82 grpc_sockaddr_is_v4mapped(&resolved_addr, &addr_normalized) in local_check_peer()
84 : &resolved_addr; in local_check_peer()
/third_party/grpc/src/core/lib/security/authorization/
Devaluate_args.cc92 grpc_resolved_address resolved_addr; in GetLocalPort() local
93 if (!uri.ok() || !grpc_parse_uri(*uri, &resolved_addr)) { in GetLocalPort()
96 return grpc_sockaddr_get_port(&resolved_addr); in GetLocalPort()
115 grpc_resolved_address resolved_addr; in GetPeerPort() local
116 if (!uri.ok() || !grpc_parse_uri(*uri, &resolved_addr)) { in GetPeerPort()
119 return grpc_sockaddr_get_port(&resolved_addr); in GetPeerPort()
/third_party/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()
/third_party/grpc/test/core/surface/
Dconcurrent_connectivity_test.cc137 grpc_resolved_address resolved_addr; in bad_server_thread() local
138 grpc_sockaddr* addr = reinterpret_cast<grpc_sockaddr*>(resolved_addr.addr); in bad_server_thread()
143 memset(&resolved_addr, 0, sizeof(resolved_addr)); in bad_server_thread()
145 error = grpc_tcp_server_add_port(s, &resolved_addr, &port); in bad_server_thread()
/third_party/grpc/test/cpp/naming/
Daddress_sorting_test.cc69 grpc_resolved_address resolved_addr; in TestAddressToGrpcResolvedAddress() local
77 memcpy(&resolved_addr.addr, &in_dest, sizeof(sockaddr_in)); in TestAddressToGrpcResolvedAddress()
78 resolved_addr.len = sizeof(sockaddr_in); in TestAddressToGrpcResolvedAddress()
86 memcpy(&resolved_addr.addr, &in6_dest, sizeof(sockaddr_in6)); in TestAddressToGrpcResolvedAddress()
87 resolved_addr.len = sizeof(sockaddr_in6); in TestAddressToGrpcResolvedAddress()
89 return resolved_addr; in TestAddressToGrpcResolvedAddress()

12