/* -*-c-*-
- *
- * $Id$
*
* Tunnel interface based on Linux Usernet
*
* (c) 2001 Straylight/Edgeware
*/
-/*----- Licensing notice --------------------------------------------------*
+/*----- Licensing notice --------------------------------------------------*
*
* This file is part of Trivial IP Encryption (TrIPE).
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* TrIPE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with TrIPE; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
if (ioctl(t->f.fd, UNIOCGINFO, &uni)) {
a_warn("TUN", "-", "unet", "getinfo-error", "?ERRNO", A_END);
- return ("<error>");
+ return (0);
}
*ifn = xstrdup(uni.uni_ifname);
T( trace(T_TUNNEL, "tun-unet: attached interface %s to peer `%s'",
*/
static void t_destroy(tunnel *t)
-{
- sel_rmfile(&t->f);
- close(t->f.fd);
- DESTROY(t);
-}
+ { sel_rmfile(&t->f); close(t->f.fd); DESTROY(t); }
const tunnel_ops tun_unet = {
"unet",