[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
tinc/src/darwin device.c,1.1.2.8,1.1.2.9
Update of /home/CVS/tinc/src/darwin
In directory humbolt:/tmp/cvs-serv19621/darwin
Modified Files:
Tag: CABAL
device.c
Log Message:
Update all device.c files.
Index: device.c
===================================================================
RCS file: /home/CVS/tinc/src/darwin/Attic/device.c,v
retrieving revision 1.1.2.8
retrieving revision 1.1.2.9
diff -u -r1.1.2.8 -r1.1.2.9
--- device.c 2003/07/12 17:41:47 1.1.2.8
+++ device.c 2003/07/18 13:41:36 1.1.2.9
@@ -20,32 +20,19 @@
$Id$
*/
-#include "config.h"
-
-#include <stdio.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <fcntl.h>
-#include <net/if.h>
-#include <unistd.h>
-#include <string.h>
+#include "system.h"
-#include <utils.h>
#include "conf.h"
-#include "net.h"
#include "logger.h"
-
-#include "system.h"
+#include "net.h"
+#include "utils.h"
#define DEFAULT_DEVICE "/dev/tun0"
int device_fd = -1;
int device_type;
char *device;
-char *interface;
+char *iface;
char *device_info;
int device_total_in = 0;
int device_total_out = 0;
@@ -57,8 +44,8 @@
if(!get_config_string(lookup_config(config_tree, "Device"), &device))
device = DEFAULT_DEVICE;
- if(!get_config_string(lookup_config(config_tree, "Interface"), &interface))
- interface = rindex(device, '/') ? rindex(device, '/') + 1 : device;
+ if(!get_config_string(lookup_config(config_tree, "Interface"), &iface))
+ iface = rindex(device, '/') ? rindex(device, '/') + 1 : device;
if((device_fd = open(device, O_RDWR | O_NONBLOCK)) < 0) {
logger(LOG_ERR, _("Could not open %s: %s"), device, strerror(errno));
--
Tinc-cvs: CVS changelog list for the tinc VPN daemon
Archive: http://mail.nl.linux.org/tinc-cvs/
Tinc site: http://tinc.nl.linux.org/