grpc 1.38.0 → 1.40.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of grpc might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Makefile +68 -21
- data/include/grpc/event_engine/endpoint_config.h +48 -0
- data/include/grpc/event_engine/event_engine.h +23 -29
- data/include/grpc/event_engine/port.h +2 -0
- data/include/grpc/event_engine/slice_allocator.h +21 -36
- data/include/grpc/grpc.h +9 -2
- data/include/grpc/grpc_security.h +32 -0
- data/include/grpc/grpc_security_constants.h +1 -0
- data/include/grpc/impl/codegen/grpc_types.h +33 -19
- data/include/grpc/impl/codegen/port_platform.h +41 -0
- data/src/core/ext/filters/client_channel/client_channel.cc +415 -249
- data/src/core/ext/filters/client_channel/client_channel.h +42 -18
- data/src/core/ext/filters/client_channel/config_selector.h +19 -6
- data/src/core/ext/filters/client_channel/health/health_check_client.cc +2 -0
- data/src/core/ext/filters/client_channel/health/health_check_client.h +3 -3
- data/src/core/ext/filters/client_channel/http_proxy.cc +16 -1
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +7 -8
- data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +12 -21
- data/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc +3 -5
- data/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc +734 -0
- data/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h +10 -0
- data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +8 -15
- data/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc +3 -6
- data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +18 -36
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc +14 -22
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc +2 -9
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc +68 -103
- data/src/core/ext/filters/client_channel/lb_policy.cc +1 -15
- data/src/core/ext/filters/client_channel/lb_policy.h +70 -46
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +1 -3
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc +31 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_event_engine.cc +28 -0
- data/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc +1 -3
- data/src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc +7 -2
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +116 -76
- data/src/core/ext/filters/client_channel/retry_filter.cc +967 -544
- data/src/core/ext/filters/client_channel/retry_service_config.cc +57 -28
- data/src/core/ext/filters/client_channel/retry_service_config.h +9 -3
- data/src/core/ext/filters/client_channel/service_config_call_data.h +45 -5
- data/src/core/ext/filters/client_idle/client_idle_filter.cc +1 -1
- data/src/core/ext/filters/http/client/http_client_filter.cc +5 -2
- data/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc +2 -1
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +5 -1
- data/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc +3 -2
- data/src/core/ext/transport/chttp2/transport/bin_decoder.cc +1 -1
- data/src/core/{lib/event_engine/slice_allocator.cc → ext/transport/chttp2/transport/chttp2_slice_allocator.cc} +23 -16
- data/src/core/ext/transport/chttp2/transport/chttp2_slice_allocator.h +74 -0
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +12 -10
- data/src/core/ext/transport/chttp2/transport/flow_control.h +1 -1
- data/src/core/ext/transport/chttp2/transport/frame_data.cc +4 -4
- data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +8 -8
- data/src/core/ext/transport/chttp2/transport/frame_settings.cc +5 -5
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +639 -752
- data/src/core/ext/transport/chttp2/transport/hpack_parser.h +190 -69
- data/src/core/ext/transport/chttp2/transport/internal.h +2 -1
- data/src/core/ext/transport/chttp2/transport/parsing.cc +72 -56
- data/src/core/ext/transport/chttp2/transport/varint.cc +6 -4
- data/src/core/ext/transport/inproc/inproc_transport.cc +42 -31
- data/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.c +56 -35
- data/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.h +180 -76
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.c +35 -27
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.h +97 -48
- data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.c +45 -9
- data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.h +67 -7
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.c +66 -9
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.h +227 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/resolver.upb.c +46 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/resolver.upb.h +121 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.c +1 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/udp_socket_config.upb.c +35 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/udp_socket_config.upb.h +90 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.c +32 -24
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.h +120 -73
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.c +4 -2
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.h +15 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/quic_config.upb.c +48 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/quic_config.upb.h +171 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.c +8 -6
- data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.h +27 -19
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.c +1 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.c +24 -7
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.h +57 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.c +29 -17
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.h +72 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.c +3 -2
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.h +4 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.c +6 -5
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.h +15 -11
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.c +85 -43
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h +274 -91
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.c +11 -8
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.h +30 -13
- data/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.c +33 -5
- data/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.h +115 -0
- data/src/core/ext/upb-generated/envoy/type/http/v3/path_transformation.upb.c +60 -0
- data/src/core/ext/upb-generated/envoy/type/http/v3/path_transformation.upb.h +181 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.c +1 -0
- data/src/core/ext/upb-generated/validate/validate.upb.c +82 -66
- data/src/core/ext/upb-generated/validate/validate.upb.h +220 -124
- data/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.c +15 -7
- data/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.c +53 -52
- data/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.c +318 -277
- data/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.h +5 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.c +437 -410
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.c +198 -170
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.h +10 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.c +9 -8
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.c +219 -163
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.h +15 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/resolver.upbdefs.c +59 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/resolver.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.c +29 -25
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/udp_socket_config.upbdefs.c +52 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/udp_socket_config.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.c +135 -125
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.h +5 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.c +131 -123
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/quic_config.upbdefs.c +90 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/quic_config.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.c +32 -24
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.c +69 -55
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.h +5 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.c +684 -664
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.h +5 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.c +13 -10
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.c +13 -10
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.c +441 -375
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.h +10 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.c +122 -114
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.c +1 -1
- data/src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.c +112 -79
- data/src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.h +5 -0
- data/src/core/ext/upbdefs-generated/envoy/type/http/v3/path_transformation.upbdefs.c +64 -0
- data/src/core/ext/upbdefs-generated/envoy/type/http/v3/path_transformation.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.c +35 -32
- data/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.c +4 -4
- data/src/core/ext/upbdefs-generated/validate/validate.upbdefs.c +182 -160
- data/src/core/ext/xds/certificate_provider_store.h +1 -1
- data/src/core/ext/xds/xds_api.cc +582 -257
- data/src/core/ext/xds/xds_api.h +46 -8
- data/src/core/ext/xds/xds_bootstrap.cc +4 -1
- data/src/core/ext/xds/xds_client.cc +66 -43
- data/src/core/ext/xds/xds_client.h +0 -4
- data/src/core/ext/xds/xds_http_filters.cc +3 -2
- data/src/core/ext/xds/xds_http_filters.h +3 -0
- data/src/core/lib/address_utils/sockaddr_utils.cc +13 -0
- data/src/core/lib/address_utils/sockaddr_utils.h +10 -0
- data/src/core/lib/channel/call_tracer.h +85 -0
- data/src/core/lib/channel/channel_stack.h +1 -1
- data/src/core/lib/channel/channelz.h +3 -0
- data/src/core/lib/channel/context.h +3 -0
- data/src/core/lib/channel/status_util.h +4 -0
- data/src/core/lib/compression/stream_compression.h +1 -1
- data/src/core/lib/compression/stream_compression_gzip.h +1 -1
- data/src/core/lib/compression/stream_compression_identity.h +1 -1
- data/src/core/lib/debug/stats.h +1 -1
- data/src/core/lib/event_engine/endpoint_config.cc +46 -0
- data/src/core/lib/event_engine/endpoint_config_internal.h +42 -0
- data/src/core/lib/event_engine/event_engine.cc +50 -0
- data/src/core/lib/event_engine/sockaddr.cc +14 -12
- data/src/core/lib/event_engine/sockaddr.h +44 -0
- data/src/core/lib/gpr/murmur_hash.cc +4 -2
- data/src/core/lib/gpr/wrap_memcpy.cc +2 -1
- data/src/core/lib/gprpp/manual_constructor.h +1 -1
- data/src/core/lib/gprpp/orphanable.h +3 -3
- data/src/core/lib/gprpp/status_helper.h +3 -0
- data/src/core/lib/gprpp/sync.h +2 -30
- data/src/core/lib/iomgr/buffer_list.cc +1 -1
- data/src/core/lib/iomgr/endpoint_pair_event_engine.cc +33 -0
- data/src/core/lib/iomgr/error.cc +5 -4
- data/src/core/lib/iomgr/error.h +1 -1
- data/src/core/lib/iomgr/ev_apple.h +1 -1
- data/src/core/lib/iomgr/event_engine/closure.cc +54 -0
- data/src/core/lib/iomgr/event_engine/closure.h +33 -0
- data/src/core/lib/iomgr/event_engine/endpoint.cc +192 -0
- data/src/core/lib/iomgr/event_engine/endpoint.h +53 -0
- data/src/core/lib/iomgr/event_engine/iomgr.cc +105 -0
- data/src/core/lib/iomgr/event_engine/iomgr.h +24 -0
- data/src/core/lib/iomgr/event_engine/pollset.cc +87 -0
- data/{include/grpc/event_engine/channel_args.h → src/core/lib/iomgr/event_engine/pollset.h} +7 -10
- data/src/core/lib/iomgr/event_engine/promise.h +51 -0
- data/src/core/lib/iomgr/event_engine/resolved_address_internal.cc +41 -0
- data/src/core/lib/iomgr/event_engine/resolved_address_internal.h +35 -0
- data/src/core/lib/iomgr/event_engine/resolver.cc +110 -0
- data/src/core/lib/iomgr/event_engine/tcp.cc +263 -0
- data/src/core/lib/iomgr/event_engine/timer.cc +57 -0
- data/src/core/lib/iomgr/exec_ctx.cc +8 -0
- data/src/core/lib/iomgr/exec_ctx.h +3 -4
- data/src/core/lib/iomgr/executor/threadpool.cc +2 -3
- data/src/core/lib/iomgr/executor/threadpool.h +2 -2
- data/src/core/lib/iomgr/iomgr.cc +1 -1
- data/src/core/lib/iomgr/iomgr_posix.cc +2 -0
- data/src/core/lib/iomgr/iomgr_posix_cfstream.cc +40 -10
- data/src/core/lib/iomgr/pollset_custom.cc +2 -2
- data/src/core/lib/iomgr/pollset_custom.h +3 -1
- data/src/core/lib/iomgr/pollset_uv.cc +3 -1
- data/src/core/lib/iomgr/pollset_uv.h +5 -1
- data/src/core/lib/iomgr/port.h +7 -5
- data/src/core/lib/iomgr/python_util.h +1 -1
- data/src/core/lib/iomgr/resolve_address.cc +5 -1
- data/src/core/lib/iomgr/resolve_address.h +6 -0
- data/src/core/lib/iomgr/resource_quota.cc +2 -0
- data/src/core/lib/iomgr/sockaddr.h +1 -0
- data/src/core/lib/iomgr/socket_mutator.cc +15 -2
- data/src/core/lib/iomgr/socket_mutator.h +26 -2
- data/src/core/lib/iomgr/socket_utils_common_posix.cc +4 -4
- data/src/core/lib/iomgr/socket_utils_posix.h +2 -2
- data/src/core/lib/iomgr/tcp_client_posix.cc +7 -2
- data/src/core/lib/iomgr/tcp_client_windows.cc +2 -0
- data/src/core/lib/iomgr/tcp_posix.cc +42 -39
- data/src/core/lib/iomgr/tcp_posix.h +8 -0
- data/src/core/lib/iomgr/tcp_server_custom.cc +3 -4
- data/src/core/lib/iomgr/tcp_server_posix.cc +7 -0
- data/src/core/lib/iomgr/tcp_server_utils_posix_common.cc +2 -1
- data/src/core/lib/iomgr/timer.h +6 -1
- data/src/core/lib/iomgr/timer_manager.cc +1 -1
- data/src/core/lib/json/json_reader.cc +1 -2
- data/src/core/lib/matchers/matchers.cc +8 -20
- data/src/core/lib/matchers/matchers.h +2 -1
- data/src/core/lib/security/authorization/authorization_engine.h +44 -0
- data/src/core/lib/security/authorization/authorization_policy_provider.h +32 -0
- data/src/core/lib/security/authorization/authorization_policy_provider_vtable.cc +46 -0
- data/src/core/lib/security/authorization/evaluate_args.cc +209 -0
- data/src/core/lib/security/authorization/evaluate_args.h +91 -0
- data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +3 -1
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc +49 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h +7 -0
- data/src/core/lib/security/credentials/tls/tls_utils.cc +32 -0
- data/src/core/lib/security/credentials/tls/tls_utils.h +13 -0
- data/src/core/lib/security/security_connector/local/local_security_connector.cc +9 -6
- data/src/core/lib/security/security_connector/ssl_utils.cc +5 -0
- data/src/core/lib/security/security_connector/tls/tls_security_connector.cc +6 -18
- data/src/core/lib/security/transport/security_handshaker.cc +12 -4
- data/src/core/lib/security/transport/server_auth_filter.cc +0 -7
- data/src/core/lib/slice/slice.cc +12 -2
- data/src/core/lib/slice/slice_internal.h +1 -0
- data/src/core/lib/surface/call.cc +26 -7
- data/src/core/lib/surface/call.h +11 -0
- data/src/core/lib/surface/completion_queue.cc +22 -22
- data/src/core/lib/surface/completion_queue.h +1 -1
- data/src/core/lib/surface/completion_queue_factory.cc +1 -2
- data/src/core/lib/surface/init.cc +1 -3
- data/src/core/lib/surface/init.h +10 -1
- data/src/core/lib/surface/server.cc +3 -1
- data/src/core/lib/surface/server.h +3 -3
- data/src/core/lib/surface/version.cc +2 -4
- data/src/core/lib/transport/error_utils.cc +2 -2
- data/src/core/lib/transport/metadata_batch.cc +13 -2
- data/src/core/lib/transport/metadata_batch.h +7 -0
- data/src/core/lib/transport/transport.h +2 -0
- data/src/core/lib/transport/transport_op_string.cc +1 -1
- data/src/core/plugin_registry/grpc_plugin_registry.cc +4 -0
- data/src/core/tsi/alts/crypt/gsec.h +2 -0
- data/src/ruby/ext/grpc/extconf.rb +2 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +6 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +10 -1
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/third_party/boringssl-with-bazel/err_data.c +269 -263
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_object.c +8 -6
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/cipher_extra.c +4 -0
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/curve25519.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/internal.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/evp/evp.c +9 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/prime.c +0 -4
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/digest.c +7 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/md32_common.h +87 -121
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/md4/md4.c +20 -30
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/md5/md5.c +19 -30
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/internal.h +1 -4
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/rand.c +0 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa.c +26 -24
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa_impl.c +10 -7
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha1.c +28 -39
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha256.c +48 -66
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha512.c +4 -5
- data/third_party/boringssl-with-bazel/src/crypto/hpke/hpke.c +362 -371
- data/third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7_x509.c +4 -2
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/passive.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/rsa_extra/rsa_asn1.c +1 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509/internal.h +101 -11
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_x509a.c +3 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_cmp.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_req.c +3 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_set.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_trs.c +2 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_vfy.c +14 -15
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_vpm.c +53 -73
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509cset.c +31 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509rset.c +3 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_all.c +3 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_req.c +5 -8
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_sig.c +5 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_x509a.c +3 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/internal.h +7 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_purp.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_utl.c +5 -8
- data/third_party/boringssl-with-bazel/src/include/openssl/aead.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/arm_arch.h +66 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/base.h +40 -9
- data/third_party/boringssl-with-bazel/src/include/openssl/bytestring.h +1 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/chacha.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/digest.h +6 -2
- data/third_party/boringssl-with-bazel/src/include/openssl/ecdsa.h +14 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/evp.h +19 -11
- data/third_party/boringssl-with-bazel/src/include/openssl/hpke.h +325 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/pkcs7.h +23 -7
- data/third_party/boringssl-with-bazel/src/include/openssl/rsa.h +99 -63
- data/third_party/boringssl-with-bazel/src/include/openssl/ssl.h +139 -109
- data/third_party/boringssl-with-bazel/src/include/openssl/tls1.h +12 -19
- data/third_party/boringssl-with-bazel/src/include/openssl/x509.h +48 -50
- data/third_party/boringssl-with-bazel/src/include/openssl/x509_vfy.h +451 -435
- data/third_party/boringssl-with-bazel/src/include/openssl/x509v3.h +0 -1
- data/third_party/boringssl-with-bazel/src/ssl/d1_both.cc +2 -2
- data/third_party/boringssl-with-bazel/src/ssl/d1_srtp.cc +1 -1
- data/third_party/boringssl-with-bazel/src/ssl/encrypted_client_hello.cc +773 -84
- data/third_party/boringssl-with-bazel/src/ssl/handoff.cc +80 -47
- data/third_party/boringssl-with-bazel/src/ssl/handshake.cc +24 -19
- data/third_party/boringssl-with-bazel/src/ssl/handshake_client.cc +189 -86
- data/third_party/boringssl-with-bazel/src/ssl/handshake_server.cc +45 -56
- data/third_party/boringssl-with-bazel/src/ssl/internal.h +272 -167
- data/third_party/boringssl-with-bazel/src/ssl/s3_both.cc +2 -2
- data/third_party/boringssl-with-bazel/src/ssl/s3_lib.cc +2 -2
- data/third_party/boringssl-with-bazel/src/ssl/s3_pkt.cc +14 -19
- data/third_party/boringssl-with-bazel/src/ssl/ssl_lib.cc +34 -102
- data/third_party/boringssl-with-bazel/src/ssl/ssl_privkey.cc +2 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_session.cc +8 -31
- data/third_party/boringssl-with-bazel/src/ssl/ssl_stat.cc +3 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_transcript.cc +4 -3
- data/third_party/boringssl-with-bazel/src/ssl/ssl_versions.cc +7 -3
- data/third_party/boringssl-with-bazel/src/ssl/t1_lib.cc +576 -648
- data/third_party/boringssl-with-bazel/src/ssl/tls13_both.cc +31 -3
- data/third_party/boringssl-with-bazel/src/ssl/tls13_client.cc +98 -39
- data/third_party/boringssl-with-bazel/src/ssl/tls13_enc.cc +141 -94
- data/third_party/boringssl-with-bazel/src/ssl/tls13_server.cc +58 -68
- data/third_party/xxhash/xxhash.h +77 -195
- metadata +81 -39
- data/src/core/lib/gpr/arena.h +0 -47
- data/third_party/boringssl-with-bazel/src/crypto/hpke/internal.h +0 -267
- data/third_party/boringssl-with-bazel/src/crypto/x509/vpm_int.h +0 -71
@@ -78,7 +78,7 @@ struct grpc_call_element_args {
|
|
78
78
|
const void* server_transport_data;
|
79
79
|
grpc_call_context_element* context;
|
80
80
|
const grpc_slice& path;
|
81
|
-
gpr_cycle_counter start_time;
|
81
|
+
gpr_cycle_counter start_time; // Note: not populated in subchannel stack.
|
82
82
|
grpc_millis deadline;
|
83
83
|
grpc_core::Arena* arena;
|
84
84
|
grpc_core::CallCombiner* call_combiner;
|
@@ -276,6 +276,9 @@ class SocketNode : public BaseNode {
|
|
276
276
|
public:
|
277
277
|
struct Security : public RefCounted<Security> {
|
278
278
|
struct Tls {
|
279
|
+
// This is a workaround for https://bugs.llvm.org/show_bug.cgi?id=50346
|
280
|
+
Tls() {}
|
281
|
+
|
279
282
|
enum class NameType { kUnset = 0, kStandardName = 1, kOtherName = 2 };
|
280
283
|
NameType type = NameType::kUnset;
|
281
284
|
// Holds the value of standard_name or other_names if type is not kUnset.
|
@@ -53,6 +53,10 @@ class StatusCodeSet {
|
|
53
53
|
return status_code_mask_ & (1 << status);
|
54
54
|
}
|
55
55
|
|
56
|
+
bool operator==(const StatusCodeSet& other) const {
|
57
|
+
return status_code_mask_ == other.status_code_mask_;
|
58
|
+
}
|
59
|
+
|
56
60
|
private:
|
57
61
|
int status_code_mask_ = 0; // A bitfield of status codes in the set.
|
58
62
|
};
|
data/src/core/lib/debug/stats.h
CHANGED
@@ -0,0 +1,46 @@
|
|
1
|
+
// Copyright 2021 The gRPC Authors
|
2
|
+
//
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
// you may not use this file except in compliance with the License.
|
5
|
+
// You may obtain a copy of the License at
|
6
|
+
//
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
//
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
// See the License for the specific language governing permissions and
|
13
|
+
// limitations under the License.
|
14
|
+
#include <grpc/support/port_platform.h>
|
15
|
+
|
16
|
+
#include <grpc/event_engine/endpoint_config.h>
|
17
|
+
|
18
|
+
#include <grpc/impl/codegen/grpc_types.h>
|
19
|
+
#include <grpc/impl/codegen/log.h>
|
20
|
+
|
21
|
+
#include "src/core/lib/channel/channel_args.h"
|
22
|
+
#include "src/core/lib/event_engine/endpoint_config_internal.h"
|
23
|
+
#include "src/core/lib/gpr/useful.h"
|
24
|
+
|
25
|
+
namespace grpc_event_engine {
|
26
|
+
namespace experimental {
|
27
|
+
|
28
|
+
EndpointConfig::Setting ChannelArgsEndpointConfig::Get(
|
29
|
+
absl::string_view key) const {
|
30
|
+
const grpc_arg* arg = grpc_channel_args_find(args_, std::string(key).c_str());
|
31
|
+
if (arg == nullptr) {
|
32
|
+
return absl::monostate();
|
33
|
+
}
|
34
|
+
switch (arg->type) {
|
35
|
+
case GRPC_ARG_STRING:
|
36
|
+
return absl::string_view(arg->value.string);
|
37
|
+
case GRPC_ARG_INTEGER:
|
38
|
+
return arg->value.integer;
|
39
|
+
case GRPC_ARG_POINTER:
|
40
|
+
return arg->value.pointer.p;
|
41
|
+
}
|
42
|
+
GPR_UNREACHABLE_CODE(return absl::monostate());
|
43
|
+
}
|
44
|
+
|
45
|
+
} // namespace experimental
|
46
|
+
} // namespace grpc_event_engine
|
@@ -0,0 +1,42 @@
|
|
1
|
+
// Copyright 2021 The gRPC Authors
|
2
|
+
//
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
// you may not use this file except in compliance with the License.
|
5
|
+
// You may obtain a copy of the License at
|
6
|
+
//
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
//
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
// See the License for the specific language governing permissions and
|
13
|
+
// limitations under the License.
|
14
|
+
#ifndef GRPC_CORE_LIB_EVENT_ENGINE_ENDPOINT_CONFIG_INTERNAL_H
|
15
|
+
#define GRPC_CORE_LIB_EVENT_ENGINE_ENDPOINT_CONFIG_INTERNAL_H
|
16
|
+
|
17
|
+
#include <grpc/support/port_platform.h>
|
18
|
+
|
19
|
+
#include <grpc/event_engine/endpoint_config.h>
|
20
|
+
|
21
|
+
#include "src/core/lib/channel/channel_args.h"
|
22
|
+
|
23
|
+
namespace grpc_event_engine {
|
24
|
+
namespace experimental {
|
25
|
+
|
26
|
+
/// A readonly \a EndpointConfig based on grpc_channel_args. This class does not
|
27
|
+
/// take ownership of the grpc_endpoint_args*, and instances of this class
|
28
|
+
/// should not be used after the underlying args are destroyed.
|
29
|
+
class ChannelArgsEndpointConfig : public EndpointConfig {
|
30
|
+
public:
|
31
|
+
explicit ChannelArgsEndpointConfig(const grpc_channel_args* args)
|
32
|
+
: args_(args) {}
|
33
|
+
Setting Get(absl::string_view key) const override;
|
34
|
+
|
35
|
+
private:
|
36
|
+
const grpc_channel_args* args_;
|
37
|
+
};
|
38
|
+
|
39
|
+
} // namespace experimental
|
40
|
+
} // namespace grpc_event_engine
|
41
|
+
|
42
|
+
#endif // GRPC_CORE_LIB_EVENT_ENGINE_ENDPOINT_CONFIG_INTERNAL_H
|
@@ -0,0 +1,50 @@
|
|
1
|
+
// Copyright 2021 The gRPC Authors
|
2
|
+
//
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
// you may not use this file except in compliance with the License.
|
5
|
+
// You may obtain a copy of the License at
|
6
|
+
//
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
//
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
// See the License for the specific language governing permissions and
|
13
|
+
// limitations under the License.
|
14
|
+
#include <grpc/support/port_platform.h>
|
15
|
+
|
16
|
+
#include <grpc/event_engine/endpoint_config.h>
|
17
|
+
#include <grpc/event_engine/event_engine.h>
|
18
|
+
#include <grpc/event_engine/port.h>
|
19
|
+
#include <grpc/impl/codegen/grpc_types.h>
|
20
|
+
#include <grpc/support/log.h>
|
21
|
+
|
22
|
+
#include "absl/strings/str_format.h"
|
23
|
+
#include "absl/strings/str_join.h"
|
24
|
+
|
25
|
+
#include "src/core/lib/event_engine/sockaddr.h"
|
26
|
+
|
27
|
+
namespace grpc_event_engine {
|
28
|
+
namespace experimental {
|
29
|
+
|
30
|
+
EventEngine::ResolvedAddress::ResolvedAddress(const sockaddr* address,
|
31
|
+
socklen_t size)
|
32
|
+
: size_(size) {
|
33
|
+
GPR_ASSERT(size <= sizeof(address_));
|
34
|
+
memcpy(&address_, address, size);
|
35
|
+
}
|
36
|
+
|
37
|
+
const struct sockaddr* EventEngine::ResolvedAddress::address() const {
|
38
|
+
return reinterpret_cast<const struct sockaddr*>(address_);
|
39
|
+
}
|
40
|
+
|
41
|
+
socklen_t EventEngine::ResolvedAddress::size() const { return size_; }
|
42
|
+
|
43
|
+
std::shared_ptr<grpc_event_engine::experimental::EventEngine>
|
44
|
+
DefaultEventEngineFactory() {
|
45
|
+
// TODO(nnoble): delete when uv-ee is merged
|
46
|
+
abort();
|
47
|
+
}
|
48
|
+
|
49
|
+
} // namespace experimental
|
50
|
+
} // namespace grpc_event_engine
|
@@ -13,26 +13,28 @@
|
|
13
13
|
// limitations under the License.
|
14
14
|
#include <grpc/support/port_platform.h>
|
15
15
|
|
16
|
+
#ifdef GRPC_USE_EVENT_ENGINE
|
16
17
|
#include <string.h>
|
17
18
|
|
18
19
|
#include "grpc/event_engine/event_engine.h"
|
19
20
|
#include "grpc/event_engine/port.h"
|
20
21
|
#include "grpc/support/log.h"
|
21
22
|
|
22
|
-
|
23
|
-
namespace experimental {
|
23
|
+
uint16_t grpc_htons(uint16_t hostshort) { return htons(hostshort); }
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
memcpy(&address_, address, size);
|
29
|
-
}
|
25
|
+
uint16_t grpc_ntohs(uint16_t netshort) { return ntohs(netshort); }
|
26
|
+
|
27
|
+
uint32_t grpc_htonl(uint32_t hostlong) { return htonl(hostlong); }
|
30
28
|
|
31
|
-
|
32
|
-
|
29
|
+
uint32_t grpc_ntohl(uint32_t netlong) { return ntohl(netlong); }
|
30
|
+
|
31
|
+
int grpc_inet_pton(int af, const char* src, void* dst) {
|
32
|
+
return inet_pton(af, src, dst);
|
33
33
|
}
|
34
34
|
|
35
|
-
|
35
|
+
const char* grpc_inet_ntop(int af, const void* src, char* dst, size_t size) {
|
36
|
+
inet_ntop(af, src, dst, size);
|
37
|
+
return dst;
|
38
|
+
}
|
36
39
|
|
37
|
-
|
38
|
-
} // namespace grpc_event_engine
|
40
|
+
#endif // GRPC_USE_EVENT_ENGINE
|
@@ -0,0 +1,44 @@
|
|
1
|
+
// Copyright 2021 The gRPC Authors
|
2
|
+
//
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
// you may not use this file except in compliance with the License.
|
5
|
+
// You may obtain a copy of the License at
|
6
|
+
//
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
//
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
// See the License for the specific language governing permissions and
|
13
|
+
// limitations under the License.
|
14
|
+
#ifndef GRPC_CORE_LIB_EVENT_ENGINE_SOCKADDR_H
|
15
|
+
#define GRPC_CORE_LIB_EVENT_ENGINE_SOCKADDR_H
|
16
|
+
|
17
|
+
#include <grpc/support/port_platform.h>
|
18
|
+
|
19
|
+
#ifdef GRPC_USE_EVENT_ENGINE
|
20
|
+
#include <grpc/event_engine/port.h>
|
21
|
+
|
22
|
+
#include "src/core/lib/iomgr/port.h"
|
23
|
+
|
24
|
+
typedef struct sockaddr grpc_sockaddr;
|
25
|
+
typedef struct sockaddr_in grpc_sockaddr_in;
|
26
|
+
typedef struct sockaddr_in6 grpc_sockaddr_in6;
|
27
|
+
typedef struct in_addr grpc_in_addr;
|
28
|
+
typedef struct in6_addr grpc_in6_addr;
|
29
|
+
|
30
|
+
#define GRPC_INET_ADDRSTRLEN INET_ADDRSTRLEN
|
31
|
+
#define GRPC_INET6_ADDRSTRLEN INET6_ADDRSTRLEN
|
32
|
+
|
33
|
+
#define GRPC_SOCK_STREAM SOCK_STREAM
|
34
|
+
#define GRPC_SOCK_DGRAM SOCK_DGRAM
|
35
|
+
|
36
|
+
#define GRPC_AF_UNSPEC AF_UNSPEC
|
37
|
+
#define GRPC_AF_UNIX AF_UNIX
|
38
|
+
#define GRPC_AF_INET AF_INET
|
39
|
+
#define GRPC_AF_INET6 AF_INET6
|
40
|
+
|
41
|
+
#define GRPC_AI_PASSIVE AI_PASSIVE
|
42
|
+
|
43
|
+
#endif
|
44
|
+
#endif // GRPC_CORE_LIB_EVENT_ENGINE_SOCKADDR_H
|
@@ -22,6 +22,8 @@
|
|
22
22
|
|
23
23
|
#include <string.h>
|
24
24
|
|
25
|
+
#include "absl/base/attributes.h"
|
26
|
+
|
25
27
|
#define ROTL32(x, r) (((x) << (r)) | ((x) >> (32 - (r))))
|
26
28
|
|
27
29
|
#define FMIX32(h) \
|
@@ -61,10 +63,10 @@ uint32_t gpr_murmur_hash3(const void* key, size_t len, uint32_t seed) {
|
|
61
63
|
switch (len & 3) {
|
62
64
|
case 3:
|
63
65
|
k1 ^= (static_cast<uint32_t>(keyptr[2])) << 16;
|
64
|
-
|
66
|
+
ABSL_FALLTHROUGH_INTENDED;
|
65
67
|
case 2:
|
66
68
|
k1 ^= (static_cast<uint32_t>(keyptr[1])) << 8;
|
67
|
-
|
69
|
+
ABSL_FALLTHROUGH_INTENDED;
|
68
70
|
case 1:
|
69
71
|
k1 ^= keyptr[0];
|
70
72
|
k1 *= c1;
|
@@ -28,7 +28,8 @@
|
|
28
28
|
|
29
29
|
extern "C" {
|
30
30
|
#ifdef __linux__
|
31
|
-
#if defined(__x86_64__) && !defined(GPR_MUSL_LIBC_COMPAT)
|
31
|
+
#if defined(__x86_64__) && !defined(GPR_MUSL_LIBC_COMPAT) && \
|
32
|
+
!defined(__ANDROID__)
|
32
33
|
__asm__(".symver memcpy,memcpy@GLIBC_2.2.5");
|
33
34
|
void* __wrap_memcpy(void* destination, const void* source, size_t num) {
|
34
35
|
return memcpy(destination, source, num);
|
@@ -72,7 +72,7 @@ inline OrphanablePtr<T> MakeOrphanable(Args&&... args) {
|
|
72
72
|
}
|
73
73
|
|
74
74
|
// A type of Orphanable with internal ref-counting.
|
75
|
-
template <typename Child>
|
75
|
+
template <typename Child, UnrefBehavior UnrefBehaviorArg = kUnrefDelete>
|
76
76
|
class InternallyRefCounted : public Orphanable {
|
77
77
|
public:
|
78
78
|
// Not copyable nor movable.
|
@@ -102,12 +102,12 @@ class InternallyRefCounted : public Orphanable {
|
|
102
102
|
|
103
103
|
void Unref() {
|
104
104
|
if (GPR_UNLIKELY(refs_.Unref())) {
|
105
|
-
|
105
|
+
internal::Delete<Child, UnrefBehaviorArg>(static_cast<Child*>(this));
|
106
106
|
}
|
107
107
|
}
|
108
108
|
void Unref(const DebugLocation& location, const char* reason) {
|
109
109
|
if (GPR_UNLIKELY(refs_.Unref(location, reason))) {
|
110
|
-
|
110
|
+
internal::Delete<Child, UnrefBehaviorArg>(static_cast<Child*>(this));
|
111
111
|
}
|
112
112
|
}
|
113
113
|
|
data/src/core/lib/gprpp/sync.h
CHANGED
@@ -19,10 +19,9 @@
|
|
19
19
|
#ifndef GRPC_CORE_LIB_GPRPP_SYNC_H
|
20
20
|
#define GRPC_CORE_LIB_GPRPP_SYNC_H
|
21
21
|
|
22
|
-
#include <grpc/
|
22
|
+
#include <grpc/support/port_platform.h>
|
23
23
|
|
24
|
-
#include <grpc/
|
25
|
-
#include <grpc/impl/codegen/sync.h>
|
24
|
+
#include <grpc/support/log.h>
|
26
25
|
#include <grpc/support/sync.h>
|
27
26
|
#include <grpc/support/time.h>
|
28
27
|
|
@@ -145,33 +144,6 @@ class CondVar {
|
|
145
144
|
|
146
145
|
#endif // GPR_ABSEIL_SYNC
|
147
146
|
|
148
|
-
template <typename Predicate>
|
149
|
-
static void WaitUntil(CondVar* cv, Mutex* mu, Predicate pred) {
|
150
|
-
while (!pred()) {
|
151
|
-
cv->Wait(mu);
|
152
|
-
}
|
153
|
-
}
|
154
|
-
|
155
|
-
// Returns true iff we timed-out
|
156
|
-
template <typename Predicate>
|
157
|
-
static bool WaitUntilWithTimeout(CondVar* cv, Mutex* mu, Predicate pred,
|
158
|
-
absl::Duration timeout) {
|
159
|
-
while (!pred()) {
|
160
|
-
if (cv->WaitWithTimeout(mu, timeout)) return true;
|
161
|
-
}
|
162
|
-
return false;
|
163
|
-
}
|
164
|
-
|
165
|
-
// Returns true iff we timed-out
|
166
|
-
template <typename Predicate>
|
167
|
-
static bool WaitUntilWithDeadline(CondVar* cv, Mutex* mu, Predicate pred,
|
168
|
-
absl::Time deadline) {
|
169
|
-
while (!pred()) {
|
170
|
-
if (cv->WaitWithDeadline(mu, deadline)) return true;
|
171
|
-
}
|
172
|
-
return false;
|
173
|
-
}
|
174
|
-
|
175
147
|
// Deprecated. Prefer MutexLock
|
176
148
|
class MutexLockForGprMu {
|
177
149
|
public:
|
@@ -190,7 +190,7 @@ void extract_opt_stats_from_cmsg(ConnectionMetrics* metrics,
|
|
190
190
|
|
191
191
|
static int get_socket_tcp_info(grpc_core::tcp_info* info, int fd) {
|
192
192
|
memset(info, 0, sizeof(*info));
|
193
|
-
info->length =
|
193
|
+
info->length = offsetof(grpc_core::tcp_info, length);
|
194
194
|
return getsockopt(fd, IPPROTO_TCP, TCP_INFO, info, &(info->length));
|
195
195
|
}
|
196
196
|
} /* namespace */
|
@@ -0,0 +1,33 @@
|
|
1
|
+
// Copyright 2021 The gRPC Authors
|
2
|
+
//
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
// you may not use this file except in compliance with the License.
|
5
|
+
// You may obtain a copy of the License at
|
6
|
+
//
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
//
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
// See the License for the specific language governing permissions and
|
13
|
+
// limitations under the License.
|
14
|
+
#include <grpc/support/port_platform.h>
|
15
|
+
|
16
|
+
#ifdef GRPC_USE_EVENT_ENGINE
|
17
|
+
#include "src/core/lib/iomgr/port.h"
|
18
|
+
|
19
|
+
#include <stdlib.h>
|
20
|
+
|
21
|
+
#include <grpc/support/log.h>
|
22
|
+
|
23
|
+
#include "src/core/lib/iomgr/endpoint_pair.h"
|
24
|
+
|
25
|
+
grpc_endpoint_pair grpc_iomgr_create_endpoint_pair(
|
26
|
+
const char* /* name */, grpc_channel_args* /* args */) {
|
27
|
+
// TODO(hork): determine what's needed here in the long run
|
28
|
+
GPR_ASSERT(
|
29
|
+
false &&
|
30
|
+
"grpc_iomgr_create_endpoint_pair is not suppoted with event_engine");
|
31
|
+
}
|
32
|
+
|
33
|
+
#endif // GRPC_USE_EVENT_ENGINE
|