diff options
60 files changed, 3975 insertions, 163 deletions
diff --git a/.gitmodules b/.gitmodules index 92d5ac3e4f..12956229c6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -17,6 +17,10 @@ [submodule "third_party/nanopb"] path = third_party/nanopb url = https://github.com/nanopb/nanopb.git +[submodule "third_party/c-ares"] + path = third_party/c-ares + url = https://github.com/c-ares/c-ares.git + branch = cares-1_11_0 [submodule "third_party/thrift"] path = third_party/thrift url = https://github.com/apache/thrift.git @@ -303,6 +303,8 @@ cc_library( "src/core/ext/lb_policy/grpclb/grpclb.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", + "src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver.h", + "src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.h", "src/core/ext/load_reporting/load_reporting.h", "src/core/ext/load_reporting/load_reporting_filter.h", "src/core/ext/census/aggregation.h", @@ -484,6 +486,10 @@ cc_library( "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c", "src/core/ext/lb_policy/pick_first/pick_first.c", "src/core/ext/lb_policy/round_robin/round_robin.c", + "src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c", + "src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c", + "src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c", + "src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c", "src/core/ext/resolver/dns/native/dns_resolver.c", "src/core/ext/resolver/sockaddr/sockaddr_resolver.c", "src/core/ext/load_reporting/load_reporting.c", @@ -1025,6 +1031,8 @@ cc_library( "src/core/ext/client_config/subchannel_call_holder.h", "src/core/ext/client_config/subchannel_index.h", "src/core/ext/client_config/uri_parser.h", + "src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver.h", + "src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.h", "src/core/ext/load_reporting/load_reporting.h", "src/core/ext/load_reporting/load_reporting_filter.h", "src/core/ext/lb_policy/grpclb/grpclb.h", @@ -1175,6 +1183,10 @@ cc_library( "src/core/ext/client_config/subchannel_call_holder.c", "src/core/ext/client_config/subchannel_index.c", "src/core/ext/client_config/uri_parser.c", + "src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c", + "src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c", + "src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c", + "src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c", "src/core/ext/resolver/dns/native/dns_resolver.c", "src/core/ext/resolver/sockaddr/sockaddr_resolver.c", "src/core/ext/load_reporting/load_reporting.c", @@ -2330,6 +2342,10 @@ objc_library( "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c", "src/core/ext/lb_policy/pick_first/pick_first.c", "src/core/ext/lb_policy/round_robin/round_robin.c", + "src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c", + "src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c", + "src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c", + "src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c", "src/core/ext/resolver/dns/native/dns_resolver.c", "src/core/ext/resolver/sockaddr/sockaddr_resolver.c", "src/core/ext/load_reporting/load_reporting.c", @@ -2523,6 +2539,8 @@ objc_library( "src/core/ext/lb_policy/grpclb/grpclb.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", + "src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver.h", + "src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.h", "src/core/ext/load_reporting/load_reporting.h", "src/core/ext/load_reporting/load_reporting_filter.h", "src/core/ext/census/aggregation.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index fbcc6bbeae..bba06df3b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -463,6 +463,10 @@ add_library(grpc third_party/nanopb/pb_encode.c src/core/ext/lb_policy/pick_first/pick_first.c src/core/ext/lb_policy/round_robin/round_robin.c + src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c + src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c + src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c + src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c src/core/ext/resolver/dns/native/dns_resolver.c src/core/ext/resolver/sockaddr/sockaddr_resolver.c src/core/ext/load_reporting/load_reporting.c @@ -915,6 +919,10 @@ add_library(grpc_unsecure src/core/ext/client_config/subchannel_call_holder.c src/core/ext/client_config/subchannel_index.c src/core/ext/client_config/uri_parser.c + src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c + src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c + src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c + src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c src/core/ext/resolver/dns/native/dns_resolver.c src/core/ext/resolver/sockaddr/sockaddr_resolver.c src/core/ext/load_reporting/load_reporting.c @@ -493,6 +493,7 @@ OPENSSL_ALPN_CHECK_CMD = $(PKG_CONFIG) --atleast-version=1.0.2 openssl OPENSSL_NPN_CHECK_CMD = $(PKG_CONFIG) --atleast-version=1.0.1 openssl ZLIB_CHECK_CMD = $(PKG_CONFIG) --exists zlib PROTOBUF_CHECK_CMD = $(PKG_CONFIG) --atleast-version=3.0.0 protobuf +CARES_CHECK_CMD = $(PKG_CONFIG) --exists libcares else # HAS_PKG_CONFIG ifeq ($(SYSTEM),MINGW32) @@ -506,6 +507,7 @@ OPENSSL_NPN_CHECK_CMD = $(CC) $(CPPFLAGS) $(CFLAGS) -o $(TMPOUT) test/build/open BORINGSSL_COMPILE_CHECK_CMD = $(CC) $(CPPFLAGS) -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) -o $(TMPOUT) test/build/boringssl.c $(LDFLAGS) ZLIB_CHECK_CMD = $(CC) $(CPPFLAGS) $(CFLAGS) -o $(TMPOUT) test/build/zlib.c -lz $(LDFLAGS) PROTOBUF_CHECK_CMD = $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $(TMPOUT) test/build/protobuf.cc -lprotobuf $(LDFLAGS) +CARES_CHECK_CMD = $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $(TMPOUT) test/build/c-ares.c -lcares $(LDFLAGS) endif # HAS_PKG_CONFIG @@ -545,12 +547,17 @@ HAS_SYSTEM_PROTOBUF ?= $(HAS_SYSTEM_PROTOBUF_VERIFY) ifeq ($(HAS_SYSTEM_PROTOBUF),true) CACHE_MK += HAS_SYSTEM_PROTOBUF = true, endif +HAS_SYSTEM_CARES ?= $(shell $(CARES_CHECK_CMD) 2> /dev/null && echo true || echo false) +ifeq ($(HAS_SYSTEM_CARES),true) +CACHE_MK += HAS_SYSTEM_CARES = true, +endif else # override system libraries if the config requires a custom compiled library HAS_SYSTEM_OPENSSL_ALPN = false HAS_SYSTEM_OPENSSL_NPN = false HAS_SYSTEM_ZLIB = false HAS_SYSTEM_PROTOBUF = false +HAS_SYSTEM_CARES = false endif HAS_PROTOC ?= $(shell $(PROTOC_CHECK_CMD) 2> /dev/null && echo true || echo false) @@ -609,6 +616,12 @@ else HAS_EMBEDDED_PROTOBUF = true endif +ifeq ($(wildcard third_party/c-ares/ares.h),) +HAS_EMBEDDED_CARES = false +else +HAS_EMBEDDED_CARES = true +endif + PC_REQUIRES_GRPC = PC_LIBS_GRPC = @@ -641,6 +654,37 @@ LIBS += z endif endif +CARES_PKG_CONFIG = false + +ifeq ($(HAS_SYSTEM_CARES),false) +ifeq ($(HAS_EMBEDDED_CARES), true) +EMBED_CARES ?= true +else +DEP_MISSING += cares +EMBED_CARES ?= broken +endif +else +EMBED_CARES ?= false +endif + +ifeq ($(EMBED_CARES),true) +CARES_DEP = $(LIBDIR)/$(CONFIG)/libares.a +CARES_MERGE_OBJS = $(LIBARES_OBJS) +CARES_MERGE_LIBS = $(LIBDIR)/$(CONFIG)/libares.a +CPPFLAGS := -Ithird_party/c-ares -Isrc/c-ares $(CPPFLAGS) +LDFLAGS := -L$(LIBDIR)/$(CONFIG)/c-ares $(LDFLAGS) +else +ifeq ($(HAS_PKG_CONFIG),true) +PC_REQUIRES_GRPC += libcares +CPPFLAGS += $(shell $(PKG_CONFIG) --cflags libcares) +LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-L libcares) +LIBS += $(patsubst -l%,%,$(shell $(PKG_CONFIG) --libs-only-l libcares)) +else +PC_LIBS_GRPC += -lcares +LIBS += cares +endif +endif + OPENSSL_PKG_CONFIG = false PC_REQUIRES_SECURE = @@ -1169,6 +1213,7 @@ run_dep_checks: $(PERFTOOLS_CHECK_CMD) || true $(PROTOBUF_CHECK_CMD) || true $(PROTOC_CHECK_VERSION_CMD) || true + $(CARES_CHECK_CMD) || true third_party/protobuf/configure: $(E) "[AUTOGEN] Preparing protobuf" @@ -1203,7 +1248,7 @@ plugins: $(PROTOC_PLUGINS) privatelibs: privatelibs_c privatelibs_cxx -privatelibs_c: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libreconnect_server.a $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libz.a $(LIBDIR)/$(CONFIG)/libbad_client_test.a $(LIBDIR)/$(CONFIG)/libbad_ssl_test_server.a $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a +privatelibs_c: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libreconnect_server.a $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libz.a $(LIBDIR)/$(CONFIG)/libares.a $(LIBDIR)/$(CONFIG)/libbad_client_test.a $(LIBDIR)/$(CONFIG)/libbad_ssl_test_server.a $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a pc_c: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc.pc pc_c_unsecure: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc_unsecure.pc @@ -2446,7 +2491,7 @@ PUBLIC_HEADERS_C += \ LIBGPR_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGPR_SRC)))) -$(LIBDIR)/$(CONFIG)/libgpr.a: $(ZLIB_DEP) $(LIBGPR_OBJS) +$(LIBDIR)/$(CONFIG)/libgpr.a: $(ZLIB_DEP) $(CARES_DEP) $(LIBGPR_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgpr.a @@ -2458,18 +2503,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION).$(SHARED_EXT): $(LIBGPR_OBJS) $(ZLIB_DEP) +$(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION).$(SHARED_EXT): $(LIBGPR_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared gpr.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION).$(SHARED_EXT) $(LIBGPR_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared gpr.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION).$(SHARED_EXT) $(LIBGPR_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) else -$(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION).$(SHARED_EXT): $(LIBGPR_OBJS) $(ZLIB_DEP) +$(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION).$(SHARED_EXT): $(LIBGPR_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION).$(SHARED_EXT) $(LIBGPR_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION).$(SHARED_EXT) $(LIBGPR_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) else - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgpr.so.1 -o $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION).$(SHARED_EXT) $(LIBGPR_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgpr.so.1 -o $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION).$(SHARED_EXT) $(LIBGPR_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION).so.1 $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION).so endif @@ -2488,7 +2533,7 @@ PUBLIC_HEADERS_C += \ LIBGPR_TEST_UTIL_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGPR_TEST_UTIL_SRC)))) -$(LIBDIR)/$(CONFIG)/libgpr_test_util.a: $(ZLIB_DEP) $(LIBGPR_TEST_UTIL_OBJS) +$(LIBDIR)/$(CONFIG)/libgpr_test_util.a: $(ZLIB_DEP) $(CARES_DEP) $(LIBGPR_TEST_UTIL_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgpr_test_util.a @@ -2679,6 +2724,10 @@ LIBGRPC_SRC = \ third_party/nanopb/pb_encode.c \ src/core/ext/lb_policy/pick_first/pick_first.c \ src/core/ext/lb_policy/round_robin/round_robin.c \ + src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c \ + src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c \ + src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c \ + src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c \ src/core/ext/resolver/dns/native/dns_resolver.c \ src/core/ext/resolver/sockaddr/sockaddr_resolver.c \ src/core/ext/load_reporting/load_reporting.c \ @@ -2743,11 +2792,11 @@ $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT): openssl else -$(LIBDIR)/$(CONFIG)/libgrpc.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(LIBGRPC_OBJS) $(LIBGPR_OBJS) $(ZLIB_MERGE_OBJS) $(OPENSSL_MERGE_OBJS) +$(LIBDIR)/$(CONFIG)/libgrpc.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(LIBGRPC_OBJS) $(LIBGPR_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(OPENSSL_MERGE_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBGRPC_OBJS) $(LIBGPR_OBJS) $(ZLIB_MERGE_OBJS) $(OPENSSL_MERGE_OBJS) + $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBGRPC_OBJS) $(LIBGPR_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(OPENSSL_MERGE_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc.a endif @@ -2755,18 +2804,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) else -$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) else - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).so.1 $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).so endif @@ -2993,11 +3042,11 @@ $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT): else -$(LIBDIR)/$(CONFIG)/libgrpc_cronet.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(LIBGRPC_CRONET_OBJS) $(LIBGPR_OBJS) $(ZLIB_MERGE_OBJS) $(OPENSSL_MERGE_OBJS) +$(LIBDIR)/$(CONFIG)/libgrpc_cronet.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(LIBGRPC_CRONET_OBJS) $(LIBGPR_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(OPENSSL_MERGE_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc_cronet.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc_cronet.a $(LIBGRPC_CRONET_OBJS) $(LIBGPR_OBJS) $(ZLIB_MERGE_OBJS) $(OPENSSL_MERGE_OBJS) + $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc_cronet.a $(LIBGRPC_CRONET_OBJS) $(LIBGPR_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(OPENSSL_MERGE_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc_cronet.a endif @@ -3005,18 +3054,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc_cronet$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_CRONET_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/grpc_cronet$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_CRONET_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc_cronet.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_cronet$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_cronet$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CRONET_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc_cronet.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_cronet$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_cronet$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CRONET_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) else -$(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_CRONET_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_CRONET_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CRONET_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CRONET_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) else - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_cronet.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CRONET_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_cronet.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CRONET_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION).so.1 $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION).so endif @@ -3222,7 +3271,7 @@ PUBLIC_HEADERS_C += \ LIBGRPC_TEST_UTIL_UNSECURE_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_TEST_UTIL_UNSECURE_SRC)))) -$(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a: $(ZLIB_DEP) $(LIBGRPC_TEST_UTIL_UNSECURE_OBJS) +$(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a: $(ZLIB_DEP) $(CARES_DEP) $(LIBGRPC_TEST_UTIL_UNSECURE_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a @@ -3376,6 +3425,10 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/client_config/subchannel_call_holder.c \ src/core/ext/client_config/subchannel_index.c \ src/core/ext/client_config/uri_parser.c \ + src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c \ + src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c \ + src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c \ + src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c \ src/core/ext/resolver/dns/native/dns_resolver.c \ src/core/ext/resolver/sockaddr/sockaddr_resolver.c \ src/core/ext/load_reporting/load_reporting.c \ @@ -3436,11 +3489,11 @@ PUBLIC_HEADERS_C += \ LIBGRPC_UNSECURE_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_UNSECURE_SRC)))) -$(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a: $(ZLIB_DEP) $(LIBGRPC_UNSECURE_OBJS) $(LIBGPR_OBJS) $(ZLIB_MERGE_OBJS) +$(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a: $(ZLIB_DEP) $(CARES_DEP) $(LIBGRPC_UNSECURE_OBJS) $(LIBGPR_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBGRPC_UNSECURE_OBJS) $(LIBGPR_OBJS) $(ZLIB_MERGE_OBJS) + $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBGRPC_UNSECURE_OBJS) $(LIBGPR_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a endif @@ -3448,18 +3501,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a +$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc_unsecure.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc_unsecure.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) else -$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a +$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) else - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_unsecure.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_unsecure.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).so.1 $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).so endif @@ -3803,11 +3856,11 @@ $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT): proto else -$(LIBDIR)/$(CONFIG)/libgrpc++.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_OBJS) $(LIBGPR_OBJS) $(ZLIB_MERGE_OBJS) +$(LIBDIR)/$(CONFIG)/libgrpc++.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_OBJS) $(LIBGPR_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBGRPC++_OBJS) $(LIBGPR_OBJS) $(ZLIB_MERGE_OBJS) + $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBGRPC++_OBJS) $(LIBGPR_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++.a endif @@ -3815,18 +3868,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/gpr.$(SHARED_EXT) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/gpr.$(SHARED_EXT) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc-imp -lgpr-imp + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc-imp -lgpr-imp else -$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc -lgpr + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc -lgpr else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc -lgpr + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc -lgpr $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).so.1 $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).so endif @@ -3942,18 +3995,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_REFLECTION_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc++.$(SHARED_EXT) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_REFLECTION_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc++.$(SHARED_EXT) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++_reflection.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_reflection$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_REFLECTION_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc++-imp + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++_reflection.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_reflection$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_REFLECTION_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc++-imp else -$(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_REFLECTION_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc++.$(SHARED_EXT) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_REFLECTION_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc++.$(SHARED_EXT) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_REFLECTION_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc++ + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_REFLECTION_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc++ else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_reflection.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_REFLECTION_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc++ + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_reflection.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_REFLECTION_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc++ $(Q) ln -sf $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).so.1 $(Q) ln -sf $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).so endif @@ -4428,11 +4481,11 @@ $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EX else -$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_UNSECURE_OBJS) $(LIBGPR_OBJS) $(ZLIB_MERGE_OBJS) +$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a: $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_UNSECURE_OBJS) $(LIBGPR_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBGRPC++_UNSECURE_OBJS) $(LIBGPR_OBJS) $(ZLIB_MERGE_OBJS) + $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBGRPC++_UNSECURE_OBJS) $(LIBGPR_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a endif @@ -4440,18 +4493,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/gpr.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/grpc_unsecure.$(SHARED_EXT) +$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/gpr.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/grpc_unsecure.$(SHARED_EXT) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++_unsecure.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr-imp -lgrpc_unsecure-imp + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++_unsecure.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr-imp -lgrpc_unsecure-imp else -$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.$(SHARED_EXT) +$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.$(SHARED_EXT) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_unsecure + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_unsecure else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_unsecure.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_unsecure + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_unsecure.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_unsecure $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).so.1 $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).so endif @@ -4540,7 +4593,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc_plugin_support.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libgrpc_plugin_support.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBGRPC_PLUGIN_SUPPORT_OBJS) +$(LIBDIR)/$(CONFIG)/libgrpc_plugin_support.a: $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBGRPC_PLUGIN_SUPPORT_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc_plugin_support.a @@ -4922,18 +4975,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_CSHARP_EXT_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_CSHARP_EXT_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(if $(subst Linux,,$(SYSTEM)),,-Wl$(comma)-wrap$(comma)memcpy) -L$(LIBDIR)/$(CONFIG) -shared grpc_csharp_ext.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_csharp_ext$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CSHARP_EXT_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) $(if $(subst Linux,,$(SYSTEM)),,-Wl$(comma)-wrap$(comma)memcpy) -L$(LIBDIR)/$(CONFIG) -shared grpc_csharp_ext.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_csharp_ext$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CSHARP_EXT_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) else -$(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_CSHARP_EXT_OBJS) $(ZLIB_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_CSHARP_EXT_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LD) $(LDFLAGS) $(if $(subst Linux,,$(SYSTEM)),,-Wl$(comma)-wrap$(comma)memcpy) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CSHARP_EXT_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) $(if $(subst Linux,,$(SYSTEM)),,-Wl$(comma)-wrap$(comma)memcpy) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CSHARP_EXT_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) else - $(Q) $(LD) $(LDFLAGS) $(if $(subst Linux,,$(SYSTEM)),,-Wl$(comma)-wrap$(comma)memcpy) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_csharp_ext.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CSHARP_EXT_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) + $(Q) $(LD) $(LDFLAGS) $(if $(subst Linux,,$(SYSTEM)),,-Wl$(comma)-wrap$(comma)memcpy) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_csharp_ext.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CSHARP_EXT_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(Q) ln -sf $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION).so.1 $(Q) ln -sf $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION).so endif @@ -5254,7 +5307,7 @@ LIBBORINGSSL_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX $(LIBBORINGSSL_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) -$(LIBDIR)/$(CONFIG)/libboringssl.a: $(ZLIB_DEP) $(LIBBORINGSSL_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl.a: $(ZLIB_DEP) $(CARES_DEP) $(LIBBORINGSSL_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl.a @@ -5292,7 +5345,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libboringssl_test_util.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_TEST_UTIL_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_test_util.a: $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_TEST_UTIL_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a @@ -5330,7 +5383,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_AES_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_AES_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a @@ -5368,7 +5421,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_asn1_test_lib.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libboringssl_asn1_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_ASN1_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_asn1_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_ASN1_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_asn1_test_lib.a @@ -5406,7 +5459,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_base64_test_lib.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libboringssl_base64_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_BASE64_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_base64_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_BASE64_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_base64_test_lib.a @@ -5444,7 +5497,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_bio_test_lib.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libboringssl_bio_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_BIO_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_bio_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_BIO_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_bio_test_lib.a @@ -5482,7 +5535,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_bn_test_lib.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libboringssl_bn_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_BN_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_bn_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_BN_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_bn_test_lib.a @@ -5520,7 +5573,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_bytestring_test_lib.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libboringssl_bytestring_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_BYTESTRING_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_bytestring_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_BYTESTRING_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_bytestring_test_lib.a @@ -5558,7 +5611,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_aead_test_lib.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libboringssl_aead_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_AEAD_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_aead_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_AEAD_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_aead_test_lib.a @@ -5596,7 +5649,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_cipher_test_lib.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libboringssl_cipher_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_CIPHER_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_cipher_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_CIPHER_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_cipher_test_lib.a @@ -5634,7 +5687,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_cmac_test_lib.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libboringssl_cmac_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_CMAC_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_cmac_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_CMAC_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_cmac_test_lib.a @@ -5663,7 +5716,7 @@ LIBBORINGSSL_CONSTANT_TIME_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(a $(LIBBORINGSSL_CONSTANT_TIME_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX $(LIBBORINGSSL_CONSTANT_TIME_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) -$(LIBDIR)/$(CONFIG)/libboringssl_constant_time_test_lib.a: $(ZLIB_DEP) $(LIBBORINGSSL_CONSTANT_TIME_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_constant_time_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(LIBBORINGSSL_CONSTANT_TIME_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_constant_time_test_lib.a @@ -5699,7 +5752,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_ed25519_test_lib.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libboringssl_ed25519_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_ED25519_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_ed25519_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_ED25519_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_ed25519_test_lib.a @@ -5737,7 +5790,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_x25519_test_lib.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libboringssl_x25519_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_X25519_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_x25519_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_X25519_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_x25519_test_lib.a @@ -5775,7 +5828,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_dh_test_lib.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libboringssl_dh_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_DH_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_dh_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_DH_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_dh_test_lib.a @@ -5813,7 +5866,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_digest_test_lib.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libboringssl_digest_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_DIGEST_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_digest_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_DIGEST_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_digest_test_lib.a @@ -5842,7 +5895,7 @@ LIBBORINGSSL_DSA_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix . $(LIBBORINGSSL_DSA_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX $(LIBBORINGSSL_DSA_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) -$(LIBDIR)/$(CONFIG)/libboringssl_dsa_test_lib.a: $(ZLIB_DEP) $(LIBBORINGSSL_DSA_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_dsa_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(LIBBORINGSSL_DSA_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_dsa_test_lib.a @@ -5878,7 +5931,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_ec_test_lib.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libboringssl_ec_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_EC_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_ec_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_EC_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_ec_test_lib.a @@ -5907,7 +5960,7 @@ LIBBORINGSSL_EXAMPLE_MUL_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffi $(LIBBORINGSSL_EXAMPLE_MUL_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX $(LIBBORINGSSL_EXAMPLE_MUL_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) -$(LIBDIR)/$(CONFIG)/libboringssl_example_mul_lib.a: $(ZLIB_DEP) $(LIBBORINGSSL_EXAMPLE_MUL_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_example_mul_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(LIBBORINGSSL_EXAMPLE_MUL_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_example_mul_lib.a @@ -5943,7 +5996,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_test_lib.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_ECDSA_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_ECDSA_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_test_lib.a @@ -5981,7 +6034,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_err_test_lib.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libboringssl_err_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_ERR_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_err_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_ERR_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_err_test_lib.a @@ -6019,7 +6072,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_evp_extra_test_lib.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libboringssl_evp_extra_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_EVP_EXTRA_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_evp_extra_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_EVP_EXTRA_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_evp_extra_test_lib.a @@ -6057,7 +6110,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_evp_test_lib.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libboringssl_evp_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_EVP_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_evp_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_EVP_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_evp_test_lib.a @@ -6095,7 +6148,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_pbkdf_test_lib.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libboringssl_pbkdf_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_PBKDF_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_pbkdf_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_PBKDF_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_pbkdf_test_lib.a @@ -6124,7 +6177,7 @@ LIBBORINGSSL_HKDF_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix $(LIBBORINGSSL_HKDF_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX $(LIBBORINGSSL_HKDF_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) -$(LIBDIR)/$(CONFIG)/libboringssl_hkdf_test_lib.a: $(ZLIB_DEP) $(LIBBORINGSSL_HKDF_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_hkdf_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(LIBBORINGSSL_HKDF_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_hkdf_test_lib.a @@ -6160,7 +6213,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_hmac_test_lib.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libboringssl_hmac_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_HMAC_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_hmac_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_HMAC_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_hmac_test_lib.a @@ -6189,7 +6242,7 @@ LIBBORINGSSL_LHASH_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix $(LIBBORINGSSL_LHASH_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX $(LIBBORINGSSL_LHASH_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) -$(LIBDIR)/$(CONFIG)/libboringssl_lhash_test_lib.a: $(ZLIB_DEP) $(LIBBORINGSSL_LHASH_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_lhash_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(LIBBORINGSSL_LHASH_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_lhash_test_lib.a @@ -6216,7 +6269,7 @@ LIBBORINGSSL_GCM_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix . $(LIBBORINGSSL_GCM_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX $(LIBBORINGSSL_GCM_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) -$(LIBDIR)/$(CONFIG)/libboringssl_gcm_test_lib.a: $(ZLIB_DEP) $(LIBBORINGSSL_GCM_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_gcm_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(LIBBORINGSSL_GCM_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_gcm_test_lib.a @@ -6252,7 +6305,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_pkcs12_test_lib.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libboringssl_pkcs12_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_PKCS12_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_pkcs12_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_PKCS12_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_pkcs12_test_lib.a @@ -6290,7 +6343,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_pkcs8_test_lib.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libboringssl_pkcs8_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_PKCS8_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_pkcs8_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_PKCS8_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_pkcs8_test_lib.a @@ -6328,7 +6381,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_poly1305_test_lib.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libboringssl_poly1305_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_POLY1305_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_poly1305_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_POLY1305_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_poly1305_test_lib.a @@ -6357,7 +6410,7 @@ LIBBORINGSSL_REFCOUNT_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuf $(LIBBORINGSSL_REFCOUNT_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX $(LIBBORINGSSL_REFCOUNT_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) -$(LIBDIR)/$(CONFIG)/libboringssl_refcount_test_lib.a: $(ZLIB_DEP) $(LIBBORINGSSL_REFCOUNT_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_refcount_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(LIBBORINGSSL_REFCOUNT_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_refcount_test_lib.a @@ -6393,7 +6446,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_rsa_test_lib.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libboringssl_rsa_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_RSA_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_rsa_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_RSA_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_rsa_test_lib.a @@ -6422,7 +6475,7 @@ LIBBORINGSSL_THREAD_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffi $(LIBBORINGSSL_THREAD_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX $(LIBBORINGSSL_THREAD_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) -$(LIBDIR)/$(CONFIG)/libboringssl_thread_test_lib.a: $(ZLIB_DEP) $(LIBBORINGSSL_THREAD_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_thread_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(LIBBORINGSSL_THREAD_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_thread_test_lib.a @@ -6449,7 +6502,7 @@ LIBBORINGSSL_PKCS7_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix $(LIBBORINGSSL_PKCS7_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX $(LIBBORINGSSL_PKCS7_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) -$(LIBDIR)/$(CONFIG)/libboringssl_pkcs7_test_lib.a: $(ZLIB_DEP) $(LIBBORINGSSL_PKCS7_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_pkcs7_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(LIBBORINGSSL_PKCS7_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_pkcs7_test_lib.a @@ -6485,7 +6538,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_x509_test_lib.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libboringssl_x509_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_X509_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_x509_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_X509_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_x509_test_lib.a @@ -6514,7 +6567,7 @@ LIBBORINGSSL_TAB_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix . $(LIBBORINGSSL_TAB_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX $(LIBBORINGSSL_TAB_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) -$(LIBDIR)/$(CONFIG)/libboringssl_tab_test_lib.a: $(ZLIB_DEP) $(LIBBORINGSSL_TAB_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_tab_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(LIBBORINGSSL_TAB_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_tab_test_lib.a @@ -6541,7 +6594,7 @@ LIBBORINGSSL_V3NAME_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffi $(LIBBORINGSSL_V3NAME_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX $(LIBBORINGSSL_V3NAME_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) -$(LIBDIR)/$(CONFIG)/libboringssl_v3name_test_lib.a: $(ZLIB_DEP) $(LIBBORINGSSL_V3NAME_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_v3name_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(LIBBORINGSSL_V3NAME_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_v3name_test_lib.a @@ -6568,7 +6621,7 @@ LIBBORINGSSL_PQUEUE_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffi $(LIBBORINGSSL_PQUEUE_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX $(LIBBORINGSSL_PQUEUE_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) -$(LIBDIR)/$(CONFIG)/libboringssl_pqueue_test_lib.a: $(ZLIB_DEP) $(LIBBORINGSSL_PQUEUE_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_pqueue_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(LIBBORINGSSL_PQUEUE_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_pqueue_test_lib.a @@ -6604,7 +6657,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_ssl_test_lib.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libboringssl_ssl_test_lib.a: $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_SSL_TEST_LIB_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_ssl_test_lib.a: $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_SSL_TEST_LIB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_ssl_test_lib.a @@ -6646,7 +6699,7 @@ LIBZ_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBZ_ $(LIBZ_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-implicit-function-declaration $(W_NO_SHIFT_NEGATIVE_VALUE) -fvisibility=hidden -$(LIBDIR)/$(CONFIG)/libz.a: $(LIBZ_OBJS) +$(LIBDIR)/$(CONFIG)/libz.a: $(CARES_DEP) $(LIBZ_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libz.a @@ -6663,6 +6716,81 @@ ifneq ($(NO_DEPS),true) endif +LIBARES_SRC = \ + third_party/c-ares/ares__close_sockets.c \ + third_party/c-ares/ares__get_hostent.c \ + third_party/c-ares/ares__read_line.c \ + third_party/c-ares/ares__timeval.c \ + third_party/c-ares/ares_cancel.c \ + third_party/c-ares/ares_create_query.c \ + third_party/c-ares/ares_data.c \ + third_party/c-ares/ares_destroy.c \ + third_party/c-ares/ares_expand_name.c \ + third_party/c-ares/ares_expand_string.c \ + third_party/c-ares/ares_fds.c \ + third_party/c-ares/ares_free_hostent.c \ + third_party/c-ares/ares_free_string.c \ + third_party/c-ares/ares_getenv.c \ + third_party/c-ares/ares_gethostbyaddr.c \ + third_party/c-ares/ares_gethostbyname.c \ + third_party/c-ares/ares_getnameinfo.c \ + third_party/c-ares/ares_getopt.c \ + third_party/c-ares/ares_getsock.c \ + third_party/c-ares/ares_init.c \ + third_party/c-ares/ares_library_init.c \ + third_party/c-ares/ares_llist.c \ + third_party/c-ares/ares_mkquery.c \ + third_party/c-ares/ares_nowarn.c \ + third_party/c-ares/ares_options.c \ + third_party/c-ares/ares_parse_a_reply.c \ + third_party/c-ares/ares_parse_aaaa_reply.c \ + third_party/c-ares/ares_parse_mx_reply.c \ + third_party/c-ares/ares_parse_naptr_reply.c \ + third_party/c-ares/ares_parse_ns_reply.c \ + third_party/c-ares/ares_parse_ptr_reply.c \ + third_party/c-ares/ares_parse_soa_reply.c \ + third_party/c-ares/ares_parse_srv_reply.c \ + third_party/c-ares/ares_parse_txt_reply.c \ + third_party/c-ares/ares_platform.c \ + third_party/c-ares/ares_process.c \ + third_party/c-ares/ares_query.c \ + third_party/c-ares/ares_search.c \ + third_party/c-ares/ares_send.c \ + third_party/c-ares/ares_strcasecmp.c \ + third_party/c-ares/ares_strdup.c \ + third_party/c-ares/ares_strerror.c \ + third_party/c-ares/ares_timeout.c \ + third_party/c-ares/ares_version.c \ + third_party/c-ares/ares_writev.c \ + third_party/c-ares/bitncmp.c \ + third_party/c-ares/inet_net_pton.c \ + third_party/c-ares/inet_ntop.c \ + third_party/c-ares/windows_port.c \ + +PUBLIC_HEADERS_C += \ + +LIBARES_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBARES_SRC)))) + +$(LIBARES_OBJS): CPPFLAGS += -Ithird_party/c-ares -Isrc/c-ares $(if $(subst Linux,,$(SYSTEM)),,-Isrc/c-ares/config_linux) $(if $(subst Darwin,,$(SYSTEM)),,-Isrc/c-ares/config_darwin) -fvisibility=hidden -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -DHAVE_CONFIG_H +$(LIBARES_OBJS): CFLAGS += -Wno-sign-conversion -Wno-invalid-source-encoding + +$(LIBDIR)/$(CONFIG)/libares.a: $(ZLIB_DEP) $(LIBARES_OBJS) + $(E) "[AR] Creating $@" + $(Q) mkdir -p `dirname $@` + $(Q) rm -f $(LIBDIR)/$(CONFIG)/libares.a + $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libares.a $(LIBARES_OBJS) +ifeq ($(SYSTEM),Darwin) + $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libares.a +endif + + + + +ifneq ($(NO_DEPS),true) +-include $(LIBARES_OBJS:.o=.dep) +endif + + LIBBAD_CLIENT_TEST_SRC = \ test/core/bad_client/bad_client.c \ @@ -6871,7 +6999,7 @@ PUBLIC_HEADERS_C += \ LIBEND2END_NOSEC_TESTS_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_NOSEC_TESTS_SRC)))) -$(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a: $(ZLIB_DEP) $(LIBEND2END_NOSEC_TESTS_OBJS) +$(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a: $(ZLIB_DEP) $(CARES_DEP) $(LIBEND2END_NOSEC_TESTS_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a diff --git a/PYTHON-MANIFEST.in b/PYTHON-MANIFEST.in index adeb390649..846530532d 100644 --- a/PYTHON-MANIFEST.in +++ b/PYTHON-MANIFEST.in @@ -7,6 +7,7 @@ graft include/grpc graft third_party/boringssl graft third_party/nanopb graft third_party/zlib +graft third_party/c-ares include src/python/grpcio/_spawn_patch.py include src/python/grpcio/commands.py include src/python/grpcio/grpc_version.py diff --git a/binding.gyp b/binding.gyp index 17dbfc0d38..5860f7cffc 100644 --- a/binding.gyp +++ b/binding.gyp @@ -46,7 +46,8 @@ ['OS == "win"', { "include_dirs": [ "third_party/boringssl/include", - "third_party/zlib" + "third_party/zlib", + "third_party/c-ares" ], "defines": [ '_WIN32_WINNT=0x0600', @@ -84,7 +85,8 @@ ], 'include_dirs': [ '<(node_root_dir)/deps/openssl/openssl/include', - '<(node_root_dir)/deps/zlib' + '<(node_root_dir)/deps/zlib', + '<(node_root_dir)/deps/cares/include', ], 'conditions': [ ['config=="gcov"', { @@ -483,6 +485,7 @@ }] ], 'targets': [ + { 'cflags': [ '-std=c99', @@ -560,6 +563,7 @@ 'type': 'static_library', 'dependencies': [ 'gpr', + 'node_modules/cares/deps/cares/cares.gyp:cares', ], 'sources': [ 'src/core/lib/surface/init.c', @@ -735,6 +739,10 @@ 'third_party/nanopb/pb_encode.c', 'src/core/ext/lb_policy/pick_first/pick_first.c', 'src/core/ext/lb_policy/round_robin/round_robin.c', + 'src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c', + 'src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c', + 'src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c', + 'src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c', 'src/core/ext/resolver/dns/native/dns_resolver.c', 'src/core/ext/resolver/sockaddr/sockaddr_resolver.c', 'src/core/ext/load_reporting/load_reporting.c', @@ -815,6 +823,7 @@ "dependencies": [ "grpc", "gpr", + "node_modules/cares/deps/cares/cares.gyp:cares", ] }, { diff --git a/build.yaml b/build.yaml index 506a02920c..c594d2e64b 100644 --- a/build.yaml +++ b/build.yaml @@ -419,10 +419,22 @@ filegroups: plugin: grpc_load_reporting_plugin uses: - grpc_base +- name: grpc_resolver_dns_ares + headers: + - src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver.h + - src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.h + src: + - src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c + - src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c + - src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c + - src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c + plugin: grpc_resolver_dns_ares + uses: + - grpc_base + - grpc_client_config - name: grpc_resolver_dns_native src: - src/core/ext/resolver/dns/native/dns_resolver.c - plugin: grpc_resolver_dns_native uses: - grpc_base - grpc_client_config @@ -831,6 +843,7 @@ libs: - grpc_lb_policy_grpclb - grpc_lb_policy_pick_first - grpc_lb_policy_round_robin + - grpc_resolver_dns_ares - grpc_resolver_dns_native - grpc_resolver_sockaddr - grpc_load_reporting @@ -923,6 +936,7 @@ libs: - grpc_base - grpc_transport_chttp2_server_insecure - grpc_transport_chttp2_client_insecure + - grpc_resolver_dns_ares - grpc_resolver_dns_native - grpc_resolver_sockaddr - grpc_load_reporting @@ -3393,6 +3407,11 @@ configs: UBSAN_OPTIONS: halt_on_error=1:print_stacktrace=1 timeout_multiplier: 1.5 defaults: + ares: + CFLAGS: -Wno-sign-conversion -Wno-invalid-source-encoding + CPPFLAGS: -Ithird_party/c-ares -Isrc/c-ares $(if $(subst Linux,,$(SYSTEM)),,-Isrc/c-ares/config_linux) + $(if $(subst Darwin,,$(SYSTEM)),,-Isrc/c-ares/config_darwin) -fvisibility=hidden + -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -DHAVE_CONFIG_H boringssl: CFLAGS: -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) @@ -3476,11 +3495,13 @@ python_dependencies: deps: - grpc - gpr + - ares - boringssl - z ruby_gem: deps: - grpc - gpr + - ares - boringssl - z @@ -254,6 +254,10 @@ if test "$PHP_GRPC" != "no"; then third_party/nanopb/pb_encode.c \ src/core/ext/lb_policy/pick_first/pick_first.c \ src/core/ext/lb_policy/round_robin/round_robin.c \ + src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c \ + src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c \ + src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c \ + src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c \ src/core/ext/resolver/dns/native/dns_resolver.c \ src/core/ext/resolver/sockaddr/sockaddr_resolver.c \ src/core/ext/load_reporting/load_reporting.c \ @@ -584,6 +588,7 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/pick_first) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/round_robin) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/load_reporting) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/resolver/dns/c_ares) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/resolver/dns/native) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/resolver/sockaddr) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/alpn) diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 86b811a3ec..90ff915e55 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -400,6 +400,8 @@ Pod::Spec.new do |s| 'third_party/nanopb/pb_common.h', 'third_party/nanopb/pb_decode.h', 'third_party/nanopb/pb_encode.h', + 'src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver.h', + 'src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.h', 'src/core/ext/load_reporting/load_reporting.h', 'src/core/ext/load_reporting/load_reporting_filter.h', 'src/core/ext/census/aggregation.h', @@ -584,6 +586,10 @@ Pod::Spec.new do |s| 'third_party/nanopb/pb_encode.c', 'src/core/ext/lb_policy/pick_first/pick_first.c', 'src/core/ext/lb_policy/round_robin/round_robin.c', + 'src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c', + 'src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c', + 'src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c', + 'src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c', 'src/core/ext/resolver/dns/native/dns_resolver.c', 'src/core/ext/resolver/sockaddr/sockaddr_resolver.c', 'src/core/ext/load_reporting/load_reporting.c', @@ -761,6 +767,8 @@ Pod::Spec.new do |s| 'third_party/nanopb/pb_common.h', 'third_party/nanopb/pb_decode.h', 'third_party/nanopb/pb_encode.h', + 'src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver.h', + 'src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.h', 'src/core/ext/load_reporting/load_reporting.h', 'src/core/ext/load_reporting/load_reporting_filter.h', 'src/core/ext/census/aggregation.h', diff --git a/grpc.gemspec b/grpc.gemspec index 8d74e36e7b..0a3004de51 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -319,6 +319,8 @@ Gem::Specification.new do |s| s.files += %w( third_party/nanopb/pb_common.h ) s.files += %w( third_party/nanopb/pb_decode.h ) s.files += %w( third_party/nanopb/pb_encode.h ) + s.files += %w( src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver.h ) + s.files += %w( src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.h ) s.files += %w( src/core/ext/load_reporting/load_reporting.h ) s.files += %w( src/core/ext/load_reporting/load_reporting_filter.h ) s.files += %w( src/core/ext/census/aggregation.h ) @@ -503,6 +505,10 @@ Gem::Specification.new do |s| s.files += %w( third_party/nanopb/pb_encode.c ) s.files += %w( src/core/ext/lb_policy/pick_first/pick_first.c ) s.files += %w( src/core/ext/lb_policy/round_robin/round_robin.c ) + s.files += %w( src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c ) + s.files += %w( src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c ) + s.files += %w( src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c ) + s.files += %w( src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c ) s.files += %w( src/core/ext/resolver/dns/native/dns_resolver.c ) s.files += %w( src/core/ext/resolver/sockaddr/sockaddr_resolver.c ) s.files += %w( src/core/ext/load_reporting/load_reporting.c ) @@ -950,4 +956,77 @@ Gem::Specification.new do |s| s.files += %w( third_party/zlib/trees.c ) s.files += %w( third_party/zlib/uncompr.c ) s.files += %w( third_party/zlib/zutil.c ) + s.files += %w( third_party/c-ares/ares.h ) + s.files += %w( third_party/c-ares/ares_data.h ) + s.files += %w( third_party/c-ares/ares_dns.h ) + s.files += %w( third_party/c-ares/ares_getenv.h ) + s.files += %w( third_party/c-ares/ares_getopt.h ) + s.files += %w( third_party/c-ares/ares_inet_net_pton.h ) + s.files += %w( third_party/c-ares/ares_iphlpapi.h ) + s.files += %w( third_party/c-ares/ares_ipv6.h ) + s.files += %w( third_party/c-ares/ares_library_init.h ) + s.files += %w( third_party/c-ares/ares_llist.h ) + s.files += %w( third_party/c-ares/ares_nowarn.h ) + s.files += %w( third_party/c-ares/ares_platform.h ) + s.files += %w( third_party/c-ares/ares_private.h ) + s.files += %w( third_party/c-ares/ares_rules.h ) + s.files += %w( third_party/c-ares/ares_setup.h ) + s.files += %w( third_party/c-ares/ares_strcasecmp.h ) + s.files += %w( third_party/c-ares/ares_strdup.h ) + s.files += %w( third_party/c-ares/ares_version.h ) + s.files += %w( third_party/c-ares/bitncmp.h ) + s.files += %w( third_party/c-ares/config-win32.h ) + s.files += %w( third_party/c-ares/setup_once.h ) + s.files += %w( src/c-ares/ares_build.h ) + s.files += %w( src/c-ares/config_linux/ares_config.h ) + s.files += %w( src/c-ares/config_darwin/ares_config.h ) + s.files += %w( third_party/c-ares/ares__close_sockets.c ) + s.files += %w( third_party/c-ares/ares__get_hostent.c ) + s.files += %w( third_party/c-ares/ares__read_line.c ) + s.files += %w( third_party/c-ares/ares__timeval.c ) + s.files += %w( third_party/c-ares/ares_cancel.c ) + s.files += %w( third_party/c-ares/ares_create_query.c ) + s.files += %w( third_party/c-ares/ares_data.c ) + s.files += %w( third_party/c-ares/ares_destroy.c ) + s.files += %w( third_party/c-ares/ares_expand_name.c ) + s.files += %w( third_party/c-ares/ares_expand_string.c ) + s.files += %w( third_party/c-ares/ares_fds.c ) + s.files += %w( third_party/c-ares/ares_free_hostent.c ) + s.files += %w( third_party/c-ares/ares_free_string.c ) + s.files += %w( third_party/c-ares/ares_getenv.c ) + s.files += %w( third_party/c-ares/ares_gethostbyaddr.c ) + s.files += %w( third_party/c-ares/ares_gethostbyname.c ) + s.files += %w( third_party/c-ares/ares_getnameinfo.c ) + s.files += %w( third_party/c-ares/ares_getopt.c ) + s.files += %w( third_party/c-ares/ares_getsock.c ) + s.files += %w( third_party/c-ares/ares_init.c ) + s.files += %w( third_party/c-ares/ares_library_init.c ) + s.files += %w( third_party/c-ares/ares_llist.c ) + s.files += %w( third_party/c-ares/ares_mkquery.c ) + s.files += %w( third_party/c-ares/ares_nowarn.c ) + s.files += %w( third_party/c-ares/ares_options.c ) + s.files += %w( third_party/c-ares/ares_parse_a_reply.c ) + s.files += %w( third_party/c-ares/ares_parse_aaaa_reply.c ) + s.files += %w( third_party/c-ares/ares_parse_mx_reply.c ) + s.files += %w( third_party/c-ares/ares_parse_naptr_reply.c ) + s.files += %w( third_party/c-ares/ares_parse_ns_reply.c ) + s.files += %w( third_party/c-ares/ares_parse_ptr_reply.c ) + s.files += %w( third_party/c-ares/ares_parse_soa_reply.c ) + s.files += %w( third_party/c-ares/ares_parse_srv_reply.c ) + s.files += %w( third_party/c-ares/ares_parse_txt_reply.c ) + s.files += %w( third_party/c-ares/ares_platform.c ) + s.files += %w( third_party/c-ares/ares_process.c ) + s.files += %w( third_party/c-ares/ares_query.c ) + s.files += %w( third_party/c-ares/ares_search.c ) + s.files += %w( third_party/c-ares/ares_send.c ) + s.files += %w( third_party/c-ares/ares_strcasecmp.c ) + s.files += %w( third_party/c-ares/ares_strdup.c ) + s.files += %w( third_party/c-ares/ares_strerror.c ) + s.files += %w( third_party/c-ares/ares_timeout.c ) + s.files += %w( third_party/c-ares/ares_version.c ) + s.files += %w( third_party/c-ares/ares_writev.c ) + s.files += %w( third_party/c-ares/bitncmp.c ) + s.files += %w( third_party/c-ares/inet_net_pton.c ) + s.files += %w( third_party/c-ares/inet_ntop.c ) + s.files += %w( third_party/c-ares/windows_port.c ) end diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index 7c67bad5ae..933c4c97ae 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h @@ -431,6 +431,12 @@ typedef unsigned __int64 uint64_t; power of two */ #define GPR_MAX_ALIGNMENT 16 +#ifdef GPR_WINDOWS +#ifndef GRPC_NATIVE_ADDRESS_RESOLVE +#define GRPC_NATIVE_ADDRESS_RESOLVE +#endif +#endif + #ifndef GRPC_MUST_USE_RESULT #ifdef __GNUC__ #define GRPC_MUST_USE_RESULT __attribute__((warn_unused_result)) diff --git a/package.json b/package.json index 9afba31816..21f0b4e9e0 100644 --- a/package.json +++ b/package.json @@ -23,14 +23,15 @@ "test": "./node_modules/.bin/mocha src/node/test && npm run-script lint", "gen_docs": "./node_modules/.bin/jsdoc -c src/node/jsdoc_conf.json", "coverage": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha src/node/test", - "install": "./node_modules/.bin/node-pre-gyp install --fallback-to-build" + "install": "./node_modules/.bin/node-pre-gyp install --fallback-to-build --library=static_library" }, "bundledDependencies": ["node-pre-gyp"], "dependencies": { "arguejs": "^0.2.3", "lodash": "^3.9.3", "nan": "^2.0.0", - "protobufjs": "^4.0.0" + "protobufjs": "^4.0.0", + "cares": "^1.1.5" }, "devDependencies": { "async": "^1.5.0", diff --git a/package.xml b/package.xml index 387afc3498..bde31b8554 100644 --- a/package.xml +++ b/package.xml @@ -327,6 +327,8 @@ <file baseinstalldir="/" name="third_party/nanopb/pb_common.h" role="src" /> <file baseinstalldir="/" name="third_party/nanopb/pb_decode.h" role="src" /> <file baseinstalldir="/" name="third_party/nanopb/pb_encode.h" role="src" /> + <file baseinstalldir="/" name="src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver.h" role="src" /> + <file baseinstalldir="/" name="src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/load_reporting/load_reporting.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/load_reporting/load_reporting_filter.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/census/aggregation.h" role="src" /> @@ -511,6 +513,10 @@ <file baseinstalldir="/" name="third_party/nanopb/pb_encode.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/lb_policy/pick_first/pick_first.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/lb_policy/round_robin/round_robin.c" role="src" /> + <file baseinstalldir="/" name="src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c" role="src" /> + <file baseinstalldir="/" name="src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c" role="src" /> + <file baseinstalldir="/" name="src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c" role="src" /> + <file baseinstalldir="/" name="src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/resolver/dns/native/dns_resolver.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/resolver/sockaddr/sockaddr_resolver.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/load_reporting/load_reporting.c" role="src" /> @@ -52,6 +52,12 @@ PYTHON_STEM = os.path.join('src', 'python', 'grpcio') CORE_INCLUDE = ('include', '.',) BORINGSSL_INCLUDE = (os.path.join('third_party', 'boringssl', 'include'),) ZLIB_INCLUDE = (os.path.join('third_party', 'zlib'),) +CARES_INCLUDE = ( + os.path.join('third_party', 'c-ares'), os.path.join('src', 'c-ares'),) +if 'linux' in sys.platform: + CARES_INCLUDE += (os.path.join('src', 'c-ares', 'config_linux'),) +if 'darwin' in sys.platform: + CARES_INCLUDE += (os.path.join('src', 'c-ares', 'config_darwin'),) # Ensure we're in the proper directory whether or not we're being used by pip. os.chdir(os.path.dirname(os.path.abspath(__file__))) @@ -127,7 +133,8 @@ CYTHON_HELPER_C_FILES = () CORE_C_FILES = tuple(grpc_core_dependencies.CORE_SOURCE_FILES) EXTENSION_INCLUDE_DIRECTORIES = ( - (PYTHON_STEM,) + CORE_INCLUDE + BORINGSSL_INCLUDE + ZLIB_INCLUDE) + (PYTHON_STEM,) + CORE_INCLUDE + BORINGSSL_INCLUDE + ZLIB_INCLUDE + + CARES_INCLUDE) EXTENSION_LIBRARIES = () if "linux" in sys.platform: @@ -141,13 +148,15 @@ DEFINE_MACROS = ( ('OPENSSL_NO_ASM', 1), ('_WIN32_WINNT', 0x600), ('GPR_BACKWARDS_COMPATIBILITY_MODE', 1),) if "win32" in sys.platform: - DEFINE_MACROS += (('WIN32_LEAN_AND_MEAN', 1),) + DEFINE_MACROS += (('WIN32_LEAN_AND_MEAN', 1), ('CARES_STATICLIB', 1),) if '64bit' in platform.architecture()[0]: DEFINE_MACROS += (('MS_WIN64', 1),) elif sys.version_info >= (3, 5): # For some reason, this is needed to get access to inet_pton/inet_ntop # on msvc, but only for 32 bits DEFINE_MACROS += (('NTDDI_VERSION', 0x06000000),) +else: + DEFINE_MACROS += (('HAVE_CONFIG_H', 1),) LDFLAGS = tuple(EXTRA_LINK_ARGS) CFLAGS = tuple(EXTRA_COMPILE_ARGS) diff --git a/src/c-ares/ares_build.h b/src/c-ares/ares_build.h new file mode 100644 index 0000000000..7d69f1e6ae --- /dev/null +++ b/src/c-ares/ares_build.h @@ -0,0 +1,254 @@ +#ifndef __CARES_BUILD_H +#define __CARES_BUILD_H + + +/* Copyright (C) 2009 - 2013 by Daniel Stenberg et al + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, provided + * that the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of M.I.T. not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. M.I.T. makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + */ + +/* ================================================================ */ +/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */ +/* ================================================================ */ + +/* + * NOTE 1: + * ------- + * + * See file ares_build.h.in, run configure, and forget that this file + * exists it is only used for non-configure systems. + * But you can keep reading if you want ;-) + * + */ + +/* ================================================================ */ +/* NOTES FOR NON-CONFIGURE SYSTEMS */ +/* ================================================================ */ + +/* + * NOTE 1: + * ------- + * + * Nothing in this file is intended to be modified or adjusted by the + * c-ares library user nor by the c-ares library builder. + * + * If you think that something actually needs to be changed, adjusted + * or fixed in this file, then, report it on the c-ares development + * mailing list: http://cool.haxx.se/mailman/listinfo/c-ares/ + * + * Try to keep one section per platform, compiler and architecture, + * otherwise, if an existing section is reused for a different one and + * later on the original is adjusted, probably the piggybacking one can + * be adversely changed. + * + * In order to differentiate between platforms/compilers/architectures + * use only compiler built in predefined preprocessor symbols. + * + * This header file shall only export symbols which are 'cares' or 'CARES' + * prefixed, otherwise public name space would be polluted. + * + * NOTE 2: + * ------- + * + * Right now you might be staring at file ares_build.h.dist or ares_build.h, + * this is due to the following reason: file ares_build.h.dist is renamed + * to ares_build.h when the c-ares source code distribution archive file is + * created. + * + * File ares_build.h.dist is not included in the distribution archive. + * File ares_build.h is not present in the git tree. + * + * The distributed ares_build.h file is only intended to be used on systems + * which can not run the also distributed configure script. + * + * On systems capable of running the configure script, the configure process + * will overwrite the distributed ares_build.h file with one that is suitable + * and specific to the library being configured and built, which is generated + * from the ares_build.h.in template file. + * + * If you check out from git on a non-configure platform, you must run the + * appropriate buildconf* script to set up ares_build.h and other local files. + * + */ + +/* ================================================================ */ +/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ +/* ================================================================ */ + +#ifdef CARES_SIZEOF_LONG +# error "CARES_SIZEOF_LONG shall not be defined except in ares_build.h" + Error Compilation_aborted_CARES_SIZEOF_LONG_already_defined +#endif + +#ifdef CARES_TYPEOF_ARES_SOCKLEN_T +# error "CARES_TYPEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h" + Error Compilation_aborted_CARES_TYPEOF_ARES_SOCKLEN_T_already_defined +#endif + +#ifdef CARES_SIZEOF_ARES_SOCKLEN_T +# error "CARES_SIZEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h" + Error Compilation_aborted_CARES_SIZEOF_ARES_SOCKLEN_T_already_defined +#endif + +/* ================================================================ */ +/* EXTERNAL INTERFACE SETTINGS FOR NON-CONFIGURE SYSTEMS ONLY */ +/* ================================================================ */ + +#if defined(__DJGPP__) || defined(__GO32__) +# define CARES_SIZEOF_LONG 4 +# define CARES_TYPEOF_ARES_SOCKLEN_T int +# define CARES_SIZEOF_ARES_SOCKLEN_T 4 + +#elif defined(__SALFORDC__) +# define CARES_SIZEOF_LONG 4 +# define CARES_TYPEOF_ARES_SOCKLEN_T int +# define CARES_SIZEOF_ARES_SOCKLEN_T 4 + +#elif defined(__BORLANDC__) +# define CARES_SIZEOF_LONG 4 +# define CARES_TYPEOF_ARES_SOCKLEN_T int +# define CARES_SIZEOF_ARES_SOCKLEN_T 4 + +#elif defined(__TURBOC__) +# define CARES_SIZEOF_LONG 4 +# define CARES_TYPEOF_ARES_SOCKLEN_T int +# define CARES_SIZEOF_ARES_SOCKLEN_T 4 + +#elif defined(__WATCOMC__) +# define CARES_SIZEOF_LONG 4 +# define CARES_TYPEOF_ARES_SOCKLEN_T int +# define CARES_SIZEOF_ARES_SOCKLEN_T 4 + +#elif defined(__POCC__) +# define CARES_SIZEOF_LONG 4 +# define CARES_TYPEOF_ARES_SOCKLEN_T int +# define CARES_SIZEOF_ARES_SOCKLEN_T 4 + +#elif defined(__LCC__) +# define CARES_SIZEOF_LONG 4 +# define CARES_TYPEOF_ARES_SOCKLEN_T int +# define CARES_SIZEOF_ARES_SOCKLEN_T 4 + +#elif defined(__SYMBIAN32__) +# define CARES_SIZEOF_LONG 4 +# define CARES_TYPEOF_ARES_SOCKLEN_T unsigned int +# define CARES_SIZEOF_ARES_SOCKLEN_T 4 + +#elif defined(__MWERKS__) +# define CARES_SIZEOF_LONG 4 +# define CARES_TYPEOF_ARES_SOCKLEN_T int +# define CARES_SIZEOF_ARES_SOCKLEN_T 4 + +#elif defined(_WIN32_WCE) +# define CARES_SIZEOF_LONG 4 +# define CARES_TYPEOF_ARES_SOCKLEN_T int +# define CARES_SIZEOF_ARES_SOCKLEN_T 4 + +#elif defined(__MINGW32__) +# define CARES_SIZEOF_LONG 4 +# define CARES_TYPEOF_ARES_SOCKLEN_T int +# define CARES_SIZEOF_ARES_SOCKLEN_T 4 + +#elif defined(__VMS) +# define CARES_SIZEOF_LONG 4 +# define CARES_TYPEOF_ARES_SOCKLEN_T unsigned int +# define CARES_SIZEOF_ARES_SOCKLEN_T 4 + +#elif defined(__OS400__) +# if defined(__ILEC400__) +# define CARES_SIZEOF_LONG 4 +# define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t +# define CARES_SIZEOF_ARES_SOCKLEN_T 4 +# define CARES_PULL_SYS_TYPES_H 1 +# define CARES_PULL_SYS_SOCKET_H 1 +# endif + +#elif defined(__MVS__) +# if defined(__IBMC__) || defined(__IBMCPP__) +# if defined(_ILP32) +# define CARES_SIZEOF_LONG 4 +# elif defined(_LP64) +# define CARES_SIZEOF_LONG 8 +# endif +# define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t +# define CARES_SIZEOF_ARES_SOCKLEN_T 4 +# define CARES_PULL_SYS_TYPES_H 1 +# define CARES_PULL_SYS_SOCKET_H 1 +# endif + +#elif defined(__370__) +# if defined(__IBMC__) || defined(__IBMCPP__) +# if defined(_ILP32) +# define CARES_SIZEOF_LONG 4 +# elif defined(_LP64) +# define CARES_SIZEOF_LONG 8 +# endif +# define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t +# define CARES_SIZEOF_ARES_SOCKLEN_T 4 +# define CARES_PULL_SYS_TYPES_H 1 +# define CARES_PULL_SYS_SOCKET_H 1 +# endif + +#elif defined(TPF) +# define CARES_SIZEOF_LONG 8 +# define CARES_TYPEOF_ARES_SOCKLEN_T int +# define CARES_SIZEOF_ARES_SOCKLEN_T 4 + +/* ===================================== */ +/* KEEP MSVC THE PENULTIMATE ENTRY */ +/* ===================================== */ + +#elif defined(_MSC_VER) +# define CARES_SIZEOF_LONG 4 +# define CARES_TYPEOF_ARES_SOCKLEN_T int +# define CARES_SIZEOF_ARES_SOCKLEN_T 4 + +/* ===================================== */ +/* KEEP GENERIC GCC THE LAST ENTRY */ +/* ===================================== */ + +#elif defined(__GNUC__) +# if defined(__LP64__) || \ + defined(__x86_64__) || defined(__ppc64__) +# define CARES_SIZEOF_LONG 8 +# elif defined(__ILP32__) || \ + defined(__i386__) || defined(__ppc__) || defined(__arm__) +# define CARES_SIZEOF_LONG 4 +# endif +# define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t +# define CARES_SIZEOF_ARES_SOCKLEN_T 4 +# define CARES_PULL_SYS_TYPES_H 1 +# define CARES_PULL_SYS_SOCKET_H 1 + +#else +# error "Unknown non-configure build target!" + Error Compilation_aborted_Unknown_non_configure_build_target +#endif + +/* CARES_PULL_SYS_TYPES_H is defined above when inclusion of header file */ +/* sys/types.h is required here to properly make type definitions below. */ +#ifdef CARES_PULL_SYS_TYPES_H +# include <sys/types.h> +#endif + +/* CARES_PULL_SYS_SOCKET_H is defined above when inclusion of header file */ +/* sys/socket.h is required here to properly make type definitions below. */ +#ifdef CARES_PULL_SYS_SOCKET_H +# include <sys/socket.h> +#endif + +/* Data type definition of ares_socklen_t. */ + +#ifdef CARES_TYPEOF_ARES_SOCKLEN_T + typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t; +#endif + +#endif /* __CARES_BUILD_H */ diff --git a/src/c-ares/config_darwin/ares_config.h b/src/c-ares/config_darwin/ares_config.h new file mode 100644 index 0000000000..0f5bd4b6a5 --- /dev/null +++ b/src/c-ares/config_darwin/ares_config.h @@ -0,0 +1,523 @@ +/* ares_config.h. Generated from ares_config.h.in by configure. */ +/* ares_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* define this if ares is built for a big endian system */ +/* #undef ARES_BIG_ENDIAN */ + +/* when building as static part of libcurl */ +/* #undef BUILDING_LIBCURL */ + +/* Defined for build that exposes internal static functions for testing. */ +/* #undef CARES_EXPOSE_STATICS */ + +/* Defined for build with symbol hiding. */ +#define CARES_SYMBOL_HIDING 1 + +/* Definition to make a library symbol externally visible. */ +#define CARES_SYMBOL_SCOPE_EXTERN __attribute__ ((__visibility__ ("default"))) + +/* Use resolver library to configure cares */ +/* #undef CARES_USE_LIBRESOLV */ + +/* if a /etc/inet dir is being used */ +/* #undef ETC_INET */ + +/* Define to the type of arg 2 for gethostname. */ +#define GETHOSTNAME_TYPE_ARG2 size_t + +/* Define to the type qualifier of arg 1 for getnameinfo. */ +#define GETNAMEINFO_QUAL_ARG1 const + +/* Define to the type of arg 1 for getnameinfo. */ +#define GETNAMEINFO_TYPE_ARG1 struct sockaddr * + +/* Define to the type of arg 2 for getnameinfo. */ +#define GETNAMEINFO_TYPE_ARG2 socklen_t + +/* Define to the type of args 4 and 6 for getnameinfo. */ +#define GETNAMEINFO_TYPE_ARG46 socklen_t + +/* Define to the type of arg 7 for getnameinfo. */ +#define GETNAMEINFO_TYPE_ARG7 int + +/* Specifies the number of arguments to getservbyport_r */ +/* #undef GETSERVBYPORT_R_ARGS */ + +/* Specifies the size of the buffer to pass to getservbyport_r */ +/* #undef GETSERVBYPORT_R_BUFSIZE */ + +/* Define to 1 if you have AF_INET6. */ +#define HAVE_AF_INET6 1 + +/* Define to 1 if you have the <arpa/inet.h> header file. */ +#define HAVE_ARPA_INET_H 1 + +/* Define to 1 if you have the <arpa/nameser_compat.h> header file. */ +#define HAVE_ARPA_NAMESER_COMPAT_H 1 + +/* Define to 1 if you have the <arpa/nameser.h> header file. */ +#define HAVE_ARPA_NAMESER_H 1 + +/* Define to 1 if you have the <assert.h> header file. */ +#define HAVE_ASSERT_H 1 + +/* Define to 1 if you have the `bitncmp' function. */ +/* #undef HAVE_BITNCMP */ + +/* Define to 1 if bool is an available type. */ +#define HAVE_BOOL_T 1 + +/* Define to 1 if you have the clock_gettime function and monotonic timer. */ +/* #undef HAVE_CLOCK_GETTIME_MONOTONIC */ + +/* Define to 1 if you have the closesocket function. */ +/* #undef HAVE_CLOSESOCKET */ + +/* Define to 1 if you have the CloseSocket camel case function. */ +/* #undef HAVE_CLOSESOCKET_CAMEL */ + +/* Define to 1 if you have the connect function. */ +#define HAVE_CONNECT 1 + +/* define if the compiler supports basic C++11 syntax */ +#define HAVE_CXX11 1 + +/* Define to 1 if you have the <dlfcn.h> header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the <errno.h> header file. */ +#define HAVE_ERRNO_H 1 + +/* Define to 1 if you have the fcntl function. */ +#define HAVE_FCNTL 1 + +/* Define to 1 if you have the <fcntl.h> header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have a working fcntl O_NONBLOCK function. */ +#define HAVE_FCNTL_O_NONBLOCK 1 + +/* Define to 1 if you have the freeaddrinfo function. */ +#define HAVE_FREEADDRINFO 1 + +/* Define to 1 if you have a working getaddrinfo function. */ +#define HAVE_GETADDRINFO 1 + +/* Define to 1 if the getaddrinfo function is threadsafe. */ +#define HAVE_GETADDRINFO_THREADSAFE 1 + +/* Define to 1 if you have the getenv function. */ +#define HAVE_GETENV 1 + +/* Define to 1 if you have the gethostbyaddr function. */ +#define HAVE_GETHOSTBYADDR 1 + +/* Define to 1 if you have the gethostbyname function. */ +#define HAVE_GETHOSTBYNAME 1 + +/* Define to 1 if you have the gethostname function. */ +#define HAVE_GETHOSTNAME 1 + +/* Define to 1 if you have the getnameinfo function. */ +#define HAVE_GETNAMEINFO 1 + +/* Define to 1 if you have the getservbyport_r function. */ +/* #undef HAVE_GETSERVBYPORT_R */ + +/* Define to 1 if you have the `gettimeofday' function. */ +#define HAVE_GETTIMEOFDAY 1 + +/* Define to 1 if you have the `if_indextoname' function. */ +#define HAVE_IF_INDEXTONAME 1 + +/* Define to 1 if you have a IPv6 capable working inet_net_pton function. */ +#define HAVE_INET_NET_PTON 1 + +/* Define to 1 if you have a IPv6 capable working inet_ntop function. */ +#define HAVE_INET_NTOP 1 + +/* Define to 1 if you have a IPv6 capable working inet_pton function. */ +#define HAVE_INET_PTON 1 + +/* Define to 1 if you have the <inttypes.h> header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the ioctl function. */ +#define HAVE_IOCTL 1 + +/* Define to 1 if you have the ioctlsocket function. */ +/* #undef HAVE_IOCTLSOCKET */ + +/* Define to 1 if you have the IoctlSocket camel case function. */ +/* #undef HAVE_IOCTLSOCKET_CAMEL */ + +/* Define to 1 if you have a working IoctlSocket camel case FIONBIO function. + */ +/* #undef HAVE_IOCTLSOCKET_CAMEL_FIONBIO */ + +/* Define to 1 if you have a working ioctlsocket FIONBIO function. */ +/* #undef HAVE_IOCTLSOCKET_FIONBIO */ + +/* Define to 1 if you have a working ioctl FIONBIO function. */ +#define HAVE_IOCTL_FIONBIO 1 + +/* Define to 1 if you have a working ioctl SIOCGIFADDR function. */ +#define HAVE_IOCTL_SIOCGIFADDR 1 + +/* Define to 1 if you have the `resolve' library (-lresolve). */ +/* #undef HAVE_LIBRESOLVE */ + +/* Define to 1 if you have the <limits.h> header file. */ +#define HAVE_LIMITS_H 1 + +/* if your compiler supports LL */ +#define HAVE_LL 1 + +/* Define to 1 if the compiler supports the 'long long' data type. */ +#define HAVE_LONGLONG 1 + +/* Define to 1 if you have the malloc.h header file. */ +/* #undef HAVE_MALLOC_H */ + +/* Define to 1 if you have the memory.h header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the MSG_NOSIGNAL flag. */ +/* #undef HAVE_MSG_NOSIGNAL */ + +/* Define to 1 if you have the <netdb.h> header file. */ +#define HAVE_NETDB_H 1 + +/* Define to 1 if you have the <netinet/in.h> header file. */ +#define HAVE_NETINET_IN_H 1 + +/* Define to 1 if you have the <netinet/tcp.h> header file. */ +#define HAVE_NETINET_TCP_H 1 + +/* Define to 1 if you have the <net/if.h> header file. */ +#define HAVE_NET_IF_H 1 + +/* Define to 1 if you have PF_INET6. */ +#define HAVE_PF_INET6 1 + +/* Define to 1 if you have the recv function. */ +#define HAVE_RECV 1 + +/* Define to 1 if you have the recvfrom function. */ +#define HAVE_RECVFROM 1 + +/* Define to 1 if you have the send function. */ +#define HAVE_SEND 1 + +/* Define to 1 if you have the setsockopt function. */ +#define HAVE_SETSOCKOPT 1 + +/* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */ +/* #undef HAVE_SETSOCKOPT_SO_NONBLOCK */ + +/* Define to 1 if you have the <signal.h> header file. */ +#define HAVE_SIGNAL_H 1 + +/* Define to 1 if sig_atomic_t is an available typedef. */ +#define HAVE_SIG_ATOMIC_T 1 + +/* Define to 1 if sig_atomic_t is already defined as volatile. */ +/* #undef HAVE_SIG_ATOMIC_T_VOLATILE */ + +/* Define to 1 if your struct sockaddr_in6 has sin6_scope_id. */ +#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1 + +/* Define to 1 if you have the socket function. */ +#define HAVE_SOCKET 1 + +/* Define to 1 if you have the <socket.h> header file. */ +/* #undef HAVE_SOCKET_H */ + +/* Define to 1 if you have the <stdbool.h> header file. */ +#define HAVE_STDBOOL_H 1 + +/* Define to 1 if you have the <stdint.h> header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the <stdlib.h> header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the strcasecmp function. */ +#define HAVE_STRCASECMP 1 + +/* Define to 1 if you have the strcmpi function. */ +/* #undef HAVE_STRCMPI */ + +/* Define to 1 if you have the strdup function. */ +#define HAVE_STRDUP 1 + +/* Define to 1 if you have the stricmp function. */ +/* #undef HAVE_STRICMP */ + +/* Define to 1 if you have the <strings.h> header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the <string.h> header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the strncasecmp function. */ +#define HAVE_STRNCASECMP 1 + +/* Define to 1 if you have the strncmpi function. */ +/* #undef HAVE_STRNCMPI */ + +/* Define to 1 if you have the strnicmp function. */ +/* #undef HAVE_STRNICMP */ + +/* Define to 1 if you have the <stropts.h> header file. */ +/* #undef HAVE_STROPTS_H */ + +/* Define to 1 if you have struct addrinfo. */ +#define HAVE_STRUCT_ADDRINFO 1 + +/* Define to 1 if you have struct in6_addr. */ +#define HAVE_STRUCT_IN6_ADDR 1 + +/* Define to 1 if you have struct sockaddr_in6. */ +#define HAVE_STRUCT_SOCKADDR_IN6 1 + +/* if struct sockaddr_storage is defined */ +#define HAVE_STRUCT_SOCKADDR_STORAGE 1 + +/* Define to 1 if you have the timeval struct. */ +#define HAVE_STRUCT_TIMEVAL 1 + +/* Define to 1 if you have the <sys/ioctl.h> header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define to 1 if you have the <sys/param.h> header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the <sys/select.h> header file. */ +#define HAVE_SYS_SELECT_H 1 + +/* Define to 1 if you have the <sys/socket.h> header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the <sys/time.h> header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the <sys/types.h> header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the <sys/uio.h> header file. */ +#define HAVE_SYS_UIO_H 1 + +/* Define to 1 if you have the <time.h> header file. */ +#define HAVE_TIME_H 1 + +/* Define to 1 if you have the <unistd.h> header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the windows.h header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Define to 1 if you have the winsock2.h header file. */ +/* #undef HAVE_WINSOCK2_H */ + +/* Define to 1 if you have the winsock.h header file. */ +/* #undef HAVE_WINSOCK_H */ + +/* Define to 1 if you have the writev function. */ +#define HAVE_WRITEV 1 + +/* Define to 1 if you have the ws2tcpip.h header file. */ +/* #undef HAVE_WS2TCPIP_H */ + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Define to 1 if you need the malloc.h header file even with stdlib.h */ +/* #undef NEED_MALLOC_H */ + +/* Define to 1 if you need the memory.h header file even with stdlib.h */ +/* #undef NEED_MEMORY_H */ + +/* Define to 1 if _REENTRANT preprocessor symbol must be defined. */ +/* #undef NEED_REENTRANT */ + +/* Define to 1 if _THREAD_SAFE preprocessor symbol must be defined. */ +/* #undef NEED_THREAD_SAFE */ + +/* cpu-machine-OS */ +#define OS "i386-apple-darwin9.8.0" + +/* Name of package */ +#define PACKAGE "c-ares" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "c-ares mailing list: http://cool.haxx.se/mailman/listinfo/c-ares" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "c-ares" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "c-ares -" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "c-ares" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "-" + +/* a suitable file/device to read random data from */ +#define RANDOM_FILE "/dev/urandom" + +/* Define to the type qualifier pointed by arg 5 for recvfrom. */ +#define RECVFROM_QUAL_ARG5 + +/* Define to the type of arg 1 for recvfrom. */ +#define RECVFROM_TYPE_ARG1 int + +/* Define to the type pointed by arg 2 for recvfrom. */ +#define RECVFROM_TYPE_ARG2 void + +/* Define to 1 if the type pointed by arg 2 for recvfrom is void. */ +#define RECVFROM_TYPE_ARG2_IS_VOID 1 + +/* Define to the type of arg 3 for recvfrom. */ +#define RECVFROM_TYPE_ARG3 size_t + +/* Define to the type of arg 4 for recvfrom. */ +#define RECVFROM_TYPE_ARG4 int + +/* Define to the type pointed by arg 5 for recvfrom. */ +#define RECVFROM_TYPE_ARG5 struct sockaddr + +/* Define to 1 if the type pointed by arg 5 for recvfrom is void. */ +/* #undef RECVFROM_TYPE_ARG5_IS_VOID */ + +/* Define to the type pointed by arg 6 for recvfrom. */ +#define RECVFROM_TYPE_ARG6 socklen_t + +/* Define to 1 if the type pointed by arg 6 for recvfrom is void. */ +/* #undef RECVFROM_TYPE_ARG6_IS_VOID */ + +/* Define to the function return type for recvfrom. */ +#define RECVFROM_TYPE_RETV ssize_t + +/* Define to the type of arg 1 for recv. */ +#define RECV_TYPE_ARG1 int + +/* Define to the type of arg 2 for recv. */ +#define RECV_TYPE_ARG2 void * + +/* Define to the type of arg 3 for recv. */ +#define RECV_TYPE_ARG3 size_t + +/* Define to the type of arg 4 for recv. */ +#define RECV_TYPE_ARG4 int + +/* Define to the function return type for recv. */ +#define RECV_TYPE_RETV ssize_t + +/* Define as the return type of signal handlers (`int' or `void'). */ +#define RETSIGTYPE void + +/* Define to the type qualifier of arg 2 for send. */ +#define SEND_QUAL_ARG2 const + +/* Define to the type of arg 1 for send. */ +#define SEND_TYPE_ARG1 int + +/* Define to the type of arg 2 for send. */ +#define SEND_TYPE_ARG2 void * + +/* Define to the type of arg 3 for send. */ +#define SEND_TYPE_ARG3 size_t + +/* Define to the type of arg 4 for send. */ +#define SEND_TYPE_ARG4 int + +/* Define to the function return type for send. */ +#define SEND_TYPE_RETV ssize_t + +/* The size of `int', as computed by sizeof. */ +#define SIZEOF_INT 4 + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* The size of `short', as computed by sizeof. */ +#define SIZEOF_SHORT 2 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 4 + +/* The size of `struct in6_addr', as computed by sizeof. */ +#define SIZEOF_STRUCT_IN6_ADDR 16 + +/* The size of `struct in_addr', as computed by sizeof. */ +#define SIZEOF_STRUCT_IN_ADDR 4 + +/* The size of `time_t', as computed by sizeof. */ +#define SIZEOF_TIME_T 4 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ +#define TIME_WITH_SYS_TIME 1 + +/* Define to disable non-blocking sockets. */ +/* #undef USE_BLOCKING_SOCKETS */ + +/* Version number of package */ +#define VERSION "-" + +/* Define to avoid automatic inclusion of winsock.h */ +/* #undef WIN32_LEAN_AND_MEAN */ + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Define to 1 if OS is AIX. */ +#ifndef _ALL_SOURCE +/* # undef _ALL_SOURCE */ +#endif + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Type to use in place of in_addr_t when system does not provide it. */ +/* #undef in_addr_t */ + +/* Define to `unsigned int' if <sys/types.h> does not define. */ +/* #undef size_t */ + +/* the signed version of size_t */ +/* #undef ssize_t */ diff --git a/src/c-ares/config_linux/ares_config.h b/src/c-ares/config_linux/ares_config.h new file mode 100644 index 0000000000..8296bb7b17 --- /dev/null +++ b/src/c-ares/config_linux/ares_config.h @@ -0,0 +1,524 @@ +/* ares_config.h. Generated from ares_config.h.in by configure. */ +/* ares_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* define this if ares is built for a big endian system */ +/* #undef ARES_BIG_ENDIAN */ + +/* when building as static part of libcurl */ +/* #undef BUILDING_LIBCURL */ + +/* Defined for build that exposes internal static functions for testing. */ +/* #undef CARES_EXPOSE_STATICS */ + +/* Defined for build with symbol hiding. */ +#define CARES_SYMBOL_HIDING 1 + +/* Definition to make a library symbol externally visible. */ +#define CARES_SYMBOL_SCOPE_EXTERN __attribute__ ((__visibility__ ("default"))) + +/* Use resolver library to configure cares */ +/* #undef CARES_USE_LIBRESOLV */ + +/* if a /etc/inet dir is being used */ +/* #undef ETC_INET */ + +/* Define to the type of arg 2 for gethostname. */ +#define GETHOSTNAME_TYPE_ARG2 size_t + +/* Define to the type qualifier of arg 1 for getnameinfo. */ +#define GETNAMEINFO_QUAL_ARG1 const + +/* Define to the type of arg 1 for getnameinfo. */ +#define GETNAMEINFO_TYPE_ARG1 struct sockaddr * + +/* Define to the type of arg 2 for getnameinfo. */ +#define GETNAMEINFO_TYPE_ARG2 socklen_t + +/* Define to the type of args 4 and 6 for getnameinfo. */ +#define GETNAMEINFO_TYPE_ARG46 socklen_t + +/* Define to the type of arg 7 for getnameinfo. */ +#define GETNAMEINFO_TYPE_ARG7 int + +/* Specifies the number of arguments to getservbyport_r */ +#define GETSERVBYPORT_R_ARGS 6 + +/* Specifies the size of the buffer to pass to getservbyport_r */ +#define GETSERVBYPORT_R_BUFSIZE 4096 + +/* Define to 1 if you have AF_INET6. */ +#define HAVE_AF_INET6 1 + +/* Define to 1 if you have the <arpa/inet.h> header file. */ +#define HAVE_ARPA_INET_H 1 + +/* Define to 1 if you have the <arpa/nameser_compat.h> header file. */ +#define HAVE_ARPA_NAMESER_COMPAT_H 1 + +/* Define to 1 if you have the <arpa/nameser.h> header file. */ +#define HAVE_ARPA_NAMESER_H 1 + +/* Define to 1 if you have the <assert.h> header file. */ +#define HAVE_ASSERT_H 1 + +/* Define to 1 if you have the `bitncmp' function. */ +/* #undef HAVE_BITNCMP */ + +/* Define to 1 if bool is an available type. */ +#define HAVE_BOOL_T 1 + +/* Define to 1 if you have the clock_gettime function and monotonic timer. */ +#define HAVE_CLOCK_GETTIME_MONOTONIC 1 + +/* Define to 1 if you have the closesocket function. */ +/* #undef HAVE_CLOSESOCKET */ + +/* Define to 1 if you have the CloseSocket camel case function. */ +/* #undef HAVE_CLOSESOCKET_CAMEL */ + +/* Define to 1 if you have the connect function. */ +#define HAVE_CONNECT 1 + +/* define if the compiler supports basic C++11 syntax */ +#define HAVE_CXX11 1 + +/* Define to 1 if you have the <dlfcn.h> header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the <errno.h> header file. */ +#define HAVE_ERRNO_H 1 + +/* Define to 1 if you have the fcntl function. */ +#define HAVE_FCNTL 1 + +/* Define to 1 if you have the <fcntl.h> header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have a working fcntl O_NONBLOCK function. */ +#define HAVE_FCNTL_O_NONBLOCK 1 + +/* Define to 1 if you have the freeaddrinfo function. */ +#define HAVE_FREEADDRINFO 1 + +/* Define to 1 if you have a working getaddrinfo function. */ +#define HAVE_GETADDRINFO 1 + +/* Define to 1 if the getaddrinfo function is threadsafe. */ +#define HAVE_GETADDRINFO_THREADSAFE 1 + +/* Define to 1 if you have the getenv function. */ +#define HAVE_GETENV 1 + +/* Define to 1 if you have the gethostbyaddr function. */ +#define HAVE_GETHOSTBYADDR 1 + +/* Define to 1 if you have the gethostbyname function. */ +#define HAVE_GETHOSTBYNAME 1 + +/* Define to 1 if you have the gethostname function. */ +#define HAVE_GETHOSTNAME 1 + +/* Define to 1 if you have the getnameinfo function. */ +#define HAVE_GETNAMEINFO 1 + +/* Define to 1 if you have the getservbyport_r function. */ +#define HAVE_GETSERVBYPORT_R 1 + +/* Define to 1 if you have the `gettimeofday' function. */ +#define HAVE_GETTIMEOFDAY 1 + +/* Define to 1 if you have the `if_indextoname' function. */ +#define HAVE_IF_INDEXTONAME 1 + +/* Define to 1 if you have a IPv6 capable working inet_net_pton function. */ +/* #undef HAVE_INET_NET_PTON */ + +/* Define to 1 if you have a IPv6 capable working inet_ntop function. */ +#define HAVE_INET_NTOP 1 + +/* Define to 1 if you have a IPv6 capable working inet_pton function. */ +#define HAVE_INET_PTON 1 + +/* Define to 1 if you have the <inttypes.h> header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the ioctl function. */ +#define HAVE_IOCTL 1 + +/* Define to 1 if you have the ioctlsocket function. */ +/* #undef HAVE_IOCTLSOCKET */ + +/* Define to 1 if you have the IoctlSocket camel case function. */ +/* #undef HAVE_IOCTLSOCKET_CAMEL */ + +/* Define to 1 if you have a working IoctlSocket camel case FIONBIO function. + */ +/* #undef HAVE_IOCTLSOCKET_CAMEL_FIONBIO */ + +/* Define to 1 if you have a working ioctlsocket FIONBIO function. */ +/* #undef HAVE_IOCTLSOCKET_FIONBIO */ + +/* Define to 1 if you have a working ioctl FIONBIO function. */ +#define HAVE_IOCTL_FIONBIO 1 + +/* Define to 1 if you have a working ioctl SIOCGIFADDR function. */ +#define HAVE_IOCTL_SIOCGIFADDR 1 + +/* Define to 1 if you have the `resolve' library (-lresolve). */ +/* #undef HAVE_LIBRESOLVE */ + +/* Define to 1 if you have the <limits.h> header file. */ +#define HAVE_LIMITS_H 1 + +/* if your compiler supports LL */ +#define HAVE_LL 1 + +/* Define to 1 if the compiler supports the 'long long' data type. */ +#define HAVE_LONGLONG 1 + +/* Define to 1 if you have the malloc.h header file. */ +#define HAVE_MALLOC_H 1 + +/* Define to 1 if you have the memory.h header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the MSG_NOSIGNAL flag. */ +#define HAVE_MSG_NOSIGNAL 1 + +/* Define to 1 if you have the <netdb.h> header file. */ +#define HAVE_NETDB_H 1 + +/* Define to 1 if you have the <netinet/in.h> header file. */ +#define HAVE_NETINET_IN_H 1 + +/* Define to 1 if you have the <netinet/tcp.h> header file. */ +#define HAVE_NETINET_TCP_H 1 + +/* Define to 1 if you have the <net/if.h> header file. */ +#define HAVE_NET_IF_H 1 + +/* Define to 1 if you have PF_INET6. */ +#define HAVE_PF_INET6 1 + +/* Define to 1 if you have the recv function. */ +#define HAVE_RECV 1 + +/* Define to 1 if you have the recvfrom function. */ +#define HAVE_RECVFROM 1 + +/* Define to 1 if you have the send function. */ +#define HAVE_SEND 1 + +/* Define to 1 if you have the setsockopt function. */ +#define HAVE_SETSOCKOPT 1 + +/* Define to 1 if you have a working setsockopt SO_NONBLOCK function. */ +/* #undef HAVE_SETSOCKOPT_SO_NONBLOCK */ + +/* Define to 1 if you have the <signal.h> header file. */ +#define HAVE_SIGNAL_H 1 + +/* Define to 1 if sig_atomic_t is an available typedef. */ +#define HAVE_SIG_ATOMIC_T 1 + +/* Define to 1 if sig_atomic_t is already defined as volatile. */ +/* #undef HAVE_SIG_ATOMIC_T_VOLATILE */ + +/* Define to 1 if your struct sockaddr_in6 has sin6_scope_id. */ +#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1 + +/* Define to 1 if you have the socket function. */ +#define HAVE_SOCKET 1 + +/* Define to 1 if you have the <socket.h> header file. */ +/* #undef HAVE_SOCKET_H */ + +/* Define to 1 if you have the <stdbool.h> header file. */ +#define HAVE_STDBOOL_H 1 + +/* Define to 1 if you have the <stdint.h> header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the <stdlib.h> header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the strcasecmp function. */ +#define HAVE_STRCASECMP 1 + +/* Define to 1 if you have the strcmpi function. */ +/* #undef HAVE_STRCMPI */ + +/* Define to 1 if you have the strdup function. */ +#define HAVE_STRDUP 1 + +/* Define to 1 if you have the stricmp function. */ +/* #undef HAVE_STRICMP */ + +/* Define to 1 if you have the <strings.h> header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the <string.h> header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the strncasecmp function. */ +#define HAVE_STRNCASECMP 1 + +/* Define to 1 if you have the strncmpi function. */ +/* #undef HAVE_STRNCMPI */ + +/* Define to 1 if you have the strnicmp function. */ +/* #undef HAVE_STRNICMP */ + +/* Define to 1 if you have the <stropts.h> header file. */ +#define HAVE_STROPTS_H 1 + +/* Define to 1 if you have struct addrinfo. */ +#define HAVE_STRUCT_ADDRINFO 1 + +/* Define to 1 if you have struct in6_addr. */ +#define HAVE_STRUCT_IN6_ADDR 1 + +/* Define to 1 if you have struct sockaddr_in6. */ +#define HAVE_STRUCT_SOCKADDR_IN6 1 + +/* if struct sockaddr_storage is defined */ +#define HAVE_STRUCT_SOCKADDR_STORAGE 1 + +/* Define to 1 if you have the timeval struct. */ +#define HAVE_STRUCT_TIMEVAL 1 + +/* Define to 1 if you have the <sys/ioctl.h> header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define to 1 if you have the <sys/param.h> header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the <sys/select.h> header file. */ +#define HAVE_SYS_SELECT_H 1 + +/* Define to 1 if you have the <sys/socket.h> header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the <sys/time.h> header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the <sys/types.h> header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the <sys/uio.h> header file. */ +#define HAVE_SYS_UIO_H 1 + +/* Define to 1 if you have the <time.h> header file. */ +#define HAVE_TIME_H 1 + +/* Define to 1 if you have the <unistd.h> header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the windows.h header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Define to 1 if you have the winsock2.h header file. */ +/* #undef HAVE_WINSOCK2_H */ + +/* Define to 1 if you have the winsock.h header file. */ +/* #undef HAVE_WINSOCK_H */ + +/* Define to 1 if you have the writev function. */ +#define HAVE_WRITEV 1 + +/* Define to 1 if you have the ws2tcpip.h header file. */ +/* #undef HAVE_WS2TCPIP_H */ + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Define to 1 if you need the malloc.h header file even with stdlib.h */ +/* #undef NEED_MALLOC_H */ + +/* Define to 1 if you need the memory.h header file even with stdlib.h */ +/* #undef NEED_MEMORY_H */ + +/* Define to 1 if _REENTRANT preprocessor symbol must be defined. */ +/* #undef NEED_REENTRANT */ + +/* Define to 1 if _THREAD_SAFE preprocessor symbol must be defined. */ +/* #undef NEED_THREAD_SAFE */ + +/* cpu-machine-OS */ +#define OS "x86_64-unknown-linux-gnu" + +/* Name of package */ +#define PACKAGE "c-ares" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "c-ares mailing list: http://cool.haxx.se/mailman/listinfo/c-ares" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "c-ares" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "c-ares -" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "c-ares" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "-" + +/* a suitable file/device to read random data from */ +#define RANDOM_FILE "/dev/urandom" + +/* Define to the type qualifier pointed by arg 5 for recvfrom. */ +#define RECVFROM_QUAL_ARG5 + +/* Define to the type of arg 1 for recvfrom. */ +#define RECVFROM_TYPE_ARG1 int + +/* Define to the type pointed by arg 2 for recvfrom. */ +#define RECVFROM_TYPE_ARG2 void + +/* Define to 1 if the type pointed by arg 2 for recvfrom is void. */ +#define RECVFROM_TYPE_ARG2_IS_VOID 1 + +/* Define to the type of arg 3 for recvfrom. */ +#define RECVFROM_TYPE_ARG3 size_t + +/* Define to the type of arg 4 for recvfrom. */ +#define RECVFROM_TYPE_ARG4 int + +/* Define to the type pointed by arg 5 for recvfrom. */ +#define RECVFROM_TYPE_ARG5 struct sockaddr + +/* Define to 1 if the type pointed by arg 5 for recvfrom is void. */ +/* #undef RECVFROM_TYPE_ARG5_IS_VOID */ + +/* Define to the type pointed by arg 6 for recvfrom. */ +#define RECVFROM_TYPE_ARG6 socklen_t + +/* Define to 1 if the type pointed by arg 6 for recvfrom is void. */ +/* #undef RECVFROM_TYPE_ARG6_IS_VOID */ + +/* Define to the function return type for recvfrom. */ +#define RECVFROM_TYPE_RETV ssize_t + +/* Define to the type of arg 1 for recv. */ +#define RECV_TYPE_ARG1 int + +/* Define to the type of arg 2 for recv. */ +#define RECV_TYPE_ARG2 void * + +/* Define to the type of arg 3 for recv. */ +#define RECV_TYPE_ARG3 size_t + +/* Define to the type of arg 4 for recv. */ +#define RECV_TYPE_ARG4 int + +/* Define to the function return type for recv. */ +#define RECV_TYPE_RETV ssize_t + +/* Define as the return type of signal handlers (`int' or `void'). */ +#define RETSIGTYPE void + +/* Define to the type qualifier of arg 2 for send. */ +#define SEND_QUAL_ARG2 const + +/* Define to the type of arg 1 for send. */ +#define SEND_TYPE_ARG1 int + +/* Define to the type of arg 2 for send. */ +#define SEND_TYPE_ARG2 void * + +/* Define to the type of arg 3 for send. */ +#define SEND_TYPE_ARG3 size_t + +/* Define to the type of arg 4 for send. */ +#define SEND_TYPE_ARG4 int + +/* Define to the function return type for send. */ +#define SEND_TYPE_RETV ssize_t + +/* The size of `int', as computed by sizeof. */ +#define SIZEOF_INT 4 + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 8 + +/* The size of `short', as computed by sizeof. */ +#define SIZEOF_SHORT 2 + +/* The size of `size_t', as computed by sizeof. */ +#define SIZEOF_SIZE_T 8 + +/* The size of `struct in6_addr', as computed by sizeof. */ +#define SIZEOF_STRUCT_IN6_ADDR 16 + +/* The size of `struct in_addr', as computed by sizeof. */ +#define SIZEOF_STRUCT_IN_ADDR 4 + +/* The size of `time_t', as computed by sizeof. */ +#define SIZEOF_TIME_T 8 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ +#define TIME_WITH_SYS_TIME 1 + +/* Define to disable non-blocking sockets. */ +/* #undef USE_BLOCKING_SOCKETS */ + +/* Version number of package */ +#define VERSION "-" + +/* Define to avoid automatic inclusion of winsock.h */ +/* #undef WIN32_LEAN_AND_MEAN */ + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Define to 1 if OS is AIX. */ +#ifndef _ALL_SOURCE +/* # undef _ALL_SOURCE */ +#endif + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Type to use in place of in_addr_t when system does not provide it. */ +/* #undef in_addr_t */ + +/* Define to `unsigned int' if <sys/types.h> does not define. */ +/* #undef size_t */ + +/* the signed version of size_t */ +/* #undef ssize_t */ diff --git a/src/c-ares/gen_build_yaml.py b/src/c-ares/gen_build_yaml.py new file mode 100755 index 0000000000..ae61c7856a --- /dev/null +++ b/src/c-ares/gen_build_yaml.py @@ -0,0 +1,149 @@ +#!/usr/bin/env python2.7 + +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +import re +import os +import sys +import yaml + +os.chdir(os.path.dirname(sys.argv[0])+'/../..') + +out = {} + +try: + def gen_ares_build(x): + subprocess.call("third_party/c-ares/buildconf", shell=True) + subprocess.call("third_party/c-ares/configure", shell=True) + + def config_platform(x): + if 'linux' in sys.platform: + return 'src/c-ares/config_linux/ares_config.h' + if 'darwin' in sys.platform: + return 'src/c-ares/config_darwin/ares_config.h' + if not os.path.isfile('third_party/c-ares/ares_config.h'): + gen_ares_build(x) + return 'third_party/c-ares/ares_config.h' + + def ares_build(x): + if os.path.isfile('src/c-ares/ares_build.h'): + return 'src/c-ares/ares_build.h' + if not os.path.isfile('third_party/c-ares/ares_build.h'): + gen_ares_build(x) + return 'third_party/c-ares/ares_build.h' + + out['libs'] = [{ + 'name': 'ares', + 'defaults': 'ares', + 'build': 'private', + 'language': 'c', + 'secure': 'no', + 'src': [ + "third_party/c-ares/ares__close_sockets.c", + "third_party/c-ares/ares__get_hostent.c", + "third_party/c-ares/ares__read_line.c", + "third_party/c-ares/ares__timeval.c", + "third_party/c-ares/ares_cancel.c", + "third_party/c-ares/ares_create_query.c", + "third_party/c-ares/ares_data.c", + "third_party/c-ares/ares_destroy.c", + "third_party/c-ares/ares_expand_name.c", + "third_party/c-ares/ares_expand_string.c", + "third_party/c-ares/ares_fds.c", + "third_party/c-ares/ares_free_hostent.c", + "third_party/c-ares/ares_free_string.c", + "third_party/c-ares/ares_getenv.c", + "third_party/c-ares/ares_gethostbyaddr.c", + "third_party/c-ares/ares_gethostbyname.c", + "third_party/c-ares/ares_getnameinfo.c", + "third_party/c-ares/ares_getopt.c", + "third_party/c-ares/ares_getsock.c", + "third_party/c-ares/ares_init.c", + "third_party/c-ares/ares_library_init.c", + "third_party/c-ares/ares_llist.c", + "third_party/c-ares/ares_mkquery.c", + "third_party/c-ares/ares_nowarn.c", + "third_party/c-ares/ares_options.c", + "third_party/c-ares/ares_parse_a_reply.c", + "third_party/c-ares/ares_parse_aaaa_reply.c", + "third_party/c-ares/ares_parse_mx_reply.c", + "third_party/c-ares/ares_parse_naptr_reply.c", + "third_party/c-ares/ares_parse_ns_reply.c", + "third_party/c-ares/ares_parse_ptr_reply.c", + "third_party/c-ares/ares_parse_soa_reply.c", + "third_party/c-ares/ares_parse_srv_reply.c", + "third_party/c-ares/ares_parse_txt_reply.c", + "third_party/c-ares/ares_platform.c", + "third_party/c-ares/ares_process.c", + "third_party/c-ares/ares_query.c", + "third_party/c-ares/ares_search.c", + "third_party/c-ares/ares_send.c", + "third_party/c-ares/ares_strcasecmp.c", + "third_party/c-ares/ares_strdup.c", + "third_party/c-ares/ares_strerror.c", + "third_party/c-ares/ares_timeout.c", + "third_party/c-ares/ares_version.c", + "third_party/c-ares/ares_writev.c", + "third_party/c-ares/bitncmp.c", + "third_party/c-ares/inet_net_pton.c", + "third_party/c-ares/inet_ntop.c", + "third_party/c-ares/windows_port.c", + ], + 'headers': [ + "third_party/c-ares/ares.h", + "third_party/c-ares/ares_data.h", + "third_party/c-ares/ares_dns.h", + "third_party/c-ares/ares_getenv.h", + "third_party/c-ares/ares_getopt.h", + "third_party/c-ares/ares_inet_net_pton.h", + "third_party/c-ares/ares_iphlpapi.h", + "third_party/c-ares/ares_ipv6.h", + "third_party/c-ares/ares_library_init.h", + "third_party/c-ares/ares_llist.h", + "third_party/c-ares/ares_nowarn.h", + "third_party/c-ares/ares_platform.h", + "third_party/c-ares/ares_private.h", + "third_party/c-ares/ares_rules.h", + "third_party/c-ares/ares_setup.h", + "third_party/c-ares/ares_strcasecmp.h", + "third_party/c-ares/ares_strdup.h", + "third_party/c-ares/ares_version.h", + "third_party/c-ares/bitncmp.h", + "third_party/c-ares/config-win32.h", + "third_party/c-ares/setup_once.h", + "src/c-ares/ares_build.h", + "src/c-ares/config_linux/ares_config.h", + "src/c-ares/config_darwin/ares_config.h" + ], + }] +except: + pass + +print yaml.dump(out) diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_config/client_channel.c index 2c0c4abffc..2977639db7 100644 --- a/src/core/ext/client_config/client_channel.c +++ b/src/core/ext/client_config/client_channel.c @@ -233,7 +233,7 @@ static void cc_on_config_changed(grpc_exec_ctx *exec_ctx, void *arg, watch_lb_policy(exec_ctx, chand, lb_policy, state); } GRPC_CHANNEL_STACK_REF(chand->owning_stack, "resolver"); - grpc_resolver_next(exec_ctx, chand->resolver, + grpc_resolver_next(exec_ctx, chand->resolver, NULL, &chand->incoming_configuration, &chand->on_config_changed); gpr_mu_unlock(&chand->mu_config); @@ -411,7 +411,9 @@ static int cc_pick_subchannel(grpc_exec_ctx *exec_ctx, void *elemp, if (chand->resolver != NULL && !chand->started_resolving) { chand->started_resolving = 1; GRPC_CHANNEL_STACK_REF(chand->owning_stack, "resolver"); - grpc_resolver_next(exec_ctx, chand->resolver, + // grpc_polling_entity_add_to_pollset_set(exec_ctx, calld->pollent, + // chand->interested_parties); + grpc_resolver_next(exec_ctx, chand->resolver, calld->pollent, &chand->incoming_configuration, &chand->on_config_changed); } @@ -523,13 +525,18 @@ void grpc_client_channel_set_resolver(grpc_exec_ctx *exec_ctx, GPR_ASSERT(!chand->resolver); chand->resolver = resolver; GRPC_RESOLVER_REF(resolver, "channel"); - if (!grpc_closure_list_empty(chand->waiting_for_config_closures) || - chand->exit_idle_when_lb_policy_arrives) { - chand->started_resolving = 1; - GRPC_CHANNEL_STACK_REF(chand->owning_stack, "resolver"); - grpc_resolver_next(exec_ctx, resolver, &chand->incoming_configuration, - &chand->on_config_changed); - } + // TODO(zyc): check if the following part is needed + // if (!grpc_closure_list_empty(chand->waiting_for_config_closures) || + // chand->exit_idle_when_lb_policy_arrives) { + // chand->started_resolving = 1; + // GRPC_CHANNEL_STACK_REF(chand->owning_stack, "resolver"); + // grpc_resolver_next(exec_ctx, resolver, &chand->incoming_configuration, + // &chand->on_config_changed); + // gpr_log(GPR_ERROR, "%" PRIuPTR "%" PRIuPTR "%" + // PRIuPTR, chand->interested_parties->pollset_count, + // chand->interested_parties->pollset_set_count, + // chand->interested_parties->fd_count); + // } gpr_mu_unlock(&chand->mu_config); } @@ -547,7 +554,7 @@ grpc_connectivity_state grpc_client_channel_check_connectivity_state( if (!chand->started_resolving && chand->resolver != NULL) { GRPC_CHANNEL_STACK_REF(chand->owning_stack, "resolver"); chand->started_resolving = 1; - grpc_resolver_next(exec_ctx, chand->resolver, + grpc_resolver_next(exec_ctx, chand->resolver, NULL, &chand->incoming_configuration, &chand->on_config_changed); } diff --git a/src/core/ext/client_config/resolver.c b/src/core/ext/client_config/resolver.c index eb004455bd..ad9d30b302 100644 --- a/src/core/ext/client_config/resolver.c +++ b/src/core/ext/client_config/resolver.c @@ -36,6 +36,7 @@ void grpc_resolver_init(grpc_resolver *resolver, const grpc_resolver_vtable *vtable) { resolver->vtable = vtable; + resolver->pollset_set = grpc_pollset_set_create(); gpr_ref_init(&resolver->refs, 1); } @@ -62,6 +63,7 @@ void grpc_resolver_unref(grpc_resolver *resolver, void grpc_resolver_unref(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver) { #endif if (gpr_unref(&resolver->refs)) { + grpc_pollset_set_destroy(resolver->pollset_set); resolver->vtable->destroy(exec_ctx, resolver); } } @@ -75,8 +77,16 @@ void grpc_resolver_channel_saw_error(grpc_exec_ctx *exec_ctx, resolver->vtable->channel_saw_error(exec_ctx, resolver); } +// void grpc_resolver_next(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver, +// grpc_client_config **target_config, +// grpc_closure *on_complete) { +// resolver->vtable->next(exec_ctx, resolver, target_config, on_complete); +// } + void grpc_resolver_next(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver, + grpc_polling_entity *pollent, grpc_client_config **target_config, grpc_closure *on_complete) { - resolver->vtable->next(exec_ctx, resolver, target_config, on_complete); + resolver->vtable->next(exec_ctx, resolver, pollent, target_config, + on_complete); } diff --git a/src/core/ext/client_config/resolver.h b/src/core/ext/client_config/resolver.h index 6ecb5d2774..fd907b2049 100644 --- a/src/core/ext/client_config/resolver.h +++ b/src/core/ext/client_config/resolver.h @@ -45,6 +45,7 @@ typedef struct grpc_resolver_vtable grpc_resolver_vtable; objects */ struct grpc_resolver { const grpc_resolver_vtable *vtable; + grpc_pollset_set *pollset_set; gpr_refcount refs; }; @@ -52,8 +53,12 @@ struct grpc_resolver_vtable { void (*destroy)(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver); void (*shutdown)(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver); void (*channel_saw_error)(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver); + // void (*next)(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver, + // grpc_client_config **target_config, grpc_closure + // *on_complete); void (*next)(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver, - grpc_client_config **target_config, grpc_closure *on_complete); + grpc_polling_entity *pollent, grpc_client_config **target_config, + grpc_closure *on_complete); }; #ifdef GRPC_RESOLVER_REFCOUNT_DEBUG @@ -87,7 +92,12 @@ void grpc_resolver_channel_saw_error(grpc_exec_ctx *exec_ctx, If resolution is fatally broken, set *target_config to NULL and schedule on_complete. */ +// void grpc_resolver_next(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver, +// grpc_client_config **target_config, +// grpc_closure *on_complete); + void grpc_resolver_next(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver, + grpc_polling_entity *pollent, grpc_client_config **target_config, grpc_closure *on_complete); diff --git a/src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c b/src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c new file mode 100644 index 0000000000..ae358149a0 --- /dev/null +++ b/src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c @@ -0,0 +1,368 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include <grpc/support/port_platform.h> +#include <string.h> + +#include <grpc/support/alloc.h> +#include <grpc/support/host_port.h> +#include <grpc/support/string_util.h> + +#include "src/core/ext/client_config/lb_policy_registry.h" +#include "src/core/ext/client_config/resolver_registry.h" +#include "src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.h" +#include "src/core/lib/iomgr/resolve_address.h" +#include "src/core/lib/iomgr/timer.h" +#include "src/core/lib/support/backoff.h" +#include "src/core/lib/support/string.h" + +#define BACKOFF_MULTIPLIER 1.6 +#define BACKOFF_JITTER 0.2 +#define BACKOFF_MIN_SECONDS 1 +#define BACKOFF_MAX_SECONDS 120 + +typedef struct { + /** base class: must be first */ + grpc_resolver base; + /** refcount */ + gpr_refcount refs; + /** name to resolve */ + char *name; + /** default port to use */ + char *default_port; + /** subchannel factory */ + grpc_client_channel_factory *client_channel_factory; + /** load balancing policy name */ + char *lb_policy_name; + + /** mutex guarding the rest of the state */ + gpr_mu mu; + /** are we currently resolving? */ + int resolving; + /** which version of resolved_config have we published? */ + int published_version; + /** which version of resolved_config is current? */ + int resolved_version; + /** pending next completion, or NULL */ + grpc_closure *next_completion; + /** target config address for next completion */ + grpc_client_config **target_config; + /** current (fully resolved) config */ + grpc_client_config *resolved_config; + /** retry timer */ + bool have_retry_timer; + grpc_timer retry_timer; + /** retry backoff state */ + gpr_backoff backoff_state; + + /** currently resolving addresses */ + grpc_resolved_addresses *addresses; + + grpc_polling_entity *pollent; +} dns_resolver; + +static void dns_destroy(grpc_exec_ctx *exec_ctx, grpc_resolver *r); + +static void dns_start_resolving_locked(grpc_exec_ctx *exec_ctx, + dns_resolver *r); +static void dns_maybe_finish_next_locked(grpc_exec_ctx *exec_ctx, + dns_resolver *r); + +static void dns_shutdown(grpc_exec_ctx *exec_ctx, grpc_resolver *r); +static void dns_channel_saw_error(grpc_exec_ctx *exec_ctx, grpc_resolver *r); +static void dns_next(grpc_exec_ctx *exec_ctx, grpc_resolver *r, + grpc_polling_entity *pollent, + grpc_client_config **target_config, + grpc_closure *on_complete); + +static const grpc_resolver_vtable dns_resolver_vtable = { + dns_destroy, dns_shutdown, dns_channel_saw_error, dns_next}; + +static void dns_shutdown(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver) { + dns_resolver *r = (dns_resolver *)resolver; + gpr_mu_lock(&r->mu); + if (r->have_retry_timer) { + grpc_timer_cancel(exec_ctx, &r->retry_timer); + } + if (r->next_completion != NULL) { + *r->target_config = NULL; + grpc_exec_ctx_sched(exec_ctx, r->next_completion, + GRPC_ERROR_CREATE("Resolver Shutdown"), NULL); + r->next_completion = NULL; + } + gpr_mu_unlock(&r->mu); +} + +static void dns_channel_saw_error(grpc_exec_ctx *exec_ctx, + grpc_resolver *resolver) { + dns_resolver *r = (dns_resolver *)resolver; + gpr_mu_lock(&r->mu); + if (!r->resolving) { + gpr_backoff_reset(&r->backoff_state); + dns_start_resolving_locked(exec_ctx, r); + } + gpr_mu_unlock(&r->mu); +} + +static void dns_on_retry_timer(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + dns_resolver *r = arg; + + gpr_mu_lock(&r->mu); + r->have_retry_timer = false; + if (error == GRPC_ERROR_NONE) { + if (!r->resolving) { + dns_start_resolving_locked(exec_ctx, r); + } + } + gpr_mu_unlock(&r->mu); + + GRPC_RESOLVER_UNREF(exec_ctx, &r->base, "retry-timer"); +} + +static void dns_on_resolved(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + gpr_log(GPR_ERROR, "dns_on_resolved"); + dns_resolver *r = arg; + grpc_client_config *config = NULL; + grpc_lb_policy *lb_policy; + gpr_log(GPR_ERROR, "before mu"); + gpr_mu_lock(&r->mu); + gpr_log(GPR_ERROR, "after mu"); + GPR_ASSERT(r->resolving); + r->resolving = 0; + grpc_resolved_addresses *addresses = r->addresses; + if (addresses != NULL) { + gpr_log(GPR_ERROR, "addresses != NULL"); + grpc_lb_policy_args lb_policy_args; + config = grpc_client_config_create(); + memset(&lb_policy_args, 0, sizeof(lb_policy_args)); + lb_policy_args.addresses = addresses; + lb_policy_args.client_channel_factory = r->client_channel_factory; + lb_policy = + grpc_lb_policy_create(exec_ctx, r->lb_policy_name, &lb_policy_args); + if (lb_policy != NULL) { + grpc_client_config_set_lb_policy(config, lb_policy); + GRPC_LB_POLICY_UNREF(exec_ctx, lb_policy, "construction"); + } + if (r->pollent) { + grpc_polling_entity_del_from_pollset_set(exec_ctx, r->pollent, + r->base.pollset_set); + r->pollent = NULL; + } + grpc_resolved_addresses_destroy(addresses); + } else { + gpr_log(GPR_ERROR, "addresses == NULL"); + gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC); + gpr_timespec next_try = gpr_backoff_step(&r->backoff_state, now); + gpr_timespec timeout = gpr_time_sub(next_try, now); + const char *msg = grpc_error_string(error); + gpr_log(GPR_DEBUG, "dns resolution failed: %s", msg); + grpc_error_free_string(msg); + GPR_ASSERT(!r->have_retry_timer); + r->have_retry_timer = true; + GRPC_RESOLVER_REF(&r->base, "retry-timer"); + if (gpr_time_cmp(timeout, gpr_time_0(timeout.clock_type)) <= 0) { + gpr_log(GPR_DEBUG, "retrying in %" PRId64 ".%09d seconds", timeout.tv_sec, + timeout.tv_nsec); + } else { + gpr_log(GPR_DEBUG, "retrying immediately"); + } + grpc_timer_init(exec_ctx, &r->retry_timer, next_try, dns_on_retry_timer, r, + now); + } + if (r->resolved_config) { + grpc_client_config_unref(exec_ctx, r->resolved_config); + } + r->resolved_config = config; + r->resolved_version++; + dns_maybe_finish_next_locked(exec_ctx, r); + gpr_mu_unlock(&r->mu); + gpr_log(GPR_ERROR, "mu_unlock"); + GRPC_RESOLVER_UNREF(exec_ctx, &r->base, "dns-resolving"); + gpr_log(GPR_ERROR, "after GRPC_RESOLVER_UNREF"); +} + +static void dns_next(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver, + grpc_polling_entity *pollent, + grpc_client_config **target_config, + grpc_closure *on_complete) { + dns_resolver *r = (dns_resolver *)resolver; + gpr_mu_lock(&r->mu); + GPR_ASSERT(!r->next_completion); + r->next_completion = on_complete; + r->target_config = target_config; + if (r->resolved_version == 0 && !r->resolving) { + gpr_backoff_reset(&r->backoff_state); + gpr_log(GPR_ERROR, "dns_start_resolving_locked"); + GRPC_RESOLVER_REF(&r->base, "dns-resolving"); + GPR_ASSERT(!r->resolving); + r->resolving = 1; + r->addresses = NULL; + r->pollent = NULL; + if (grpc_ares_need_poll_entity() && pollent) { + r->pollent = pollent; + grpc_polling_entity_add_to_pollset_set(exec_ctx, pollent, + r->base.pollset_set); + } else { + gpr_log(GPR_ERROR, "pollent is NULL"); + } + grpc_resolve_address_ares( + exec_ctx, r->name, r->default_port, r->base.pollset_set, + grpc_closure_create(dns_on_resolved, r), &r->addresses); + } else { + dns_maybe_finish_next_locked(exec_ctx, r); + } + gpr_mu_unlock(&r->mu); +} + +static void dns_start_resolving_locked(grpc_exec_ctx *exec_ctx, + dns_resolver *r) { + gpr_log(GPR_ERROR, "dns_start_resolving_locked"); + GRPC_RESOLVER_REF(&r->base, "dns-resolving"); + GPR_ASSERT(!r->resolving); + r->resolving = 1; + r->addresses = NULL; +#ifdef GRPC_NATIVE_ADDRESS_RESOLVE + grpc_resolve_address(exec_ctx, r->name, r->default_port, + grpc_closure_create(dns_on_resolved, r), &r->addresses); +#else + grpc_resolve_address_ares( + exec_ctx, r->name, r->default_port, r->base.pollset_set, + grpc_closure_create(dns_on_resolved, r), &r->addresses); +#endif + // grpc_resolve_address(exec_ctx, r->name, r->default_port, + // grpc_closure_create(dns_on_resolved, r), &r->addresses); +} + +static void dns_maybe_finish_next_locked(grpc_exec_ctx *exec_ctx, + dns_resolver *r) { + if (r->next_completion != NULL && + r->resolved_version != r->published_version) { + *r->target_config = r->resolved_config; + if (r->resolved_config) { + grpc_client_config_ref(r->resolved_config); + } + grpc_exec_ctx_sched(exec_ctx, r->next_completion, GRPC_ERROR_NONE, NULL); + r->next_completion = NULL; + r->published_version = r->resolved_version; + } +} + +static void dns_destroy(grpc_exec_ctx *exec_ctx, grpc_resolver *gr) { + dns_resolver *r = (dns_resolver *)gr; + gpr_mu_destroy(&r->mu); +#ifndef GRPC_NATIVE_ADDRESS_RESOLVE + grpc_ares_cleanup(); +#endif + if (r->resolved_config) { + grpc_client_config_unref(exec_ctx, r->resolved_config); + } + grpc_client_channel_factory_unref(exec_ctx, r->client_channel_factory); + gpr_free(r->name); + gpr_free(r->default_port); + gpr_free(r->lb_policy_name); + gpr_free(r); +} + +static grpc_resolver *dns_create(grpc_resolver_args *args, + const char *default_port, + const char *lb_policy_name) { + dns_resolver *r; + grpc_error *error = GRPC_ERROR_NONE; + const char *path = args->uri->path; + + if (0 != strcmp(args->uri->authority, "")) { + gpr_log(GPR_ERROR, "authority based dns uri's not supported"); + return NULL; + } + +#ifndef GRPC_NATIVE_ADDRESS_RESOLVE + error = grpc_ares_init(); +#endif + if (error != GRPC_ERROR_NONE) { + GRPC_LOG_IF_ERROR("ares_library_init() failed", error); + return NULL; + } + + if (path[0] == '/') ++path; + + r = gpr_malloc(sizeof(dns_resolver)); + memset(r, 0, sizeof(*r)); + gpr_ref_init(&r->refs, 1); + gpr_mu_init(&r->mu); + grpc_resolver_init(&r->base, &dns_resolver_vtable); + r->name = gpr_strdup(path); + r->default_port = gpr_strdup(default_port); + r->client_channel_factory = args->client_channel_factory; + gpr_backoff_init(&r->backoff_state, BACKOFF_MULTIPLIER, BACKOFF_JITTER, + BACKOFF_MIN_SECONDS * 1000, BACKOFF_MAX_SECONDS * 1000); + grpc_client_channel_factory_ref(r->client_channel_factory); + r->lb_policy_name = gpr_strdup(lb_policy_name); + return &r->base; +} + +/* + * FACTORY + */ + +static void dns_factory_ref(grpc_resolver_factory *factory) {} + +static void dns_factory_unref(grpc_resolver_factory *factory) {} + +static grpc_resolver *dns_factory_create_resolver( + grpc_resolver_factory *factory, grpc_resolver_args *args) { + return dns_create(args, "https", "pick_first"); +} + +static char *dns_factory_get_default_host_name(grpc_resolver_factory *factory, + grpc_uri *uri) { + const char *path = uri->path; + if (path[0] == '/') ++path; + return gpr_strdup(path); +} + +static const grpc_resolver_factory_vtable dns_factory_vtable = { + dns_factory_ref, dns_factory_unref, dns_factory_create_resolver, + dns_factory_get_default_host_name, "dns"}; +static grpc_resolver_factory dns_resolver_factory = {&dns_factory_vtable}; + +static grpc_resolver_factory *dns_resolver_factory_create() { + return &dns_resolver_factory; +} + +void grpc_resolver_dns_ares_init(void) { + grpc_register_resolver_type(dns_resolver_factory_create()); +} + +void grpc_resolver_dns_ares_shutdown(void) {} diff --git a/src/core/ext/resolver/dns/c_ares/grpc_ares_ev_dirver_windows.c b/src/core/ext/resolver/dns/c_ares/grpc_ares_ev_dirver_windows.c new file mode 100644 index 0000000000..cd8dfbc326 --- /dev/null +++ b/src/core/ext/resolver/dns/c_ares/grpc_ares_ev_dirver_windows.c @@ -0,0 +1,34 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver.h" diff --git a/src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver.h b/src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver.h new file mode 100644 index 0000000000..25ba5e59de --- /dev/null +++ b/src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver.h @@ -0,0 +1,59 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_CORE_EXT_RESOLVER_DNS_C_ARES_GRPC_ARES_EV_DRIVER_H +#define GRPC_CORE_EXT_RESOLVER_DNS_C_ARES_GRPC_ARES_EV_DRIVER_H + +#include <grpc/support/port_platform.h> +#ifndef GRPC_NATIVE_ADDRESS_RESOLVE + +#include <ares.h> + +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/pollset_set.h" + +typedef struct grpc_ares_ev_driver grpc_ares_ev_driver; + +void grpc_ares_notify_on_event(grpc_exec_ctx *exec_ctx, + grpc_ares_ev_driver *ev_driver); +void grpc_ares_gethostbyname(grpc_ares_ev_driver *ev_driver, const char *host, + ares_host_callback on_done_cb, void *arg); +ares_channel *grpc_ares_ev_driver_get_channel(grpc_ares_ev_driver *ev_driver); + +grpc_error *grpc_ares_ev_driver_create(grpc_ares_ev_driver **ev_driver, + grpc_pollset_set *pollset_set); +void grpc_ares_ev_driver_destroy(grpc_ares_ev_driver *ev_driver); + +#endif /* GRPC_NATIVE_ADDRESS_RESOLVE */ + +#endif /* GRPC_CORE_EXT_RESOLVER_DNS_C_ARES_GRPC_ARES_EV_DRIVER_H */ diff --git a/src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c b/src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c new file mode 100644 index 0000000000..31fc7e1dfe --- /dev/null +++ b/src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c @@ -0,0 +1,206 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ +#include <grpc/support/port_platform.h> +#ifndef GRPC_NATIVE_ADDRESS_RESOLVE +#ifdef GPR_POSIX_SOCKET + +#include "src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver.h" + +#include "src/core/lib/iomgr/ev_posix.h" +#include "src/core/lib/iomgr/sockaddr.h" + +#include <ares.h> +#include <grpc/support/alloc.h> +#include <grpc/support/log.h> +#include <grpc/support/string_util.h> +#include <grpc/support/time.h> +#include <grpc/support/useful.h> +#include "src/core/lib/iomgr/iomgr_internal.h" +#include "src/core/lib/iomgr/sockaddr_utils.h" +#include "src/core/lib/iomgr/unix_sockets_posix.h" +#include "src/core/lib/support/block_annotate.h" +#include "src/core/lib/support/string.h" + +typedef struct fd_pair { + grpc_fd *grpc_fd; + int fd; + struct fd_pair *next; +} fd_pair; + +struct grpc_ares_ev_driver { + bool closing; + ares_socket_t socks[ARES_GETSOCK_MAXNUM]; + int bitmask; + grpc_closure driver_closure; + grpc_pollset_set *pollset_set; + ares_channel channel; + fd_pair *fds; +}; + +grpc_error *grpc_ares_ev_driver_create(grpc_ares_ev_driver **ev_driver, + grpc_pollset_set *pollset_set) { + int status; + *ev_driver = gpr_malloc(sizeof(grpc_ares_ev_driver)); + status = ares_init(&(*ev_driver)->channel); + if (status != ARES_SUCCESS) { + gpr_free(*ev_driver); + return GRPC_ERROR_CREATE("Failed to init ares channel"); + } + (*ev_driver)->pollset_set = pollset_set; + (*ev_driver)->fds = NULL; + (*ev_driver)->closing = false; + return GRPC_ERROR_NONE; +} + +void grpc_ares_ev_driver_destroy(grpc_ares_ev_driver *ev_driver) { + // ev_driver->pollset_set = NULL; + ev_driver->closing = true; +} + +static fd_pair *get_fd(fd_pair **head, int fd) { + fd_pair dummy_head; + fd_pair *node; + fd_pair *ret; + dummy_head.next = *head; + node = &dummy_head; + while (node->next != NULL) { + if (node->next->fd == fd) { + ret = node->next; + node->next = node->next->next; + *head = dummy_head.next; + return ret; + } + } + return NULL; +} + +static void driver_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { + grpc_ares_ev_driver *d = arg; + size_t i; + gpr_log(GPR_ERROR, "driver_cb"); + if (error == GRPC_ERROR_NONE) { + gpr_log(GPR_ERROR, "GRPC_ERROR_NONE"); + for (i = 0; i < ARES_GETSOCK_MAXNUM; i++) { + ares_process_fd( + d->channel, + ARES_GETSOCK_READABLE(d->bitmask, i) ? d->socks[i] : ARES_SOCKET_BAD, + ARES_GETSOCK_WRITABLE(d->bitmask, i) ? d->socks[i] : ARES_SOCKET_BAD); + } + } else { + ares_cancel(d->channel); + } + grpc_ares_notify_on_event(exec_ctx, d); +} + +void grpc_ares_gethostbyname(grpc_ares_ev_driver *ev_driver, const char *host, + ares_host_callback on_done_cb, void *arg) { + ares_gethostbyname(ev_driver->channel, host, AF_UNSPEC, on_done_cb, arg); +} + +ares_channel *grpc_ares_ev_driver_get_channel(grpc_ares_ev_driver *ev_driver) { + return &ev_driver->channel; +} + +void grpc_ares_notify_on_event(grpc_exec_ctx *exec_ctx, + grpc_ares_ev_driver *ev_driver) { + size_t i; + fd_pair *new_list = NULL; + gpr_log(GPR_ERROR, "\n\n notify_on_event"); + if (!ev_driver->closing) { + ev_driver->bitmask = + ares_getsock(ev_driver->channel, ev_driver->socks, ARES_GETSOCK_MAXNUM); + grpc_closure_init(&ev_driver->driver_closure, driver_cb, ev_driver); + for (i = 0; i < ARES_GETSOCK_MAXNUM; i++) { + char *final_name; + gpr_asprintf(&final_name, "ares_ev_driver-%" PRIuPTR, i); + + if (ARES_GETSOCK_READABLE(ev_driver->bitmask, i) || + ARES_GETSOCK_WRITABLE(ev_driver->bitmask, i)) { + gpr_log(GPR_ERROR, "%d", ev_driver->socks[i]); + fd_pair *fdp = get_fd(&ev_driver->fds, ev_driver->socks[i]); + if (!fdp) { + gpr_log(GPR_ERROR, "new fd"); + fdp = gpr_malloc(sizeof(fd_pair)); + fdp->grpc_fd = grpc_fd_create(ev_driver->socks[i], final_name); + fdp->fd = ev_driver->socks[i]; + grpc_pollset_set_add_fd(exec_ctx, ev_driver->pollset_set, + fdp->grpc_fd); + // new_fd_pair->grpc_fd = fd; + // new_fd_pair->next = ev_driver->fds; + } + fdp->next = new_list; + new_list = fdp; + + if (ARES_GETSOCK_READABLE(ev_driver->bitmask, i)) { + gpr_log(GPR_ERROR, "READABLE"); + + grpc_fd_notify_on_read(exec_ctx, fdp->grpc_fd, + &ev_driver->driver_closure); + } + if (ARES_GETSOCK_WRITABLE(ev_driver->bitmask, i)) { + gpr_log(GPR_ERROR, "writable"); + + grpc_fd_notify_on_write(exec_ctx, fdp->grpc_fd, + &ev_driver->driver_closure); + } + } + gpr_free(final_name); + } + } + + while (ev_driver->fds != NULL) { + fd_pair *cur; + // int fd;s + cur = ev_driver->fds; + ev_driver->fds = ev_driver->fds->next; + gpr_log(GPR_ERROR, "fd in ev_driver: %d\n", cur->fd); + grpc_pollset_set_del_fd(exec_ctx, ev_driver->pollset_set, cur->grpc_fd); + gpr_log(GPR_ERROR, "grpc_pollset_set_del_fd"); + grpc_fd_shutdown(exec_ctx, cur->grpc_fd); + gpr_log(GPR_ERROR, "grpc_fd_shutdown"); + grpc_fd_orphan(exec_ctx, cur->grpc_fd, NULL, NULL, "come on.."); + gpr_log(GPR_ERROR, "grpc_fd_orphan"); + gpr_free(cur); + } + + ev_driver->fds = new_list; + if (ev_driver->closing) { + ares_destroy(ev_driver->channel); + gpr_free(ev_driver); + } + + gpr_log(GPR_ERROR, "eof notify_on_event"); +} + +#endif /* GPR_POSIX_SOCKET */ +#endif /* GRPC_NATIVE_ADDRESS_RESOLVE */ diff --git a/src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c b/src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c new file mode 100644 index 0000000000..e1f0f34a65 --- /dev/null +++ b/src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c @@ -0,0 +1,326 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include <grpc/support/port_platform.h> +#ifndef GRPC_NATIVE_ADDRESS_RESOLVE + +#include "src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.h" +#include "src/core/lib/iomgr/sockaddr.h" +#include "src/core/lib/iomgr/socket_utils_posix.h" + +#include <string.h> +#include <sys/types.h> + +#include <ares.h> +#include <grpc/support/alloc.h> +#include <grpc/support/host_port.h> +#include <grpc/support/log.h> +#include <grpc/support/string_util.h> +#include <grpc/support/thd.h> +#include <grpc/support/time.h> +#include <grpc/support/useful.h> +#include "src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver.h" +#include "src/core/lib/iomgr/executor.h" +#include "src/core/lib/iomgr/iomgr_internal.h" +#include "src/core/lib/iomgr/sockaddr_utils.h" +#include "src/core/lib/iomgr/unix_sockets_posix.h" +#include "src/core/lib/support/block_annotate.h" +#include "src/core/lib/support/string.h" + +static gpr_once g_basic_init = GPR_ONCE_INIT; +static gpr_mu g_init_mu; + +typedef struct grpc_ares_request { + char *name; + char *host; + char *port; + char *default_port; + grpc_polling_entity *pollent; + grpc_closure *on_done; + grpc_resolved_addresses **addrs_out; + grpc_closure request_closure; + void *arg; + int pending_quries; + int success; + grpc_error *error; + grpc_ares_ev_driver *ev_driver; +} grpc_ares_request; + +static void do_basic_init(void) { gpr_mu_init(&g_init_mu); } + +static void destroy_request(grpc_ares_request *request) { + grpc_ares_ev_driver_destroy(request->ev_driver); + + gpr_free(request->name); + gpr_free(request->host); + gpr_free(request->port); + gpr_free(request->default_port); +} + +static uint16_t strhtons(const char *port) { + if (strcmp(port, "http") == 0) { + return htons(80); + } else if (strcmp(port, "https") == 0) { + return htons(443); + } + return htons((unsigned short)atoi(port)); +} + +static void on_done_cb(void *arg, int status, int timeouts, + struct hostent *hostent) { + gpr_log(GPR_ERROR, "status: %d", status); + grpc_ares_request *r = (grpc_ares_request *)arg; + gpr_log(GPR_ERROR, "status: %s", r->name); + grpc_resolved_addresses **addresses = r->addrs_out; + size_t i; + size_t prev_naddr; + + if (status == ARES_SUCCESS) { + gpr_log(GPR_ERROR, "status ARES_SUCCESS"); + GRPC_ERROR_UNREF(r->error); + r->error = GRPC_ERROR_NONE; + r->success = 1; + if (*addresses == NULL) { + *addresses = gpr_malloc(sizeof(grpc_resolved_addresses)); + (*addresses)->naddrs = 0; + (*addresses)->addrs = NULL; + } + + prev_naddr = (*addresses)->naddrs; + for (i = 0; hostent->h_addr_list[i] != NULL; i++) { + } + (*addresses)->naddrs += i; + + gpr_log(GPR_ERROR, "naddr: %" PRIuPTR, (*addresses)->naddrs); + (*addresses)->addrs = + gpr_realloc((*addresses)->addrs, + sizeof(grpc_resolved_address) * (*addresses)->naddrs); + + for (i = prev_naddr; i < (*addresses)->naddrs; i++) { + memset(&(*addresses)->addrs[i], 0, sizeof(grpc_resolved_address)); + if (hostent->h_addrtype == AF_INET6) { + char output[INET6_ADDRSTRLEN]; + gpr_log(GPR_ERROR, "AF_INET6"); + struct sockaddr_in6 *addr; + + (*addresses)->addrs[i].len = sizeof(struct sockaddr_in6); + addr = (struct sockaddr_in6 *)&(*addresses)->addrs[i].addr; + + memcpy(&addr->sin6_addr, hostent->h_addr_list[i - prev_naddr], + sizeof(struct in6_addr)); + ares_inet_ntop(AF_INET6, &addr->sin6_addr, output, INET6_ADDRSTRLEN); + gpr_log(GPR_ERROR, "addr: %s", output); + gpr_log(GPR_ERROR, "port: %s", r->port); + addr->sin6_family = (sa_family_t)hostent->h_addrtype; + addr->sin6_port = strhtons(r->port); + } else { + char output[INET_ADDRSTRLEN]; + gpr_log(GPR_ERROR, "AF_INET"); + struct sockaddr_in *addr; + + (*addresses)->addrs[i].len = sizeof(struct sockaddr_in); + addr = (struct sockaddr_in *)&(*addresses)->addrs[i].addr; + + memcpy(&addr->sin_addr, hostent->h_addr_list[i - prev_naddr], + sizeof(struct in_addr)); + ares_inet_ntop(AF_INET, &addr->sin_addr, output, INET_ADDRSTRLEN); + gpr_log(GPR_ERROR, "addr: %s", output); + gpr_log(GPR_ERROR, "port: %s", r->port); + addr->sin_family = (sa_family_t)hostent->h_addrtype; + addr->sin_port = strhtons(r->port); + } + } + // ares_destroy(r->channel); + } else if (!r->success) { + gpr_log(GPR_ERROR, "status not ARES_SUCCESS"); + // TODO(zyc): add more error detail + if (r->error == GRPC_ERROR_NONE) { + r->error = GRPC_ERROR_CREATE("C-ares query error"); + } + } + if (--r->pending_quries == 0) { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_exec_ctx_sched(&exec_ctx, r->on_done, r->error, NULL); + grpc_exec_ctx_flush(&exec_ctx); + grpc_exec_ctx_finish(&exec_ctx); + + destroy_request(r); + gpr_free(r); + } +} + +static void request_resolving_address(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + grpc_ares_request *r = (grpc_ares_request *)arg; + grpc_ares_ev_driver *ev_driver = r->ev_driver; + ares_channel *channel = grpc_ares_ev_driver_get_channel(ev_driver); + gpr_log(GPR_ERROR, "before ares_gethostbyname %s", r->host); + r->pending_quries = 1; + if (grpc_ipv6_loopback_available()) { + r->pending_quries += 1; + ares_gethostbyname(*channel, r->host, AF_INET6, on_done_cb, r); + } + ares_gethostbyname(*channel, r->host, AF_INET, on_done_cb, r); + // grpc_ares_gethostbyname(r->ev_driver, r->host, on_dones_cb, r); + gpr_log(GPR_ERROR, "before ares_getsock"); + grpc_ares_notify_on_event(exec_ctx, ev_driver); + gpr_log(GPR_ERROR, "eof resolve_address_impl"); +} + +static int try_fake_resolve(const char *name, const char *port, + grpc_resolved_addresses **addresses) { + struct sockaddr_in sa; + struct sockaddr_in6 sa6; + memset(&sa, 0, sizeof(struct sockaddr_in)); + memset(&sa6, 0, sizeof(struct sockaddr_in6)); + if (0 != ares_inet_pton(AF_INET, name, &(sa.sin_addr))) { + gpr_log(GPR_ERROR, "AF_INET"); + *addresses = gpr_malloc(sizeof(grpc_resolved_addresses)); + (*addresses)->naddrs = 1; + (*addresses)->addrs = + gpr_malloc(sizeof(grpc_resolved_address) * (*addresses)->naddrs); + (*addresses)->addrs[0].len = sizeof(struct sockaddr_in); + sa.sin_family = AF_INET; + sa.sin_port = strhtons(port); + memcpy(&(*addresses)->addrs[0].addr, &sa, sizeof(struct sockaddr_in)); + return 1; + } + if (0 != ares_inet_pton(AF_INET6, name, &(sa6.sin6_addr))) { + char output[INET6_ADDRSTRLEN]; + gpr_log(GPR_ERROR, "AF_INET6"); + *addresses = gpr_malloc(sizeof(grpc_resolved_addresses)); + (*addresses)->naddrs = 1; + (*addresses)->addrs = + gpr_malloc(sizeof(grpc_resolved_address) * (*addresses)->naddrs); + (*addresses)->addrs[0].len = sizeof(struct sockaddr_in6); + sa6.sin6_family = AF_INET6; + sa6.sin6_port = strhtons(port); + memcpy(&(*addresses)->addrs[0].addr, &sa6, sizeof(struct sockaddr_in6)); + ares_inet_ntop(AF_INET6, &sa6.sin6_addr, output, INET6_ADDRSTRLEN); + gpr_log(GPR_ERROR, "addr: %s", output); + gpr_log(GPR_ERROR, "port: %s", port); + + return 1; + } + return 0; +} + +void grpc_resolve_address_ares_impl(grpc_exec_ctx *exec_ctx, const char *name, + const char *default_port, + grpc_pollset_set *pollset_set, + grpc_closure *on_done, + grpc_resolved_addresses **addrs) { + char *host; + char *port; + grpc_error *err; + grpc_ares_request *r = NULL; + grpc_ares_ev_driver *ev_driver; + + if (grpc_customized_resolve_address(name, default_port, addrs, &err) != 0) { + grpc_exec_ctx_sched(exec_ctx, on_done, err, NULL); + return; + } + GRPC_ERROR_UNREF(err); + err = GRPC_ERROR_NONE; + + /* parse name, splitting it into host and port parts */ + gpr_split_host_port(name, &host, &port); + if (host == NULL) { + err = grpc_error_set_str(GRPC_ERROR_CREATE("unparseable host:port"), + GRPC_ERROR_STR_TARGET_ADDRESS, name); + grpc_exec_ctx_sched(exec_ctx, on_done, err, NULL); + goto done; + } else if (port == NULL) { + if (default_port == NULL) { + err = grpc_error_set_str(GRPC_ERROR_CREATE("no port in name"), + GRPC_ERROR_STR_TARGET_ADDRESS, name); + grpc_exec_ctx_sched(exec_ctx, on_done, err, NULL); + goto done; + } + port = gpr_strdup(default_port); + } + + if (try_fake_resolve(host, port, addrs)) { + grpc_exec_ctx_sched(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); + } else { + err = grpc_ares_ev_driver_create(&ev_driver, pollset_set); + if (err != GRPC_ERROR_NONE) { + grpc_exec_ctx_sched(exec_ctx, on_done, err, NULL); + return; + } + r = gpr_malloc(sizeof(grpc_ares_request)); + r->ev_driver = ev_driver; + r->on_done = on_done; + r->addrs_out = addrs; + r->name = gpr_strdup(name); + r->default_port = gpr_strdup(default_port); + r->port = gpr_strdup(port); + r->host = gpr_strdup(host); + r->pending_quries = 0; + r->success = 0; + r->error = GRPC_ERROR_NONE; + grpc_closure_init(&r->request_closure, request_resolving_address, r); + grpc_exec_ctx_sched(exec_ctx, &r->request_closure, GRPC_ERROR_NONE, NULL); + } + +done: + gpr_free(host); + gpr_free(port); +} + +void (*grpc_resolve_address_ares)( + grpc_exec_ctx *exec_ctx, const char *name, const char *default_port, + grpc_pollset_set *pollset_set, grpc_closure *on_done, + grpc_resolved_addresses **addrs) = grpc_resolve_address_ares_impl; + +grpc_error *grpc_ares_init(void) { + gpr_once_init(&g_basic_init, do_basic_init); + gpr_mu_lock(&g_init_mu); + int status = ares_library_init(ARES_LIB_INIT_ALL); + gpr_mu_unlock(&g_init_mu); + + if (status != ARES_SUCCESS) { + return GRPC_ERROR_CREATE("ares_library_init failed"); + } + return GRPC_ERROR_NONE; +} + +void grpc_ares_cleanup(void) { + gpr_mu_lock(&g_init_mu); + ares_library_cleanup(); + gpr_mu_unlock(&g_init_mu); +} + +int grpc_ares_need_poll_entity(void) { return 1; } + +#endif /* GRPC_NATIVE_ADDRESS_RESOLVE */ diff --git a/src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.h b/src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.h new file mode 100644 index 0000000000..8fe3376aed --- /dev/null +++ b/src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.h @@ -0,0 +1,58 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_CORE_EXT_RESOLVER_DNS_C_ARES_GRPC_ARES_WRAPPER_H +#define GRPC_CORE_EXT_RESOLVER_DNS_C_ARES_GRPC_ARES_WRAPPER_H + +#include <grpc/support/port_platform.h> + +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/iomgr.h" +#include "src/core/lib/iomgr/polling_entity.h" +#include "src/core/lib/iomgr/resolve_address.h" + +extern void (*grpc_resolve_address_ares)(grpc_exec_ctx *exec_ctx, + const char *addr, + const char *default_port, + grpc_pollset_set *pollset_set, + grpc_closure *on_done, + grpc_resolved_addresses **addresses); + +grpc_error *grpc_ares_init(void); + +void grpc_ares_cleanup(void); + +/* TODO(zyc): remove this temporary hack after we can build c-ares on windows */ +int grpc_ares_need_poll_entity(void); + +#endif /* GRPC_CORE_EXT_RESOLVER_DNS_C_ARES_GRPC_ARES_WRAPPER_H */ diff --git a/src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c b/src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c new file mode 100644 index 0000000000..77c5044dae --- /dev/null +++ b/src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c @@ -0,0 +1,60 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* TODO(zyc): remove this fallback after we can build c-ares on windows */ + +#include <grpc/support/port_platform.h> +#ifdef GRPC_NATIVE_ADDRESS_RESOLVE + +#include "src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.h" + +void grpc_resolve_address_ares_impl(grpc_exec_ctx *exec_ctx, const char *name, + const char *default_port, + grpc_pollset_set *pollset_set, + grpc_closure *on_done, + grpc_resolved_addresses **addrs) { + grpc_resolve_address(exec_ctx, name, default_port, on_done, addrs); +} + +void (*grpc_resolve_address_ares)( + grpc_exec_ctx *exec_ctx, const char *name, const char *default_port, + grpc_pollset_set *pollset_set, grpc_closure *on_done, + grpc_resolved_addresses **addrs) = grpc_resolve_address_ares_impl; + +grpc_error *grpc_ares_init(void) { return GRPC_ERROR_NONE; } + +void grpc_ares_cleanup(void) {} + +int grpc_ares_need_poll_entity(void) { return 0; } + +#endif /* GRPC_NATIVE_ADDRESS_RESOLVE */ diff --git a/src/core/ext/resolver/dns/native/dns_resolver.c b/src/core/ext/resolver/dns/native/dns_resolver.c index 31ac968670..3627d957cb 100644 --- a/src/core/ext/resolver/dns/native/dns_resolver.c +++ b/src/core/ext/resolver/dns/native/dns_resolver.c @@ -97,6 +97,7 @@ static void dns_maybe_finish_next_locked(grpc_exec_ctx *exec_ctx, static void dns_shutdown(grpc_exec_ctx *exec_ctx, grpc_resolver *r); static void dns_channel_saw_error(grpc_exec_ctx *exec_ctx, grpc_resolver *r); static void dns_next(grpc_exec_ctx *exec_ctx, grpc_resolver *r, + grpc_polling_entity *pollent, grpc_client_config **target_config, grpc_closure *on_complete); @@ -130,6 +131,7 @@ static void dns_channel_saw_error(grpc_exec_ctx *exec_ctx, } static void dns_next(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver, + grpc_polling_entity *pollent, grpc_client_config **target_config, grpc_closure *on_complete) { dns_resolver *r = (dns_resolver *)resolver; diff --git a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c index 1f7cce2f43..792e2c3c02 100644 --- a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c +++ b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c @@ -79,6 +79,7 @@ static void sockaddr_shutdown(grpc_exec_ctx *exec_ctx, grpc_resolver *r); static void sockaddr_channel_saw_error(grpc_exec_ctx *exec_ctx, grpc_resolver *r); static void sockaddr_next(grpc_exec_ctx *exec_ctx, grpc_resolver *r, + grpc_polling_entity *pollent, grpc_client_config **target_config, grpc_closure *on_complete); @@ -108,6 +109,7 @@ static void sockaddr_channel_saw_error(grpc_exec_ctx *exec_ctx, } static void sockaddr_next(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver, + grpc_polling_entity *pollent, grpc_client_config **target_config, grpc_closure *on_complete) { sockaddr_resolver *r = (sockaddr_resolver *)resolver; diff --git a/src/core/lib/iomgr/resolve_address.h b/src/core/lib/iomgr/resolve_address.h index ddbe375755..a3a256eb52 100644 --- a/src/core/lib/iomgr/resolve_address.h +++ b/src/core/lib/iomgr/resolve_address.h @@ -66,4 +66,11 @@ extern grpc_error *(*grpc_blocking_resolve_address)( const char *name, const char *default_port, grpc_resolved_addresses **addresses); +/* Returns 0 by default. If it's overriden and returns value other than 0, + grpc_resolve_address will use its result. Result must be freed with + grpc_resolved_addresses_destroy. */ +extern int (*grpc_customized_resolve_address)( + const char *name, const char *default_port, + grpc_resolved_addresses **addresses, grpc_error **error); + #endif /* GRPC_CORE_LIB_IOMGR_RESOLVE_ADDRESS_H */ diff --git a/src/core/lib/iomgr/resolve_address_posix.c b/src/core/lib/iomgr/resolve_address_posix.c index 4e9f978584..4010c008b4 100644 --- a/src/core/lib/iomgr/resolve_address_posix.c +++ b/src/core/lib/iomgr/resolve_address_posix.c @@ -149,6 +149,18 @@ grpc_error *(*grpc_blocking_resolve_address)( const char *name, const char *default_port, grpc_resolved_addresses **addresses) = blocking_resolve_address_impl; +static int default_customized_resolve_address_impl( + const char *name, const char *default_port, + grpc_resolved_addresses **addresses, grpc_error **error) { + *error = GRPC_ERROR_NONE; + return 0; +} + +int (*grpc_customized_resolve_address)( + const char *name, const char *default_port, + grpc_resolved_addresses **addresses, + grpc_error **error) = default_customized_resolve_address_impl; + typedef struct { char *name; char *default_port; @@ -183,7 +195,15 @@ static void resolve_address_impl(grpc_exec_ctx *exec_ctx, const char *name, const char *default_port, grpc_closure *on_done, grpc_resolved_addresses **addrs) { - request *r = gpr_malloc(sizeof(request)); + request *r; + grpc_error *err; + + if (grpc_customized_resolve_address(name, default_port, addrs, &err) != 0) { + grpc_exec_ctx_sched(exec_ctx, on_done, err, NULL); + return; + } + + r = gpr_malloc(sizeof(request)); grpc_closure_init(&r->request_closure, do_request_thread, r); r->name = gpr_strdup(name); r->default_port = gpr_strdup(default_port); diff --git a/src/core/lib/iomgr/resolve_address_windows.c b/src/core/lib/iomgr/resolve_address_windows.c index 2af8af82dc..1c8f077698 100644 --- a/src/core/lib/iomgr/resolve_address_windows.c +++ b/src/core/lib/iomgr/resolve_address_windows.c @@ -143,6 +143,19 @@ grpc_error *(*grpc_blocking_resolve_address)( const char *name, const char *default_port, grpc_resolved_addresses **addresses) = blocking_resolve_address_impl; +static int default_customized_resolve_address_impl( + const char *name, const char *default_port, + grpc_resolved_addresses **addresses, grpc_error **error) { + *addresses = NULL; + *error = GRPC_ERROR_CANCELLED; + return 0; +} + +int (*grpc_customized_resolve_address)( + const char *name, const char *default_port, + grpc_resolved_addresses **addresses, + grpc_error **error) = default_customized_resolve_address_impl; + /* Callback to be passed to grpc_executor to asynch-ify * grpc_blocking_resolve_address */ static void do_request_thread(grpc_exec_ctx *exec_ctx, void *rp, @@ -171,7 +184,16 @@ static void resolve_address_impl(grpc_exec_ctx *exec_ctx, const char *name, const char *default_port, grpc_closure *on_done, grpc_resolved_addresses **addresses) { - request *r = gpr_malloc(sizeof(request)); + request *r; + grpc_error *err; + + if (grpc_customized_resolve_address(name, default_port, addresses, &err) != + 0) { + grpc_exec_ctx_sched(exec_ctx, on_done, err, NULL); + return; + } + + r = gpr_malloc(sizeof(request)); grpc_closure_init(&r->request_closure, do_request_thread, r); r->name = gpr_strdup(name); r->default_port = gpr_strdup(default_port); diff --git a/src/core/lib/security/credentials/fake/fake_credentials.c b/src/core/lib/security/credentials/fake/fake_credentials.c index 51cafd986f..cefc8d55a7 100644 --- a/src/core/lib/security/credentials/fake/fake_credentials.c +++ b/src/core/lib/security/credentials/fake/fake_credentials.c @@ -37,6 +37,7 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/executor.h" +#include "src/core/lib/iomgr/timer.h" #include <grpc/support/alloc.h> #include <grpc/support/log.h> @@ -94,14 +95,21 @@ static void md_only_test_destruct(grpc_call_credentials *creds) { grpc_credentials_md_store_unref(c->md_store); } +typedef struct simulated_token_fetch_args { + grpc_timer timer; + grpc_credentials_metadata_request *md_request; +} simulated_token_fetch_args; + static void on_simulated_token_fetch_done(grpc_exec_ctx *exec_ctx, void *user_data, grpc_error *error) { - grpc_credentials_metadata_request *r = - (grpc_credentials_metadata_request *)user_data; - grpc_md_only_test_credentials *c = (grpc_md_only_test_credentials *)r->creds; - r->cb(exec_ctx, r->user_data, c->md_store->entries, c->md_store->num_entries, - GRPC_CREDENTIALS_OK, NULL); - grpc_credentials_metadata_request_destroy(r); + simulated_token_fetch_args *cb_arg = (simulated_token_fetch_args *)user_data; + grpc_md_only_test_credentials *c = + (grpc_md_only_test_credentials *)cb_arg->md_request->creds; + cb_arg->md_request->cb(exec_ctx, cb_arg->md_request->user_data, + c->md_store->entries, c->md_store->num_entries, + GRPC_CREDENTIALS_OK, NULL); + grpc_credentials_metadata_request_destroy(cb_arg->md_request); + gpr_free(cb_arg); } static void md_only_test_get_request_metadata( @@ -109,13 +117,16 @@ static void md_only_test_get_request_metadata( grpc_polling_entity *pollent, grpc_auth_metadata_context context, grpc_credentials_metadata_cb cb, void *user_data) { grpc_md_only_test_credentials *c = (grpc_md_only_test_credentials *)creds; - if (c->is_async) { - grpc_credentials_metadata_request *cb_arg = + simulated_token_fetch_args *cb_arg = + gpr_malloc(sizeof(simulated_token_fetch_args)); + cb_arg->md_request = grpc_credentials_metadata_request_create(creds, cb, user_data); - grpc_executor_push( - grpc_closure_create(on_simulated_token_fetch_done, cb_arg), - GRPC_ERROR_NONE); + grpc_timer_init(exec_ctx, &cb_arg->timer, + gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), + gpr_time_from_micros(100, GPR_TIMESPAN)), + on_simulated_token_fetch_done, cb_arg, + gpr_now(GPR_CLOCK_MONOTONIC)); } else { cb(exec_ctx, user_data, c->md_store->entries, 1, GRPC_CREDENTIALS_OK, NULL); } diff --git a/src/core/plugin_registry/grpc_plugin_registry.c b/src/core/plugin_registry/grpc_plugin_registry.c index 7a7a9ce477..7ebd312b5a 100644 --- a/src/core/plugin_registry/grpc_plugin_registry.c +++ b/src/core/plugin_registry/grpc_plugin_registry.c @@ -43,8 +43,8 @@ extern void grpc_lb_policy_pick_first_init(void); extern void grpc_lb_policy_pick_first_shutdown(void); extern void grpc_lb_policy_round_robin_init(void); extern void grpc_lb_policy_round_robin_shutdown(void); -extern void grpc_resolver_dns_native_init(void); -extern void grpc_resolver_dns_native_shutdown(void); +extern void grpc_resolver_dns_ares_init(void); +extern void grpc_resolver_dns_ares_shutdown(void); extern void grpc_resolver_sockaddr_init(void); extern void grpc_resolver_sockaddr_shutdown(void); extern void grpc_load_reporting_plugin_init(void); @@ -63,8 +63,8 @@ void grpc_register_built_in_plugins(void) { grpc_lb_policy_pick_first_shutdown); grpc_register_plugin(grpc_lb_policy_round_robin_init, grpc_lb_policy_round_robin_shutdown); - grpc_register_plugin(grpc_resolver_dns_native_init, - grpc_resolver_dns_native_shutdown); + grpc_register_plugin(grpc_resolver_dns_ares_init, + grpc_resolver_dns_ares_shutdown); grpc_register_plugin(grpc_resolver_sockaddr_init, grpc_resolver_sockaddr_shutdown); grpc_register_plugin(grpc_load_reporting_plugin_init, diff --git a/src/core/plugin_registry/grpc_unsecure_plugin_registry.c b/src/core/plugin_registry/grpc_unsecure_plugin_registry.c index ad4ddf0ff4..72dc10e77f 100644 --- a/src/core/plugin_registry/grpc_unsecure_plugin_registry.c +++ b/src/core/plugin_registry/grpc_unsecure_plugin_registry.c @@ -37,8 +37,8 @@ extern void grpc_chttp2_plugin_init(void); extern void grpc_chttp2_plugin_shutdown(void); extern void grpc_client_config_init(void); extern void grpc_client_config_shutdown(void); -extern void grpc_resolver_dns_native_init(void); -extern void grpc_resolver_dns_native_shutdown(void); +extern void grpc_resolver_dns_ares_init(void); +extern void grpc_resolver_dns_ares_shutdown(void); extern void grpc_resolver_sockaddr_init(void); extern void grpc_resolver_sockaddr_shutdown(void); extern void grpc_load_reporting_plugin_init(void); @@ -57,8 +57,8 @@ void grpc_register_built_in_plugins(void) { grpc_chttp2_plugin_shutdown); grpc_register_plugin(grpc_client_config_init, grpc_client_config_shutdown); - grpc_register_plugin(grpc_resolver_dns_native_init, - grpc_resolver_dns_native_shutdown); + grpc_register_plugin(grpc_resolver_dns_ares_init, + grpc_resolver_dns_ares_shutdown); grpc_register_plugin(grpc_resolver_sockaddr_init, grpc_resolver_sockaddr_shutdown); grpc_register_plugin(grpc_load_reporting_plugin_init, diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 7ae76f52c1..037c50d0d3 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -248,6 +248,10 @@ CORE_SOURCE_FILES = [ 'third_party/nanopb/pb_encode.c', 'src/core/ext/lb_policy/pick_first/pick_first.c', 'src/core/ext/lb_policy/round_robin/round_robin.c', + 'src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c', + 'src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c', + 'src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c', + 'src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c', 'src/core/ext/resolver/dns/native/dns_resolver.c', 'src/core/ext/resolver/sockaddr/sockaddr_resolver.c', 'src/core/ext/load_reporting/load_reporting.c', @@ -577,4 +581,53 @@ CORE_SOURCE_FILES = [ 'third_party/zlib/trees.c', 'third_party/zlib/uncompr.c', 'third_party/zlib/zutil.c', + 'third_party/c-ares/ares__close_sockets.c', + 'third_party/c-ares/ares__get_hostent.c', + 'third_party/c-ares/ares__read_line.c', + 'third_party/c-ares/ares__timeval.c', + 'third_party/c-ares/ares_cancel.c', + 'third_party/c-ares/ares_create_query.c', + 'third_party/c-ares/ares_data.c', + 'third_party/c-ares/ares_destroy.c', + 'third_party/c-ares/ares_expand_name.c', + 'third_party/c-ares/ares_expand_string.c', + 'third_party/c-ares/ares_fds.c', + 'third_party/c-ares/ares_free_hostent.c', + 'third_party/c-ares/ares_free_string.c', + 'third_party/c-ares/ares_getenv.c', + 'third_party/c-ares/ares_gethostbyaddr.c', + 'third_party/c-ares/ares_gethostbyname.c', + 'third_party/c-ares/ares_getnameinfo.c', + 'third_party/c-ares/ares_getopt.c', + 'third_party/c-ares/ares_getsock.c', + 'third_party/c-ares/ares_init.c', + 'third_party/c-ares/ares_library_init.c', + 'third_party/c-ares/ares_llist.c', + 'third_party/c-ares/ares_mkquery.c', + 'third_party/c-ares/ares_nowarn.c', + 'third_party/c-ares/ares_options.c', + 'third_party/c-ares/ares_parse_a_reply.c', + 'third_party/c-ares/ares_parse_aaaa_reply.c', + 'third_party/c-ares/ares_parse_mx_reply.c', + 'third_party/c-ares/ares_parse_naptr_reply.c', + 'third_party/c-ares/ares_parse_ns_reply.c', + 'third_party/c-ares/ares_parse_ptr_reply.c', + 'third_party/c-ares/ares_parse_soa_reply.c', + 'third_party/c-ares/ares_parse_srv_reply.c', + 'third_party/c-ares/ares_parse_txt_reply.c', + 'third_party/c-ares/ares_platform.c', + 'third_party/c-ares/ares_process.c', + 'third_party/c-ares/ares_query.c', + 'third_party/c-ares/ares_search.c', + 'third_party/c-ares/ares_send.c', + 'third_party/c-ares/ares_strcasecmp.c', + 'third_party/c-ares/ares_strdup.c', + 'third_party/c-ares/ares_strerror.c', + 'third_party/c-ares/ares_timeout.c', + 'third_party/c-ares/ares_version.c', + 'third_party/c-ares/ares_writev.c', + 'third_party/c-ares/bitncmp.c', + 'third_party/c-ares/inet_net_pton.c', + 'third_party/c-ares/inet_ntop.c', + 'third_party/c-ares/windows_port.c', ] diff --git a/src/ruby/ext/grpc/extconf.rb b/src/ruby/ext/grpc/extconf.rb index 6d65db8306..4be7e58c96 100644 --- a/src/ruby/ext/grpc/extconf.rb +++ b/src/ruby/ext/grpc/extconf.rb @@ -70,6 +70,7 @@ ENV['AR'] = 'libtool -o' if RUBY_PLATFORM =~ /darwin/ ENV['EMBED_OPENSSL'] = 'true' ENV['EMBED_ZLIB'] = 'true' +ENV['EMBED_CARES'] = 'true' ENV['ARCH_FLAGS'] = RbConfig::CONFIG['ARCH_FLAG'] ENV['ARCH_FLAGS'] = '-arch i386 -arch x86_64' if RUBY_PLATFORM =~ /darwin/ ENV['CFLAGS'] = '-DGPR_BACKWARDS_COMPATIBILITY_MODE' diff --git a/templates/Makefile.template b/templates/Makefile.template index e6a28d16bc..d4da968a52 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -381,6 +381,7 @@ OPENSSL_NPN_CHECK_CMD = $(PKG_CONFIG) --atleast-version=1.0.1 openssl ZLIB_CHECK_CMD = $(PKG_CONFIG) --exists zlib PROTOBUF_CHECK_CMD = $(PKG_CONFIG) --atleast-version=3.0.0 protobuf + CARES_CHECK_CMD = $(PKG_CONFIG) --exists libcares else # HAS_PKG_CONFIG ifeq ($(SYSTEM),MINGW32) @@ -394,6 +395,7 @@ BORINGSSL_COMPILE_CHECK_CMD = $(CC) $(CPPFLAGS) ${defaults.boringssl.CPPFLAGS} $(CFLAGS) ${defaults.boringssl.CFLAGS} -o $(TMPOUT) test/build/boringssl.c $(LDFLAGS) ZLIB_CHECK_CMD = $(CC) $(CPPFLAGS) $(CFLAGS) -o $(TMPOUT) test/build/zlib.c -lz $(LDFLAGS) PROTOBUF_CHECK_CMD = $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $(TMPOUT) test/build/protobuf.cc -lprotobuf $(LDFLAGS) + CARES_CHECK_CMD = $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $(TMPOUT) test/build/c-ares.c -lcares $(LDFLAGS) endif # HAS_PKG_CONFIG @@ -433,12 +435,17 @@ ifeq ($(HAS_SYSTEM_PROTOBUF),true) CACHE_MK += HAS_SYSTEM_PROTOBUF = true, endif + HAS_SYSTEM_CARES ?= $(shell $(CARES_CHECK_CMD) 2> /dev/null && echo true || echo false) + ifeq ($(HAS_SYSTEM_CARES),true) + CACHE_MK += HAS_SYSTEM_CARES = true, + endif else # override system libraries if the config requires a custom compiled library HAS_SYSTEM_OPENSSL_ALPN = false HAS_SYSTEM_OPENSSL_NPN = false HAS_SYSTEM_ZLIB = false HAS_SYSTEM_PROTOBUF = false + HAS_SYSTEM_CARES = false endif HAS_PROTOC ?= $(shell $(PROTOC_CHECK_CMD) 2> /dev/null && echo true || echo false) @@ -497,6 +504,12 @@ HAS_EMBEDDED_PROTOBUF = true endif + ifeq ($(wildcard third_party/c-ares/ares.h),) + HAS_EMBEDDED_CARES = false + else + HAS_EMBEDDED_CARES = true + endif + PC_REQUIRES_GRPC = PC_LIBS_GRPC = @@ -529,6 +542,37 @@ endif endif + CARES_PKG_CONFIG = false + + ifeq ($(HAS_SYSTEM_CARES),false) + ifeq ($(HAS_EMBEDDED_CARES), true) + EMBED_CARES ?= true + else + DEP_MISSING += cares + EMBED_CARES ?= broken + endif + else + EMBED_CARES ?= false + endif + + ifeq ($(EMBED_CARES),true) + CARES_DEP = $(LIBDIR)/$(CONFIG)/libares.a + CARES_MERGE_OBJS = $(LIBARES_OBJS) + CARES_MERGE_LIBS = $(LIBDIR)/$(CONFIG)/libares.a + CPPFLAGS := -Ithird_party/c-ares -Isrc/c-ares $(CPPFLAGS) + LDFLAGS := -L$(LIBDIR)/$(CONFIG)/c-ares $(LDFLAGS) + else + ifeq ($(HAS_PKG_CONFIG),true) + PC_REQUIRES_GRPC += libcares + CPPFLAGS += $(shell $(PKG_CONFIG) --cflags libcares) + LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-L libcares) + LIBS += $(patsubst -l%,%,$(shell $(PKG_CONFIG) --libs-only-l libcares)) + else + PC_LIBS_GRPC += -lcares + LIBS += cares + endif + endif + OPENSSL_PKG_CONFIG = false PC_REQUIRES_SECURE = @@ -810,6 +854,7 @@ $(PERFTOOLS_CHECK_CMD) || true $(PROTOBUF_CHECK_CMD) || true $(PROTOC_CHECK_VERSION_CMD) || true + $(CARES_CHECK_CMD) || true third_party/protobuf/configure: $(E) "[AUTOGEN] Preparing protobuf" @@ -1403,6 +1448,9 @@ % if lib.name != 'z': $(ZLIB_DEP) \ % endif + % if lib.name != 'ares': + $(CARES_DEP) \ + % endif % endif % if lib.language == 'c++': $(PROTOBUF_DEP)\ @@ -1411,6 +1459,7 @@ % if lib.get('baselib', False): $(LIBGPR_OBJS) \ $(ZLIB_MERGE_OBJS) \ + $(CARES_MERGE_OBJS) \ % if lib.get('secure', 'check') == True: $(OPENSSL_MERGE_OBJS) \ % endif @@ -1423,6 +1472,7 @@ % if lib.get('baselib', False): $(LIBGPR_OBJS) \ $(ZLIB_MERGE_OBJS) \ + $(CARES_MERGE_OBJS) \ % if lib.get('secure', 'check') == True: $(OPENSSL_MERGE_OBJS) \ % endif @@ -1445,9 +1495,9 @@ common = '$(LIB' + lib.name.upper() + '_OBJS) $(LDLIBS)' libs = '' - lib_deps = ' $(ZLIB_DEP)' + lib_deps = ' $(ZLIB_DEP) $(CARES_DEP)' mingw_libs = '' - mingw_lib_deps = ' $(ZLIB_DEP)' + mingw_lib_deps = ' $(ZLIB_DEP) $(CARES_DEP)' if lib.language == 'c++': lib_deps += ' $(PROTOBUF_DEP)' mingw_lib_deps += ' $(PROTOBUF_DEP)' @@ -1467,7 +1517,7 @@ security = lib.get('secure', 'check') if security == True: common = common + ' $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE)' - common = common + ' $(ZLIB_MERGE_LIBS)' + common = common + ' $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS)' if security in [True, 'check']: for src in lib.src: diff --git a/templates/binding.gyp.template b/templates/binding.gyp.template index 40d430f792..6f1425e3c8 100644 --- a/templates/binding.gyp.template +++ b/templates/binding.gyp.template @@ -48,7 +48,8 @@ ['OS == "win"', { "include_dirs": [ "third_party/boringssl/include", - "third_party/zlib" + "third_party/zlib", + "third_party/c-ares" ], "defines": [ '_WIN32_WINNT=0x0600', @@ -86,7 +87,8 @@ ], 'include_dirs': [ '<(node_root_dir)/deps/openssl/openssl/include', - '<(node_root_dir)/deps/zlib' + '<(node_root_dir)/deps/zlib', + '<(node_root_dir)/deps/cares/include', ], 'conditions': [ ['config=="gcov"', { @@ -171,6 +173,13 @@ }] ], 'targets': [ + <% + for lib in libs: + if 'grpc' in lib.transitive_deps or lib.name == 'grpc': + lib.deps.append('node_modules/cares/deps/cares/cares.gyp:cares') + for module in node_modules: + module.deps.append('node_modules/cares/deps/cares/cares.gyp:cares') + %> % for module in node_modules: % for lib in libs: % if lib.name in module.transitive_deps and lib.name not in ('boringssl', 'z'): diff --git a/templates/package.json.template b/templates/package.json.template index e9596d4d4c..b55fbae472 100644 --- a/templates/package.json.template +++ b/templates/package.json.template @@ -25,14 +25,15 @@ "test": "./node_modules/.bin/mocha src/node/test && npm run-script lint", "gen_docs": "./node_modules/.bin/jsdoc -c src/node/jsdoc_conf.json", "coverage": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha src/node/test", - "install": "./node_modules/.bin/node-pre-gyp install --fallback-to-build" + "install": "./node_modules/.bin/node-pre-gyp install --fallback-to-build --library=static_library" }, "bundledDependencies": ["node-pre-gyp"], "dependencies": { "arguejs": "^0.2.3", "lodash": "^3.9.3", "nan": "^2.0.0", - "protobufjs": "^4.0.0" + "protobufjs": "^4.0.0", + "cares": "^1.1.5" }, "devDependencies": { "async": "^1.5.0", diff --git a/test/build/c-ares.c b/test/build/c-ares.c new file mode 100644 index 0000000000..c954e9397f --- /dev/null +++ b/test/build/c-ares.c @@ -0,0 +1,43 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include <ares.h> + +int main(void) { + ares_channel channelptr; + + ares_init(&channelptr); + ares_destroy(channelptr); + + return 0; +} diff --git a/test/core/client_config/resolvers/dns_resolver_connectivity_test.c b/test/core/client_config/resolvers/dns_resolver_connectivity_test.c index 69c07d83f4..f6349527cb 100644 --- a/test/core/client_config/resolvers/dns_resolver_connectivity_test.c +++ b/test/core/client_config/resolvers/dns_resolver_connectivity_test.c @@ -67,22 +67,24 @@ static grpc_client_channel_factory cc_factory = {&sc_vtable}; static gpr_mu g_mu; static bool g_fail_resolution = true; -static grpc_error *my_resolve_address(const char *name, const char *addr, - grpc_resolved_addresses **addrs) { +static int my_resolve_address(const char *name, const char *addr, + grpc_resolved_addresses **addrs, + grpc_error **error) { gpr_mu_lock(&g_mu); GPR_ASSERT(0 == strcmp("test", name)); if (g_fail_resolution) { g_fail_resolution = false; gpr_mu_unlock(&g_mu); - return GRPC_ERROR_CREATE("Forced Failure"); + *error = GRPC_ERROR_CREATE("Forced Failure"); } else { gpr_mu_unlock(&g_mu); *addrs = gpr_malloc(sizeof(**addrs)); (*addrs)->naddrs = 1; (*addrs)->addrs = gpr_malloc(sizeof(*(*addrs)->addrs)); (*addrs)->addrs[0].len = 123; - return GRPC_ERROR_NONE; + *error = GRPC_ERROR_NONE; } + return 1; } static grpc_resolver *create_resolver(const char *name) { @@ -123,7 +125,7 @@ int main(int argc, char **argv) { grpc_init(); gpr_mu_init(&g_mu); - grpc_blocking_resolve_address = my_resolve_address; + grpc_customized_resolve_address = my_resolve_address; grpc_resolver *resolver = create_resolver("dns:test"); @@ -132,7 +134,7 @@ int main(int argc, char **argv) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; gpr_event ev1; gpr_event_init(&ev1); - grpc_resolver_next(&exec_ctx, resolver, &config, + grpc_resolver_next(&exec_ctx, resolver, NULL, &config, grpc_closure_create(on_done, &ev1)); grpc_exec_ctx_flush(&exec_ctx); GPR_ASSERT(wait_loop(5, &ev1)); @@ -140,7 +142,7 @@ int main(int argc, char **argv) { gpr_event ev2; gpr_event_init(&ev2); - grpc_resolver_next(&exec_ctx, resolver, &config, + grpc_resolver_next(&exec_ctx, resolver, NULL, &config, grpc_closure_create(on_done, &ev2)); grpc_exec_ctx_flush(&exec_ctx); GPR_ASSERT(wait_loop(30, &ev2)); diff --git a/test/core/end2end/fuzzers/api_fuzzer.c b/test/core/end2end/fuzzers/api_fuzzer.c index 96ea82d95e..303a15c756 100644 --- a/test/core/end2end/fuzzers/api_fuzzer.c +++ b/test/core/end2end/fuzzers/api_fuzzer.c @@ -38,6 +38,7 @@ #include <grpc/support/log.h> #include <grpc/support/string_util.h> +#include "src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/resolve_address.h" @@ -225,6 +226,14 @@ void my_resolve_address(grpc_exec_ctx *exec_ctx, const char *addr, finish_resolve, r, gpr_now(GPR_CLOCK_MONOTONIC)); } +void my_resolve_address_async(grpc_exec_ctx *exec_ctx, const char *addr, + const char *default_port, + grpc_pollset_set *pollset_set, + grpc_closure *on_done, + grpc_resolved_addresses **addresses) { + my_resolve_address(exec_ctx, addr, default_port, on_done, addresses); +} + //////////////////////////////////////////////////////////////////////////////// // client connection @@ -507,6 +516,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { if (squelch) gpr_set_log_function(dont_log); input_stream inp = {data, data + size}; grpc_resolve_address = my_resolve_address; + grpc_resolve_address_ares = my_resolve_address_async; grpc_tcp_client_connect_impl = my_tcp_client_connect; gpr_now_impl = now_impl; grpc_init(); diff --git a/test/core/end2end/goaway_server_test.c b/test/core/end2end/goaway_server_test.c index 67cc24c74c..d1cb4fe3cb 100644 --- a/test/core/end2end/goaway_server_test.c +++ b/test/core/end2end/goaway_server_test.c @@ -46,9 +46,6 @@ static void *tag(intptr_t i) { return (void *)i; } static gpr_mu g_mu; static int g_resolve_port = -1; -static grpc_error *(*iomgr_resolve_address)(const char *name, - const char *default_port, - grpc_resolved_addresses **addrs); static void set_resolve_port(int port) { gpr_mu_lock(&g_mu); @@ -56,16 +53,17 @@ static void set_resolve_port(int port) { gpr_mu_unlock(&g_mu); } -static grpc_error *my_resolve_address(const char *name, const char *addr, - grpc_resolved_addresses **addrs) { +static int my_resolve_address(const char *name, const char *addr, + grpc_resolved_addresses **addrs, + grpc_error **error) { if (0 != strcmp(name, "test")) { - return iomgr_resolve_address(name, addr, addrs); + return 0; } gpr_mu_lock(&g_mu); if (g_resolve_port < 0) { gpr_mu_unlock(&g_mu); - return GRPC_ERROR_CREATE("Forced Failure"); + *error = GRPC_ERROR_CREATE("Forced Failure"); } else { *addrs = gpr_malloc(sizeof(**addrs)); (*addrs)->naddrs = 1; @@ -77,8 +75,9 @@ static grpc_error *my_resolve_address(const char *name, const char *addr, sa->sin_port = htons((uint16_t)g_resolve_port); (*addrs)->addrs[0].len = sizeof(*sa); gpr_mu_unlock(&g_mu); - return GRPC_ERROR_NONE; + *error = GRPC_ERROR_NONE; } + return 1; } int main(int argc, char **argv) { @@ -90,8 +89,7 @@ int main(int argc, char **argv) { grpc_test_init(argc, argv); gpr_mu_init(&g_mu); - iomgr_resolve_address = grpc_blocking_resolve_address; - grpc_blocking_resolve_address = my_resolve_address; + grpc_customized_resolve_address = my_resolve_address; grpc_init(); int was_cancelled1; diff --git a/third_party/c-ares b/third_party/c-ares new file mode 160000 +Subproject e7fe2744db383c4489b7adc2b74f8ec3069367e diff --git a/tools/buildgen/generate_build_additions.sh b/tools/buildgen/generate_build_additions.sh index 9a1a7a7249..1ee810679f 100644 --- a/tools/buildgen/generate_build_additions.sh +++ b/tools/buildgen/generate_build_additions.sh @@ -32,6 +32,7 @@ gen_build_yaml_dirs=" \ src/boringssl \ src/proto \ src/zlib \ + src/c-ares \ test/core/bad_client \ test/core/bad_ssl \ test/core/end2end \ diff --git a/tools/buildgen/plugins/expand_bin_attrs.py b/tools/buildgen/plugins/expand_bin_attrs.py index dc72bf3b9d..f52168a9d3 100755 --- a/tools/buildgen/plugins/expand_bin_attrs.py +++ b/tools/buildgen/plugins/expand_bin_attrs.py @@ -52,9 +52,11 @@ def mako_plugin(dictionary): tgt['ci_platforms'] = sorted(tgt.get('ci_platforms', tgt['platforms'])) tgt['boringssl'] = tgt.get('boringssl', False) tgt['zlib'] = tgt.get('zlib', False) + tgt['ares'] = tgt.get('ares', False) tgt['gtest'] = tgt.get('gtest', False) libs = dictionary.get('libs') for lib in libs: lib['boringssl'] = lib.get('boringssl', False) lib['zlib'] = lib.get('zlib', False) + lib['ares'] = lib.get('ares', False) diff --git a/tools/buildgen/plugins/expand_filegroups.py b/tools/buildgen/plugins/expand_filegroups.py index 477e69c869..6cee27ee46 100755 --- a/tools/buildgen/plugins/expand_filegroups.py +++ b/tools/buildgen/plugins/expand_filegroups.py @@ -57,6 +57,7 @@ FILEGROUP_DEFAULTS = { 'language': 'c', 'boringssl': False, 'zlib': False, + 'ares': False, } diff --git a/tools/distrib/check_copyright.py b/tools/distrib/check_copyright.py index 4577ab3d11..3757c90afd 100755 --- a/tools/distrib/check_copyright.py +++ b/tools/distrib/check_copyright.py @@ -108,7 +108,9 @@ RE_LICENSE = dict( if args.precommit: FILE_LIST_COMMAND = 'git status -z | grep -Poz \'(?<=^[MARC][MARCD ] )[^\s]+\'' else: - FILE_LIST_COMMAND = 'git ls-tree -r --name-only -r HEAD | grep -v ^third_party/' + FILE_LIST_COMMAND = 'git ls-tree -r --name-only -r HEAD | ' \ + 'grep -v ^third_party/ |' \ + 'grep -v "\(ares_config.h\|ares_build.h\)"' def load(name): with open(name) as f: diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 426c6d91e3..16a7878c46 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -938,6 +938,8 @@ third_party/nanopb/pb.h \ third_party/nanopb/pb_common.h \ third_party/nanopb/pb_decode.h \ third_party/nanopb/pb_encode.h \ +src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver.h \ +src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.h \ src/core/ext/load_reporting/load_reporting.h \ src/core/ext/load_reporting/load_reporting_filter.h \ src/core/ext/census/aggregation.h \ @@ -1122,6 +1124,10 @@ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ src/core/ext/lb_policy/pick_first/pick_first.c \ src/core/ext/lb_policy/round_robin/round_robin.c \ +src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c \ +src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c \ +src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c \ +src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c \ src/core/ext/resolver/dns/native/dns_resolver.c \ src/core/ext/resolver/sockaddr/sockaddr_resolver.c \ src/core/ext/load_reporting/load_reporting.c \ diff --git a/tools/run_tests/sanity/check_submodules.sh b/tools/run_tests/sanity/check_submodules.sh index d2ab5b01cc..b8a95e80d8 100755 --- a/tools/run_tests/sanity/check_submodules.sh +++ b/tools/run_tests/sanity/check_submodules.sh @@ -47,10 +47,10 @@ cat << EOF | awk '{ print $1 }' | sort > $want_submodules f8ac463766281625ad710900479130c7fcb4d63b third_party/nanopb (nanopb-0.3.4-29-gf8ac463) e8ae137c96444ea313485ed1118c5e43b2099cf1 third_party/protobuf (v3.0.0-beta-4-74-ge8ae137) 50893291621658f355bc5b4d450a8d06a563053d third_party/zlib (v1.2.8) + e7fe2744db383c4489b7adc2b74f8ec3069367e4 third_party/c-ares (1.11.0) bcad91771b7f0bff28a1cac1981d7ef2b9bcef3c third_party/thrift EOF diff -u $submodules $want_submodules rm $submodules $want_submodules - diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 11daf24e0a..812d23fc76 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -4262,6 +4262,7 @@ "grpc_lb_policy_pick_first", "grpc_lb_policy_round_robin", "grpc_load_reporting", + "grpc_resolver_dns_ares", "grpc_resolver_dns_native", "grpc_resolver_sockaddr", "grpc_secure", @@ -4357,6 +4358,7 @@ "grpc_lb_policy_pick_first", "grpc_lb_policy_round_robin", "grpc_load_reporting", + "grpc_resolver_dns_ares", "grpc_resolver_dns_native", "grpc_resolver_sockaddr", "grpc_transport_chttp2_client_insecure", @@ -5420,6 +5422,44 @@ "type": "lib" }, { + "deps": [], + "headers": [ + "src/c-ares/ares_build.h", + "src/c-ares/config_darwin/ares_config.h", + "src/c-ares/config_linux/ares_config.h", + "third_party/c-ares/ares.h", + "third_party/c-ares/ares_data.h", + "third_party/c-ares/ares_dns.h", + "third_party/c-ares/ares_getenv.h", + "third_party/c-ares/ares_getopt.h", + "third_party/c-ares/ares_inet_net_pton.h", + "third_party/c-ares/ares_iphlpapi.h", + "third_party/c-ares/ares_ipv6.h", + "third_party/c-ares/ares_library_init.h", + "third_party/c-ares/ares_llist.h", + "third_party/c-ares/ares_nowarn.h", + "third_party/c-ares/ares_platform.h", + "third_party/c-ares/ares_private.h", + "third_party/c-ares/ares_rules.h", + "third_party/c-ares/ares_setup.h", + "third_party/c-ares/ares_strcasecmp.h", + "third_party/c-ares/ares_strdup.h", + "third_party/c-ares/ares_version.h", + "third_party/c-ares/bitncmp.h", + "third_party/c-ares/config-win32.h", + "third_party/c-ares/setup_once.h" + ], + "language": "c", + "name": "ares", + "src": [ + "src/c-ares/ares_build.h", + "src/c-ares/config_darwin/ares_config.h", + "src/c-ares/config_linux/ares_config.h" + ], + "third_party": false, + "type": "lib" + }, + { "deps": [ "gpr", "gpr_test_util", @@ -6254,6 +6294,29 @@ "grpc_base", "grpc_client_config" ], + "headers": [ + "src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver.h", + "src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.h" + ], + "language": "c", + "name": "grpc_resolver_dns_ares", + "src": [ + "src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c", + "src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver.h", + "src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c", + "src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c", + "src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.h", + "src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c" + ], + "third_party": false, + "type": "filegroup" + }, + { + "deps": [ + "gpr", + "grpc_base", + "grpc_client_config" + ], "headers": [], "language": "c", "name": "grpc_resolver_dns_native", diff --git a/vsprojects/grpc.sln b/vsprojects/grpc.sln index 8fccc646e5..3d9c43c958 100644 --- a/vsprojects/grpc.sln +++ b/vsprojects/grpc.sln @@ -3,6 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0.21005.1 MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ares", "vcxproj\.\ares\ares.vcxproj", "{1769D06D-F18C-B4C2-B019-31D7F83F3C9A}" + ProjectSection(myProperties) = preProject + lib = "True" + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boringssl", "vcxproj\.\boringssl\boringssl.vcxproj", "{9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}" ProjectSection(myProperties) = preProject lib = "True" @@ -174,6 +179,22 @@ Global Release-DLL|x64 = Release-DLL|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1769D06D-F18C-B4C2-B019-31D7F83F3C9A}.Debug|Win32.ActiveCfg = Debug|Win32 + {1769D06D-F18C-B4C2-B019-31D7F83F3C9A}.Debug|x64.ActiveCfg = Debug|x64 + {1769D06D-F18C-B4C2-B019-31D7F83F3C9A}.Release|Win32.ActiveCfg = Release|Win32 + {1769D06D-F18C-B4C2-B019-31D7F83F3C9A}.Release|x64.ActiveCfg = Release|x64 + {1769D06D-F18C-B4C2-B019-31D7F83F3C9A}.Debug|Win32.Build.0 = Debug|Win32 + {1769D06D-F18C-B4C2-B019-31D7F83F3C9A}.Debug|x64.Build.0 = Debug|x64 + {1769D06D-F18C-B4C2-B019-31D7F83F3C9A}.Release|Win32.Build.0 = Release|Win32 + {1769D06D-F18C-B4C2-B019-31D7F83F3C9A}.Release|x64.Build.0 = Release|x64 + {1769D06D-F18C-B4C2-B019-31D7F83F3C9A}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {1769D06D-F18C-B4C2-B019-31D7F83F3C9A}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {1769D06D-F18C-B4C2-B019-31D7F83F3C9A}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {1769D06D-F18C-B4C2-B019-31D7F83F3C9A}.Debug-DLL|x64.Build.0 = Debug|x64 + {1769D06D-F18C-B4C2-B019-31D7F83F3C9A}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {1769D06D-F18C-B4C2-B019-31D7F83F3C9A}.Release-DLL|Win32.Build.0 = Release|Win32 + {1769D06D-F18C-B4C2-B019-31D7F83F3C9A}.Release-DLL|x64.ActiveCfg = Release|x64 + {1769D06D-F18C-B4C2-B019-31D7F83F3C9A}.Release-DLL|x64.Build.0 = Release|x64 {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}.Debug|Win32.ActiveCfg = Debug|Win32 {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}.Debug|x64.ActiveCfg = Debug|x64 {9FD9A3EF-C4A3-8390-D8F4-6F86C22A58CE}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/vcxproj/ares/ares.vcxproj b/vsprojects/vcxproj/ares/ares.vcxproj new file mode 100644 index 0000000000..3a0b179684 --- /dev/null +++ b/vsprojects/vcxproj/ares/ares.vcxproj @@ -0,0 +1,284 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{1769D06D-F18C-B4C2-B019-31D7F83F3C9A}</ProjectGuid> + <IgnoreWarnIntDirInTempDetected>true</IgnoreWarnIntDirInTempDetected> + <IntDir>$(SolutionDir)IntDir\$(MSBuildProjectName)\</IntDir> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(VisualStudioVersion)' == '10.0'" Label="Configuration"> + <PlatformToolset>v100</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(VisualStudioVersion)' == '11.0'" Label="Configuration"> + <PlatformToolset>v110</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(VisualStudioVersion)' == '12.0'" Label="Configuration"> + <PlatformToolset>v120</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(VisualStudioVersion)' == '14.0'" Label="Configuration"> + <PlatformToolset>v140</PlatformToolset> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration"> + <ConfigurationType>StaticLibrary</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(SolutionDir)\..\vsprojects\global.props" /> + <Import Project="$(SolutionDir)\..\vsprojects\winsock.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup Condition="'$(Configuration)'=='Debug'"> + <TargetName>ares</TargetName> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)'=='Release'"> + <TargetName>ares</TargetName> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <PrecompiledHeader>NotUsing</PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <TreatWarningAsError>true</TreatWarningAsError> + <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> + <MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild> + </ClCompile> + <Link> + <SubSystem>Windows</SubSystem> + <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> + <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> + </Link> + </ItemDefinitionGroup> + + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <PrecompiledHeader>NotUsing</PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <SDLCheck>true</SDLCheck> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <TreatWarningAsError>true</TreatWarningAsError> + <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> + <MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild> + </ClCompile> + <Link> + <SubSystem>Windows</SubSystem> + <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> + <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> + </Link> + </ItemDefinitionGroup> + + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <PrecompiledHeader>NotUsing</PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>MaxSpeed</Optimization> + <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <SDLCheck>true</SDLCheck> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <TreatWarningAsError>true</TreatWarningAsError> + <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> + <MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild> + </ClCompile> + <Link> + <SubSystem>Windows</SubSystem> + <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> + <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + </Link> + </ItemDefinitionGroup> + + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <PrecompiledHeader>NotUsing</PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>MaxSpeed</Optimization> + <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <SDLCheck>true</SDLCheck> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <TreatWarningAsError>true</TreatWarningAsError> + <DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> + <MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild> + </ClCompile> + <Link> + <SubSystem>Windows</SubSystem> + <GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> + <GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + </Link> + </ItemDefinitionGroup> + + <ItemGroup> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares.h" /> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_data.h" /> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_dns.h" /> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_getenv.h" /> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_getopt.h" /> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_inet_net_pton.h" /> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_iphlpapi.h" /> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_ipv6.h" /> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_library_init.h" /> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_llist.h" /> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_nowarn.h" /> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_platform.h" /> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_private.h" /> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_rules.h" /> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_setup.h" /> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_strcasecmp.h" /> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_strdup.h" /> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_version.h" /> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\bitncmp.h" /> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\config-win32.h" /> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\setup_once.h" /> + <ClInclude Include="$(SolutionDir)\..\src\c-ares\ares_build.h" /> + <ClInclude Include="$(SolutionDir)\..\src\c-ares\config_linux\ares_config.h" /> + <ClInclude Include="$(SolutionDir)\..\src\c-ares\config_darwin\ares_config.h" /> + </ItemGroup> + <ItemGroup> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares__close_sockets.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares__get_hostent.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares__read_line.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares__timeval.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_cancel.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_create_query.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_data.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_destroy.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_expand_name.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_expand_string.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_fds.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_free_hostent.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_free_string.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_getenv.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_gethostbyaddr.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_gethostbyname.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_getnameinfo.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_getopt.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_getsock.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_init.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_library_init.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_llist.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_mkquery.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_nowarn.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_options.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_parse_a_reply.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_parse_aaaa_reply.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_parse_mx_reply.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_parse_naptr_reply.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_parse_ns_reply.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_parse_ptr_reply.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_parse_soa_reply.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_parse_srv_reply.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_parse_txt_reply.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_platform.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_process.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_query.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_search.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_send.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_strcasecmp.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_strdup.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_strerror.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_timeout.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_version.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_writev.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\bitncmp.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\inet_net_pton.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\inet_ntop.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\windows_port.c"> + </ClCompile> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> + <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> + <PropertyGroup> + <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> + </PropertyGroup> + </Target> +</Project> + diff --git a/vsprojects/vcxproj/ares/ares.vcxproj.filters b/vsprojects/vcxproj/ares/ares.vcxproj.filters new file mode 100644 index 0000000000..47378f17ce --- /dev/null +++ b/vsprojects/vcxproj/ares/ares.vcxproj.filters @@ -0,0 +1,248 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares__close_sockets.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares__get_hostent.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares__read_line.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares__timeval.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_cancel.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_create_query.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_data.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_destroy.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_expand_name.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_expand_string.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_fds.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_free_hostent.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_free_string.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_getenv.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_gethostbyaddr.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_gethostbyname.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_getnameinfo.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_getopt.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_getsock.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_init.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_library_init.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_llist.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_mkquery.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_nowarn.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_options.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_parse_a_reply.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_parse_aaaa_reply.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_parse_mx_reply.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_parse_naptr_reply.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_parse_ns_reply.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_parse_ptr_reply.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_parse_soa_reply.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_parse_srv_reply.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_parse_txt_reply.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_platform.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_process.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_query.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_search.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_send.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_strcasecmp.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_strdup.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_strerror.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_timeout.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_version.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\ares_writev.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\bitncmp.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\inet_net_pton.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\inet_ntop.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\third_party\c-ares\windows_port.c"> + <Filter>third_party\c-ares</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares.h"> + <Filter>third_party\c-ares</Filter> + </ClInclude> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_data.h"> + <Filter>third_party\c-ares</Filter> + </ClInclude> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_dns.h"> + <Filter>third_party\c-ares</Filter> + </ClInclude> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_getenv.h"> + <Filter>third_party\c-ares</Filter> + </ClInclude> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_getopt.h"> + <Filter>third_party\c-ares</Filter> + </ClInclude> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_inet_net_pton.h"> + <Filter>third_party\c-ares</Filter> + </ClInclude> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_iphlpapi.h"> + <Filter>third_party\c-ares</Filter> + </ClInclude> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_ipv6.h"> + <Filter>third_party\c-ares</Filter> + </ClInclude> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_library_init.h"> + <Filter>third_party\c-ares</Filter> + </ClInclude> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_llist.h"> + <Filter>third_party\c-ares</Filter> + </ClInclude> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_nowarn.h"> + <Filter>third_party\c-ares</Filter> + </ClInclude> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_platform.h"> + <Filter>third_party\c-ares</Filter> + </ClInclude> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_private.h"> + <Filter>third_party\c-ares</Filter> + </ClInclude> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_rules.h"> + <Filter>third_party\c-ares</Filter> + </ClInclude> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_setup.h"> + <Filter>third_party\c-ares</Filter> + </ClInclude> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_strcasecmp.h"> + <Filter>third_party\c-ares</Filter> + </ClInclude> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_strdup.h"> + <Filter>third_party\c-ares</Filter> + </ClInclude> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\ares_version.h"> + <Filter>third_party\c-ares</Filter> + </ClInclude> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\bitncmp.h"> + <Filter>third_party\c-ares</Filter> + </ClInclude> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\config-win32.h"> + <Filter>third_party\c-ares</Filter> + </ClInclude> + <ClInclude Include="$(SolutionDir)\..\third_party\c-ares\setup_once.h"> + <Filter>third_party\c-ares</Filter> + </ClInclude> + <ClInclude Include="$(SolutionDir)\..\src\c-ares\ares_build.h"> + <Filter>src\c-ares</Filter> + </ClInclude> + <ClInclude Include="$(SolutionDir)\..\src\c-ares\config_linux\ares_config.h"> + <Filter>src\c-ares\config_linux</Filter> + </ClInclude> + <ClInclude Include="$(SolutionDir)\..\src\c-ares\config_darwin\ares_config.h"> + <Filter>src\c-ares\config_darwin</Filter> + </ClInclude> + </ItemGroup> + + <ItemGroup> + <Filter Include="src"> + <UniqueIdentifier>{b3522833-8ba3-b61e-a36a-609bbb19731b}</UniqueIdentifier> + </Filter> + <Filter Include="src\c-ares"> + <UniqueIdentifier>{46de445f-46a7-7f1c-6a6d-4f68280a93f1}</UniqueIdentifier> + </Filter> + <Filter Include="src\c-ares\config_darwin"> + <UniqueIdentifier>{caa901d6-d1f9-5553-801b-76a36285e66d}</UniqueIdentifier> + </Filter> + <Filter Include="src\c-ares\config_linux"> + <UniqueIdentifier>{d1c196f6-508c-7a30-7be3-8f38670adbf9}</UniqueIdentifier> + </Filter> + <Filter Include="third_party"> + <UniqueIdentifier>{6463a17d-379b-4a21-51a9-c729ed28c9c1}</UniqueIdentifier> + </Filter> + <Filter Include="third_party\c-ares"> + <UniqueIdentifier>{ed241948-a4a1-89a0-0cc6-5a07e2c8ddec}</UniqueIdentifier> + </Filter> + </ItemGroup> +</Project> + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 252704756d..d0d0d4d946 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -447,6 +447,8 @@ <ClInclude Include="$(SolutionDir)\..\third_party\nanopb\pb_common.h" /> <ClInclude Include="$(SolutionDir)\..\third_party\nanopb\pb_decode.h" /> <ClInclude Include="$(SolutionDir)\..\third_party\nanopb\pb_encode.h" /> + <ClInclude Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_ev_driver.h" /> + <ClInclude Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_wrapper.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\ext\load_reporting\load_reporting.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\ext\load_reporting\load_reporting_filter.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\ext\census\aggregation.h" /> @@ -806,6 +808,14 @@ </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\ext\lb_policy\round_robin\round_robin.c"> </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\dns_resolver_ares.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_ev_driver_posix.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_wrapper.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_wrapper_fallback.c"> + </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\native\dns_resolver.c"> </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\sockaddr\sockaddr_resolver.c"> diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 1fdf0f5eca..2c89cee84b 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -520,6 +520,18 @@ <ClCompile Include="$(SolutionDir)\..\src\core\ext\lb_policy\round_robin\round_robin.c"> <Filter>src\core\ext\lb_policy\round_robin</Filter> </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\dns_resolver_ares.c"> + <Filter>src\core\ext\resolver\dns\c_ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_ev_driver_posix.c"> + <Filter>src\core\ext\resolver\dns\c_ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_wrapper.c"> + <Filter>src\core\ext\resolver\dns\c_ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_wrapper_fallback.c"> + <Filter>src\core\ext\resolver\dns\c_ares</Filter> + </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\native\dns_resolver.c"> <Filter>src\core\ext\resolver\dns\native</Filter> </ClCompile> @@ -1109,6 +1121,12 @@ <ClInclude Include="$(SolutionDir)\..\third_party\nanopb\pb_encode.h"> <Filter>third_party\nanopb</Filter> </ClInclude> + <ClInclude Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_ev_driver.h"> + <Filter>src\core\ext\resolver\dns\c_ares</Filter> + </ClInclude> + <ClInclude Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_wrapper.h"> + <Filter>src\core\ext\resolver\dns\c_ares</Filter> + </ClInclude> <ClInclude Include="$(SolutionDir)\..\src\core\ext\load_reporting\load_reporting.h"> <Filter>src\core\ext\load_reporting</Filter> </ClInclude> @@ -1208,6 +1226,9 @@ <Filter Include="src\core\ext\resolver\dns"> <UniqueIdentifier>{e8fe6413-ab8c-48d5-2c7b-aa79e3db4ab2}</UniqueIdentifier> </Filter> + <Filter Include="src\core\ext\resolver\dns\c_ares"> + <UniqueIdentifier>{2b72688f-79b8-05dd-2896-c7d5dec07dd6}</UniqueIdentifier> + </Filter> <Filter Include="src\core\ext\resolver\dns\native"> <UniqueIdentifier>{94e34be0-29d2-1731-3c1e-617ec4986acb}</UniqueIdentifier> </Filter> diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index fffb409781..2600e9e25a 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -406,6 +406,8 @@ <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel_call_holder.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\subchannel_index.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\uri_parser.h" /> + <ClInclude Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_ev_driver.h" /> + <ClInclude Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_wrapper.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\ext\load_reporting\load_reporting.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\ext\load_reporting\load_reporting_filter.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\ext\lb_policy\grpclb\grpclb.h" /> @@ -698,6 +700,14 @@ </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\uri_parser.c"> </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\dns_resolver_ares.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_ev_driver_posix.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_wrapper.c"> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_wrapper_fallback.c"> + </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\native\dns_resolver.c"> </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\sockaddr\sockaddr_resolver.c"> diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 8c8afb6b86..1d1a2fc892 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -409,6 +409,18 @@ <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\uri_parser.c"> <Filter>src\core\ext\client_config</Filter> </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\dns_resolver_ares.c"> + <Filter>src\core\ext\resolver\dns\c_ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_ev_driver_posix.c"> + <Filter>src\core\ext\resolver\dns\c_ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_wrapper.c"> + <Filter>src\core\ext\resolver\dns\c_ares</Filter> + </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_wrapper_fallback.c"> + <Filter>src\core\ext\resolver\dns\c_ares</Filter> + </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\ext\resolver\dns\native\dns_resolver.c"> <Filter>src\core\ext\resolver\dns\native</Filter> </ClCompile> @@ -926,6 +938,12 @@ <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\uri_parser.h"> <Filter>src\core\ext\client_config</Filter> </ClInclude> + <ClInclude Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_ev_driver.h"> + <Filter>src\core\ext\resolver\dns\c_ares</Filter> + </ClInclude> + <ClInclude Include="$(SolutionDir)\..\src\core\ext\resolver\dns\c_ares\grpc_ares_wrapper.h"> + <Filter>src\core\ext\resolver\dns\c_ares</Filter> + </ClInclude> <ClInclude Include="$(SolutionDir)\..\src\core\ext\load_reporting\load_reporting.h"> <Filter>src\core\ext\load_reporting</Filter> </ClInclude> @@ -1046,6 +1064,9 @@ <Filter Include="src\core\ext\resolver\dns"> <UniqueIdentifier>{2e0a9b4f-6394-7c0e-6e5a-0f8b3ee29b41}</UniqueIdentifier> </Filter> + <Filter Include="src\core\ext\resolver\dns\c_ares"> + <UniqueIdentifier>{932d8afd-e042-46d0-30c5-1c45386165d9}</UniqueIdentifier> + </Filter> <Filter Include="src\core\ext\resolver\dns\native"> <UniqueIdentifier>{3d5398c8-928b-9096-8eb7-f8c40ee68c4d}</UniqueIdentifier> </Filter> |