/* SPDX-License-Identifier: GPL-3.0-or-later */ #pragma once // // This module implements a Linux tun device. The tun_alloc() functions creates a tun device // with a given name, IP address, subnet mask and MTU. // #include /// Allocate a tun device with the given CIDR (e.g. "172.16.0.1/24") and MTU. /// Returns fd on success, -1 on failure (errno is set). int tun_alloc(const char* ifname, const char* cidr, int mtu);