projects
/
oweals
/
tinc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4a21aab
)
Use 64 bit counters to keep track of bytes sent/received from the virtual network...
author
Guus Sliepen
<guus@tinc-vpn.org>
Fri, 4 Jun 2010 13:04:08 +0000
(15:04 +0200)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Fri, 4 Jun 2010 13:04:08 +0000
(15:04 +0200)
src/bsd/device.c
patch
|
blob
|
history
src/cygwin/device.c
patch
|
blob
|
history
src/dummy/device.c
patch
|
blob
|
history
src/linux/device.c
patch
|
blob
|
history
src/mingw/device.c
patch
|
blob
|
history
src/raw_socket/device.c
patch
|
blob
|
history
src/solaris/device.c
patch
|
blob
|
history
src/uml_socket/device.c
patch
|
blob
|
history
diff --git
a/src/bsd/device.c
b/src/bsd/device.c
index 6674abd209a23aa7763073097081114e263431ee..e8fdc1bc3abc94b603f022f8382c415d39babb96 100644
(file)
--- a/
src/bsd/device.c
+++ b/
src/bsd/device.c
@@
-47,8
+47,8
@@
int device_fd = -1;
char *device = NULL;
char *iface = NULL;
static char *device_info = NULL;
char *device = NULL;
char *iface = NULL;
static char *device_info = NULL;
-static
in
t device_total_in = 0;
-static
in
t device_total_out = 0;
+static
uint64_
t device_total_in = 0;
+static
uint64_
t device_total_out = 0;
#if defined(TUNEMU)
static device_type_t device_type = DEVICE_TYPE_TUNEMU;
#elif defined(HAVE_OPENBSD) || defined(HAVE_FREEBSD)
#if defined(TUNEMU)
static device_type_t device_type = DEVICE_TYPE_TUNEMU;
#elif defined(HAVE_OPENBSD) || defined(HAVE_FREEBSD)
@@
-353,6
+353,6
@@
bool write_packet(vpn_packet_t *packet) {
void dump_device_stats(void) {
logger(LOG_DEBUG, "Statistics for %s %s:", device_info, device);
void dump_device_stats(void) {
logger(LOG_DEBUG, "Statistics for %s %s:", device_info, device);
- logger(LOG_DEBUG, " total bytes in: %10
d"
, device_total_in);
- logger(LOG_DEBUG, " total bytes out: %10
d"
, device_total_out);
+ logger(LOG_DEBUG, " total bytes in: %10
"PRIu64
, device_total_in);
+ logger(LOG_DEBUG, " total bytes out: %10
"PRIu64
, device_total_out);
}
}
diff --git
a/src/cygwin/device.c
b/src/cygwin/device.c
index 958184bdef21f3a1fdbe307052c84ddb68def186..90966cd2419d0a7c724a00dba864ab074e37e47a 100644
(file)
--- a/
src/cygwin/device.c
+++ b/
src/cygwin/device.c
@@
-38,8
+38,8
@@
char *device = NULL;
char *iface = NULL;
static char *device_info = NULL;
char *iface = NULL;
static char *device_info = NULL;
-static
in
t device_total_in = 0;
-static
in
t device_total_out = 0;
+static
uint64_
t device_total_in = 0;
+static
uint64_
t device_total_out = 0;
static pid_t reader_pid;
static int sp[2];
static pid_t reader_pid;
static int sp[2];
@@
-261,6
+261,6
@@
bool write_packet(vpn_packet_t *packet) {
void dump_device_stats(void) {
logger(LOG_DEBUG, "Statistics for %s %s:", device_info, device);
void dump_device_stats(void) {
logger(LOG_DEBUG, "Statistics for %s %s:", device_info, device);
- logger(LOG_DEBUG, " total bytes in: %10
d"
, device_total_in);
- logger(LOG_DEBUG, " total bytes out: %10
d"
, device_total_out);
+ logger(LOG_DEBUG, " total bytes in: %10
"PRIu64
, device_total_in);
+ logger(LOG_DEBUG, " total bytes out: %10
"PRIu64
, device_total_out);
}
}
diff --git
a/src/dummy/device.c
b/src/dummy/device.c
index a9600b280af320221d3c34908a1488736b2d1745..c84e899ba400bd77109893b012ea7fc2197ad2da 100644
(file)
--- a/
src/dummy/device.c
+++ b/
src/dummy/device.c
@@
-27,8
+27,8
@@
char *device = "dummy";
char *iface = "dummy";
static char *device_info = "dummy device";
char *iface = "dummy";
static char *device_info = "dummy device";
-static
in
t device_total_in = 0;
-static
in
t device_total_out = 0;
+static
uint64_
t device_total_in = 0;
+static
uint64_
t device_total_out = 0;
bool setup_device(void) {
logger(LOG_INFO, "%s (%s) is a %s", device, iface, device_info);
bool setup_device(void) {
logger(LOG_INFO, "%s (%s) is a %s", device, iface, device_info);
@@
-49,6
+49,6
@@
bool write_packet(vpn_packet_t *packet) {
void dump_device_stats(void) {
logger(LOG_DEBUG, "Statistics for %s %s:", device_info, device);
void dump_device_stats(void) {
logger(LOG_DEBUG, "Statistics for %s %s:", device_info, device);
- logger(LOG_DEBUG, " total bytes in: %10
d"
, device_total_in);
- logger(LOG_DEBUG, " total bytes out: %10
d"
, device_total_out);
+ logger(LOG_DEBUG, " total bytes in: %10
"PRIu64
, device_total_in);
+ logger(LOG_DEBUG, " total bytes out: %10
"PRIu64
, device_total_out);
}
}
diff --git
a/src/linux/device.c
b/src/linux/device.c
index 6363b126c3d9c4643ff5da7ccfd2d80ebc8c1c81..6c828c01d84f1909ab15ae8093a7ab56c7f71e9e 100644
(file)
--- a/
src/linux/device.c
+++ b/
src/linux/device.c
@@
-47,8
+47,8
@@
char *iface = NULL;
static char ifrname[IFNAMSIZ];
static char *device_info;
static char ifrname[IFNAMSIZ];
static char *device_info;
-static
in
t device_total_in = 0;
-static
in
t device_total_out = 0;
+static
uint64_
t device_total_in = 0;
+static
uint64_
t device_total_out = 0;
bool setup_device(void) {
struct ifreq ifr;
bool setup_device(void) {
struct ifreq ifr;
@@
-205,6
+205,6
@@
bool write_packet(vpn_packet_t *packet) {
void dump_device_stats(void) {
logger(LOG_DEBUG, "Statistics for %s %s:", device_info, device);
void dump_device_stats(void) {
logger(LOG_DEBUG, "Statistics for %s %s:", device_info, device);
- logger(LOG_DEBUG, " total bytes in: %10
d"
, device_total_in);
- logger(LOG_DEBUG, " total bytes out: %10
d"
, device_total_out);
+ logger(LOG_DEBUG, " total bytes in: %10
"PRIu64
, device_total_in);
+ logger(LOG_DEBUG, " total bytes out: %10
"PRIu64
, device_total_out);
}
}
diff --git
a/src/mingw/device.c
b/src/mingw/device.c
index c0f5d296a18c56c7b5b82af43a6be06bb462ae4e..cbaa19e51d2296a3243ee1b1bebbb92ac467e52f 100644
(file)
--- a/
src/mingw/device.c
+++ b/
src/mingw/device.c
@@
-38,8
+38,8
@@
char *device = NULL;
char *iface = NULL;
static char *device_info = NULL;
char *iface = NULL;
static char *device_info = NULL;
-static
in
t device_total_in = 0;
-static
in
t device_total_out = 0;
+static
uint64_
t device_total_in = 0;
+static
uint64_
t device_total_out = 0;
extern char *myport;
extern char *myport;
@@
-247,6
+247,6
@@
bool write_packet(vpn_packet_t *packet) {
void dump_device_stats(void) {
logger(LOG_DEBUG, "Statistics for %s %s:", device_info, device);
void dump_device_stats(void) {
logger(LOG_DEBUG, "Statistics for %s %s:", device_info, device);
- logger(LOG_DEBUG, " total bytes in: %10
d"
, device_total_in);
- logger(LOG_DEBUG, " total bytes out: %10
d"
, device_total_out);
+ logger(LOG_DEBUG, " total bytes in: %10
"PRIu64
, device_total_in);
+ logger(LOG_DEBUG, " total bytes out: %10
"PRIu64
, device_total_out);
}
}
diff --git
a/src/raw_socket/device.c
b/src/raw_socket/device.c
index 30bb1845cc2b5bbe4c719ad12b95eab0f4b773c6..f68e461973f6159085d19f5e917d9566e05e7a78 100644
(file)
--- a/
src/raw_socket/device.c
+++ b/
src/raw_socket/device.c
@@
-35,8
+35,8
@@
char *iface = NULL;
static char ifrname[IFNAMSIZ];
static char *device_info;
static char ifrname[IFNAMSIZ];
static char *device_info;
-static
in
t device_total_in = 0;
-static
in
t device_total_out = 0;
+static
uint64_
t device_total_in = 0;
+static
uint64_
t device_total_out = 0;
bool setup_device(void) {
struct ifreq ifr;
bool setup_device(void) {
struct ifreq ifr;
@@
-123,6
+123,6
@@
bool write_packet(vpn_packet_t *packet) {
void dump_device_stats(void) {
logger(LOG_DEBUG, "Statistics for %s %s:", device_info, device);
void dump_device_stats(void) {
logger(LOG_DEBUG, "Statistics for %s %s:", device_info, device);
- logger(LOG_DEBUG, " total bytes in: %10
d"
, device_total_in);
- logger(LOG_DEBUG, " total bytes out: %10
d"
, device_total_out);
+ logger(LOG_DEBUG, " total bytes in: %10
"PRIu64
, device_total_in);
+ logger(LOG_DEBUG, " total bytes out: %10
"PRIu64
, device_total_out);
}
}
diff --git
a/src/solaris/device.c
b/src/solaris/device.c
index e26dc06c4d8ed84bcdc959692d8083ac9b8bf08e..9018c31a0811011ee661aafb88b32846019e3a08 100644
(file)
--- a/
src/solaris/device.c
+++ b/
src/solaris/device.c
@@
-38,8
+38,8
@@
char *device = NULL;
char *iface = NULL;
static char *device_info = NULL;
char *iface = NULL;
static char *device_info = NULL;
-static
in
t device_total_in = 0;
-static
in
t device_total_out = 0;
+static
uint64_
t device_total_in = 0;
+static
uint64_
t device_total_out = 0;
bool setup_device(void) {
int ip_fd = -1, if_fd = -1;
bool setup_device(void) {
int ip_fd = -1, if_fd = -1;
@@
-163,6
+163,6
@@
bool write_packet(vpn_packet_t *packet) {
void dump_device_stats(void) {
logger(LOG_DEBUG, "Statistics for %s %s:", device_info, device);
void dump_device_stats(void) {
logger(LOG_DEBUG, "Statistics for %s %s:", device_info, device);
- logger(LOG_DEBUG, " total bytes in: %10
d"
, device_total_in);
- logger(LOG_DEBUG, " total bytes out: %10
d"
, device_total_out);
+ logger(LOG_DEBUG, " total bytes in: %10
"PRIu64
, device_total_in);
+ logger(LOG_DEBUG, " total bytes out: %10
"PRIu64
, device_total_out);
}
}
diff --git
a/src/uml_socket/device.c
b/src/uml_socket/device.c
index 3523f6471f277521cfd3966d144ef4e0f3bae5f6..59551b4f51b1d94a4d15c69d24dbb6babc8710cf 100644
(file)
--- a/
src/uml_socket/device.c
+++ b/
src/uml_socket/device.c
@@
-41,8
+41,8
@@
static char *device_info;
extern char *identname;
extern bool running;
extern char *identname;
extern bool running;
-static
in
t device_total_in = 0;
-static
in
t device_total_out = 0;
+static
uint64_
t device_total_in = 0;
+static
uint64_
t device_total_out = 0;
enum request_type { REQ_NEW_CONTROL };
enum request_type { REQ_NEW_CONTROL };
@@
-272,6
+272,6
@@
bool write_packet(vpn_packet_t *packet) {
void dump_device_stats(void) {
logger(LOG_DEBUG, "Statistics for %s %s:", device_info, device);
void dump_device_stats(void) {
logger(LOG_DEBUG, "Statistics for %s %s:", device_info, device);
- logger(LOG_DEBUG, " total bytes in: %10
d"
, device_total_in);
- logger(LOG_DEBUG, " total bytes out: %10
d"
, device_total_out);
+ logger(LOG_DEBUG, " total bytes in: %10
"PRIu64
, device_total_in);
+ logger(LOG_DEBUG, " total bytes out: %10
"PRIu64
, device_total_out);
}
}