+int fd = -1;
+static device_type_t device_type;
+char *device = NULL;
+char *iface = NULL;
+static char ifrname[IFNAMSIZ];
+static char *device_info;
+
+static uint64_t device_total_in = 0;
+static uint64_t device_total_out = 0;
+
+thread_t thread;
+
+static void read_thread(void *arg) {
+ static vpn_packet_t packet;
+ errno = 0;
+
+ while(true) {
+ if(read_packet(&packet)) {
+ route(myself, &packet);
+ } else {
+ if(errno == EAGAIN || errno == EINTR) {
+ errno = 0;
+ continue;
+ }