projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update documentation to match tincctl changes
[tinc]
/
src
/
solaris
/
device.c
diff --git
a/src/solaris/device.c
b/src/solaris/device.c
index
4a57885
..
25f66f3
100644
(file)
--- a/
src/solaris/device.c
+++ b/
src/solaris/device.c
@@
-1,7
+1,7
@@
/*
device.c -- Interaction with Solaris tun device
/*
device.c -- Interaction with Solaris tun device
- Copyright (C) 2001-2005 Ivo Timmermans
<ivo@tinc-vpn.org>
,
- 2001-200
5
Guus Sliepen <guus@tinc-vpn.org>
+ Copyright (C) 2001-2005 Ivo Timmermans,
+ 2001-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
@@
-42,8
+42,7
@@
char *device_info = NULL;
static int device_total_in = 0;
static int device_total_out = 0;
static int device_total_in = 0;
static int device_total_out = 0;
-bool setup_device(void)
-{
+bool setup_device(void) {
int ip_fd = -1, if_fd = -1;
int ppa;
char *ptr;
int ip_fd = -1, if_fd = -1;
int ppa;
char *ptr;
@@
-108,20
+107,18
@@
bool setup_device(void)
return true;
}
return true;
}
-void close_device(void)
-{
+void close_device(void) {
cp();
close(device_fd);
}
cp();
close(device_fd);
}
-bool read_packet(vpn_packet_t *packet)
-{
- int lenin;
+bool read_packet(vpn_packet_t *packet) {
+ int inlen;
cp();
cp();
- if((
leni
n = read(device_fd, packet->data + 14, MTU - 14)) <= 0) {
+ if((
inle
n = read(device_fd, packet->data + 14, MTU - 14)) <= 0) {
logger(LOG_ERR, _("Error while reading from %s %s: %s"), device_info,
device, strerror(errno));
return false;
logger(LOG_ERR, _("Error while reading from %s %s: %s"), device_info,
device, strerror(errno));
return false;
@@
-143,7
+140,7
@@
bool read_packet(vpn_packet_t *packet)
return false;
}
return false;
}
- packet->len =
leni
n + 14;
+ packet->len =
inle
n + 14;
device_total_in += packet->len;
device_total_in += packet->len;
@@
-153,8
+150,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) {
cp();
ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Writing packet of %d bytes to %s"),
cp();
ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Writing packet of %d bytes to %s"),
@@
-171,8
+167,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);