-int device_type;
-char *device;
-char *interface;
-char ifrname[IFNAMSIZ];
-char *device_info;
-
-int device_total_in = 0;
-int device_total_out = 0;
-
-extern subnet_t mymac;
-
-/*
- open the local ethertap device
-*/
-int setup_device(void)
-{
- struct ifreq ifr;
-
- cp();
-
+static device_type_t device_type;
+char *device = NULL;
+char *iface = NULL;
+static char *type = NULL;
+static char ifrname[IFNAMSIZ];
+static char *device_info;
+
+uint64_t device_in_packets = 0;
+uint64_t device_in_bytes = 0;
+uint64_t device_out_packets = 0;
+uint64_t device_out_bytes = 0;
+
+static bool setup_device(void) {