diff --git a/BUILD b/BUILD index fa9a1209899b08aa8f09f0308cfc2b55c78c6a90..b4751a708104ead70d95efe8c06ef851ca39e48d 100644 --- a/BUILD +++ b/BUILD @@ -275,6 +275,7 @@ cc_library( "src/core/ext/client_config/lb_policy.h", "src/core/ext/client_config/lb_policy_factory.h", "src/core/ext/client_config/lb_policy_registry.h", + "src/core/ext/client_config/parse_address.h", "src/core/ext/client_config/resolver.h", "src/core/ext/client_config/resolver_factory.h", "src/core/ext/client_config/resolver_registry.h", @@ -426,6 +427,7 @@ cc_library( "src/core/ext/client_config/lb_policy.c", "src/core/ext/client_config/lb_policy_factory.c", "src/core/ext/client_config/lb_policy_registry.c", + "src/core/ext/client_config/parse_address.c", "src/core/ext/client_config/resolver.c", "src/core/ext/client_config/resolver_factory.c", "src/core/ext/client_config/resolver_registry.c", @@ -603,6 +605,7 @@ cc_library( "src/core/ext/client_config/lb_policy.h", "src/core/ext/client_config/lb_policy_factory.h", "src/core/ext/client_config/lb_policy_registry.h", + "src/core/ext/client_config/parse_address.h", "src/core/ext/client_config/resolver.h", "src/core/ext/client_config/resolver_factory.h", "src/core/ext/client_config/resolver_registry.h", @@ -736,6 +739,7 @@ cc_library( "src/core/ext/client_config/lb_policy.c", "src/core/ext/client_config/lb_policy_factory.c", "src/core/ext/client_config/lb_policy_registry.c", + "src/core/ext/client_config/parse_address.c", "src/core/ext/client_config/resolver.c", "src/core/ext/client_config/resolver_factory.c", "src/core/ext/client_config/resolver_registry.c", @@ -1434,6 +1438,7 @@ objc_library( "src/core/ext/client_config/lb_policy.c", "src/core/ext/client_config/lb_policy_factory.c", "src/core/ext/client_config/lb_policy_registry.c", + "src/core/ext/client_config/parse_address.c", "src/core/ext/client_config/resolver.c", "src/core/ext/client_config/resolver_factory.c", "src/core/ext/client_config/resolver_registry.c", @@ -1604,6 +1609,7 @@ objc_library( "src/core/ext/client_config/lb_policy.h", "src/core/ext/client_config/lb_policy_factory.h", "src/core/ext/client_config/lb_policy_registry.h", + "src/core/ext/client_config/parse_address.h", "src/core/ext/client_config/resolver.h", "src/core/ext/client_config/resolver_factory.h", "src/core/ext/client_config/resolver_registry.h", diff --git a/Makefile b/Makefile index 488d6f4dcec2e150f32830fdb0d9191da5d76c88..50fc16753aebac315d957b12d2397c7a7a89812c 100644 --- a/Makefile +++ b/Makefile @@ -2583,6 +2583,7 @@ LIBGRPC_SRC = \ src/core/ext/client_config/lb_policy.c \ src/core/ext/client_config/lb_policy_factory.c \ src/core/ext/client_config/lb_policy_registry.c \ + src/core/ext/client_config/parse_address.c \ src/core/ext/client_config/resolver.c \ src/core/ext/client_config/resolver_factory.c \ src/core/ext/client_config/resolver_registry.c \ @@ -2900,6 +2901,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/client_config/lb_policy.c \ src/core/ext/client_config/lb_policy_factory.c \ src/core/ext/client_config/lb_policy_registry.c \ + src/core/ext/client_config/parse_address.c \ src/core/ext/client_config/resolver.c \ src/core/ext/client_config/resolver_factory.c \ src/core/ext/client_config/resolver_registry.c \ diff --git a/binding.gyp b/binding.gyp index 8efc8a2b8e6493b4d9533a640f95d1a825ca96a4..53d86534defcb6605fba70b31ea25a96e69c981f 100644 --- a/binding.gyp +++ b/binding.gyp @@ -694,6 +694,7 @@ 'src/core/ext/client_config/lb_policy.c', 'src/core/ext/client_config/lb_policy_factory.c', 'src/core/ext/client_config/lb_policy_registry.c', + 'src/core/ext/client_config/parse_address.c', 'src/core/ext/client_config/resolver.c', 'src/core/ext/client_config/resolver_factory.c', 'src/core/ext/client_config/resolver_registry.c', diff --git a/build.yaml b/build.yaml index a6feea507465fca4bb18a5892b08f19b61c60951..b096576b441dc2930ddc91685e1b6359d4dd1677 100644 --- a/build.yaml +++ b/build.yaml @@ -442,6 +442,7 @@ filegroups: - src/core/ext/client_config/lb_policy.h - src/core/ext/client_config/lb_policy_factory.h - src/core/ext/client_config/lb_policy_registry.h + - src/core/ext/client_config/parse_address.h - src/core/ext/client_config/resolver.h - src/core/ext/client_config/resolver_factory.h - src/core/ext/client_config/resolver_registry.h @@ -461,6 +462,7 @@ filegroups: - src/core/ext/client_config/lb_policy.c - src/core/ext/client_config/lb_policy_factory.c - src/core/ext/client_config/lb_policy_registry.c + - src/core/ext/client_config/parse_address.c - src/core/ext/client_config/resolver.c - src/core/ext/client_config/resolver_factory.c - src/core/ext/client_config/resolver_registry.c diff --git a/config.m4 b/config.m4 index 7d3d899a405366e2643b7b69e5b3ee7f4118c37c..c26cb7b881fd3cfacf70c39adb062b7566e697a8 100644 --- a/config.m4 +++ b/config.m4 @@ -216,6 +216,7 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/client_config/lb_policy.c \ src/core/ext/client_config/lb_policy_factory.c \ src/core/ext/client_config/lb_policy_registry.c \ + src/core/ext/client_config/parse_address.c \ src/core/ext/client_config/resolver.c \ src/core/ext/client_config/resolver_factory.c \ src/core/ext/client_config/resolver_registry.c \ diff --git a/gRPC.podspec b/gRPC.podspec index 82c5eaac411476b990e99a81fb563645b5886dea..7ede97d1a9bfabdf37b9091b9948840d4e60303b 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -277,6 +277,7 @@ Pod::Spec.new do |s| 'src/core/ext/client_config/lb_policy.h', 'src/core/ext/client_config/lb_policy_factory.h', 'src/core/ext/client_config/lb_policy_registry.h', + 'src/core/ext/client_config/parse_address.h', 'src/core/ext/client_config/resolver.h', 'src/core/ext/client_config/resolver_factory.h', 'src/core/ext/client_config/resolver_registry.h', @@ -459,6 +460,7 @@ Pod::Spec.new do |s| 'src/core/ext/client_config/lb_policy.c', 'src/core/ext/client_config/lb_policy_factory.c', 'src/core/ext/client_config/lb_policy_registry.c', + 'src/core/ext/client_config/parse_address.c', 'src/core/ext/client_config/resolver.c', 'src/core/ext/client_config/resolver_factory.c', 'src/core/ext/client_config/resolver_registry.c', @@ -616,6 +618,7 @@ Pod::Spec.new do |s| 'src/core/ext/client_config/lb_policy.h', 'src/core/ext/client_config/lb_policy_factory.h', 'src/core/ext/client_config/lb_policy_registry.h', + 'src/core/ext/client_config/parse_address.h', 'src/core/ext/client_config/resolver.h', 'src/core/ext/client_config/resolver_factory.h', 'src/core/ext/client_config/resolver_registry.h', diff --git a/grpc.gemspec b/grpc.gemspec index b8cfc4e6c4e5213f3f87fa1fc7e33e56e749e482..9c858b25791c861c7a5c77308a24d70cc60cba3f 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -288,6 +288,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/client_config/lb_policy.h ) s.files += %w( src/core/ext/client_config/lb_policy_factory.h ) s.files += %w( src/core/ext/client_config/lb_policy_registry.h ) + s.files += %w( src/core/ext/client_config/parse_address.h ) s.files += %w( src/core/ext/client_config/resolver.h ) s.files += %w( src/core/ext/client_config/resolver_factory.h ) s.files += %w( src/core/ext/client_config/resolver_registry.h ) @@ -443,6 +444,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/client_config/lb_policy.c ) s.files += %w( src/core/ext/client_config/lb_policy_factory.c ) s.files += %w( src/core/ext/client_config/lb_policy_registry.c ) + s.files += %w( src/core/ext/client_config/parse_address.c ) s.files += %w( src/core/ext/client_config/resolver.c ) s.files += %w( src/core/ext/client_config/resolver_factory.c ) s.files += %w( src/core/ext/client_config/resolver_registry.c ) diff --git a/package.xml b/package.xml index 2f4c6255394a25a71ed053d7829cfc293b370ea9..ced62b63d663ccee2f8c11901a2a14f18250030e 100644 --- a/package.xml +++ b/package.xml @@ -291,6 +291,7 @@ <file baseinstalldir="/" name="src/core/ext/client_config/lb_policy.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/lb_policy_factory.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/lb_policy_registry.h" role="src" /> + <file baseinstalldir="/" name="src/core/ext/client_config/parse_address.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/resolver.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/resolver_factory.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/resolver_registry.h" role="src" /> @@ -446,6 +447,7 @@ <file baseinstalldir="/" name="src/core/ext/client_config/lb_policy.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/lb_policy_factory.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/lb_policy_registry.c" role="src" /> + <file baseinstalldir="/" name="src/core/ext/client_config/parse_address.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/resolver.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/resolver_factory.c" role="src" /> <file baseinstalldir="/" name="src/core/ext/client_config/resolver_registry.c" role="src" /> diff --git a/src/core/ext/client_config/parse_address.c b/src/core/ext/client_config/parse_address.c new file mode 100644 index 0000000000000000000000000000000000000000..8b4abe24a6118f752ddc2cd0ff7c626ddb0e2e06 --- /dev/null +++ b/src/core/ext/client_config/parse_address.c @@ -0,0 +1,137 @@ +/* + * + * 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/client_config/parse_address.h" + +#include <stdio.h> +#include <string.h> +#ifdef GPR_HAVE_UNIX_SOCKET +#include <sys/un.h> +#endif + +#include <grpc/support/alloc.h> +#include <grpc/support/host_port.h> +#include <grpc/support/log.h> +#include <grpc/support/string_util.h> + +#ifdef GPR_HAVE_UNIX_SOCKET +int parse_unix(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len) { + struct sockaddr_un *un = (struct sockaddr_un *)addr; + + un->sun_family = AF_UNIX; + strcpy(un->sun_path, uri->path); + *len = strlen(un->sun_path) + sizeof(un->sun_family) + 1; + + return 1; +} +#endif + +int parse_ipv4(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len) { + const char *host_port = uri->path; + char *host; + char *port; + int port_num; + int result = 0; + struct sockaddr_in *in = (struct sockaddr_in *)addr; + + if (*host_port == '/') ++host_port; + if (!gpr_split_host_port(host_port, &host, &port)) { + return 0; + } + + memset(in, 0, sizeof(*in)); + *len = sizeof(*in); + in->sin_family = AF_INET; + if (inet_pton(AF_INET, host, &in->sin_addr) == 0) { + gpr_log(GPR_ERROR, "invalid ipv4 address: '%s'", host); + goto done; + } + + if (port != NULL) { + if (sscanf(port, "%d", &port_num) != 1 || port_num < 0 || + port_num > 65535) { + gpr_log(GPR_ERROR, "invalid ipv4 port: '%s'", port); + goto done; + } + in->sin_port = htons((uint16_t)port_num); + } else { + gpr_log(GPR_ERROR, "no port given for ipv4 scheme"); + goto done; + } + + result = 1; +done: + gpr_free(host); + gpr_free(port); + return result; +} + +int parse_ipv6(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len) { + const char *host_port = uri->path; + char *host; + char *port; + int port_num; + int result = 0; + struct sockaddr_in6 *in6 = (struct sockaddr_in6 *)addr; + + if (*host_port == '/') ++host_port; + if (!gpr_split_host_port(host_port, &host, &port)) { + return 0; + } + + memset(in6, 0, sizeof(*in6)); + *len = sizeof(*in6); + in6->sin6_family = AF_INET6; + if (inet_pton(AF_INET6, host, &in6->sin6_addr) == 0) { + gpr_log(GPR_ERROR, "invalid ipv6 address: '%s'", host); + goto done; + } + + if (port != NULL) { + if (sscanf(port, "%d", &port_num) != 1 || port_num < 0 || + port_num > 65535) { + gpr_log(GPR_ERROR, "invalid ipv6 port: '%s'", port); + goto done; + } + in6->sin6_port = htons((uint16_t)port_num); + } else { + gpr_log(GPR_ERROR, "no port given for ipv6 scheme"); + goto done; + } + + result = 1; +done: + gpr_free(host); + gpr_free(port); + return result; +} diff --git a/src/core/ext/client_config/parse_address.h b/src/core/ext/client_config/parse_address.h new file mode 100644 index 0000000000000000000000000000000000000000..74c86f4d938b97d2cebf01f28e413d94e0ca12c1 --- /dev/null +++ b/src/core/ext/client_config/parse_address.h @@ -0,0 +1,56 @@ +/* + * + * 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. + * + */ + +#ifndef GRPC_CORE_EXT_CLIENT_CONFIG_PARSE_ADDRESS_H +#define GRPC_CORE_EXT_CLIENT_CONFIG_PARSE_ADDRESS_H + +#include <stddef.h> + +#include "src/core/ext/client_config/uri_parser.h" +#include "src/core/lib/iomgr/sockaddr.h" + +#ifdef GPR_HAVE_UNIX_SOCKET +/** Populate \a addr and \a len from \a uri, whose path is expected to contain a + * unix socket path. Returns true upon success. */ +int parse_unix(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len); +#endif + +/** Populate /a addr and \a len from \a uri, whose path is expected to contain a + * host:port pair. Returns true upon success. */ +int parse_ipv4(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len); + +/** Populate /a addr and \a len from \a uri, whose path is expected to contain a + * host:port pair. Returns true upon success. */ +int parse_ipv6(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len); + +#endif /* GRPC_CORE_EXT_CLIENT_CONFIG_PARSE_ADDRESS_H */ diff --git a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c index 1d54a86c39a817e373e28be19459a117c94e9939..a4fa9acf2249f51d6ba36c34895f7fb4a9c61514 100644 --- a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c +++ b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c @@ -40,11 +40,8 @@ #include <grpc/support/port_platform.h> #include <grpc/support/string_util.h> -#ifdef GPR_HAVE_UNIX_SOCKET -#include <sys/un.h> -#endif - #include "src/core/ext/client_config/lb_policy_registry.h" +#include "src/core/ext/client_config/parse_address.h" #include "src/core/ext/client_config/resolver_registry.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/unix_sockets_posix.h" @@ -167,105 +164,12 @@ static char *ipv6_get_default_authority(grpc_resolver_factory *factory, } #ifdef GPR_HAVE_UNIX_SOCKET -static int parse_unix(grpc_uri *uri, struct sockaddr_storage *addr, - size_t *len) { - struct sockaddr_un *un = (struct sockaddr_un *)addr; - - un->sun_family = AF_UNIX; - strcpy(un->sun_path, uri->path); - *len = strlen(un->sun_path) + sizeof(un->sun_family) + 1; - - return 1; -} - char *unix_get_default_authority(grpc_resolver_factory *factory, grpc_uri *uri) { return gpr_strdup("localhost"); } #endif -static int parse_ipv4(grpc_uri *uri, struct sockaddr_storage *addr, - size_t *len) { - const char *host_port = uri->path; - char *host; - char *port; - int port_num; - int result = 0; - struct sockaddr_in *in = (struct sockaddr_in *)addr; - - if (*host_port == '/') ++host_port; - if (!gpr_split_host_port(host_port, &host, &port)) { - return 0; - } - - memset(in, 0, sizeof(*in)); - *len = sizeof(*in); - in->sin_family = AF_INET; - if (inet_pton(AF_INET, host, &in->sin_addr) == 0) { - gpr_log(GPR_ERROR, "invalid ipv4 address: '%s'", host); - goto done; - } - - if (port != NULL) { - if (sscanf(port, "%d", &port_num) != 1 || port_num < 0 || - port_num > 65535) { - gpr_log(GPR_ERROR, "invalid ipv4 port: '%s'", port); - goto done; - } - in->sin_port = htons((uint16_t)port_num); - } else { - gpr_log(GPR_ERROR, "no port given for ipv4 scheme"); - goto done; - } - - result = 1; -done: - gpr_free(host); - gpr_free(port); - return result; -} - -static int parse_ipv6(grpc_uri *uri, struct sockaddr_storage *addr, - size_t *len) { - const char *host_port = uri->path; - char *host; - char *port; - int port_num; - int result = 0; - struct sockaddr_in6 *in6 = (struct sockaddr_in6 *)addr; - - if (*host_port == '/') ++host_port; - if (!gpr_split_host_port(host_port, &host, &port)) { - return 0; - } - - memset(in6, 0, sizeof(*in6)); - *len = sizeof(*in6); - in6->sin6_family = AF_INET6; - if (inet_pton(AF_INET6, host, &in6->sin6_addr) == 0) { - gpr_log(GPR_ERROR, "invalid ipv6 address: '%s'", host); - goto done; - } - - if (port != NULL) { - if (sscanf(port, "%d", &port_num) != 1 || port_num < 0 || - port_num > 65535) { - gpr_log(GPR_ERROR, "invalid ipv6 port: '%s'", port); - goto done; - } - in6->sin6_port = htons((uint16_t)port_num); - } else { - gpr_log(GPR_ERROR, "no port given for ipv6 scheme"); - goto done; - } - - result = 1; -done: - gpr_free(host); - gpr_free(port); - return result; -} - static void do_nothing(void *ignored) {} static grpc_resolver *sockaddr_create( diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 1f7f2a196be0e27701db97049f895e677d2bf8e4..de25edbeb523dd9636f95d5ef4beb67f33aedade 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -210,6 +210,7 @@ CORE_SOURCE_FILES = [ 'src/core/ext/client_config/lb_policy.c', 'src/core/ext/client_config/lb_policy_factory.c', 'src/core/ext/client_config/lb_policy_registry.c', + 'src/core/ext/client_config/parse_address.c', 'src/core/ext/client_config/resolver.c', 'src/core/ext/client_config/resolver_factory.c', 'src/core/ext/client_config/resolver_registry.c', diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index b131a55b5922163e8ec58a3af651430dc40ce2cb..4b3c8ab4bf6dfde44738bceb84b1705d901b9432 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -903,6 +903,7 @@ src/core/ext/client_config/initial_connect_string.h \ src/core/ext/client_config/lb_policy.h \ src/core/ext/client_config/lb_policy_factory.h \ src/core/ext/client_config/lb_policy_registry.h \ +src/core/ext/client_config/parse_address.h \ src/core/ext/client_config/resolver.h \ src/core/ext/client_config/resolver_factory.h \ src/core/ext/client_config/resolver_registry.h \ @@ -1058,6 +1059,7 @@ src/core/ext/client_config/initial_connect_string.c \ src/core/ext/client_config/lb_policy.c \ src/core/ext/client_config/lb_policy_factory.c \ src/core/ext/client_config/lb_policy_registry.c \ +src/core/ext/client_config/parse_address.c \ src/core/ext/client_config/resolver.c \ src/core/ext/client_config/resolver_factory.c \ src/core/ext/client_config/resolver_registry.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 0b68315c82a8a2ebb524dd175e91d51263b444dd..7978f12d53fc2ae80565d5ac8ea1ba56312cab4c 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -5997,6 +5997,7 @@ "src/core/ext/client_config/lb_policy.h", "src/core/ext/client_config/lb_policy_factory.h", "src/core/ext/client_config/lb_policy_registry.h", + "src/core/ext/client_config/parse_address.h", "src/core/ext/client_config/resolver.h", "src/core/ext/client_config/resolver_factory.h", "src/core/ext/client_config/resolver_registry.h", @@ -6027,6 +6028,8 @@ "src/core/ext/client_config/lb_policy_factory.h", "src/core/ext/client_config/lb_policy_registry.c", "src/core/ext/client_config/lb_policy_registry.h", + "src/core/ext/client_config/parse_address.c", + "src/core/ext/client_config/parse_address.h", "src/core/ext/client_config/resolver.c", "src/core/ext/client_config/resolver.h", "src/core/ext/client_config/resolver_factory.c", diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index f695468254cfa69411c8032f129e118b4dd85aad..32540da4991dc6d566647062ad9bf3411d706fa7 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -412,6 +412,7 @@ <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\lb_policy.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\lb_policy_factory.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\lb_policy_registry.h" /> + <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\parse_address.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\resolver.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\resolver_factory.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\resolver_registry.h" /> @@ -705,6 +706,8 @@ </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\lb_policy_registry.c"> </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\parse_address.c"> + </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\resolver.c"> </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\resolver_factory.c"> diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 37bd1e6645b4de1b67a19ec0b16451b491f20f0a..09b94cffe9b8d324afe0aa273c24898a42a5fb9e 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -409,6 +409,9 @@ <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\lb_policy_registry.c"> <Filter>src\core\ext\client_config</Filter> </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\parse_address.c"> + <Filter>src\core\ext\client_config</Filter> + </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\resolver.c"> <Filter>src\core\ext\client_config</Filter> </ClCompile> @@ -926,6 +929,9 @@ <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\lb_policy_registry.h"> <Filter>src\core\ext\client_config</Filter> </ClInclude> + <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\parse_address.h"> + <Filter>src\core\ext\client_config</Filter> + </ClInclude> <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\resolver.h"> <Filter>src\core\ext\client_config</Filter> </ClInclude> diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index a866ddc3336bca4b84228fae1142c127db568d21..fa571d9bf9dde4197307f896353c7fe7e216b621 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -388,6 +388,7 @@ <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\lb_policy.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\lb_policy_factory.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\lb_policy_registry.h" /> + <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\parse_address.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\resolver.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\resolver_factory.h" /> <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\resolver_registry.h" /> @@ -645,6 +646,8 @@ </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\lb_policy_registry.c"> </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\parse_address.c"> + </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\resolver.c"> </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\resolver_factory.c"> diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index bc4e06e9489654582d5eae4ef858d77d4cff866f..30dcb1ba1a3a53dbc786af5ddd718b9760c0a149 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -355,6 +355,9 @@ <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\lb_policy_registry.c"> <Filter>src\core\ext\client_config</Filter> </ClCompile> + <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\parse_address.c"> + <Filter>src\core\ext\client_config</Filter> + </ClCompile> <ClCompile Include="$(SolutionDir)\..\src\core\ext\client_config\resolver.c"> <Filter>src\core\ext\client_config</Filter> </ClCompile> @@ -821,6 +824,9 @@ <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\lb_policy_registry.h"> <Filter>src\core\ext\client_config</Filter> </ClInclude> + <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\parse_address.h"> + <Filter>src\core\ext\client_config</Filter> + </ClInclude> <ClInclude Include="$(SolutionDir)\..\src\core\ext\client_config\resolver.h"> <Filter>src\core\ext\client_config</Filter> </ClInclude>