grpc 1.2.5 → 1.3.4
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 +1434 -399
- data/etc/roots.pem +34 -150
- data/include/grpc/grpc.h +71 -0
- data/include/grpc/impl/codegen/atm.h +5 -0
- data/include/grpc/impl/codegen/atm_gcc_atomic.h +6 -0
- data/include/grpc/impl/codegen/atm_gcc_sync.h +2 -0
- data/include/grpc/impl/codegen/atm_windows.h +11 -0
- data/include/grpc/impl/codegen/grpc_types.h +54 -13
- data/include/grpc/impl/codegen/port_platform.h +15 -1
- data/include/grpc/support/alloc.h +2 -1
- data/include/grpc/support/sync.h +4 -0
- data/include/grpc/support/tls.h +1 -1
- data/src/core/ext/census/gen/trace_context.pb.h +1 -1
- data/src/core/ext/census/grpc_filter.c +14 -10
- data/src/core/ext/census/grpc_plugin.c +3 -1
- data/src/core/ext/census/trace_label.h +1 -1
- data/src/core/ext/census/trace_propagation.h +1 -1
- data/src/core/ext/census/trace_status.h +1 -1
- data/src/core/ext/census/trace_string.h +1 -1
- data/src/core/ext/census/tracing.h +1 -1
- data/src/core/ext/{client_channel → filters/client_channel}/channel_connectivity.c +56 -27
- data/src/core/ext/{client_channel → filters/client_channel}/client_channel.c +407 -202
- data/src/core/ext/{client_channel → filters/client_channel}/client_channel.h +10 -6
- data/src/core/ext/{client_channel → filters/client_channel}/client_channel_factory.c +1 -1
- data/src/core/ext/{client_channel → filters/client_channel}/client_channel_factory.h +4 -4
- data/src/core/ext/{client_channel → filters/client_channel}/client_channel_plugin.c +12 -7
- data/src/core/ext/{client_channel → filters/client_channel}/connector.c +1 -1
- data/src/core/ext/{client_channel → filters/client_channel}/connector.h +3 -5
- data/src/core/ext/{client_channel → filters/client_channel}/http_connect_handshaker.c +6 -6
- data/src/core/ext/{client_channel → filters/client_channel}/http_connect_handshaker.h +3 -3
- data/src/core/ext/{client_channel → filters/client_channel}/http_proxy.c +4 -4
- data/src/core/ext/{client_channel → filters/client_channel}/http_proxy.h +3 -3
- data/src/core/ext/{client_channel → filters/client_channel}/lb_policy.c +1 -1
- data/src/core/ext/{client_channel → filters/client_channel}/lb_policy.h +4 -4
- data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/grpclb/grpclb.c +22 -20
- data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/grpclb/grpclb.h +4 -4
- data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/grpclb/grpclb_channel.h +5 -4
- data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/grpclb/grpclb_channel_secure.c +2 -2
- data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/grpclb/load_balancer_api.c +1 -1
- data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/grpclb/load_balancer_api.h +6 -5
- data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/grpclb/proto/grpc/lb/v1/load_balancer.pb.c +1 -1
- data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/grpclb/proto/grpc/lb/v1/load_balancer.pb.h +0 -0
- data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/pick_first/pick_first.c +20 -15
- data/src/core/ext/{lb_policy → filters/client_channel/lb_policy}/round_robin/round_robin.c +21 -16
- data/src/core/ext/{client_channel → filters/client_channel}/lb_policy_factory.c +1 -1
- data/src/core/ext/{client_channel → filters/client_channel}/lb_policy_factory.h +5 -5
- data/src/core/ext/{client_channel → filters/client_channel}/lb_policy_registry.c +1 -1
- data/src/core/ext/{client_channel → filters/client_channel}/lb_policy_registry.h +4 -4
- data/src/core/ext/{client_channel → filters/client_channel}/parse_address.c +1 -1
- data/src/core/ext/{client_channel → filters/client_channel}/parse_address.h +4 -4
- data/src/core/ext/{client_channel → filters/client_channel}/proxy_mapper.c +1 -1
- data/src/core/ext/{client_channel → filters/client_channel}/proxy_mapper.h +3 -3
- data/src/core/ext/{client_channel → filters/client_channel}/proxy_mapper_registry.c +10 -4
- data/src/core/ext/{client_channel → filters/client_channel}/proxy_mapper_registry.h +4 -4
- data/src/core/ext/{client_channel → filters/client_channel}/resolver.c +1 -1
- data/src/core/ext/{client_channel → filters/client_channel}/resolver.h +4 -4
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c +350 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h +66 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c +319 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c +289 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +64 -0
- data/src/core/ext/{resolver → filters/client_channel/resolver}/dns/native/dns_resolver.c +21 -5
- data/src/core/ext/{resolver → filters/client_channel/resolver}/sockaddr/sockaddr_resolver.c +3 -3
- data/src/core/ext/{client_channel → filters/client_channel}/resolver_factory.c +1 -1
- data/src/core/ext/{client_channel → filters/client_channel}/resolver_factory.h +6 -6
- data/src/core/ext/{client_channel → filters/client_channel}/resolver_registry.c +1 -2
- data/src/core/ext/{client_channel → filters/client_channel}/resolver_registry.h +4 -4
- data/src/core/ext/filters/client_channel/retry_throttle.c +210 -0
- data/src/core/ext/filters/client_channel/retry_throttle.h +65 -0
- data/src/core/ext/{client_channel → filters/client_channel}/subchannel.c +49 -43
- data/src/core/ext/{client_channel → filters/client_channel}/subchannel.h +21 -7
- data/src/core/ext/{client_channel → filters/client_channel}/subchannel_index.c +1 -1
- data/src/core/ext/{client_channel → filters/client_channel}/subchannel_index.h +5 -5
- data/src/core/ext/{client_channel → filters/client_channel}/uri_parser.c +1 -1
- data/src/core/ext/{client_channel → filters/client_channel}/uri_parser.h +3 -3
- data/src/core/ext/{load_reporting → filters/load_reporting}/load_reporting.c +4 -2
- data/src/core/ext/{load_reporting → filters/load_reporting}/load_reporting.h +3 -3
- data/src/core/ext/{load_reporting → filters/load_reporting}/load_reporting_filter.c +17 -14
- data/src/core/ext/{load_reporting → filters/load_reporting}/load_reporting_filter.h +4 -4
- data/src/core/ext/filters/max_age/max_age_filter.c +439 -0
- data/src/core/ext/filters/max_age/max_age_filter.h +39 -0
- data/src/core/ext/transport/chttp2/client/chttp2_connector.c +6 -41
- data/src/core/ext/transport/chttp2/client/chttp2_connector.h +1 -1
- data/src/core/ext/transport/chttp2/client/insecure/channel_create.c +2 -2
- data/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +3 -3
- data/src/core/ext/transport/chttp2/server/chttp2_server.c +2 -2
- data/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c +2 -5
- data/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +2 -2
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.c +449 -204
- data/src/core/ext/transport/chttp2/transport/frame_data.c +10 -7
- data/src/core/ext/transport/chttp2/transport/frame_goaway.c +3 -2
- data/src/core/ext/transport/chttp2/transport/frame_ping.c +37 -7
- data/src/core/ext/transport/chttp2/transport/frame_ping.h +3 -0
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.c +4 -3
- data/src/core/ext/transport/chttp2/transport/frame_settings.c +18 -38
- data/src/core/ext/transport/chttp2/transport/frame_settings.h +1 -29
- data/src/core/ext/transport/chttp2/transport/frame_window_update.c +2 -2
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.c +64 -37
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.h +11 -4
- data/src/core/ext/transport/chttp2/transport/hpack_parser.c +60 -39
- data/src/core/ext/transport/chttp2/transport/hpack_table.c +2 -2
- data/src/core/ext/transport/chttp2/transport/http2_settings.c +75 -0
- data/src/core/ext/transport/chttp2/transport/http2_settings.h +74 -0
- data/src/core/ext/transport/chttp2/transport/incoming_metadata.c +22 -43
- data/src/core/ext/transport/chttp2/transport/incoming_metadata.h +8 -10
- data/src/core/ext/transport/chttp2/transport/internal.h +24 -2
- data/src/core/ext/transport/chttp2/transport/parsing.c +33 -15
- data/src/core/ext/transport/chttp2/transport/writing.c +56 -10
- data/src/core/lib/channel/channel_args.c +7 -0
- data/src/core/lib/channel/channel_args.h +2 -0
- data/src/core/lib/channel/channel_stack.c +20 -27
- data/src/core/lib/channel/channel_stack.h +18 -16
- data/src/core/lib/channel/compress_filter.c +20 -18
- data/src/core/lib/channel/connected_channel.c +9 -8
- data/src/core/lib/channel/deadline_filter.c +28 -24
- data/src/core/lib/channel/deadline_filter.h +3 -3
- data/src/core/lib/channel/handshaker.c +3 -2
- data/src/core/lib/channel/http_client_filter.c +119 -61
- data/src/core/lib/channel/http_server_filter.c +124 -69
- data/src/core/lib/channel/message_size_filter.c +23 -19
- data/src/core/lib/http/httpcli.c +8 -6
- data/src/core/lib/http/httpcli_security_connector.c +5 -5
- data/src/core/lib/http/parser.c +57 -31
- data/src/core/lib/iomgr/closure.c +15 -0
- data/src/core/lib/iomgr/closure.h +4 -0
- data/src/core/lib/iomgr/combiner.c +8 -0
- data/src/core/lib/iomgr/endpoint_pair.h +2 -3
- data/src/core/lib/iomgr/endpoint_pair_posix.c +10 -7
- data/src/core/lib/iomgr/endpoint_pair_uv.c +2 -3
- data/src/core/lib/iomgr/endpoint_pair_windows.c +9 -6
- data/src/core/lib/iomgr/error.c +360 -177
- data/src/core/lib/iomgr/error.h +31 -33
- data/src/core/lib/iomgr/error_internal.h +30 -9
- data/src/core/lib/iomgr/ev_epoll_linux.c +25 -239
- data/src/core/lib/iomgr/ev_poll_posix.c +11 -7
- data/src/core/lib/iomgr/ev_posix.c +6 -0
- data/src/core/lib/iomgr/ev_posix.h +3 -0
- data/src/core/lib/iomgr/exec_ctx.c +6 -0
- data/src/core/lib/iomgr/executor.c +8 -2
- data/src/core/lib/iomgr/load_file.c +6 -3
- data/src/core/lib/iomgr/lockfree_event.c +238 -0
- data/src/core/{ext/client_channel/initial_connect_string.h → lib/iomgr/lockfree_event.h} +17 -13
- data/src/core/lib/iomgr/pollset.h +4 -0
- data/src/core/lib/iomgr/pollset_windows.c +2 -2
- data/src/core/lib/iomgr/port.h +9 -0
- data/src/core/lib/iomgr/resolve_address_posix.c +15 -9
- data/src/core/lib/iomgr/resolve_address_uv.c +8 -6
- data/src/core/lib/iomgr/resolve_address_windows.c +2 -2
- data/src/core/lib/iomgr/resource_quota.c +19 -4
- data/src/core/lib/iomgr/resource_quota.h +2 -0
- data/src/core/lib/iomgr/sockaddr_utils.c +3 -1
- data/src/core/lib/iomgr/socket_factory_posix.c +110 -0
- data/src/core/lib/iomgr/socket_factory_posix.h +90 -0
- data/src/core/lib/iomgr/socket_utils_common_posix.c +25 -9
- data/src/core/lib/iomgr/socket_utils_posix.h +7 -0
- data/src/core/lib/iomgr/tcp_client.h +0 -4
- data/src/core/lib/iomgr/tcp_client_posix.c +15 -31
- data/src/core/lib/iomgr/tcp_client_uv.c +10 -6
- data/src/core/lib/iomgr/tcp_client_windows.c +9 -19
- data/src/core/lib/iomgr/tcp_posix.c +111 -22
- data/src/core/lib/iomgr/tcp_posix.h +3 -4
- data/src/core/lib/iomgr/tcp_server_posix.c +39 -417
- data/src/core/lib/iomgr/tcp_server_utils_posix.h +135 -0
- data/src/core/lib/iomgr/tcp_server_utils_posix_common.c +221 -0
- data/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c +196 -0
- data/src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c +49 -0
- data/src/core/lib/iomgr/tcp_server_uv.c +43 -16
- data/src/core/lib/iomgr/tcp_server_windows.c +10 -22
- data/src/core/lib/iomgr/tcp_uv.c +16 -13
- data/src/core/lib/iomgr/tcp_windows.c +24 -12
- data/src/core/lib/iomgr/tcp_windows.h +2 -2
- data/src/core/lib/iomgr/timer.h +3 -0
- data/src/core/lib/iomgr/timer_generic.c +257 -72
- data/src/core/lib/iomgr/timer_generic.h +1 -1
- data/src/core/lib/iomgr/timer_heap.c +8 -8
- data/src/core/lib/iomgr/udp_server.c +54 -24
- data/src/core/lib/iomgr/udp_server.h +7 -7
- data/src/core/lib/iomgr/unix_sockets_posix.c +1 -1
- data/src/core/lib/iomgr/unix_sockets_posix_noop.c +2 -1
- data/src/core/lib/iomgr/wakeup_fd_posix.h +1 -1
- data/src/core/lib/profiling/basic_timers.c +1 -1
- data/src/core/lib/security/credentials/credentials.h +1 -1
- data/src/core/lib/security/credentials/google_default/google_default_credentials.c +10 -9
- data/src/core/lib/security/credentials/jwt/json_token.c +1 -1
- data/src/core/lib/security/credentials/jwt/jwt_verifier.c +2 -2
- data/src/core/lib/security/transport/client_auth_filter.c +33 -26
- data/src/core/lib/security/transport/secure_endpoint.c +8 -5
- data/src/core/lib/security/transport/security_connector.c +37 -37
- data/src/core/lib/security/transport/security_connector.h +1 -1
- data/src/core/lib/security/transport/security_handshaker.c +15 -12
- data/src/core/lib/security/transport/server_auth_filter.c +20 -18
- data/src/core/lib/security/transport/tsi_error.c +5 -3
- data/src/core/lib/security/transport/tsi_error.h +1 -1
- data/src/core/lib/{security/util → slice}/b64.c +21 -6
- data/src/core/lib/{security/util → slice}/b64.h +16 -4
- data/src/core/lib/slice/slice.c +4 -2
- data/src/core/lib/slice/slice_buffer.c +16 -14
- data/src/core/lib/support/arena.c +98 -0
- data/src/core/{ext/client_channel/initial_connect_string.c → lib/support/arena.h} +17 -15
- data/src/core/{ext/client_channel/default_initial_connect_string.c → lib/support/atm.c} +14 -5
- data/src/core/lib/support/cpu_linux.c +5 -0
- data/src/core/lib/support/sync.c +4 -0
- data/src/core/lib/support/time.c +4 -10
- data/src/core/lib/support/wrap_memcpy.c +3 -1
- data/src/core/lib/surface/call.c +252 -221
- data/src/core/lib/surface/channel.c +72 -21
- data/src/core/lib/surface/channel.h +8 -0
- data/src/core/lib/surface/completion_queue.c +2 -3
- data/src/core/lib/surface/completion_queue_factory.c +77 -0
- data/src/core/lib/surface/completion_queue_factory.h +51 -0
- data/src/core/lib/surface/init_secure.c +3 -1
- data/src/core/lib/surface/lame_client.c +18 -14
- data/src/core/lib/surface/server.c +43 -41
- data/src/core/lib/surface/validate_metadata.c +8 -4
- data/src/core/lib/surface/version.c +2 -2
- data/src/core/lib/transport/bdp_estimator.h +1 -1
- data/src/core/lib/transport/connectivity_state.c +2 -1
- data/src/core/lib/transport/error_utils.c +17 -17
- data/src/core/lib/transport/error_utils.h +1 -1
- data/src/core/lib/transport/metadata_batch.c +6 -7
- data/src/core/lib/transport/pid_controller.c +1 -0
- data/src/core/lib/transport/service_config.c +12 -0
- data/src/core/lib/transport/service_config.h +6 -0
- data/src/core/lib/transport/transport.c +29 -17
- data/src/core/lib/transport/transport.h +85 -42
- data/src/core/lib/transport/transport_impl.h +5 -3
- data/src/core/lib/transport/transport_op_string.c +20 -14
- data/src/core/plugin_registry/grpc_plugin_registry.c +8 -0
- data/src/core/{lib/tsi → tsi}/fake_transport_security.c +2 -2
- data/src/core/{lib/tsi → tsi}/fake_transport_security.h +4 -4
- data/src/core/{lib/tsi → tsi}/ssl_transport_security.c +40 -79
- data/src/core/{lib/tsi → tsi}/ssl_transport_security.h +44 -21
- data/src/core/{lib/tsi → tsi}/ssl_types.h +3 -3
- data/src/core/{lib/tsi → tsi}/transport_security.c +2 -2
- data/src/core/{lib/tsi → tsi}/transport_security.h +4 -4
- data/src/core/{lib/tsi → tsi}/transport_security_interface.h +3 -3
- data/src/ruby/ext/grpc/extconf.rb +1 -0
- data/src/ruby/ext/grpc/rb_call_credentials.c +2 -2
- data/src/ruby/ext/grpc/rb_channel.c +520 -93
- data/src/ruby/ext/grpc/rb_channel.h +2 -0
- data/src/ruby/ext/grpc/rb_channel_credentials.c +3 -0
- data/src/ruby/ext/grpc/rb_compression_options.c +5 -2
- data/src/ruby/ext/grpc/rb_event_thread.c +6 -6
- data/src/ruby/ext/grpc/rb_grpc.c +29 -7
- data/src/ruby/ext/grpc/rb_grpc.h +2 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +10 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +15 -0
- data/src/ruby/ext/grpc/rb_server.c +5 -3
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/spec/channel_connection_spec.rb +173 -0
- data/src/ruby/spec/channel_spec.rb +29 -0
- data/src/ruby/spec/generic/rpc_server_pool_spec.rb +27 -17
- data/third_party/cares/ares_build.h +264 -0
- data/third_party/cares/cares/ares.h +636 -0
- data/third_party/cares/cares/ares__close_sockets.c +61 -0
- data/third_party/cares/cares/ares__get_hostent.c +261 -0
- data/third_party/cares/cares/ares__read_line.c +73 -0
- data/third_party/cares/cares/ares__timeval.c +111 -0
- data/third_party/cares/cares/ares_cancel.c +63 -0
- data/third_party/cares/cares/ares_create_query.c +202 -0
- data/third_party/cares/cares/ares_data.c +221 -0
- data/third_party/cares/cares/ares_data.h +72 -0
- data/third_party/cares/cares/ares_destroy.c +108 -0
- data/third_party/cares/cares/ares_dns.h +103 -0
- data/third_party/cares/cares/ares_expand_name.c +205 -0
- data/third_party/cares/cares/ares_expand_string.c +70 -0
- data/third_party/cares/cares/ares_fds.c +59 -0
- data/third_party/cares/cares/ares_free_hostent.c +41 -0
- data/third_party/cares/cares/ares_free_string.c +25 -0
- data/third_party/cares/cares/ares_getenv.c +30 -0
- data/third_party/cares/cares/ares_getenv.h +26 -0
- data/third_party/cares/cares/ares_gethostbyaddr.c +294 -0
- data/third_party/cares/cares/ares_gethostbyname.c +518 -0
- data/third_party/cares/cares/ares_getnameinfo.c +422 -0
- data/third_party/cares/cares/ares_getopt.c +122 -0
- data/third_party/cares/cares/ares_getopt.h +53 -0
- data/third_party/cares/cares/ares_getsock.c +66 -0
- data/third_party/cares/cares/ares_inet_net_pton.h +25 -0
- data/third_party/cares/cares/ares_init.c +2146 -0
- data/third_party/cares/cares/ares_iphlpapi.h +221 -0
- data/third_party/cares/cares/ares_ipv6.h +78 -0
- data/third_party/cares/cares/ares_library_init.c +167 -0
- data/third_party/cares/cares/ares_library_init.h +42 -0
- data/third_party/cares/cares/ares_llist.c +63 -0
- data/third_party/cares/cares/ares_llist.h +39 -0
- data/third_party/cares/cares/ares_mkquery.c +24 -0
- data/third_party/cares/cares/ares_nowarn.c +260 -0
- data/third_party/cares/cares/ares_nowarn.h +61 -0
- data/third_party/cares/cares/ares_options.c +402 -0
- data/third_party/cares/cares/ares_parse_a_reply.c +264 -0
- data/third_party/cares/cares/ares_parse_aaaa_reply.c +264 -0
- data/third_party/cares/cares/ares_parse_mx_reply.c +170 -0
- data/third_party/cares/cares/ares_parse_naptr_reply.c +188 -0
- data/third_party/cares/cares/ares_parse_ns_reply.c +183 -0
- data/third_party/cares/cares/ares_parse_ptr_reply.c +219 -0
- data/third_party/cares/cares/ares_parse_soa_reply.c +133 -0
- data/third_party/cares/cares/ares_parse_srv_reply.c +179 -0
- data/third_party/cares/cares/ares_parse_txt_reply.c +220 -0
- data/third_party/cares/cares/ares_platform.c +11035 -0
- data/third_party/cares/cares/ares_platform.h +43 -0
- data/third_party/cares/cares/ares_private.h +363 -0
- data/third_party/cares/cares/ares_process.c +1359 -0
- data/third_party/cares/cares/ares_query.c +186 -0
- data/third_party/cares/cares/ares_rules.h +125 -0
- data/third_party/cares/cares/ares_search.c +316 -0
- data/third_party/cares/cares/ares_send.c +131 -0
- data/third_party/cares/cares/ares_setup.h +217 -0
- data/third_party/cares/cares/ares_strcasecmp.c +66 -0
- data/third_party/cares/cares/ares_strcasecmp.h +30 -0
- data/third_party/cares/cares/ares_strdup.c +49 -0
- data/third_party/cares/cares/ares_strdup.h +24 -0
- data/third_party/cares/cares/ares_strerror.c +56 -0
- data/third_party/cares/cares/ares_timeout.c +88 -0
- data/third_party/cares/cares/ares_version.c +11 -0
- data/third_party/cares/cares/ares_version.h +24 -0
- data/third_party/cares/cares/ares_writev.c +79 -0
- data/third_party/cares/cares/bitncmp.c +59 -0
- data/third_party/cares/cares/bitncmp.h +26 -0
- data/third_party/cares/cares/config-win32.h +377 -0
- data/third_party/cares/cares/inet_net_pton.c +450 -0
- data/third_party/cares/cares/inet_ntop.c +208 -0
- data/third_party/cares/cares/setup_once.h +554 -0
- data/third_party/cares/cares/windows_port.c +22 -0
- data/third_party/cares/config_darwin/ares_config.h +523 -0
- data/third_party/cares/config_linux/ares_config.h +524 -0
- metadata +164 -68
@@ -0,0 +1,42 @@
|
|
1
|
+
#ifndef HEADER_CARES_LIBRARY_INIT_H
|
2
|
+
#define HEADER_CARES_LIBRARY_INIT_H
|
3
|
+
|
4
|
+
|
5
|
+
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
6
|
+
* Copyright (C) 2004-2011 by Daniel Stenberg
|
7
|
+
*
|
8
|
+
* Permission to use, copy, modify, and distribute this
|
9
|
+
* software and its documentation for any purpose and without
|
10
|
+
* fee is hereby granted, provided that the above copyright
|
11
|
+
* notice appear in all copies and that both that copyright
|
12
|
+
* notice and this permission notice appear in supporting
|
13
|
+
* documentation, and that the name of M.I.T. not be used in
|
14
|
+
* advertising or publicity pertaining to distribution of the
|
15
|
+
* software without specific, written prior permission.
|
16
|
+
* M.I.T. makes no representations about the suitability of
|
17
|
+
* this software for any purpose. It is provided "as is"
|
18
|
+
* without express or implied warranty.
|
19
|
+
*/
|
20
|
+
|
21
|
+
#include "ares_setup.h"
|
22
|
+
|
23
|
+
#ifdef USE_WINSOCK
|
24
|
+
|
25
|
+
#include <iphlpapi.h>
|
26
|
+
#include <ares_iphlpapi.h>
|
27
|
+
|
28
|
+
typedef DWORD (WINAPI *fpGetNetworkParams_t) (FIXED_INFO*, DWORD*);
|
29
|
+
typedef BOOLEAN (APIENTRY *fpSystemFunction036_t) (void*, ULONG);
|
30
|
+
typedef ULONG (WINAPI *fpGetAdaptersAddresses_t) ( ULONG, ULONG, void*, IP_ADAPTER_ADDRESSES*, ULONG* );
|
31
|
+
|
32
|
+
/* Forward-declaration of variables defined in ares_library_init.c */
|
33
|
+
/* that are global and unique instances for whole c-ares library. */
|
34
|
+
|
35
|
+
extern fpGetNetworkParams_t ares_fpGetNetworkParams;
|
36
|
+
extern fpSystemFunction036_t ares_fpSystemFunction036;
|
37
|
+
extern fpGetAdaptersAddresses_t ares_fpGetAdaptersAddresses;
|
38
|
+
|
39
|
+
#endif /* USE_WINSOCK */
|
40
|
+
|
41
|
+
#endif /* HEADER_CARES_LIBRARY_INIT_H */
|
42
|
+
|
@@ -0,0 +1,63 @@
|
|
1
|
+
|
2
|
+
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
3
|
+
*
|
4
|
+
* Permission to use, copy, modify, and distribute this
|
5
|
+
* software and its documentation for any purpose and without
|
6
|
+
* fee is hereby granted, provided that the above copyright
|
7
|
+
* notice appear in all copies and that both that copyright
|
8
|
+
* notice and this permission notice appear in supporting
|
9
|
+
* documentation, and that the name of M.I.T. not be used in
|
10
|
+
* advertising or publicity pertaining to distribution of the
|
11
|
+
* software without specific, written prior permission.
|
12
|
+
* M.I.T. makes no representations about the suitability of
|
13
|
+
* this software for any purpose. It is provided "as is"
|
14
|
+
* without express or implied warranty.
|
15
|
+
*/
|
16
|
+
|
17
|
+
#include "ares_setup.h"
|
18
|
+
|
19
|
+
#include "ares.h"
|
20
|
+
#include "ares_private.h"
|
21
|
+
|
22
|
+
/* Routines for managing doubly-linked circular linked lists with a
|
23
|
+
* dummy head.
|
24
|
+
*/
|
25
|
+
|
26
|
+
/* Initialize a new head node */
|
27
|
+
void ares__init_list_head(struct list_node* head) {
|
28
|
+
head->prev = head;
|
29
|
+
head->next = head;
|
30
|
+
head->data = NULL;
|
31
|
+
}
|
32
|
+
|
33
|
+
/* Initialize a list node */
|
34
|
+
void ares__init_list_node(struct list_node* node, void* d) {
|
35
|
+
node->prev = NULL;
|
36
|
+
node->next = NULL;
|
37
|
+
node->data = d;
|
38
|
+
}
|
39
|
+
|
40
|
+
/* Returns true iff the given list is empty */
|
41
|
+
int ares__is_list_empty(struct list_node* head) {
|
42
|
+
return ((head->next == head) && (head->prev == head));
|
43
|
+
}
|
44
|
+
|
45
|
+
/* Inserts new_node before old_node */
|
46
|
+
void ares__insert_in_list(struct list_node* new_node,
|
47
|
+
struct list_node* old_node) {
|
48
|
+
new_node->next = old_node;
|
49
|
+
new_node->prev = old_node->prev;
|
50
|
+
old_node->prev->next = new_node;
|
51
|
+
old_node->prev = new_node;
|
52
|
+
}
|
53
|
+
|
54
|
+
/* Removes the node from the list it's in, if any */
|
55
|
+
void ares__remove_from_list(struct list_node* node) {
|
56
|
+
if (node->next != NULL) {
|
57
|
+
node->prev->next = node->next;
|
58
|
+
node->next->prev = node->prev;
|
59
|
+
node->prev = NULL;
|
60
|
+
node->next = NULL;
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
@@ -0,0 +1,39 @@
|
|
1
|
+
#ifndef __ARES_LLIST_H
|
2
|
+
#define __ARES_LLIST_H
|
3
|
+
|
4
|
+
|
5
|
+
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
6
|
+
*
|
7
|
+
* Permission to use, copy, modify, and distribute this
|
8
|
+
* software and its documentation for any purpose and without
|
9
|
+
* fee is hereby granted, provided that the above copyright
|
10
|
+
* notice appear in all copies and that both that copyright
|
11
|
+
* notice and this permission notice appear in supporting
|
12
|
+
* documentation, and that the name of M.I.T. not be used in
|
13
|
+
* advertising or publicity pertaining to distribution of the
|
14
|
+
* software without specific, written prior permission.
|
15
|
+
* M.I.T. makes no representations about the suitability of
|
16
|
+
* this software for any purpose. It is provided "as is"
|
17
|
+
* without express or implied warranty.
|
18
|
+
*/
|
19
|
+
|
20
|
+
|
21
|
+
/* Node definition for circular, doubly-linked list */
|
22
|
+
struct list_node {
|
23
|
+
struct list_node *prev;
|
24
|
+
struct list_node *next;
|
25
|
+
void* data;
|
26
|
+
};
|
27
|
+
|
28
|
+
void ares__init_list_head(struct list_node* head);
|
29
|
+
|
30
|
+
void ares__init_list_node(struct list_node* node, void* d);
|
31
|
+
|
32
|
+
int ares__is_list_empty(struct list_node* head);
|
33
|
+
|
34
|
+
void ares__insert_in_list(struct list_node* new_node,
|
35
|
+
struct list_node* old_node);
|
36
|
+
|
37
|
+
void ares__remove_from_list(struct list_node* node);
|
38
|
+
|
39
|
+
#endif /* __ARES_LLIST_H */
|
@@ -0,0 +1,24 @@
|
|
1
|
+
|
2
|
+
/* Copyright 1998 by the Massachusetts Institute of Technology.
|
3
|
+
*
|
4
|
+
* Permission to use, copy, modify, and distribute this
|
5
|
+
* software and its documentation for any purpose and without
|
6
|
+
* fee is hereby granted, provided that the above copyright
|
7
|
+
* notice appear in all copies and that both that copyright
|
8
|
+
* notice and this permission notice appear in supporting
|
9
|
+
* documentation, and that the name of M.I.T. not be used in
|
10
|
+
* advertising or publicity pertaining to distribution of the
|
11
|
+
* software without specific, written prior permission.
|
12
|
+
* M.I.T. makes no representations about the suitability of
|
13
|
+
* this software for any purpose. It is provided "as is"
|
14
|
+
* without express or implied warranty.
|
15
|
+
*/
|
16
|
+
|
17
|
+
#include "ares_setup.h"
|
18
|
+
#include "ares.h"
|
19
|
+
|
20
|
+
int ares_mkquery(const char *name, int dnsclass, int type, unsigned short id,
|
21
|
+
int rd, unsigned char **buf, int *buflen)
|
22
|
+
{
|
23
|
+
return ares_create_query(name, dnsclass, type, id, rd, buf, buflen, 0);
|
24
|
+
}
|
@@ -0,0 +1,260 @@
|
|
1
|
+
|
2
|
+
/* Copyright (C) 2010-2013 by Daniel Stenberg
|
3
|
+
*
|
4
|
+
* Permission to use, copy, modify, and distribute this
|
5
|
+
* software and its documentation for any purpose and without
|
6
|
+
* fee is hereby granted, provided that the above copyright
|
7
|
+
* notice appear in all copies and that both that copyright
|
8
|
+
* notice and this permission notice appear in supporting
|
9
|
+
* documentation, and that the name of M.I.T. not be used in
|
10
|
+
* advertising or publicity pertaining to distribution of the
|
11
|
+
* software without specific, written prior permission.
|
12
|
+
* M.I.T. makes no representations about the suitability of
|
13
|
+
* this software for any purpose. It is provided "as is"
|
14
|
+
* without express or implied warranty.
|
15
|
+
*/
|
16
|
+
|
17
|
+
|
18
|
+
#include "ares_setup.h"
|
19
|
+
|
20
|
+
#ifdef HAVE_ASSERT_H
|
21
|
+
# include <assert.h>
|
22
|
+
#endif
|
23
|
+
|
24
|
+
#ifdef HAVE_LIMITS_H
|
25
|
+
#include <limits.h>
|
26
|
+
#endif
|
27
|
+
|
28
|
+
#if defined(__INTEL_COMPILER) && defined(__unix__)
|
29
|
+
|
30
|
+
#ifdef HAVE_NETINET_IN_H
|
31
|
+
# include <netinet/in.h>
|
32
|
+
#endif
|
33
|
+
#ifdef HAVE_ARPA_INET_H
|
34
|
+
# include <arpa/inet.h>
|
35
|
+
#endif
|
36
|
+
|
37
|
+
#endif /* __INTEL_COMPILER && __unix__ */
|
38
|
+
|
39
|
+
#define BUILDING_ARES_NOWARN_C 1
|
40
|
+
|
41
|
+
#include "ares_nowarn.h"
|
42
|
+
|
43
|
+
#ifndef HAVE_LIMITS_H
|
44
|
+
/* systems without <limits.h> we guess have 16 bit shorts, 32bit ints and
|
45
|
+
32bit longs */
|
46
|
+
# define CARES_MASK_SSHORT 0x7FFF
|
47
|
+
# define CARES_MASK_USHORT 0xFFFF
|
48
|
+
# define CARES_MASK_SINT 0x7FFFFFFF
|
49
|
+
# define CARES_MASK_UINT 0xFFFFFFFF
|
50
|
+
# define CARES_MASK_SLONG 0x7FFFFFFFL
|
51
|
+
# define CARES_MASK_ULONG 0xFFFFFFFFUL
|
52
|
+
#else
|
53
|
+
# define CARES_MASK_SSHORT SHRT_MAX
|
54
|
+
# define CARES_MASK_USHORT USHRT_MAX
|
55
|
+
# define CARES_MASK_SINT INT_MAX
|
56
|
+
# define CARES_MASK_UINT UINT_MAX
|
57
|
+
# define CARES_MASK_SLONG LONG_MAX
|
58
|
+
# define CARES_MASK_ULONG ULONG_MAX
|
59
|
+
#endif
|
60
|
+
|
61
|
+
/*
|
62
|
+
** unsigned size_t to signed long
|
63
|
+
*/
|
64
|
+
|
65
|
+
long aresx_uztosl(size_t uznum)
|
66
|
+
{
|
67
|
+
#ifdef __INTEL_COMPILER
|
68
|
+
# pragma warning(push)
|
69
|
+
# pragma warning(disable:810) /* conversion may lose significant bits */
|
70
|
+
#endif
|
71
|
+
|
72
|
+
return (long)(uznum & (size_t) CARES_MASK_SLONG);
|
73
|
+
|
74
|
+
#ifdef __INTEL_COMPILER
|
75
|
+
# pragma warning(pop)
|
76
|
+
#endif
|
77
|
+
}
|
78
|
+
|
79
|
+
/*
|
80
|
+
** unsigned size_t to signed int
|
81
|
+
*/
|
82
|
+
|
83
|
+
int aresx_uztosi(size_t uznum)
|
84
|
+
{
|
85
|
+
#ifdef __INTEL_COMPILER
|
86
|
+
# pragma warning(push)
|
87
|
+
# pragma warning(disable:810) /* conversion may lose significant bits */
|
88
|
+
#endif
|
89
|
+
|
90
|
+
return (int)(uznum & (size_t) CARES_MASK_SINT);
|
91
|
+
|
92
|
+
#ifdef __INTEL_COMPILER
|
93
|
+
# pragma warning(pop)
|
94
|
+
#endif
|
95
|
+
}
|
96
|
+
|
97
|
+
/*
|
98
|
+
** unsigned size_t to signed short
|
99
|
+
*/
|
100
|
+
|
101
|
+
short aresx_uztoss(size_t uznum)
|
102
|
+
{
|
103
|
+
#ifdef __INTEL_COMPILER
|
104
|
+
# pragma warning(push)
|
105
|
+
# pragma warning(disable:810) /* conversion may lose significant bits */
|
106
|
+
#endif
|
107
|
+
|
108
|
+
return (short)(uznum & (size_t) CARES_MASK_SSHORT);
|
109
|
+
|
110
|
+
#ifdef __INTEL_COMPILER
|
111
|
+
# pragma warning(pop)
|
112
|
+
#endif
|
113
|
+
}
|
114
|
+
|
115
|
+
/*
|
116
|
+
** signed int to signed short
|
117
|
+
*/
|
118
|
+
|
119
|
+
short aresx_sitoss(int sinum)
|
120
|
+
{
|
121
|
+
#ifdef __INTEL_COMPILER
|
122
|
+
# pragma warning(push)
|
123
|
+
# pragma warning(disable:810) /* conversion may lose significant bits */
|
124
|
+
#endif
|
125
|
+
|
126
|
+
DEBUGASSERT(sinum >= 0);
|
127
|
+
return (short)(sinum & (int) CARES_MASK_SSHORT);
|
128
|
+
|
129
|
+
#ifdef __INTEL_COMPILER
|
130
|
+
# pragma warning(pop)
|
131
|
+
#endif
|
132
|
+
}
|
133
|
+
|
134
|
+
/*
|
135
|
+
** signed long to signed int
|
136
|
+
*/
|
137
|
+
|
138
|
+
int aresx_sltosi(long slnum)
|
139
|
+
{
|
140
|
+
#ifdef __INTEL_COMPILER
|
141
|
+
# pragma warning(push)
|
142
|
+
# pragma warning(disable:810) /* conversion may lose significant bits */
|
143
|
+
#endif
|
144
|
+
|
145
|
+
DEBUGASSERT(slnum >= 0);
|
146
|
+
return (int)(slnum & (long) CARES_MASK_SINT);
|
147
|
+
|
148
|
+
#ifdef __INTEL_COMPILER
|
149
|
+
# pragma warning(pop)
|
150
|
+
#endif
|
151
|
+
}
|
152
|
+
|
153
|
+
/*
|
154
|
+
** signed ssize_t to signed int
|
155
|
+
*/
|
156
|
+
|
157
|
+
int aresx_sztosi(ssize_t sznum)
|
158
|
+
{
|
159
|
+
#ifdef __INTEL_COMPILER
|
160
|
+
# pragma warning(push)
|
161
|
+
# pragma warning(disable:810) /* conversion may lose significant bits */
|
162
|
+
#endif
|
163
|
+
|
164
|
+
DEBUGASSERT(sznum >= 0);
|
165
|
+
return (int)(sznum & (ssize_t) CARES_MASK_SINT);
|
166
|
+
|
167
|
+
#ifdef __INTEL_COMPILER
|
168
|
+
# pragma warning(pop)
|
169
|
+
#endif
|
170
|
+
}
|
171
|
+
|
172
|
+
/*
|
173
|
+
** signed ssize_t to unsigned int
|
174
|
+
*/
|
175
|
+
|
176
|
+
unsigned int aresx_sztoui(ssize_t sznum)
|
177
|
+
{
|
178
|
+
#ifdef __INTEL_COMPILER
|
179
|
+
# pragma warning(push)
|
180
|
+
# pragma warning(disable:810) /* conversion may lose significant bits */
|
181
|
+
#endif
|
182
|
+
|
183
|
+
DEBUGASSERT(sznum >= 0);
|
184
|
+
return (unsigned int)(sznum & (ssize_t) CARES_MASK_UINT);
|
185
|
+
|
186
|
+
#ifdef __INTEL_COMPILER
|
187
|
+
# pragma warning(pop)
|
188
|
+
#endif
|
189
|
+
}
|
190
|
+
|
191
|
+
/*
|
192
|
+
** signed int to unsigned short
|
193
|
+
*/
|
194
|
+
|
195
|
+
unsigned short aresx_sitous(int sinum)
|
196
|
+
{
|
197
|
+
#ifdef __INTEL_COMPILER
|
198
|
+
# pragma warning(push)
|
199
|
+
# pragma warning(disable:810) /* conversion may lose significant bits */
|
200
|
+
#endif
|
201
|
+
|
202
|
+
DEBUGASSERT(sinum >= 0);
|
203
|
+
return (unsigned short)(sinum & (int) CARES_MASK_USHORT);
|
204
|
+
|
205
|
+
#ifdef __INTEL_COMPILER
|
206
|
+
# pragma warning(pop)
|
207
|
+
#endif
|
208
|
+
}
|
209
|
+
|
210
|
+
#if defined(__INTEL_COMPILER) && defined(__unix__)
|
211
|
+
|
212
|
+
int aresx_FD_ISSET(int fd, fd_set *fdset)
|
213
|
+
{
|
214
|
+
#pragma warning(push)
|
215
|
+
#pragma warning(disable:1469) /* clobber ignored */
|
216
|
+
return FD_ISSET(fd, fdset);
|
217
|
+
#pragma warning(pop)
|
218
|
+
}
|
219
|
+
|
220
|
+
void aresx_FD_SET(int fd, fd_set *fdset)
|
221
|
+
{
|
222
|
+
#pragma warning(push)
|
223
|
+
#pragma warning(disable:1469) /* clobber ignored */
|
224
|
+
FD_SET(fd, fdset);
|
225
|
+
#pragma warning(pop)
|
226
|
+
}
|
227
|
+
|
228
|
+
void aresx_FD_ZERO(fd_set *fdset)
|
229
|
+
{
|
230
|
+
#pragma warning(push)
|
231
|
+
#pragma warning(disable:593) /* variable was set but never used */
|
232
|
+
FD_ZERO(fdset);
|
233
|
+
#pragma warning(pop)
|
234
|
+
}
|
235
|
+
|
236
|
+
unsigned short aresx_htons(unsigned short usnum)
|
237
|
+
{
|
238
|
+
#if (__INTEL_COMPILER == 910) && defined(__i386__)
|
239
|
+
return (unsigned short)(((usnum << 8) & 0xFF00) | ((usnum >> 8) & 0x00FF));
|
240
|
+
#else
|
241
|
+
#pragma warning(push)
|
242
|
+
#pragma warning(disable:810) /* conversion may lose significant bits */
|
243
|
+
return htons(usnum);
|
244
|
+
#pragma warning(pop)
|
245
|
+
#endif
|
246
|
+
}
|
247
|
+
|
248
|
+
unsigned short aresx_ntohs(unsigned short usnum)
|
249
|
+
{
|
250
|
+
#if (__INTEL_COMPILER == 910) && defined(__i386__)
|
251
|
+
return (unsigned short)(((usnum << 8) & 0xFF00) | ((usnum >> 8) & 0x00FF));
|
252
|
+
#else
|
253
|
+
#pragma warning(push)
|
254
|
+
#pragma warning(disable:810) /* conversion may lose significant bits */
|
255
|
+
return ntohs(usnum);
|
256
|
+
#pragma warning(pop)
|
257
|
+
#endif
|
258
|
+
}
|
259
|
+
|
260
|
+
#endif /* __INTEL_COMPILER && __unix__ */
|
@@ -0,0 +1,61 @@
|
|
1
|
+
#ifndef HEADER_CARES_NOWARN_H
|
2
|
+
#define HEADER_CARES_NOWARN_H
|
3
|
+
|
4
|
+
|
5
|
+
/* Copyright (C) 2010-2012 by Daniel Stenberg
|
6
|
+
*
|
7
|
+
* Permission to use, copy, modify, and distribute this
|
8
|
+
* software and its documentation for any purpose and without
|
9
|
+
* fee is hereby granted, provided that the above copyright
|
10
|
+
* notice appear in all copies and that both that copyright
|
11
|
+
* notice and this permission notice appear in supporting
|
12
|
+
* documentation, and that the name of M.I.T. not be used in
|
13
|
+
* advertising or publicity pertaining to distribution of the
|
14
|
+
* software without specific, written prior permission.
|
15
|
+
* M.I.T. makes no representations about the suitability of
|
16
|
+
* this software for any purpose. It is provided "as is"
|
17
|
+
* without express or implied warranty.
|
18
|
+
*/
|
19
|
+
|
20
|
+
long aresx_uztosl(size_t uznum);
|
21
|
+
int aresx_uztosi(size_t uznum);
|
22
|
+
short aresx_uztoss(size_t uznum);
|
23
|
+
|
24
|
+
short aresx_sitoss(int sinum);
|
25
|
+
|
26
|
+
int aresx_sltosi(long slnum);
|
27
|
+
|
28
|
+
int aresx_sztosi(ssize_t sznum);
|
29
|
+
|
30
|
+
unsigned int aresx_sztoui(ssize_t sznum);
|
31
|
+
|
32
|
+
unsigned short aresx_sitous(int sinum);
|
33
|
+
|
34
|
+
#if defined(__INTEL_COMPILER) && defined(__unix__)
|
35
|
+
|
36
|
+
int aresx_FD_ISSET(int fd, fd_set *fdset);
|
37
|
+
|
38
|
+
void aresx_FD_SET(int fd, fd_set *fdset);
|
39
|
+
|
40
|
+
void aresx_FD_ZERO(fd_set *fdset);
|
41
|
+
|
42
|
+
unsigned short aresx_htons(unsigned short usnum);
|
43
|
+
|
44
|
+
unsigned short aresx_ntohs(unsigned short usnum);
|
45
|
+
|
46
|
+
#ifndef BUILDING_ARES_NOWARN_C
|
47
|
+
# undef FD_ISSET
|
48
|
+
# define FD_ISSET(a,b) aresx_FD_ISSET((a),(b))
|
49
|
+
# undef FD_SET
|
50
|
+
# define FD_SET(a,b) aresx_FD_SET((a),(b))
|
51
|
+
# undef FD_ZERO
|
52
|
+
# define FD_ZERO(a) aresx_FD_ZERO((a))
|
53
|
+
# undef htons
|
54
|
+
# define htons(a) aresx_htons((a))
|
55
|
+
# undef ntohs
|
56
|
+
# define ntohs(a) aresx_ntohs((a))
|
57
|
+
#endif
|
58
|
+
|
59
|
+
#endif /* __INTEL_COMPILER && __unix__ */
|
60
|
+
|
61
|
+
#endif /* HEADER_CARES_NOWARN_H */
|