All Projects → LaKabane → Libtuntap

LaKabane / Libtuntap

The portable Tun/Tap devices configuration utility

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Libtuntap

Cosmopolitan
build-once run-anywhere c library
Stars: ✭ 6,324 (+5810.28%)
Mutual labels:  freebsd, openbsd, netbsd
Postinstall
💻 Bash Script to automate post-installation steps
Stars: ✭ 104 (-2.8%)
Mutual labels:  freebsd, openbsd, netbsd
InitKit
Neo-InitWare is a modular, cross-platform reimplementation of the systemd init system. It is experimental.
Stars: ✭ 364 (+240.19%)
Mutual labels:  freebsd, openbsd, netbsd
Awesome Bsd
A collection of awesome BSD related stuff
Stars: ✭ 236 (+120.56%)
Mutual labels:  freebsd, openbsd, netbsd
osutil
Go library to easily detect current operating system, current Linux distribution, macOS version and more...
Stars: ✭ 22 (-79.44%)
Mutual labels:  freebsd, openbsd, netbsd
Daemonize
daemonize is a library for writing system daemons in Python.
Stars: ✭ 396 (+270.09%)
Mutual labels:  freebsd, openbsd, netbsd
uac
UAC is a Live Response collection script for Incident Response that makes use of native binaries and tools to automate the collection of AIX, Android, ESXi, FreeBSD, Linux, macOS, NetBSD, NetScaler, OpenBSD and Solaris systems artifacts.
Stars: ✭ 260 (+142.99%)
Mutual labels:  freebsd, openbsd, netbsd
Fisy Fuzz
This is the full file system fuzzing framework that I presented at the Hack in the Box 2020 Lockdown Edition conference in April.
Stars: ✭ 110 (+2.8%)
Mutual labels:  freebsd, openbsd, netbsd
Awesome-BSD-Ports-Programs-And-Projects
A Repo Detailing BSD Ports, Programs, and Projects.
Stars: ✭ 46 (-57.01%)
Mutual labels:  freebsd, openbsd, netbsd
psutil
Cross-platform lib for process and system monitoring in Python
Stars: ✭ 8,488 (+7832.71%)
Mutual labels:  freebsd, openbsd, netbsd
Ecominit
eComInit is a free init system and service manager designed to scale from lightweight desktops to web-scale cloud deployments. It aims to offer feature-parity with systemd but with a modular, portable architecture compliant with software engineering best-practice.
Stars: ✭ 352 (+228.97%)
Mutual labels:  freebsd, openbsd, netbsd
Awesome Unix
All the UNIX and UNIX-Like: Linux, BSD, macOS, Illumos, 9front, and more.
Stars: ✭ 973 (+809.35%)
Mutual labels:  freebsd, openbsd, netbsd
Objfw
[Official Mirror] A portable framework for the Objective-C language.
Stars: ✭ 161 (+50.47%)
Mutual labels:  freebsd, openbsd, netbsd
Ruby Vmstat
A focused and fast library to gather memory, cpu, network, load avg and disk information
Stars: ✭ 68 (-36.45%)
Mutual labels:  freebsd, openbsd, netbsd
Mg
Micro (GNU) Emacs-like text editor ❤️ public-domain
Stars: ✭ 117 (+9.35%)
Mutual labels:  freebsd, openbsd, netbsd
WendzelNNTPd
A usable and IPv6-ready Usenet-server (NNTP daemon). It is portable (Linux/*BSD/*nix), supports AUTHINFO authentication, contains ACL as well as role based ACL and provides "invisible" newsgroups. It can run on MySQL and SQLite backends.
Stars: ✭ 43 (-59.81%)
Mutual labels:  freebsd, openbsd, netbsd
gsmartcontrol
GSmartControl - Hard disk drive and SSD health inspection tool
Stars: ✭ 183 (+71.03%)
Mutual labels:  freebsd, openbsd, netbsd
packetdrill
packetdrill with UDPLite and SCTP support and bug fixes for FreeBSD
Stars: ✭ 37 (-65.42%)
Mutual labels:  freebsd, openbsd, netbsd
Qtfm
Qt File Manager
Stars: ✭ 73 (-31.78%)
Mutual labels:  freebsd, openbsd, netbsd
Spectre Meltdown Checker
Spectre, Meltdown, Foreshadow, Fallout, RIDL, ZombieLoad vulnerability/mitigation checker for Linux & BSD
Stars: ✭ 3,482 (+3154.21%)
Mutual labels:  freebsd, netbsd

libtuntap 0.4

libtuntap is a library for configuring TUN or TAP devices in a portable manner.

Contents

  1. Description
  2. Install
  3. Notes
  4. Contributing
  5. License

Description

TUN and TAP are virtual networking devices which allow userland applications to receive packets sent to it. The userland applications can also send their own packets to the devices and they will be forwarded to the kernel.

This is useful for developping tunnels, private networks or virtualisation systems.

Supported Features

  • Creation of TUN and TAP devices;
  • Autodetection of available TUN or TAP devices;
  • Setting and getting the MAC address of the device;
  • Setting and getting the MTU of the device;
  • Setting the status of the device (up/down);
  • Setting the IPv4 address and netmask of the device;
  • Setting the persistence mode of the device;
  • Setting the name of the device (Linux only);
  • Setting the description of the device (OpenBSD and FreeBSD only);
  • Wrapper libraries for other languages.

Supported Systems

  • OpenBSD;
  • Linux;
  • NetBSD;
  • Darwin (up to High Sierra).

Current Porting Efforts

  • Windows;
  • FreeBSD.

In the future

  • AIX;
  • Solaris.

Install

Requires

  • cmake;
  • C and C++ compilers.

Build

This project is built with cmake:

$ mkdir build; cd build
$ cmake ../
$ make
# make install

It is possible to tweak the destination folder for the install rule with the environment variable DESTDIR. The default behaviour is to install under the /usr/lib folder for Linux and /usr/local/lib for everyone else.

Example make invocation:

$ DESTDIR=/tmp make install

The following options can be tweaked:

  • ENABLE_CXX: Enable building of the C++ wrapper library libtuntap++;
  • ENABLE_PYTHON: Enable building of the Python wrapper library pytuntap;
  • BUILD_TESTING: Enable building of the regress tests;
  • BUILD_SHARED_LIBS: Build shared libraries instead of static ones.

Other languages bindings

We currently provide wrappers for two other languages: C++ and Python, respectively named libtuntap++ and pytuntap. More instructions about them is provided in the bindings folder.

The C++ library is built by default and can be disabled with the flag ENABLE_CXX.

The Python library is disabled by default and requires both ENABLE_CXX and ENABLE_PYTHON to work. You will also need Python 3.6 and Boost libraries.

Example cmake invocation:

$ mkdir build; cd build
$ cmake -D ENABLE_CXX=ON -D ENABLE_PYTHON=ON ../

Tests

A series of regress tests can be built with the BUILD_TESTING option. They are enabled by default. A list and a description for each of them can be found in the regress folder.

Example cmake invocation:

$ mkdir build; cd build
$ cmake -D BUILD_TESTING=ON ../
# make test

Static or shared

Up to version 0.3 the libtuntap CMakeFiles.txt exported two libraries: one shared, one static. To simplify the building of the wrapper libraries it was decided to only build one. The default is to build a static library but this behaviour can be changed with the option BUILD_SHARED_LIBS.

Example cmake invocation:

$ mkdir build; cd build
$ cmake -D BUILD_SHARED_LIBS=ON ../
$ make

Local configurations

The main CMakeFiles.txt includes an optional CMakeFiles.txt.local which can be used to store persistent options across builds.

Example:

$ cat CMakeLists.txt.local
set(BUILD_SHARED_LIBS ON)
set(BUILD_TESTING OFF)
set(ENABLE_CXX OFF)

Notes

Notes for Mac OS X users

You need to install the tuntaposx project for this library to be useful, which is a third-party kext.

Notes for Windows users

You need to install the tap-windows driver provided by the OpenVPN project.

Contributing

Feel free to open issues and pull-requests, even if we are bad at replying on time. You can also chat with us on the XMPP network: libtuntap channel at rooms.bouledef.eu.

License

All the code is licensed under the ISC License. It's free, not GPLed !

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].