You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 25, 2020. It is now read-only.
qemu's libslirp has been included in Debian Sid (and possibly in other distribution):
there is a name clash with this library)
qemu's libslirp is actively maintained and updated
for all the reasons here above this library will no longer be maintained
libslirp
A TCP-IP emulator as a library.
Slirp
Originally designed to provide PPP/SLIP over terminal lines, slirp is a general purpose TCP-IP emulator widely used
by virtual machine hypervisors to provide virtual networking services.
Qemu, virtualbox, user-mode linux include slirp to provide the guest os with a virtual network while requiring no
configuration nor privileged services on the host.
This project wraps the slirp code in a library featuring a clean and simple interface.
Install libslirp:
$ autoreconf -if
$ ./configure
$ make
$ sudo make install
libslirp tutorial
The first operation to use a slirp virtual network is slirp_open.
slirp_fd returns a file descriptor which can be used to wait for incoming packets using poll or select.
myslirpfd = slirp_fd(myslirp);
It is also possible to set up port forwarding for TCP, UDP (currently IPV4 only) or connect X-window clients
running in the virtual network to a X server UNIX socket, see man libslirpfwd.