{"id":15019132,"url":"https://github.com/lakabane/libtuntap","last_synced_at":"2025-04-06T20:11:48.640Z","repository":{"id":2807939,"uuid":"3808972","full_name":"LaKabane/libtuntap","owner":"LaKabane","description":"The portable Tun/Tap devices configuration utility","archived":false,"fork":false,"pushed_at":"2024-05-07T08:33:21.000Z","size":55118,"stargazers_count":200,"open_issues_count":13,"forks_count":63,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-30T18:08:36.286Z","etag":null,"topics":["c","freebsd","linux","netbsd","openbsd","tap","tap-device","tun"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LaKabane.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-03-23T14:16:42.000Z","updated_at":"2025-03-23T16:10:32.000Z","dependencies_parsed_at":"2024-03-05T14:42:23.074Z","dependency_job_id":"bfa9897c-8691-4f12-a781-3a18ae1a490b","html_url":"https://github.com/LaKabane/libtuntap","commit_stats":{"total_commits":322,"total_committers":22,"mean_commits":"14.636363636363637","dds":0.3509316770186336,"last_synced_commit":"ec1213733eb2e66e033ff8864d9fd476f9e35ffe"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaKabane%2Flibtuntap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaKabane%2Flibtuntap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaKabane%2Flibtuntap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaKabane%2Flibtuntap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LaKabane","download_url":"https://codeload.github.com/LaKabane/libtuntap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247543593,"owners_count":20955865,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","freebsd","linux","netbsd","openbsd","tap","tap-device","tun"],"created_at":"2024-09-24T19:53:02.350Z","updated_at":"2025-04-06T20:11:48.610Z","avatar_url":"https://github.com/LaKabane.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libtuntap 0.4\n\nlibtuntap is a library for configuring TUN or TAP devices in a portable manner.\n\n## Contents\n\n1. [Description](#description)\n2. [Install](#install)\n3. [Notes](#notes)\n4. [Contributing](#contributing)\n5. [License](#license)\n\n## Description\n\nTUN and TAP are virtual networking devices which allow userland applications\nto receive packets sent to it. The userland applications can also send their\nown packets to the devices and they will be forwarded to the kernel.\n\nThis is useful for developping tunnels, private networks or virtualisation\nsystems.\n\n#### Supported Features\n\n   * Creation of TUN _and_ TAP devices;\n   * Autodetection of available TUN or TAP devices;\n   * Setting and getting the MAC address of the device;\n   * Setting and getting the MTU of the device;\n   * Setting the status of the device (up/down);\n   * Setting the IPv4 address and netmask of the device;\n   * Setting the persistence mode of the device;\n   * Setting the name of the device (Linux only);\n   * Setting the description of the device (OpenBSD and FreeBSD only);\n   * Wrapper libraries for other languages.\n\n#### Supported Systems\n\n   * OpenBSD;\n   * Linux;\n   * NetBSD;\n   * Darwin (up to High Sierra).\n\n#### Current Porting Efforts\n\n   * Windows;\n   * FreeBSD.\n\n#### In the future\n\n   * AIX;\n   * Solaris.\n\n## Install\n\n#### Requires\n\n* cmake;\n* C and C++ compilers.\n\n#### Build\n\nThis project is built with cmake:\n\n    $ mkdir build; cd build\n    $ cmake ../\n    $ make\n    # make install\n\nIt is possible to tweak the destination folder for the install rule with the\nenvironment variable `DESTDIR`.  The default behaviour is to install under\nthe `/usr/lib` folder for Linux and `/usr/local/lib` for everyone else.\n\nExample make invocation:\n\n    $ DESTDIR=/tmp make install\n\nThe following options can be tweaked:\n\n- `ENABLE_CXX`: Enable building of the C++ wrapper library libtuntap++;\n- `ENABLE_PYTHON`: Enable building of the Python wrapper library pytuntap;\n- `BUILD_TESTING`: Enable building of the regress tests;\n- `BUILD_SHARED_LIBS`: Build shared libraries instead of static ones.\n\nIf you want to build it for a release, additionally use `-DCMAKE_BUILD_TYPE=Release` as cmake argument.\n\n#### Other languages bindings\n\nWe currently provide wrappers for two other languages: C++ and Python,\nrespectively named libtuntap++ and pytuntap.  More instructions about them is\nprovided in the [`bindings`](bindings/README.md) folder.\n\nThe C++ library is built by default and can be disabled with the flag\n`ENABLE_CXX`.\n\nThe Python library is disabled by default and requires both `ENABLE_CXX` and\n`ENABLE_PYTHON` to work.  You will also need Python 3.6 and Boost libraries.\n\nExample cmake invocation:\n\n    $ mkdir build; cd build\n    $ cmake -D ENABLE_CXX=ON -D ENABLE_PYTHON=ON ../\n\n#### Tests\n\nA series of regress tests can be built with the `BUILD_TESTING` option.\nThey are enabled by default.  A list and a description for each of them can\nbe found in the [`regress`](regress/README.md) folder.\n\nExample cmake invocation:\n\n    $ mkdir build; cd build\n    $ cmake -D BUILD_TESTING=ON ../\n    # make test\n\n#### Static or shared\n\nUp 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`.\n\nExample cmake invocation:\n\n    $ mkdir build; cd build\n    $ cmake -D BUILD_SHARED_LIBS=ON ../\n    $ make\n\n#### Local configurations\n\nThe main `CMakeFiles.txt` includes an optional `CMakeFiles.txt.local` which can be used to store persistent options across builds.\n\nExample:\n\n    $ cat CMakeLists.txt.local\n    set(BUILD_SHARED_LIBS ON)\n    set(BUILD_TESTING OFF)\n    set(ENABLE_CXX OFF)\n\n## Notes\n\n#### Notes for Mac OS X users\n\nYou need to install the tuntaposx project for this library to be useful,\nwhich is a third-party kext.\n\n### Notes for Windows users\n\nYou need to install the tap-windows driver provided by the [OpenVPN project](https://openvpn.net/index.php/open-source/downloads.html).\n\n## Contributing\n\nFeel free to open issues and pull-requests, even if we are bad at replying\non time.  You can also chat with us on the XMPP network: libtuntap channel\nat rooms.bouledef.eu.\n\n## License\n\nAll the code is licensed under the ISC License.\nIt's free, not GPLed !\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flakabane%2Flibtuntap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flakabane%2Flibtuntap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flakabane%2Flibtuntap/lists"}