EnglishFrenchSpanish

OnWorks favicon

socket_wrapper - Online in the Cloud

Run socket_wrapper in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command socket_wrapper that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

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.

· Redirects all network communication to happen over unix sockets.

· Support for IPv4 and IPv6 socket and addressing emulation.

· Ablility to capture network traffic in pcap format.

ENVIRONMENT VARIABLES


SOCKET_WRAPPER_DIR
The user defines a directory where to put all the unix sockets using the envionment
variable "SOCKET_WRAPPER_DIR=/path/to/socket_dir". When a server opens a port or a
client wants to connect, socket_wrapper will translate IP addresses to a special
socket_wrapper name and look for the relevant unix socket in the SOCKET_WRAPPER_DIR.

SOCKET_WRAPPER_DEFAULT_IFACE
Additionally, the default interface to be used by an application is defined with
"SOCKET_WRAPPER_DEFAULT_IFACE=<ID>" where <ID> is between 2 and 254. This is analogous
to use the IPv4 addresses "127.0.0.<ID>" or IPv6 addresses "fd00::5357:5f<IDx>" (where
<IDx> is a hexadecimal presentation of <ID>). You should always set the default
interface. If you listen on INADDR_ANY then it will use the default interface to
listen on.

SOCKET_WRAPPER_PCAP_FILE
When debugging, it is often interesting to investigate the network traffic between the
client and server within your application. If you define
SOCKET_WRAPPER_PCAP_FILE=/path/to/file.pcap, socket_wrapper will dump all your network
traffic to the specified file. After the test has been finished you’re able to open
the file for example with Wireshark.

SOCKET_WRAPPER_MTU
With this variable you can change the MTU size. However we do not recomment to do that
as the default size of 1500 byte is best for formatting PCAP files.

The minimum value you can set is 512 and the maximum 32768.

SOCKET_WRAPPER_DEBUGLEVEL
If you need to see what is going on in socket_wrapper itself or try to find a bug, you
can enable logging support in socket_wrapper if you built it with debug symbols.

· 0 = ERROR

· 1 = WARNING

· 2 = DEBUG

· 3 = TRACE

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.

2015-08-11 SOCKET_WRAPPER(1)

Use socket_wrapper online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Canon EOS DIGITAL Info
    Canon EOS DIGITAL Info
    Canon doesn�t have shutter count
    included on the EXIF information of an
    image file, as opposed to Nikon and
    Pentax. There�s no official Canon based
    application ...
    Download Canon EOS DIGITAL Info
  • 2
    rEFInd
    rEFInd
    rEFInd is a fork of the rEFIt boot
    manager. Like rEFIt, rEFInd can
    auto-detect your installed EFI boot
    loaders and it presents a pretty GUI
    menu of boot option...
    Download rEFInd
  • 3
    ExpressLuke GSI
    ExpressLuke GSI
    This SourceForge download page was to
    grant users to download my source built
    GSIs, based upon phhusson's great
    work. I build both Android Pie and
    Android 1...
    Download ExpressLuke GSI
  • 4
    Music Caster
    Music Caster
    Music Caster is a tray music player
    that lets you cast your local music to a
    Google Cast device. On the first run,
    you will need to click the arrow in your
    tas...
    Download Music Caster
  • 5
    PyQt
    PyQt
    PyQt is the Python bindings for
    Digia's Qt cross-platform
    application development framework. It
    supports Python v2 and v3 and Qt v4 and
    Qt v5. PyQt is avail...
    Download PyQt
  • 6
    Sardi
    Sardi
    Sardi is a complete restyling and
    optimisation of svg code. 6 choices for
    your applications and 10 kind of folders
    to use in your file manager. The sardi
    icons...
    Download Sardi
  • More »

Linux commands

Ad