From e91fb065fa83e2ad4e3dacec22f011baf5d3d752 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 28 Mar 2005 01:00:39 +0000 Subject: r6088: Add the socket_wrapper library. This is a very simple library that redirects traffic (currently just IP traffic) over unix domain sockets if the SOCKET_WRAPPER_DIR environment variable has been set. Aim is to use this for the Samba4 torture suite on the buildfarm. The socket_wrapper library can only be used if Samba was compiled with --enable-developer. test_rpc.sh passes against a local smbd with SOCKET_WRAPPER_DIR set. (and ethereal showed no traffic whatsoever) Stuff that still needs to be fixed in socketwrapper: - Give ENETUNREACH if target is not localhost - A given port number can only be used for UDP /or/ TCP, not both. - Perhaps allow some calls to circumvent socketwrapper (do we need DNS?) (This used to be commit f8a63a843ccca092d9756b64e09175d37c08550a) --- source4/include/system/network.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/include/system') diff --git a/source4/include/system/network.h b/source4/include/system/network.h index bad4339666..f661194831 100644 --- a/source4/include/system/network.h +++ b/source4/include/system/network.h @@ -57,6 +57,10 @@ #include #endif +#ifdef DEVELOPER +#define SOCKET_WRAPPER_REPLACE +#include "lib/socket_wrapper.h" +#endif #ifdef REPLACE_INET_NTOA #define inet_ntoa rep_inet_ntoa -- cgit