projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
K&R style braces
[tinc]
/
src
/
cygwin
/
device.c
diff --git
a/src/cygwin/device.c
b/src/cygwin/device.c
index
2818cd2
..
db8cc9e
100644
(file)
--- a/
src/cygwin/device.c
+++ b/
src/cygwin/device.c
@@
-1,7
+1,7
@@
/*
device.c -- Interaction with Windows tap driver in a Cygwin environment
/*
device.c -- Interaction with Windows tap driver in a Cygwin environment
- Copyright (C) 2002-200
4 Ivo Timmermans <ivo@tinc-vpn.org>
,
- 2002-200
4
Guus Sliepen <guus@tinc-vpn.org>
+ Copyright (C) 2002-200
5 Ivo Timmermans
,
+ 2002-200
6
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
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
@@
-40,14
+40,13
@@
char *device = NULL;
char *iface = NULL;
char *device_info = NULL;
char *iface = NULL;
char *device_info = NULL;
-int device_total_in = 0;
-int device_total_out = 0;
+
static
int device_total_in = 0;
+
static
int device_total_out = 0;
-pid_t reader_pid;
-int sp[2];
+
static
pid_t reader_pid;
+
static
int sp[2];
-bool setup_device(void)
-{
+bool setup_device(void) {
HKEY key, key2;
int i, err;
HKEY key, key2;
int i, err;
@@
-218,8
+217,7
@@
bool setup_device(void)
return true;
}
return true;
}
-void close_device(void)
-{
+void close_device(void) {
cp();
close(sp[0]);
cp();
close(sp[0]);
@@
-229,8
+227,7
@@
void close_device(void)
kill(reader_pid, SIGKILL);
}
kill(reader_pid, SIGKILL);
}
-bool read_packet(vpn_packet_t *packet)
-{
+bool read_packet(vpn_packet_t *packet) {
int lenin;
cp();
int lenin;
cp();
@@
-251,8
+248,7
@@
bool read_packet(vpn_packet_t *packet)
return true;
}
return true;
}
-bool write_packet(vpn_packet_t *packet)
-{
+bool write_packet(vpn_packet_t *packet) {
long lenout;
cp();
long lenout;
cp();
@@
-270,8
+266,7
@@
bool write_packet(vpn_packet_t *packet)
return true;
}
return true;
}
-void dump_device_stats(void)
-{
+void dump_device_stats(void) {
cp();
logger(LOG_DEBUG, _("Statistics for %s %s:"), device_info, device);
cp();
logger(LOG_DEBUG, _("Statistics for %s %s:"), device_info, device);