char *iface = NULL;
static char *device_info = NULL;
+static uint64_t device_total_in = 0;
+static uint64_t device_total_out = 0;
+
extern char *myport;
static DWORD WINAPI tapreader(void *bla) {
}
static void close_device(void) {
- CloseHandle(device_handle);
+ CloseHandle(device_handle); device_handle = INVALID_HANDLE_VALUE;
- free(device);
- free(iface);
+ free(device); device = NULL;
+ free(iface); iface = NULL;
+ device_info = NULL;
}
static bool read_packet(vpn_packet_t *packet) {
return false;
}
+ device_total_out += packet->len;
+
return true;
}