aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--BUILD9
-rw-r--r--Makefile4
-rw-r--r--binding.gyp2
-rw-r--r--build.yaml3
-rw-r--r--config.m42
-rw-r--r--gRPC.podspec4
-rwxr-xr-xgrpc.gemspec3
-rw-r--r--include/grpc/impl/codegen/port_platform.h4
-rw-r--r--package.json3
-rw-r--r--package.xml3
-rw-r--r--src/core/client_config/resolvers/sockaddr_resolver.c35
-rw-r--r--src/core/iomgr/endpoint_pair_posix.c5
-rw-r--r--src/core/iomgr/resolve_address_posix.c12
-rw-r--r--src/core/iomgr/sockaddr_utils.c21
-rw-r--r--src/core/iomgr/tcp_client_posix.c4
-rw-r--r--src/core/iomgr/tcp_server_posix.c21
-rw-r--r--src/core/iomgr/udp_server.c19
-rw-r--r--src/core/iomgr/unix_sockets_posix.c103
-rw-r--r--src/core/iomgr/unix_sockets_posix.h61
-rw-r--r--src/core/iomgr/unix_sockets_posix_noop.c61
-rw-r--r--src/python/grpcio/grpc_core_dependencies.py2
-rw-r--r--tools/doxygen/Doxyfile.core.internal3
-rw-r--r--tools/run_tests/sources_and_headers.json8
-rw-r--r--vsprojects/vcxproj/grpc/grpc.vcxproj5
-rw-r--r--vsprojects/vcxproj/grpc/grpc.vcxproj.filters9
-rw-r--r--vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj5
-rw-r--r--vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters9
27 files changed, 332 insertions, 88 deletions
diff --git a/BUILD b/BUILD
index 2c2cce76c4..ab67add64e 100644
--- a/BUILD
+++ b/BUILD
@@ -224,6 +224,7 @@ cc_library(
"src/core/iomgr/timer.h",
"src/core/iomgr/timer_heap.h",
"src/core/iomgr/udp_server.h",
+ "src/core/iomgr/unix_sockets_posix.h",
"src/core/iomgr/wakeup_fd_pipe.h",
"src/core/iomgr/wakeup_fd_posix.h",
"src/core/iomgr/workqueue.h",
@@ -368,6 +369,8 @@ cc_library(
"src/core/iomgr/timer.c",
"src/core/iomgr/timer_heap.c",
"src/core/iomgr/udp_server.c",
+ "src/core/iomgr/unix_sockets_posix.c",
+ "src/core/iomgr/unix_sockets_posix_noop.c",
"src/core/iomgr/wakeup_fd_eventfd.c",
"src/core/iomgr/wakeup_fd_nospecial.c",
"src/core/iomgr/wakeup_fd_pipe.c",
@@ -596,6 +599,7 @@ cc_library(
"src/core/iomgr/timer.h",
"src/core/iomgr/timer_heap.h",
"src/core/iomgr/udp_server.h",
+ "src/core/iomgr/unix_sockets_posix.h",
"src/core/iomgr/wakeup_fd_pipe.h",
"src/core/iomgr/wakeup_fd_posix.h",
"src/core/iomgr/workqueue.h",
@@ -727,6 +731,8 @@ cc_library(
"src/core/iomgr/timer.c",
"src/core/iomgr/timer_heap.c",
"src/core/iomgr/udp_server.c",
+ "src/core/iomgr/unix_sockets_posix.c",
+ "src/core/iomgr/unix_sockets_posix_noop.c",
"src/core/iomgr/wakeup_fd_eventfd.c",
"src/core/iomgr/wakeup_fd_nospecial.c",
"src/core/iomgr/wakeup_fd_pipe.c",
@@ -1427,6 +1433,8 @@ objc_library(
"src/core/iomgr/timer.c",
"src/core/iomgr/timer_heap.c",
"src/core/iomgr/udp_server.c",
+ "src/core/iomgr/unix_sockets_posix.c",
+ "src/core/iomgr/unix_sockets_posix_noop.c",
"src/core/iomgr/wakeup_fd_eventfd.c",
"src/core/iomgr/wakeup_fd_nospecial.c",
"src/core/iomgr/wakeup_fd_pipe.c",
@@ -1600,6 +1608,7 @@ objc_library(
"src/core/iomgr/timer.h",
"src/core/iomgr/timer_heap.h",
"src/core/iomgr/udp_server.h",
+ "src/core/iomgr/unix_sockets_posix.h",
"src/core/iomgr/wakeup_fd_pipe.h",
"src/core/iomgr/wakeup_fd_posix.h",
"src/core/iomgr/workqueue.h",
diff --git a/Makefile b/Makefile
index 0e2b8905b0..66425dbf24 100644
--- a/Makefile
+++ b/Makefile
@@ -2474,6 +2474,8 @@ LIBGRPC_SRC = \
src/core/iomgr/timer.c \
src/core/iomgr/timer_heap.c \
src/core/iomgr/udp_server.c \
+ src/core/iomgr/unix_sockets_posix.c \
+ src/core/iomgr/unix_sockets_posix_noop.c \
src/core/iomgr/wakeup_fd_eventfd.c \
src/core/iomgr/wakeup_fd_nospecial.c \
src/core/iomgr/wakeup_fd_pipe.c \
@@ -2834,6 +2836,8 @@ LIBGRPC_UNSECURE_SRC = \
src/core/iomgr/timer.c \
src/core/iomgr/timer_heap.c \
src/core/iomgr/udp_server.c \
+ src/core/iomgr/unix_sockets_posix.c \
+ src/core/iomgr/unix_sockets_posix_noop.c \
src/core/iomgr/wakeup_fd_eventfd.c \
src/core/iomgr/wakeup_fd_nospecial.c \
src/core/iomgr/wakeup_fd_pipe.c \
diff --git a/binding.gyp b/binding.gyp
index c16697786a..d4ec080a15 100644
--- a/binding.gyp
+++ b/binding.gyp
@@ -629,6 +629,8 @@
'src/core/iomgr/timer.c',
'src/core/iomgr/timer_heap.c',
'src/core/iomgr/udp_server.c',
+ 'src/core/iomgr/unix_sockets_posix.c',
+ 'src/core/iomgr/unix_sockets_posix_noop.c',
'src/core/iomgr/wakeup_fd_eventfd.c',
'src/core/iomgr/wakeup_fd_nospecial.c',
'src/core/iomgr/wakeup_fd_pipe.c',
diff --git a/build.yaml b/build.yaml
index 9773490776..b9597a9c87 100644
--- a/build.yaml
+++ b/build.yaml
@@ -314,6 +314,7 @@ filegroups:
- src/core/iomgr/timer.h
- src/core/iomgr/timer_heap.h
- src/core/iomgr/udp_server.h
+ - src/core/iomgr/unix_sockets_posix.h
- src/core/iomgr/wakeup_fd_pipe.h
- src/core/iomgr/wakeup_fd_posix.h
- src/core/iomgr/workqueue.h
@@ -438,6 +439,8 @@ filegroups:
- src/core/iomgr/timer.c
- src/core/iomgr/timer_heap.c
- src/core/iomgr/udp_server.c
+ - src/core/iomgr/unix_sockets_posix.c
+ - src/core/iomgr/unix_sockets_posix_noop.c
- src/core/iomgr/wakeup_fd_eventfd.c
- src/core/iomgr/wakeup_fd_nospecial.c
- src/core/iomgr/wakeup_fd_pipe.c
diff --git a/config.m4 b/config.m4
index 2d42c405ec..3aad2aff47 100644
--- a/config.m4
+++ b/config.m4
@@ -151,6 +151,8 @@ if test "$PHP_GRPC" != "no"; then
src/core/iomgr/timer.c \
src/core/iomgr/timer_heap.c \
src/core/iomgr/udp_server.c \
+ src/core/iomgr/unix_sockets_posix.c \
+ src/core/iomgr/unix_sockets_posix_noop.c \
src/core/iomgr/wakeup_fd_eventfd.c \
src/core/iomgr/wakeup_fd_nospecial.c \
src/core/iomgr/wakeup_fd_pipe.c \
diff --git a/gRPC.podspec b/gRPC.podspec
index 65f24a658c..c8355e6dfc 100644
--- a/gRPC.podspec
+++ b/gRPC.podspec
@@ -228,6 +228,7 @@ Pod::Spec.new do |s|
'src/core/iomgr/timer.h',
'src/core/iomgr/timer_heap.h',
'src/core/iomgr/udp_server.h',
+ 'src/core/iomgr/unix_sockets_posix.h',
'src/core/iomgr/wakeup_fd_pipe.h',
'src/core/iomgr/wakeup_fd_posix.h',
'src/core/iomgr/workqueue.h',
@@ -385,6 +386,8 @@ Pod::Spec.new do |s|
'src/core/iomgr/timer.c',
'src/core/iomgr/timer_heap.c',
'src/core/iomgr/udp_server.c',
+ 'src/core/iomgr/unix_sockets_posix.c',
+ 'src/core/iomgr/unix_sockets_posix_noop.c',
'src/core/iomgr/wakeup_fd_eventfd.c',
'src/core/iomgr/wakeup_fd_nospecial.c',
'src/core/iomgr/wakeup_fd_pipe.c',
@@ -556,6 +559,7 @@ Pod::Spec.new do |s|
'src/core/iomgr/timer.h',
'src/core/iomgr/timer_heap.h',
'src/core/iomgr/udp_server.h',
+ 'src/core/iomgr/unix_sockets_posix.h',
'src/core/iomgr/wakeup_fd_pipe.h',
'src/core/iomgr/wakeup_fd_posix.h',
'src/core/iomgr/workqueue.h',
diff --git a/grpc.gemspec b/grpc.gemspec
index 0873286e21..53744ef34c 100755
--- a/grpc.gemspec
+++ b/grpc.gemspec
@@ -224,6 +224,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/iomgr/timer.h )
s.files += %w( src/core/iomgr/timer_heap.h )
s.files += %w( src/core/iomgr/udp_server.h )
+ s.files += %w( src/core/iomgr/unix_sockets_posix.h )
s.files += %w( src/core/iomgr/wakeup_fd_pipe.h )
s.files += %w( src/core/iomgr/wakeup_fd_posix.h )
s.files += %w( src/core/iomgr/workqueue.h )
@@ -368,6 +369,8 @@ Gem::Specification.new do |s|
s.files += %w( src/core/iomgr/timer.c )
s.files += %w( src/core/iomgr/timer_heap.c )
s.files += %w( src/core/iomgr/udp_server.c )
+ s.files += %w( src/core/iomgr/unix_sockets_posix.c )
+ s.files += %w( src/core/iomgr/unix_sockets_posix_noop.c )
s.files += %w( src/core/iomgr/wakeup_fd_eventfd.c )
s.files += %w( src/core/iomgr/wakeup_fd_nospecial.c )
s.files += %w( src/core/iomgr/wakeup_fd_pipe.c )
diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h
index fd55cb4582..ed48411817 100644
--- a/include/grpc/impl/codegen/port_platform.h
+++ b/include/grpc/impl/codegen/port_platform.h
@@ -133,6 +133,7 @@
#define GPR_POSIX_TIME 1
#define GPR_GETPID_IN_UNISTD_H 1
#define GPR_HAVE_MSG_NOSIGNAL 1
+#define GPR_HAVE_UNIX_SOCKET 1
#elif defined(__linux__)
#define GPR_POSIX_CRASH_HANDLER 1
#define GPR_PLATFORM_STRING "linux"
@@ -154,6 +155,7 @@
#define GPR_POSIX_WAKEUP_FD 1
#define GPR_POSIX_SOCKET 1
#define GPR_POSIX_SOCKETADDR 1
+#define GPR_HAVE_UNIX_SOCKET 1
#ifdef __GLIBC_PREREQ
#if __GLIBC_PREREQ(2, 9)
#define GPR_LINUX_EVENTFD 1
@@ -214,6 +216,7 @@
#define GPR_POSIX_TIME 1
#define GPR_GETPID_IN_UNISTD_H 1
#define GPR_HAVE_SO_NOSIGPIPE 1
+#define GPR_HAVE_UNIX_SOCKET 1
#ifdef _LP64
#define GPR_ARCH_64 1
#else /* _LP64 */
@@ -242,6 +245,7 @@
#define GPR_POSIX_TIME 1
#define GPR_GETPID_IN_UNISTD_H 1
#define GPR_HAVE_SO_NOSIGPIPE 1
+#define GPR_HAVE_UNIX_SOCKET 1
#ifdef _LP64
#define GPR_ARCH_64 1
#else /* _LP64 */
diff --git a/package.json b/package.json
index bc15183c93..706f44e4ea 100644
--- a/package.json
+++ b/package.json
@@ -166,6 +166,7 @@
"src/core/iomgr/timer.h",
"src/core/iomgr/timer_heap.h",
"src/core/iomgr/udp_server.h",
+ "src/core/iomgr/unix_sockets_posix.h",
"src/core/iomgr/wakeup_fd_pipe.h",
"src/core/iomgr/wakeup_fd_posix.h",
"src/core/iomgr/workqueue.h",
@@ -310,6 +311,8 @@
"src/core/iomgr/timer.c",
"src/core/iomgr/timer_heap.c",
"src/core/iomgr/udp_server.c",
+ "src/core/iomgr/unix_sockets_posix.c",
+ "src/core/iomgr/unix_sockets_posix_noop.c",
"src/core/iomgr/wakeup_fd_eventfd.c",
"src/core/iomgr/wakeup_fd_nospecial.c",
"src/core/iomgr/wakeup_fd_pipe.c",
diff --git a/package.xml b/package.xml
index 95bc835602..540c94c5e2 100644
--- a/package.xml
+++ b/package.xml
@@ -228,6 +228,7 @@
<file baseinstalldir="/" name="src/core/iomgr/timer.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/timer_heap.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/udp_server.h" role="src" />
+ <file baseinstalldir="/" name="src/core/iomgr/unix_sockets_posix.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/wakeup_fd_pipe.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/wakeup_fd_posix.h" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/workqueue.h" role="src" />
@@ -372,6 +373,8 @@
<file baseinstalldir="/" name="src/core/iomgr/timer.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/timer_heap.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/udp_server.c" role="src" />
+ <file baseinstalldir="/" name="src/core/iomgr/unix_sockets_posix.c" role="src" />
+ <file baseinstalldir="/" name="src/core/iomgr/unix_sockets_posix_noop.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/wakeup_fd_eventfd.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/wakeup_fd_nospecial.c" role="src" />
<file baseinstalldir="/" name="src/core/iomgr/wakeup_fd_pipe.c" role="src" />
diff --git a/src/core/client_config/resolvers/sockaddr_resolver.c b/src/core/client_config/resolvers/sockaddr_resolver.c
index 68910ad975..3cb7d79b67 100644
--- a/src/core/client_config/resolvers/sockaddr_resolver.c
+++ b/src/core/client_config/resolvers/sockaddr_resolver.c
@@ -37,9 +37,6 @@
#include <stdio.h>
#include <string.h>
-#ifdef GPR_POSIX_SOCKET
-#include <sys/un.h>
-#endif
#include <grpc/support/alloc.h>
#include <grpc/support/host_port.h>
@@ -47,6 +44,7 @@
#include "src/core/client_config/lb_policy_registry.h"
#include "src/core/iomgr/resolve_address.h"
+#include "src/core/iomgr/unix_sockets_posix.h"
#include "src/core/support/string.h"
typedef struct {
@@ -168,24 +166,6 @@ static void sockaddr_destroy(grpc_exec_ctx *exec_ctx, grpc_resolver *gr) {
gpr_free(r);
}
-#ifdef GPR_POSIX_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;
-}
-
-static char *unix_get_default_authority(grpc_resolver_factory *factory,
- grpc_uri *uri) {
- return gpr_strdup("localhost");
-}
-#endif
-
static char *ip_get_default_authority(grpc_uri *uri) {
const char *path = uri->path;
if (path[0] == '/') ++path;
@@ -371,21 +351,22 @@ static void sockaddr_factory_ref(grpc_resolver_factory *factory) {}
static void sockaddr_factory_unref(grpc_resolver_factory *factory) {}
-#define DECL_FACTORY(name) \
+#define DECL_FACTORY(name, prefix) \
static grpc_resolver *name##_factory_create_resolver( \
grpc_resolver_factory *factory, grpc_resolver_args *args) { \
- return sockaddr_create(args, "pick_first", parse_##name); \
+ return sockaddr_create(args, "pick_first", prefix##parse_##name); \
} \
static const grpc_resolver_factory_vtable name##_factory_vtable = { \
sockaddr_factory_ref, sockaddr_factory_unref, \
- name##_factory_create_resolver, name##_get_default_authority, #name}; \
+ name##_factory_create_resolver, prefix##name##_get_default_authority, \
+ #name}; \
static grpc_resolver_factory name##_resolver_factory = { \
&name##_factory_vtable}; \
grpc_resolver_factory *grpc_##name##_resolver_factory_create() { \
return &name##_resolver_factory; \
}
-#ifdef GPR_POSIX_SOCKET
-DECL_FACTORY(unix)
+#ifdef GPR_HAVE_UNIX_SOCKET
+DECL_FACTORY(unix, grpc_)
#endif
-DECL_FACTORY(ipv4) DECL_FACTORY(ipv6)
+DECL_FACTORY(ipv4, ) DECL_FACTORY(ipv6, )
diff --git a/src/core/iomgr/endpoint_pair_posix.c b/src/core/iomgr/endpoint_pair_posix.c
index 56f6f146fd..f84b8441df 100644
--- a/src/core/iomgr/endpoint_pair_posix.c
+++ b/src/core/iomgr/endpoint_pair_posix.c
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015, Google Inc.
+ * Copyright 2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -37,6 +37,7 @@
#include "src/core/iomgr/endpoint_pair.h"
#include "src/core/iomgr/socket_utils_posix.h"
+#include "src/core/iomgr/unix_sockets_posix.h"
#include <errno.h>
#include <fcntl.h>
@@ -52,7 +53,7 @@
static void create_sockets(int sv[2]) {
int flags;
- GPR_ASSERT(socketpair(AF_UNIX, SOCK_STREAM, 0, sv) == 0);
+ grpc_create_socketpair_if_unix(sv);
flags = fcntl(sv[0], F_GETFL, 0);
GPR_ASSERT(fcntl(sv[0], F_SETFL, flags | O_NONBLOCK) == 0);
flags = fcntl(sv[1], F_GETFL, 0);
diff --git a/src/core/iomgr/resolve_address_posix.c b/src/core/iomgr/resolve_address_posix.c
index a6c9893f23..26b3aa8189 100644
--- a/src/core/iomgr/resolve_address_posix.c
+++ b/src/core/iomgr/resolve_address_posix.c
@@ -39,7 +39,6 @@
#include <string.h>
#include <sys/types.h>
-#include <sys/un.h>
#include <grpc/support/alloc.h>
#include <grpc/support/host_port.h>
@@ -51,6 +50,7 @@
#include "src/core/iomgr/executor.h"
#include "src/core/iomgr/iomgr_internal.h"
#include "src/core/iomgr/sockaddr_utils.h"
+#include "src/core/iomgr/unix_sockets_posix.h"
#include "src/core/support/block_annotate.h"
#include "src/core/support/string.h"
@@ -71,18 +71,10 @@ static grpc_resolved_addresses *blocking_resolve_address_impl(
int s;
size_t i;
grpc_resolved_addresses *addrs = NULL;
- struct sockaddr_un *un;
if (name[0] == 'u' && name[1] == 'n' && name[2] == 'i' && name[3] == 'x' &&
name[4] == ':' && name[5] != 0) {
- addrs = gpr_malloc(sizeof(grpc_resolved_addresses));
- addrs->naddrs = 1;
- addrs->addrs = gpr_malloc(sizeof(grpc_resolved_address));
- un = (struct sockaddr_un *)addrs->addrs->addr;
- un->sun_family = AF_UNIX;
- strcpy(un->sun_path, name + 5);
- addrs->addrs->len = strlen(un->sun_path) + sizeof(un->sun_family) + 1;
- return addrs;
+ return grpc_resolve_unix_domain_address(name + 5);
}
/* parse name, splitting it into host and port parts */
diff --git a/src/core/iomgr/sockaddr_utils.c b/src/core/iomgr/sockaddr_utils.c
index 61006d7a7a..a3c3a874c1 100644
--- a/src/core/iomgr/sockaddr_utils.c
+++ b/src/core/iomgr/sockaddr_utils.c
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015, Google Inc.
+ * Copyright 2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -36,16 +36,13 @@
#include <errno.h>
#include <string.h>
-#ifdef GPR_POSIX_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/port_platform.h>
#include <grpc/support/string_util.h>
+#include "src/core/iomgr/unix_sockets_posix.h"
#include "src/core/support/string.h"
static const uint8_t kV4MappedPrefix[] = {0, 0, 0, 0, 0, 0,
@@ -191,14 +188,9 @@ char *grpc_sockaddr_to_uri(const struct sockaddr *addr) {
gpr_asprintf(&result, "ipv6:%s", temp);
gpr_free(temp);
return result;
-#ifdef GPR_POSIX_SOCKET
- case AF_UNIX:
- gpr_asprintf(&result, "unix:%s", ((struct sockaddr_un *)addr)->sun_path);
- return result;
-#endif
+ default:
+ return grpc_sockaddr_to_uri_unix_if_possible(addr);
}
-
- return NULL;
}
int grpc_sockaddr_get_port(const struct sockaddr *addr) {
@@ -207,9 +199,10 @@ int grpc_sockaddr_get_port(const struct sockaddr *addr) {
return ntohs(((struct sockaddr_in *)addr)->sin_port);
case AF_INET6:
return ntohs(((struct sockaddr_in6 *)addr)->sin6_port);
- case AF_UNIX:
- return 1;
default:
+ if (grpc_is_unix_socket(addr)) {
+ return 1;
+ }
gpr_log(GPR_ERROR, "Unknown socket family %d in grpc_sockaddr_get_port",
addr->sa_family);
return 0;
diff --git a/src/core/iomgr/tcp_client_posix.c b/src/core/iomgr/tcp_client_posix.c
index 15727856ab..1d3f9b6555 100644
--- a/src/core/iomgr/tcp_client_posix.c
+++ b/src/core/iomgr/tcp_client_posix.c
@@ -54,6 +54,7 @@
#include "src/core/iomgr/socket_utils_posix.h"
#include "src/core/iomgr/tcp_posix.h"
#include "src/core/iomgr/timer.h"
+#include "src/core/iomgr/unix_sockets_posix.h"
#include "src/core/support/string.h"
extern int grpc_tcp_trace;
@@ -77,13 +78,12 @@ static int prepare_socket(const struct sockaddr *addr, int fd) {
}
if (!grpc_set_socket_nonblocking(fd, 1) || !grpc_set_socket_cloexec(fd, 1) ||
- (addr->sa_family != AF_UNIX && !grpc_set_socket_low_latency(fd, 1)) ||
+ (!grpc_is_unix_socket(addr) && !grpc_set_socket_low_latency(fd, 1)) ||
!grpc_set_socket_no_sigpipe_if_possible(fd)) {
gpr_log(GPR_ERROR, "Unable to configure socket %d: %s", fd,
strerror(errno));
goto error;
}
-
return 1;
error:
diff --git a/src/core/iomgr/tcp_server_posix.c b/src/core/iomgr/tcp_server_posix.c
index 5e07f8261c..03dfddd925 100644
--- a/src/core/iomgr/tcp_server_posix.c
+++ b/src/core/iomgr/tcp_server_posix.c
@@ -52,7 +52,6 @@
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <sys/un.h>
#include <unistd.h>
#include "src/core/iomgr/pollset_posix.h"
@@ -60,6 +59,7 @@
#include "src/core/iomgr/sockaddr_utils.h"
#include "src/core/iomgr/socket_utils_posix.h"
#include "src/core/iomgr/tcp_posix.h"
+#include "src/core/iomgr/unix_sockets_posix.h"
#include "src/core/support/string.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
@@ -81,7 +81,6 @@ struct grpc_tcp_listener {
union {
uint8_t untyped[GRPC_MAX_SOCKADDR_SIZE];
struct sockaddr sockaddr;
- struct sockaddr_un un;
} addr;
size_t addr_len;
int port;
@@ -98,14 +97,6 @@ struct grpc_tcp_listener {
int is_sibling;
};
-static void unlink_if_unix_domain_socket(const struct sockaddr_un *un) {
- struct stat st;
-
- if (stat(un->sun_path, &st) == 0 && (st.st_mode & S_IFMT) == S_IFSOCK) {
- unlink(un->sun_path);
- }
-}
-
/* the overall server */
struct grpc_tcp_server {
gpr_refcount refs;
@@ -203,9 +194,7 @@ static void deactivated_all_ports(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) {
if (s->head) {
grpc_tcp_listener *sp;
for (sp = s->head; sp; sp = sp->next) {
- if (sp->addr.sockaddr.sa_family == AF_UNIX) {
- unlink_if_unix_domain_socket(&sp->addr.un);
- }
+ grpc_unlink_if_unix_domain_socket(&sp->addr.sockaddr);
sp->destroyed_closure.cb = destroyed_port;
sp->destroyed_closure.cb_arg = s;
grpc_fd_orphan(exec_ctx, sp->emfd, &sp->destroyed_closure, NULL,
@@ -281,7 +270,7 @@ static int prepare_socket(int fd, const struct sockaddr *addr,
}
if (!grpc_set_socket_nonblocking(fd, 1) || !grpc_set_socket_cloexec(fd, 1) ||
- (addr->sa_family != AF_UNIX && (!grpc_set_socket_low_latency(fd, 1) ||
+ (!grpc_is_unix_socket(addr) && (!grpc_set_socket_low_latency(fd, 1) ||
!grpc_set_socket_reuse_addr(fd, 1))) ||
!grpc_set_socket_no_sigpipe_if_possible(fd)) {
gpr_log(GPR_ERROR, "Unable to configure socket %d: %s", fd,
@@ -451,9 +440,7 @@ int grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr,
if (s->tail != NULL) {
port_index = s->tail->port_index + 1;
}
- if (((struct sockaddr *)addr)->sa_family == AF_UNIX) {
- unlink_if_unix_domain_socket(addr);
- }
+ grpc_unlink_if_unix_domain_socket((struct sockaddr *)addr);
/* Check if this is a wildcard port, and if so, try to keep the port the same
as some previously created listener. */
diff --git a/src/core/iomgr/udp_server.c b/src/core/iomgr/udp_server.c
index ef548cfe4d..efedd9f32e 100644
--- a/src/core/iomgr/udp_server.c
+++ b/src/core/iomgr/udp_server.c
@@ -52,7 +52,6 @@
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <sys/un.h>
#include <unistd.h>
#include "src/core/iomgr/fd_posix.h"
@@ -60,6 +59,7 @@
#include "src/core/iomgr/resolve_address.h"
#include "src/core/iomgr/sockaddr_utils.h"
#include "src/core/iomgr/socket_utils_posix.h"
+#include "src/core/iomgr/unix_sockets_posix.h"
#include "src/core/support/string.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
@@ -77,7 +77,6 @@ typedef struct {
union {
uint8_t untyped[GRPC_MAX_SOCKADDR_SIZE];
struct sockaddr sockaddr;
- struct sockaddr_un un;
} addr;
size_t addr_len;
grpc_closure read_closure;
@@ -85,14 +84,6 @@ typedef struct {
grpc_udp_server_read_cb read_cb;
} server_port;
-static void unlink_if_unix_domain_socket(const struct sockaddr_un *un) {
- struct stat st;
-
- if (stat(un->sun_path, &st) == 0 && (st.st_mode & S_IFMT) == S_IFSOCK) {
- unlink(un->sun_path);
- }
-}
-
/* the overall server */
struct grpc_udp_server {
gpr_mu mu;
@@ -176,9 +167,7 @@ static void deactivated_all_ports(grpc_exec_ctx *exec_ctx, grpc_udp_server *s) {
if (s->nports) {
for (i = 0; i < s->nports; i++) {
server_port *sp = &s->ports[i];
- if (sp->addr.sockaddr.sa_family == AF_UNIX) {
- unlink_if_unix_domain_socket(&sp->addr.un);
- }
+ grpc_unlink_if_unix_domain_socket(&sp->addr.sockaddr);
sp->destroyed_closure.cb = destroyed_port;
sp->destroyed_closure.cb_arg = s;
grpc_fd_orphan(exec_ctx, sp->emfd, &sp->destroyed_closure, NULL,
@@ -336,9 +325,7 @@ int grpc_udp_server_add_port(grpc_udp_server *s, const void *addr,
socklen_t sockname_len;
int port;
- if (((struct sockaddr *)addr)->sa_family == AF_UNIX) {
- unlink_if_unix_domain_socket(addr);
- }
+ grpc_unlink_if_unix_domain_socket((struct sockaddr *)addr);
/* Check if this is a wildcard port, and if so, try to keep the port the same
as some previously created listener. */
diff --git a/src/core/iomgr/unix_sockets_posix.c b/src/core/iomgr/unix_sockets_posix.c
new file mode 100644
index 0000000000..480ff613f6
--- /dev/null
+++ b/src/core/iomgr/unix_sockets_posix.c
@@ -0,0 +1,103 @@
+/*
+ *
+ * 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/iomgr/unix_sockets_posix.h"
+
+#ifdef GPR_HAVE_UNIX_SOCKET
+
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/un.h>
+
+#include <grpc/support/alloc.h>
+
+void grpc_create_socketpair_if_unix(int sv[2]) {
+ GPR_ASSERT(socketpair(AF_UNIX, SOCK_STREAM, 0, sv) == 0);
+}
+
+grpc_resolved_addresses *grpc_resolve_unix_domain_address(const char *name) {
+ struct sockaddr_un *un;
+
+ grpc_resolved_addresses *addrs = gpr_malloc(sizeof(grpc_resolved_addresses));
+ addrs->naddrs = 1;
+ addrs->addrs = gpr_malloc(sizeof(grpc_resolved_address));
+ un = (struct sockaddr_un *)addrs->addrs->addr;
+ un->sun_family = AF_UNIX;
+ strcpy(un->sun_path, name);
+ addrs->addrs->len = strlen(un->sun_path) + sizeof(un->sun_family) + 1;
+ return addrs;
+}
+
+int grpc_is_unix_socket(const struct sockaddr *addr) {
+ return addr->sa_family == AF_UNIX;
+}
+
+void grpc_unlink_if_unix_domain_socket(const struct sockaddr *addr) {
+ if (addr->sa_family != AF_UNIX) {
+ return;
+ }
+ struct sockaddr_un *un = (struct sockaddr_un *)addr;
+ struct stat st;
+
+ if (stat(un->sun_path, &st) == 0 && (st.st_mode & S_IFMT) == S_IFSOCK) {
+ unlink(un->sun_path);
+ }
+}
+
+int grpc_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 *grpc_unix_get_default_authority(grpc_resolver_factory *factory,
+ grpc_uri *uri) {
+ return gpr_strdup("localhost");
+}
+
+char *grpc_sockaddr_to_uri_unix_if_possible(const struct sockaddr *addr) {
+ if (addr->sa_family != AF_UNIX) {
+ return NULL;
+ }
+
+ char *result;
+ gpr_asprintf(&result, "unix:%s", ((struct sockaddr_un *)addr)->sun_path);
+ return result;
+}
+
+#endif
diff --git a/src/core/iomgr/unix_sockets_posix.h b/src/core/iomgr/unix_sockets_posix.h
new file mode 100644
index 0000000000..e842ba3770
--- /dev/null
+++ b/src/core/iomgr/unix_sockets_posix.h
@@ -0,0 +1,61 @@
+/*
+ *
+ * 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_IOMGR_UNIX_SOCKETS_POSIX_H
+#define GRPC_CORE_IOMGR_UNIX_SOCKETS_POSIX_H
+
+#include <grpc/support/port_platform.h>
+
+#include <grpc/support/string_util.h>
+
+#include "src/core/client_config/resolver_factory.h"
+#include "src/core/client_config/uri_parser.h"
+#include "src/core/iomgr/resolve_address.h"
+#include "src/core/iomgr/sockaddr.h"
+
+void grpc_create_socketpair_if_unix(int sv[2]);
+
+grpc_resolved_addresses *grpc_resolve_unix_domain_address(const char *name);
+
+int grpc_is_unix_socket(const struct sockaddr *addr);
+
+void grpc_unlink_if_unix_domain_socket(const struct sockaddr *addr);
+
+int grpc_parse_unix(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len);
+
+char *grpc_unix_get_default_authority(grpc_resolver_factory *factory,
+ grpc_uri *uri);
+
+char *grpc_sockaddr_to_uri_unix_if_possible(const struct sockaddr *addr);
+
+#endif /* GRPC_CORE_IOMGR_UNIX_SOCKETS_POSIX_H */
diff --git a/src/core/iomgr/unix_sockets_posix_noop.c b/src/core/iomgr/unix_sockets_posix_noop.c
new file mode 100644
index 0000000000..045467bea4
--- /dev/null
+++ b/src/core/iomgr/unix_sockets_posix_noop.c
@@ -0,0 +1,61 @@
+/*
+ *
+ * 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/iomgr/unix_sockets_posix.h"
+
+#ifndef GPR_HAVE_UNIX_SOCKET
+
+void grpc_create_socketpair_if_unix(int sv[2]) {}
+
+grpc_resolved_addresses *grpc_resolve_unix_domain_address(const char *name) {
+ return NULL;
+}
+
+int grpc_is_unix_socket(const struct sockaddr *addr) { return false; }
+
+void grpc_unlink_if_unix_domain_socket(const struct sockaddr *addr) {}
+
+int grpc_parse_unix(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len) {
+ return 0;
+}
+
+char *grpc_unix_get_default_authority(grpc_resolver_factory *factory,
+ grpc_uri *uri) {
+ return NULL;
+}
+
+char *grpc_sockaddr_to_uri_unix_if_possible(const struct sockaddr *addr) {
+ return NULL;
+}
+
+#endif
diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py
index 29506e69bc..4c17e57659 100644
--- a/src/python/grpcio/grpc_core_dependencies.py
+++ b/src/python/grpcio/grpc_core_dependencies.py
@@ -145,6 +145,8 @@ CORE_SOURCE_FILES = [
'src/core/iomgr/timer.c',
'src/core/iomgr/timer_heap.c',
'src/core/iomgr/udp_server.c',
+ 'src/core/iomgr/unix_sockets_posix.c',
+ 'src/core/iomgr/unix_sockets_posix_noop.c',
'src/core/iomgr/wakeup_fd_eventfd.c',
'src/core/iomgr/wakeup_fd_nospecial.c',
'src/core/iomgr/wakeup_fd_pipe.c',
diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal
index 694fd2820b..173bc5dd3e 100644
--- a/tools/doxygen/Doxyfile.core.internal
+++ b/tools/doxygen/Doxyfile.core.internal
@@ -840,6 +840,7 @@ src/core/iomgr/time_averaged_stats.h \
src/core/iomgr/timer.h \
src/core/iomgr/timer_heap.h \
src/core/iomgr/udp_server.h \
+src/core/iomgr/unix_sockets_posix.h \
src/core/iomgr/wakeup_fd_pipe.h \
src/core/iomgr/wakeup_fd_posix.h \
src/core/iomgr/workqueue.h \
@@ -984,6 +985,8 @@ src/core/iomgr/time_averaged_stats.c \
src/core/iomgr/timer.c \
src/core/iomgr/timer_heap.c \
src/core/iomgr/udp_server.c \
+src/core/iomgr/unix_sockets_posix.c \
+src/core/iomgr/unix_sockets_posix_noop.c \
src/core/iomgr/wakeup_fd_eventfd.c \
src/core/iomgr/wakeup_fd_nospecial.c \
src/core/iomgr/wakeup_fd_pipe.c \
diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json
index 3b787d680a..43c6f3f838 100644
--- a/tools/run_tests/sources_and_headers.json
+++ b/tools/run_tests/sources_and_headers.json
@@ -3994,6 +3994,7 @@
"src/core/iomgr/timer.h",
"src/core/iomgr/timer_heap.h",
"src/core/iomgr/udp_server.h",
+ "src/core/iomgr/unix_sockets_posix.h",
"src/core/iomgr/wakeup_fd_pipe.h",
"src/core/iomgr/wakeup_fd_posix.h",
"src/core/iomgr/workqueue.h",
@@ -4229,6 +4230,9 @@
"src/core/iomgr/timer_heap.h",
"src/core/iomgr/udp_server.c",
"src/core/iomgr/udp_server.h",
+ "src/core/iomgr/unix_sockets_posix.c",
+ "src/core/iomgr/unix_sockets_posix.h",
+ "src/core/iomgr/unix_sockets_posix_noop.c",
"src/core/iomgr/wakeup_fd_eventfd.c",
"src/core/iomgr/wakeup_fd_nospecial.c",
"src/core/iomgr/wakeup_fd_pipe.c",
@@ -4618,6 +4622,7 @@
"src/core/iomgr/timer.h",
"src/core/iomgr/timer_heap.h",
"src/core/iomgr/udp_server.h",
+ "src/core/iomgr/unix_sockets_posix.h",
"src/core/iomgr/wakeup_fd_pipe.h",
"src/core/iomgr/wakeup_fd_posix.h",
"src/core/iomgr/workqueue.h",
@@ -4837,6 +4842,9 @@
"src/core/iomgr/timer_heap.h",
"src/core/iomgr/udp_server.c",
"src/core/iomgr/udp_server.h",
+ "src/core/iomgr/unix_sockets_posix.c",
+ "src/core/iomgr/unix_sockets_posix.h",
+ "src/core/iomgr/unix_sockets_posix_noop.c",
"src/core/iomgr/wakeup_fd_eventfd.c",
"src/core/iomgr/wakeup_fd_nospecial.c",
"src/core/iomgr/wakeup_fd_pipe.c",
diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj
index 30726ff5e9..ae9006d56b 100644
--- a/vsprojects/vcxproj/grpc/grpc.vcxproj
+++ b/vsprojects/vcxproj/grpc/grpc.vcxproj
@@ -349,6 +349,7 @@
<ClInclude Include="$(SolutionDir)\..\src\core\iomgr\timer.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\iomgr\timer_heap.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\iomgr\udp_server.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\iomgr\unix_sockets_posix.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\iomgr\wakeup_fd_pipe.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\iomgr\wakeup_fd_posix.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\iomgr\workqueue.h" />
@@ -566,6 +567,10 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\iomgr\udp_server.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\iomgr\unix_sockets_posix.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\iomgr\unix_sockets_posix_noop.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\iomgr\wakeup_fd_eventfd.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\iomgr\wakeup_fd_nospecial.c">
diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters
index 26ef8aa781..7122de912e 100644
--- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters
@@ -214,6 +214,12 @@
<ClCompile Include="$(SolutionDir)\..\src\core\iomgr\udp_server.c">
<Filter>src\core\iomgr</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\iomgr\unix_sockets_posix.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\iomgr\unix_sockets_posix_noop.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\iomgr\wakeup_fd_eventfd.c">
<Filter>src\core\iomgr</Filter>
</ClCompile>
@@ -731,6 +737,9 @@
<ClInclude Include="$(SolutionDir)\..\src\core\iomgr\udp_server.h">
<Filter>src\core\iomgr</Filter>
</ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\iomgr\unix_sockets_posix.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\iomgr\wakeup_fd_pipe.h">
<Filter>src\core\iomgr</Filter>
</ClInclude>
diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
index 1939396e1a..34271f89e5 100644
--- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
+++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj
@@ -339,6 +339,7 @@
<ClInclude Include="$(SolutionDir)\..\src\core\iomgr\timer.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\iomgr\timer_heap.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\iomgr\udp_server.h" />
+ <ClInclude Include="$(SolutionDir)\..\src\core\iomgr\unix_sockets_posix.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\iomgr\wakeup_fd_pipe.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\iomgr\wakeup_fd_posix.h" />
<ClInclude Include="$(SolutionDir)\..\src\core\iomgr\workqueue.h" />
@@ -544,6 +545,10 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\iomgr\udp_server.c">
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\iomgr\unix_sockets_posix.c">
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\iomgr\unix_sockets_posix_noop.c">
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\iomgr\wakeup_fd_eventfd.c">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\iomgr\wakeup_fd_nospecial.c">
diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters
index 6075961030..49f252d583 100644
--- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters
+++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters
@@ -217,6 +217,12 @@
<ClCompile Include="$(SolutionDir)\..\src\core\iomgr\udp_server.c">
<Filter>src\core\iomgr</Filter>
</ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\iomgr\unix_sockets_posix.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
+ <ClCompile Include="$(SolutionDir)\..\src\core\iomgr\unix_sockets_posix_noop.c">
+ <Filter>src\core\iomgr</Filter>
+ </ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\core\iomgr\wakeup_fd_eventfd.c">
<Filter>src\core\iomgr</Filter>
</ClCompile>
@@ -668,6 +674,9 @@
<ClInclude Include="$(SolutionDir)\..\src\core\iomgr\udp_server.h">
<Filter>src\core\iomgr</Filter>
</ClInclude>
+ <ClInclude Include="$(SolutionDir)\..\src\core\iomgr\unix_sockets_posix.h">
+ <Filter>src\core\iomgr</Filter>
+ </ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\core\iomgr\wakeup_fd_pipe.h">
<Filter>src\core\iomgr</Filter>
</ClInclude>