diff --git a/BUILD b/BUILD
index f828c89e4c6..ae2a4ccda5c 100644
--- a/BUILD
+++ b/BUILD
@@ -68,7 +68,6 @@ GPR_PUBLIC_HDRS = [
"include/grpc/support/atm_windows.h",
"include/grpc/support/avl.h",
"include/grpc/support/cpu.h",
- "include/grpc/support/host_port.h",
"include/grpc/support/log.h",
"include/grpc/support/log_windows.h",
"include/grpc/support/port_platform.h",
@@ -497,6 +496,7 @@ grpc_cc_library(
"src/core/lib/gpr/arena.h",
"src/core/lib/gpr/env.h",
"src/core/lib/gpr/fork.h",
+ "src/core/lib/gpr/host_port.h",
"src/core/lib/gpr/mpscq.h",
"src/core/lib/gpr/murmur_hash.h",
"src/core/lib/gpr/spinlock.h",
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 498f8f5abd6..74e0c3994cf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -703,7 +703,6 @@ foreach(_hdr
include/grpc/support/atm_windows.h
include/grpc/support/avl.h
include/grpc/support/cpu.h
- include/grpc/support/host_port.h
include/grpc/support/log.h
include/grpc/support/log_windows.h
include/grpc/support/port_platform.h
@@ -1678,7 +1677,6 @@ foreach(_hdr
include/grpc/support/atm_windows.h
include/grpc/support/avl.h
include/grpc/support/cpu.h
- include/grpc/support/host_port.h
include/grpc/support/log.h
include/grpc/support/log_windows.h
include/grpc/support/port_platform.h
@@ -1972,7 +1970,6 @@ foreach(_hdr
include/grpc/support/atm_windows.h
include/grpc/support/avl.h
include/grpc/support/cpu.h
- include/grpc/support/host_port.h
include/grpc/support/log.h
include/grpc/support/log_windows.h
include/grpc/support/port_platform.h
@@ -2538,7 +2535,6 @@ foreach(_hdr
include/grpc/support/atm_windows.h
include/grpc/support/avl.h
include/grpc/support/cpu.h
- include/grpc/support/host_port.h
include/grpc/support/log.h
include/grpc/support/log_windows.h
include/grpc/support/port_platform.h
@@ -3009,7 +3005,6 @@ foreach(_hdr
include/grpc/support/atm_windows.h
include/grpc/support/avl.h
include/grpc/support/cpu.h
- include/grpc/support/host_port.h
include/grpc/support/log.h
include/grpc/support/log_windows.h
include/grpc/support/port_platform.h
@@ -3737,7 +3732,6 @@ foreach(_hdr
include/grpc/support/atm_windows.h
include/grpc/support/avl.h
include/grpc/support/cpu.h
- include/grpc/support/host_port.h
include/grpc/support/log.h
include/grpc/support/log_windows.h
include/grpc/support/port_platform.h
diff --git a/Makefile b/Makefile
index 0d3f6555441..4808d60eedc 100644
--- a/Makefile
+++ b/Makefile
@@ -2923,7 +2923,6 @@ PUBLIC_HEADERS_C += \
include/grpc/support/atm_windows.h \
include/grpc/support/avl.h \
include/grpc/support/cpu.h \
- include/grpc/support/host_port.h \
include/grpc/support/log.h \
include/grpc/support/log_windows.h \
include/grpc/support/port_platform.h \
@@ -3879,7 +3878,6 @@ PUBLIC_HEADERS_C += \
include/grpc/support/atm_windows.h \
include/grpc/support/avl.h \
include/grpc/support/cpu.h \
- include/grpc/support/host_port.h \
include/grpc/support/log.h \
include/grpc/support/log_windows.h \
include/grpc/support/port_platform.h \
@@ -4166,7 +4164,6 @@ PUBLIC_HEADERS_C += \
include/grpc/support/atm_windows.h \
include/grpc/support/avl.h \
include/grpc/support/cpu.h \
- include/grpc/support/host_port.h \
include/grpc/support/log.h \
include/grpc/support/log_windows.h \
include/grpc/support/port_platform.h \
@@ -4696,7 +4693,6 @@ PUBLIC_HEADERS_CXX += \
include/grpc/support/atm_windows.h \
include/grpc/support/avl.h \
include/grpc/support/cpu.h \
- include/grpc/support/host_port.h \
include/grpc/support/log.h \
include/grpc/support/log_windows.h \
include/grpc/support/port_platform.h \
@@ -5180,7 +5176,6 @@ PUBLIC_HEADERS_CXX += \
include/grpc/support/atm_windows.h \
include/grpc/support/avl.h \
include/grpc/support/cpu.h \
- include/grpc/support/host_port.h \
include/grpc/support/log.h \
include/grpc/support/log_windows.h \
include/grpc/support/port_platform.h \
@@ -5897,7 +5892,6 @@ PUBLIC_HEADERS_CXX += \
include/grpc/support/atm_windows.h \
include/grpc/support/avl.h \
include/grpc/support/cpu.h \
- include/grpc/support/host_port.h \
include/grpc/support/log.h \
include/grpc/support/log_windows.h \
include/grpc/support/port_platform.h \
diff --git a/build.yaml b/build.yaml
index 92978b99407..6f4f855aafa 100644
--- a/build.yaml
+++ b/build.yaml
@@ -85,7 +85,6 @@ filegroups:
- include/grpc/support/atm_windows.h
- include/grpc/support/avl.h
- include/grpc/support/cpu.h
- - include/grpc/support/host_port.h
- include/grpc/support/log.h
- include/grpc/support/log_windows.h
- include/grpc/support/port_platform.h
@@ -106,6 +105,7 @@ filegroups:
- src/core/lib/gpr/arena.h
- src/core/lib/gpr/env.h
- src/core/lib/gpr/fork.h
+ - src/core/lib/gpr/host_port.h
- src/core/lib/gpr/mpscq.h
- src/core/lib/gpr/murmur_hash.h
- src/core/lib/gpr/spinlock.h
diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec
index f064b2ce3b4..91217416028 100644
--- a/gRPC-C++.podspec
+++ b/gRPC-C++.podspec
@@ -206,6 +206,7 @@ Pod::Spec.new do |s|
'src/core/lib/gpr/arena.h',
'src/core/lib/gpr/env.h',
'src/core/lib/gpr/fork.h',
+ 'src/core/lib/gpr/host_port.h',
'src/core/lib/gpr/mpscq.h',
'src/core/lib/gpr/murmur_hash.h',
'src/core/lib/gpr/spinlock.h',
@@ -451,6 +452,7 @@ Pod::Spec.new do |s|
'src/core/lib/gpr/arena.h',
'src/core/lib/gpr/env.h',
'src/core/lib/gpr/fork.h',
+ 'src/core/lib/gpr/host_port.h',
'src/core/lib/gpr/mpscq.h',
'src/core/lib/gpr/murmur_hash.h',
'src/core/lib/gpr/spinlock.h',
@@ -634,6 +636,7 @@ Pod::Spec.new do |s|
'src/core/lib/gpr/arena.h',
'src/core/lib/gpr/env.h',
'src/core/lib/gpr/fork.h',
+ 'src/core/lib/gpr/host_port.h',
'src/core/lib/gpr/mpscq.h',
'src/core/lib/gpr/murmur_hash.h',
'src/core/lib/gpr/spinlock.h',
diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec
index cec8da0cfcf..ce99dd83591 100644
--- a/gRPC-Core.podspec
+++ b/gRPC-Core.podspec
@@ -116,7 +116,6 @@ Pod::Spec.new do |s|
'include/grpc/support/atm_windows.h',
'include/grpc/support/avl.h',
'include/grpc/support/cpu.h',
- 'include/grpc/support/host_port.h',
'include/grpc/support/log.h',
'include/grpc/support/log_windows.h',
'include/grpc/support/port_platform.h',
@@ -193,6 +192,7 @@ Pod::Spec.new do |s|
ss.source_files = 'src/core/lib/gpr/arena.h',
'src/core/lib/gpr/env.h',
'src/core/lib/gpr/fork.h',
+ 'src/core/lib/gpr/host_port.h',
'src/core/lib/gpr/mpscq.h',
'src/core/lib/gpr/murmur_hash.h',
'src/core/lib/gpr/spinlock.h',
@@ -716,6 +716,7 @@ Pod::Spec.new do |s|
ss.private_header_files = 'src/core/lib/gpr/arena.h',
'src/core/lib/gpr/env.h',
'src/core/lib/gpr/fork.h',
+ 'src/core/lib/gpr/host_port.h',
'src/core/lib/gpr/mpscq.h',
'src/core/lib/gpr/murmur_hash.h',
'src/core/lib/gpr/spinlock.h',
diff --git a/grpc.def b/grpc.def
index dc4cc5c5cab..3b899b169d8 100644
--- a/grpc.def
+++ b/grpc.def
@@ -186,8 +186,6 @@ EXPORTS
gpr_avl_is_empty
gpr_cpu_num_cores
gpr_cpu_current_cpu
- gpr_join_host_port
- gpr_split_host_port
gpr_log_severity_string
gpr_log
gpr_log_message
diff --git a/grpc.gemspec b/grpc.gemspec
index 1569eb68000..f13c6b8a801 100644
--- a/grpc.gemspec
+++ b/grpc.gemspec
@@ -51,7 +51,6 @@ Gem::Specification.new do |s|
s.files += %w( include/grpc/support/atm_windows.h )
s.files += %w( include/grpc/support/avl.h )
s.files += %w( include/grpc/support/cpu.h )
- s.files += %w( include/grpc/support/host_port.h )
s.files += %w( include/grpc/support/log.h )
s.files += %w( include/grpc/support/log_windows.h )
s.files += %w( include/grpc/support/port_platform.h )
@@ -84,6 +83,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/gpr/arena.h )
s.files += %w( src/core/lib/gpr/env.h )
s.files += %w( src/core/lib/gpr/fork.h )
+ s.files += %w( src/core/lib/gpr/host_port.h )
s.files += %w( src/core/lib/gpr/mpscq.h )
s.files += %w( src/core/lib/gpr/murmur_hash.h )
s.files += %w( src/core/lib/gpr/spinlock.h )
diff --git a/include/grpc/module.modulemap b/include/grpc/module.modulemap
index cdaf3b1def1..4f6bf6c9bdb 100644
--- a/include/grpc/module.modulemap
+++ b/include/grpc/module.modulemap
@@ -6,7 +6,6 @@ framework module grpc {
header "support/atm.h"
header "support/avl.h"
header "support/cpu.h"
- header "support/host_port.h"
header "support/log.h"
header "support/log_windows.h"
header "support/port_platform.h"
diff --git a/package.xml b/package.xml
index aa30588fe1e..38da58d79c3 100644
--- a/package.xml
+++ b/package.xml
@@ -58,7 +58,6 @@
-
@@ -91,6 +90,7 @@
+
diff --git a/src/core/ext/filters/client_channel/http_proxy.cc b/src/core/ext/filters/client_channel/http_proxy.cc
index 7c5f79fb302..d42376413d0 100644
--- a/src/core/ext/filters/client_channel/http_proxy.cc
+++ b/src/core/ext/filters/client_channel/http_proxy.cc
@@ -22,7 +22,6 @@
#include
#include
-#include
#include
#include
@@ -31,6 +30,7 @@
#include "src/core/ext/filters/client_channel/uri_parser.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gpr/env.h"
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/slice/b64.h"
diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
index 1709e5622e2..5e24bdd4e75 100644
--- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
+++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
@@ -87,7 +87,6 @@
#include
#include
#include
-#include
#include
#include
@@ -106,6 +105,7 @@
#include "src/core/lib/backoff/backoff.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channel_stack.h"
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gprpp/manual_constructor.h"
#include "src/core/lib/iomgr/combiner.h"
diff --git a/src/core/ext/filters/client_channel/parse_address.cc b/src/core/ext/filters/client_channel/parse_address.cc
index c3309e36a3c..4b6905eaa30 100644
--- a/src/core/ext/filters/client_channel/parse_address.cc
+++ b/src/core/ext/filters/client_channel/parse_address.cc
@@ -26,9 +26,10 @@
#endif
#include
-#include
#include
#include
+
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#ifdef GRPC_HAVE_UNIX_SOCKET
diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
index e5b2815af80..f2f25bc7c00 100644
--- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
+++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
@@ -25,7 +25,6 @@
#include
#include
-#include
#include
#include "src/core/ext/filters/client_channel/http_connect_handshaker.h"
@@ -35,6 +34,7 @@
#include "src/core/lib/backoff/backoff.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gpr/env.h"
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gprpp/manual_constructor.h"
#include "src/core/lib/iomgr/combiner.h"
diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
index e05f9d2f2ff..d76c8069d5d 100644
--- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
+++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
@@ -28,7 +28,6 @@
#include
#include
-#include
#include
#include
#include
@@ -36,6 +35,7 @@
#include "src/core/ext/filters/client_channel/parse_address.h"
#include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h"
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/executor.h"
diff --git a/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc b/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc
index 2c798188d13..478810d2637 100644
--- a/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc
+++ b/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc
@@ -23,7 +23,6 @@
#include
#include
-#include
#include
#include
@@ -32,6 +31,7 @@
#include "src/core/lib/backoff/backoff.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gpr/env.h"
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gprpp/manual_constructor.h"
#include "src/core/lib/iomgr/combiner.h"
diff --git a/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc b/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc
index e945d08202c..f4579177753 100644
--- a/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc
+++ b/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc
@@ -24,7 +24,6 @@
#include
#include
-#include
#include
#include
@@ -32,6 +31,7 @@
#include "src/core/ext/filters/client_channel/parse_address.h"
#include "src/core/ext/filters/client_channel/resolver_registry.h"
#include "src/core/lib/channel/channel_args.h"
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/combiner.h"
diff --git a/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc b/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc
index 99ad78e23ca..784935eb20a 100644
--- a/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc
+++ b/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc
@@ -22,7 +22,6 @@
#include
#include
-#include
#include
#include
@@ -30,6 +29,7 @@
#include "src/core/ext/filters/client_channel/parse_address.h"
#include "src/core/ext/filters/client_channel/resolver_registry.h"
#include "src/core/lib/channel/channel_args.h"
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/iomgr/combiner.h"
#include "src/core/lib/iomgr/resolve_address.h"
diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.cc b/src/core/ext/transport/cronet/transport/cronet_transport.cc
index 5b1c6ab3f9a..6301d69faf8 100644
--- a/src/core/ext/transport/cronet/transport/cronet_transport.cc
+++ b/src/core/ext/transport/cronet/transport/cronet_transport.cc
@@ -21,13 +21,13 @@
#include
#include
#include
-#include
#include
#include
#include
#include "src/core/ext/transport/chttp2/transport/incoming_metadata.h"
#include "src/core/ext/transport/cronet/transport/cronet_transport.h"
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/iomgr/endpoint.h"
#include "src/core/lib/iomgr/exec_ctx.h"
diff --git a/src/core/lib/gpr/host_port.cc b/src/core/lib/gpr/host_port.cc
index 29178279d3f..0776727906a 100644
--- a/src/core/lib/gpr/host_port.cc
+++ b/src/core/lib/gpr/host_port.cc
@@ -16,13 +16,14 @@
*
*/
-#include
+#include "src/core/lib/gpr/host_port.h"
#include
#include
#include
#include
+
#include "src/core/lib/gpr/string.h"
int gpr_join_host_port(char** out, const char* host, int port) {
diff --git a/include/grpc/support/host_port.h b/src/core/lib/gpr/host_port.h
similarity index 81%
rename from include/grpc/support/host_port.h
rename to src/core/lib/gpr/host_port.h
index 9805811bfb6..0bf0960f824 100644
--- a/include/grpc/support/host_port.h
+++ b/src/core/lib/gpr/host_port.h
@@ -16,15 +16,11 @@
*
*/
-#ifndef GRPC_SUPPORT_HOST_PORT_H
-#define GRPC_SUPPORT_HOST_PORT_H
+#ifndef GRPC_CORE_LIB_GPR_HOST_PORT_H
+#define GRPC_CORE_LIB_GPR_HOST_PORT_H
#include
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/** Given a host and port, creates a newly-allocated string of the form
"host:port" or "[ho:st]:port", depending on whether the host contains colons
like an IPv6 literal. If the host is already bracketed, then additional
@@ -35,17 +31,13 @@ extern "C" {
destroyed using gpr_free().
In the unlikely event of an error, returns -1 and sets *out to NULL. */
-GPRAPI int gpr_join_host_port(char** out, const char* host, int port);
+int gpr_join_host_port(char** out, const char* host, int port);
/** Given a name in the form "host:port" or "[ho:st]:port", split into hostname
and port number, into newly allocated strings, which must later be
destroyed using gpr_free().
Return 1 on success, 0 on failure. Guarantees *host and *port == NULL on
failure. */
-GPRAPI int gpr_split_host_port(const char* name, char** host, char** port);
-
-#ifdef __cplusplus
-}
-#endif
+int gpr_split_host_port(const char* name, char** host, char** port);
-#endif /* GRPC_SUPPORT_HOST_PORT_H */
+#endif /* GRPC_CORE_LIB_GPR_HOST_PORT_H */
diff --git a/src/core/lib/iomgr/resolve_address_posix.cc b/src/core/lib/iomgr/resolve_address_posix.cc
index 176caee4907..7ed28629036 100644
--- a/src/core/lib/iomgr/resolve_address_posix.cc
+++ b/src/core/lib/iomgr/resolve_address_posix.cc
@@ -27,12 +27,13 @@
#include
#include
-#include
#include
#include
#include
#include
#include
+
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/iomgr/block_annotate.h"
#include "src/core/lib/iomgr/executor.h"
diff --git a/src/core/lib/iomgr/resolve_address_uv.cc b/src/core/lib/iomgr/resolve_address_uv.cc
index 3eab04f3de0..7252555bd0e 100644
--- a/src/core/lib/iomgr/resolve_address_uv.cc
+++ b/src/core/lib/iomgr/resolve_address_uv.cc
@@ -22,11 +22,11 @@
#include
#include
-#include
#include
#include
#include
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/exec_ctx.h"
diff --git a/src/core/lib/iomgr/resolve_address_windows.cc b/src/core/lib/iomgr/resolve_address_windows.cc
index e44ab396b35..e875d77fd88 100644
--- a/src/core/lib/iomgr/resolve_address_windows.cc
+++ b/src/core/lib/iomgr/resolve_address_windows.cc
@@ -28,12 +28,13 @@
#include
#include
-#include
#include
#include
#include
#include
#include
+
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/iomgr/block_annotate.h"
#include "src/core/lib/iomgr/executor.h"
diff --git a/src/core/lib/iomgr/sockaddr_utils.cc b/src/core/lib/iomgr/sockaddr_utils.cc
index 71e3e386243..ac97af4deea 100644
--- a/src/core/lib/iomgr/sockaddr_utils.cc
+++ b/src/core/lib/iomgr/sockaddr_utils.cc
@@ -23,11 +23,11 @@
#include
#include
-#include
#include
#include
#include
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/iomgr/sockaddr.h"
#include "src/core/lib/iomgr/socket_utils.h"
diff --git a/src/core/lib/iomgr/socket_utils_common_posix.cc b/src/core/lib/iomgr/socket_utils_common_posix.cc
index 5068a8081d3..d02d77eb02e 100644
--- a/src/core/lib/iomgr/socket_utils_common_posix.cc
+++ b/src/core/lib/iomgr/socket_utils_common_posix.cc
@@ -36,10 +36,11 @@
#include
#include
-#include
#include
#include
#include
+
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/iomgr/sockaddr_utils.h"
diff --git a/src/core/lib/security/transport/security_connector.cc b/src/core/lib/security/transport/security_connector.cc
index 1d962f94b28..fd632bdbab9 100644
--- a/src/core/lib/security/transport/security_connector.cc
+++ b/src/core/lib/security/transport/security_connector.cc
@@ -23,7 +23,6 @@
#include
#include
-#include
#include
#include
@@ -31,6 +30,7 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/handshaker.h"
#include "src/core/lib/gpr/env.h"
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/iomgr/load_file.h"
#include "src/core/lib/security/context/security_context.h"
diff --git a/src/objective-c/tests/CoreCronetEnd2EndTests/CoreCronetEnd2EndTests.mm b/src/objective-c/tests/CoreCronetEnd2EndTests/CoreCronetEnd2EndTests.mm
index 16940a49179..d91b5cf99e6 100644
--- a/src/objective-c/tests/CoreCronetEnd2EndTests/CoreCronetEnd2EndTests.mm
+++ b/src/objective-c/tests/CoreCronetEnd2EndTests/CoreCronetEnd2EndTests.mm
@@ -34,12 +34,12 @@
#include
#include
-#include
#include
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/security/credentials/credentials.h"
#include "src/core/lib/gpr/env.h"
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gpr/tmpfile.h"
#include "test/core/end2end/data/ssl_test_data.h"
diff --git a/src/objective-c/tests/CronetUnitTests/CronetUnitTests.m b/src/objective-c/tests/CronetUnitTests/CronetUnitTests.m
index 09ee062596c..28414b8e39f 100644
--- a/src/objective-c/tests/CronetUnitTests/CronetUnitTests.m
+++ b/src/objective-c/tests/CronetUnitTests/CronetUnitTests.m
@@ -23,7 +23,6 @@
#import
#import
#import
-#import
#import "test/core/end2end/cq_verifier.h"
#import "test/core/util/port.h"
@@ -32,6 +31,7 @@
#import "src/core/lib/channel/channel_args.h"
#import "src/core/lib/gpr/env.h"
+#import "src/core/lib/gpr/host_port.h"
#import "src/core/lib/gpr/string.h"
#import "src/core/lib/gpr/tmpfile.h"
#import "test/core/end2end/data/ssl_test_data.h"
diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c
index e9c446ef349..31b162f121b 100644
--- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c
+++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c
@@ -209,8 +209,6 @@ gpr_avl_maybe_get_type gpr_avl_maybe_get_import;
gpr_avl_is_empty_type gpr_avl_is_empty_import;
gpr_cpu_num_cores_type gpr_cpu_num_cores_import;
gpr_cpu_current_cpu_type gpr_cpu_current_cpu_import;
-gpr_join_host_port_type gpr_join_host_port_import;
-gpr_split_host_port_type gpr_split_host_port_import;
gpr_log_severity_string_type gpr_log_severity_string_import;
gpr_log_type gpr_log_import;
gpr_log_message_type gpr_log_message_import;
@@ -462,8 +460,6 @@ void grpc_rb_load_imports(HMODULE library) {
gpr_avl_is_empty_import = (gpr_avl_is_empty_type) GetProcAddress(library, "gpr_avl_is_empty");
gpr_cpu_num_cores_import = (gpr_cpu_num_cores_type) GetProcAddress(library, "gpr_cpu_num_cores");
gpr_cpu_current_cpu_import = (gpr_cpu_current_cpu_type) GetProcAddress(library, "gpr_cpu_current_cpu");
- gpr_join_host_port_import = (gpr_join_host_port_type) GetProcAddress(library, "gpr_join_host_port");
- gpr_split_host_port_import = (gpr_split_host_port_type) GetProcAddress(library, "gpr_split_host_port");
gpr_log_severity_string_import = (gpr_log_severity_string_type) GetProcAddress(library, "gpr_log_severity_string");
gpr_log_import = (gpr_log_type) GetProcAddress(library, "gpr_log");
gpr_log_message_import = (gpr_log_message_type) GetProcAddress(library, "gpr_log_message");
diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h
index 5c724de089e..511f37683e1 100644
--- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h
+++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h
@@ -35,7 +35,6 @@
#include
#include
#include
-#include
#include
#include
#include
@@ -604,12 +603,6 @@ extern gpr_cpu_num_cores_type gpr_cpu_num_cores_import;
typedef unsigned(*gpr_cpu_current_cpu_type)(void);
extern gpr_cpu_current_cpu_type gpr_cpu_current_cpu_import;
#define gpr_cpu_current_cpu gpr_cpu_current_cpu_import
-typedef int(*gpr_join_host_port_type)(char** out, const char* host, int port);
-extern gpr_join_host_port_type gpr_join_host_port_import;
-#define gpr_join_host_port gpr_join_host_port_import
-typedef int(*gpr_split_host_port_type)(const char* name, char** host, char** port);
-extern gpr_split_host_port_type gpr_split_host_port_import;
-#define gpr_split_host_port gpr_split_host_port_import
typedef const char*(*gpr_log_severity_string_type)(gpr_log_severity severity);
extern gpr_log_severity_string_type gpr_log_severity_string_import;
#define gpr_log_severity_string gpr_log_severity_string_import
diff --git a/test/core/bad_ssl/bad_ssl_test.cc b/test/core/bad_ssl/bad_ssl_test.cc
index 1979ecbb174..e2ab22e0140 100644
--- a/test/core/bad_ssl/bad_ssl_test.cc
+++ b/test/core/bad_ssl/bad_ssl_test.cc
@@ -22,10 +22,11 @@
#include
#include
#include
-#include
#include
#include
+
#include "src/core/lib/gpr/env.h"
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "test/core/end2end/cq_verifier.h"
#include "test/core/util/port.h"
diff --git a/test/core/end2end/bad_server_response_test.cc b/test/core/end2end/bad_server_response_test.cc
index a8e5e291c8d..2b986201648 100644
--- a/test/core/end2end/bad_server_response_test.cc
+++ b/test/core/end2end/bad_server_response_test.cc
@@ -27,10 +27,10 @@
#include
#include
#include
-#include
#include
#include
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/iomgr/sockaddr.h"
#include "src/core/lib/slice/slice_internal.h"
diff --git a/test/core/end2end/connection_refused_test.cc b/test/core/end2end/connection_refused_test.cc
index ca6d17e7c89..ff830b47cdf 100644
--- a/test/core/end2end/connection_refused_test.cc
+++ b/test/core/end2end/connection_refused_test.cc
@@ -20,11 +20,11 @@
#include
#include
-#include
#include
#include
#include "src/core/lib/channel/channel_args.h"
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/transport/metadata.h"
#include "src/core/lib/transport/service_config.h"
diff --git a/test/core/end2end/dualstack_socket_test.cc b/test/core/end2end/dualstack_socket_test.cc
index bb30547cd22..2dc72b885fe 100644
--- a/test/core/end2end/dualstack_socket_test.cc
+++ b/test/core/end2end/dualstack_socket_test.cc
@@ -25,10 +25,10 @@
#include
#include
-#include
#include
#include
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/resolve_address.h"
diff --git a/test/core/end2end/fixtures/h2_census.cc b/test/core/end2end/fixtures/h2_census.cc
index 75c80aa1ffd..2e3bfac5868 100644
--- a/test/core/end2end/fixtures/h2_census.cc
+++ b/test/core/end2end/fixtures/h2_census.cc
@@ -21,16 +21,17 @@
#include
#include
-#include
#include
#include
#include
#include
+
#include "src/core/ext/filters/client_channel/client_channel.h"
#include "src/core/ext/filters/http/server/http_server_filter.h"
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/connected_channel.h"
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/server.h"
#include "test/core/util/port.h"
diff --git a/test/core/end2end/fixtures/h2_compress.cc b/test/core/end2end/fixtures/h2_compress.cc
index 5b9181586cb..c717ce904f4 100644
--- a/test/core/end2end/fixtures/h2_compress.cc
+++ b/test/core/end2end/fixtures/h2_compress.cc
@@ -21,16 +21,17 @@
#include
#include
-#include
#include
#include
#include
#include
+
#include "src/core/ext/filters/client_channel/client_channel.h"
#include "src/core/ext/filters/http/server/http_server_filter.h"
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/connected_channel.h"
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/server.h"
#include "test/core/util/port.h"
diff --git a/test/core/end2end/fixtures/h2_fakesec.cc b/test/core/end2end/fixtures/h2_fakesec.cc
index 87d4668d506..bbf65fcd245 100644
--- a/test/core/end2end/fixtures/h2_fakesec.cc
+++ b/test/core/end2end/fixtures/h2_fakesec.cc
@@ -22,9 +22,10 @@
#include
#include
-#include
#include
+
#include "src/core/lib/channel/channel_args.h"
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/security/credentials/fake/fake_credentials.h"
#include "test/core/end2end/data/ssl_test_data.h"
#include "test/core/util/port.h"
diff --git a/test/core/end2end/fixtures/h2_full+pipe.cc b/test/core/end2end/fixtures/h2_full+pipe.cc
index b080591e859..fd001953b2b 100644
--- a/test/core/end2end/fixtures/h2_full+pipe.cc
+++ b/test/core/end2end/fixtures/h2_full+pipe.cc
@@ -26,15 +26,16 @@
#include
#include
-#include
#include
#include
#include
#include
+
#include "src/core/ext/filters/client_channel/client_channel.h"
#include "src/core/ext/filters/http/server/http_server_filter.h"
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/lib/channel/connected_channel.h"
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/iomgr/wakeup_fd_posix.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/server.h"
diff --git a/test/core/end2end/fixtures/h2_full+trace.cc b/test/core/end2end/fixtures/h2_full+trace.cc
index 7104fbc581e..c42ef2c3434 100644
--- a/test/core/end2end/fixtures/h2_full+trace.cc
+++ b/test/core/end2end/fixtures/h2_full+trace.cc
@@ -26,16 +26,17 @@
#endif
#include
-#include
#include
#include
#include
#include
+
#include "src/core/ext/filters/client_channel/client_channel.h"
#include "src/core/ext/filters/http/server/http_server_filter.h"
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/lib/channel/connected_channel.h"
#include "src/core/lib/gpr/env.h"
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/server.h"
#include "test/core/util/port.h"
diff --git a/test/core/end2end/fixtures/h2_full+workarounds.cc b/test/core/end2end/fixtures/h2_full+workarounds.cc
index 237841d1854..1ae54163e12 100644
--- a/test/core/end2end/fixtures/h2_full+workarounds.cc
+++ b/test/core/end2end/fixtures/h2_full+workarounds.cc
@@ -21,16 +21,17 @@
#include
#include
-#include
#include
#include
#include
#include
#include
+
#include "src/core/ext/filters/client_channel/client_channel.h"
#include "src/core/ext/filters/http/server/http_server_filter.h"
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/lib/channel/connected_channel.h"
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/server.h"
#include "test/core/util/port.h"
diff --git a/test/core/end2end/fixtures/h2_full.cc b/test/core/end2end/fixtures/h2_full.cc
index 6d15c28662b..c855205889d 100644
--- a/test/core/end2end/fixtures/h2_full.cc
+++ b/test/core/end2end/fixtures/h2_full.cc
@@ -21,15 +21,16 @@
#include
#include
-#include
#include
#include
#include
#include
+
#include "src/core/ext/filters/client_channel/client_channel.h"
#include "src/core/ext/filters/http/server/http_server_filter.h"
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/lib/channel/connected_channel.h"
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/server.h"
#include "test/core/util/port.h"
diff --git a/test/core/end2end/fixtures/h2_http_proxy.cc b/test/core/end2end/fixtures/h2_http_proxy.cc
index e8e81f09304..5a2ceb759eb 100644
--- a/test/core/end2end/fixtures/h2_http_proxy.cc
+++ b/test/core/end2end/fixtures/h2_http_proxy.cc
@@ -21,17 +21,18 @@
#include
#include
-#include
#include
#include
#include
#include
#include
+
#include "src/core/ext/filters/client_channel/client_channel.h"
#include "src/core/ext/filters/http/server/http_server_filter.h"
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/lib/channel/connected_channel.h"
#include "src/core/lib/gpr/env.h"
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/server.h"
#include "test/core/end2end/fixtures/http_proxy_fixture.h"
diff --git a/test/core/end2end/fixtures/h2_load_reporting.cc b/test/core/end2end/fixtures/h2_load_reporting.cc
index fda5f4b052b..61820c29dd0 100644
--- a/test/core/end2end/fixtures/h2_load_reporting.cc
+++ b/test/core/end2end/fixtures/h2_load_reporting.cc
@@ -21,17 +21,18 @@
#include
#include
-#include
#include
#include
#include
#include
+
#include "src/core/ext/filters/client_channel/client_channel.h"
#include "src/core/ext/filters/http/server/http_server_filter.h"
#include "src/core/ext/filters/load_reporting/server_load_reporting_plugin.h"
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/connected_channel.h"
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/server.h"
#include "test/core/util/port.h"
diff --git a/test/core/end2end/fixtures/h2_oauth2.cc b/test/core/end2end/fixtures/h2_oauth2.cc
index 5fed4434dec..795e94a9e89 100644
--- a/test/core/end2end/fixtures/h2_oauth2.cc
+++ b/test/core/end2end/fixtures/h2_oauth2.cc
@@ -22,9 +22,10 @@
#include
#include
-#include
#include
+
#include "src/core/lib/channel/channel_args.h"
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/iomgr/iomgr.h"
#include "src/core/lib/security/credentials/credentials.h"
#include "test/core/end2end/data/ssl_test_data.h"
diff --git a/test/core/end2end/fixtures/h2_proxy.cc b/test/core/end2end/fixtures/h2_proxy.cc
index 295654cb6ab..5a3aef40458 100644
--- a/test/core/end2end/fixtures/h2_proxy.cc
+++ b/test/core/end2end/fixtures/h2_proxy.cc
@@ -21,15 +21,16 @@
#include
#include
-#include
#include
#include
#include
#include
+
#include "src/core/ext/filters/client_channel/client_channel.h"
#include "src/core/ext/filters/http/server/http_server_filter.h"
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/lib/channel/connected_channel.h"
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/server.h"
#include "test/core/end2end/fixtures/proxy.h"
diff --git a/test/core/end2end/fixtures/h2_ssl.cc b/test/core/end2end/fixtures/h2_ssl.cc
index 8c5c8a2f3fa..bbcc88e4f33 100644
--- a/test/core/end2end/fixtures/h2_ssl.cc
+++ b/test/core/end2end/fixtures/h2_ssl.cc
@@ -22,11 +22,11 @@
#include
#include
-#include
#include
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gpr/env.h"
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gpr/tmpfile.h"
#include "src/core/lib/security/credentials/credentials.h"
diff --git a/test/core/end2end/fixtures/h2_ssl_proxy.cc b/test/core/end2end/fixtures/h2_ssl_proxy.cc
index 3f0646cf0fd..6b0b891b185 100644
--- a/test/core/end2end/fixtures/h2_ssl_proxy.cc
+++ b/test/core/end2end/fixtures/h2_ssl_proxy.cc
@@ -22,11 +22,11 @@
#include
#include
-#include
#include
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gpr/env.h"
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gpr/tmpfile.h"
#include "src/core/lib/security/credentials/credentials.h"
diff --git a/test/core/end2end/fixtures/h2_uds.cc b/test/core/end2end/fixtures/h2_uds.cc
index 1944dd84a37..a27f897d61d 100644
--- a/test/core/end2end/fixtures/h2_uds.cc
+++ b/test/core/end2end/fixtures/h2_uds.cc
@@ -23,7 +23,6 @@
#include
#include
-#include
#include
#include
#include
@@ -33,6 +32,7 @@
#include "src/core/ext/filters/http/server/http_server_filter.h"
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/lib/channel/connected_channel.h"
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/server.h"
diff --git a/test/core/end2end/fixtures/http_proxy_fixture.cc b/test/core/end2end/fixtures/http_proxy_fixture.cc
index 8ec97df3e41..bda4a119423 100644
--- a/test/core/end2end/fixtures/http_proxy_fixture.cc
+++ b/test/core/end2end/fixtures/http_proxy_fixture.cc
@@ -26,7 +26,6 @@
#include
#include
#include
-#include
#include
#include
#include
@@ -34,6 +33,7 @@
#include
#include "src/core/lib/channel/channel_args.h"
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/http/parser.h"
#include "src/core/lib/iomgr/closure.h"
diff --git a/test/core/end2end/fixtures/inproc.cc b/test/core/end2end/fixtures/inproc.cc
index b748fbf09a0..f690d22cd34 100644
--- a/test/core/end2end/fixtures/inproc.cc
+++ b/test/core/end2end/fixtures/inproc.cc
@@ -21,15 +21,16 @@
#include
#include
-#include
#include
#include
#include
#include
+
#include "src/core/ext/filters/client_channel/client_channel.h"
#include "src/core/ext/filters/http/server/http_server_filter.h"
#include "src/core/ext/transport/inproc/inproc_transport.h"
#include "src/core/lib/channel/connected_channel.h"
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/server.h"
#include "test/core/util/port.h"
diff --git a/test/core/end2end/fixtures/proxy.cc b/test/core/end2end/fixtures/proxy.cc
index b1698c804ce..58d542beac0 100644
--- a/test/core/end2end/fixtures/proxy.cc
+++ b/test/core/end2end/fixtures/proxy.cc
@@ -21,12 +21,12 @@
#include
#include
-#include
#include
#include
#include
#include
+#include "src/core/lib/gpr/host_port.h"
#include "test/core/util/port.h"
struct grpc_end2end_proxy {
diff --git a/test/core/end2end/h2_ssl_cert_test.cc b/test/core/end2end/h2_ssl_cert_test.cc
index 9adb96e9268..cd62c3f4e22 100644
--- a/test/core/end2end/h2_ssl_cert_test.cc
+++ b/test/core/end2end/h2_ssl_cert_test.cc
@@ -22,11 +22,11 @@
#include
#include
-#include
#include
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gpr/env.h"
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gpr/tmpfile.h"
#include "src/core/lib/security/credentials/credentials.h"
diff --git a/test/core/end2end/invalid_call_argument_test.cc b/test/core/end2end/invalid_call_argument_test.cc
index cb6b4c08ef7..d2b26e7131c 100644
--- a/test/core/end2end/invalid_call_argument_test.cc
+++ b/test/core/end2end/invalid_call_argument_test.cc
@@ -23,9 +23,9 @@
#include
#include
-#include
#include
+#include "src/core/lib/gpr/host_port.h"
#include "test/core/end2end/cq_verifier.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
diff --git a/test/core/fling/fling_stream_test.cc b/test/core/fling/fling_stream_test.cc
index 48df6d5fb36..d5fd7a8d46c 100644
--- a/test/core/fling/fling_stream_test.cc
+++ b/test/core/fling/fling_stream_test.cc
@@ -20,9 +20,9 @@
#include
#include
-#include
#include
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "test/core/util/port.h"
#include "test/core/util/subprocess.h"
diff --git a/test/core/fling/fling_test.cc b/test/core/fling/fling_test.cc
index 7586be234f4..d95317b7e6a 100644
--- a/test/core/fling/fling_test.cc
+++ b/test/core/fling/fling_test.cc
@@ -20,9 +20,9 @@
#include
#include
-#include
#include
+#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "test/core/util/port.h"
#include "test/core/util/subprocess.h"
diff --git a/test/core/fling/server.cc b/test/core/fling/server.cc
index 097730b5d7a..b19a25a1857 100644
--- a/test/core/fling/server.cc
+++ b/test/core/fling/server.cc
@@ -30,9 +30,10 @@
#endif
#include
-#include