From efd2967e060a3a7ca3de589a23511bb38151ed8b Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze@samba.org>
Date: Wed, 24 Feb 2021 12:45:26 +0100
Subject: swrap: introduce a socket_wrapper_noop.so and socket_wrapper.h to
 provide noop stubs

Applications with the need to call socket_wrapper_enabled() should link
against -lsocket_wrapper_noop in order to resolve the symbol at
link time.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14640

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
---
 doc/socket_wrapper.1.adoc | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

(limited to 'doc/socket_wrapper.1.adoc')

diff --git a/doc/socket_wrapper.1.adoc b/doc/socket_wrapper.1.adoc
index 9519fd4..fd0b745 100644
--- a/doc/socket_wrapper.1.adoc
+++ b/doc/socket_wrapper.1.adoc
@@ -133,6 +133,29 @@ EXAMPLE
   # Now you can type 'Hello!' which will be sent to the server and should appear
   # in the console output of the server.
 
+PUBLIC FUNCTIONS
+----------------
+
+Socket wrapper advanced helpers.
+
+Applications with the need to alter their behaviour when
+socket wrapper is active, can link use these functions.
+
+By default it's required for applications to use any of these
+functions as libsocket_wrapper.so is injected at runtime via
+LD_PRELOAD.
+
+Applications using these functions should link against
+libsocket_wrapper_noop.so by using -lsocket_wrapper_noop,
+or implement their own noop stubs.
+
+#include <socket_wrapper.h>
+
+bool socket_wrapper_enabled(void);
+
+- This returns true when socket wrapper is actively in use.
+
+
 RESOURCES
 ---------
 
-- 
cgit 

