table of contents
SOCKET_WRAPPER(1) | SOCKET_WRAPPER(1) |
NAME¶
socket_wrapper - A library passing all socket communications through unix sockets.
SYNOPSIS¶
LD_PRELOAD=libsocket_wrapper.so SOCKET_WRAPPER_DIR=/tmp/tmp.bQRELqDrhM SOCKET_WRAPPER_DEFAULT_IFACE=10 ./myapplication
DESCRIPTION¶
socket_wrapper aims to help client/server software development teams willing to gain full functional test coverage. It makes possible to run several instances of the full software stack on the same machine and perform locally functional testing of complex network configurations.
ENVIRONMENT VARIABLES¶
SOCKET_WRAPPER_DIR
SOCKET_WRAPPER_DEFAULT_IFACE
SOCKET_WRAPPER_PCAP_FILE
SOCKET_WRAPPER_MTU
The minimum value you can set is 512 and the maximum 32768.
SOCKET_WRAPPER_MAX_SOCKETS
The default value is set to 65535 and the maximum 256000.
SOCKET_WRAPPER_DEBUGLEVEL
SOCKET_WRAPPER_DISABLE_DEEPBIND
EXAMPLE¶
# Open a console and create a directory for the unix sockets. $ mktemp -d /tmp/tmp.bQRELqDrhM
# Then start nc to listen for network traffic using the temporary directory. $ LD_PRELOAD=libsocket_wrapper.so \
SOCKET_WRAPPER_DIR=/tmp/tmp.bQRELqDrhM \
SOCKET_WRAPPER_DEFAULT_IFACE=10 nc -v -l 127.0.0.10 7
# (If nc, listens on 0.0.0.0 then listener will be open on 127.0.0.10 because # it is the default interface)
# Now open another console and start 'nc' as a client to connect to the server: $ LD_PRELOAD=libsocket_wrapper.so \
SOCKET_WRAPPER_DIR=/tmp/tmp.bQRELqDrhM \
SOCKET_WRAPPER_DEFAULT_IFACE=100 nc -v 127.0.0.10 7
# (The client will use the address 127.0.0.100 when connecting to the server) # Now you can type 'Hello!' which will be sent to the server and should appear # in the console output of the server.
AUTHOR¶
Samba Team
2018-11-28 |