/*
device.c -- Interaction with OpenBSD tun device
- Copyright (C) 2001-2003 Ivo Timmermans <ivo@o2w.nl>,
- 2001-2003 Guus Sliepen <guus@sliepen.eu.org>
+ Copyright (C) 2001-2004 Ivo Timmermans <ivo@tinc-vpn.org>,
+ 2001-2004 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: device.c,v 1.1.2.17 2003/07/22 20:55:21 guus Exp $
+ $Id$
*/
#include "system.h"
+#include <sys/uio.h>
#include "conf.h"
#include "logger.h"
#define DEFAULT_DEVICE "/dev/tun0"
-#define DEVICE_TYPE_ETHERTAP 0
-#define DEVICE_TYPE_TUNTAP 1
-
int device_fd = -1;
char *device;
char *iface;
char *device_info;
-int device_total_in = 0;
-int device_total_out = 0;
+static int device_total_in = 0;
+static int device_total_out = 0;
bool setup_device(void)
{
ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Read packet of %d bytes from %s"), packet->len,
device_info);
- }
return true;
}