projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into 1.1
[tinc]
/
src
/
solaris
/
device.c
diff --git
a/src/solaris/device.c
b/src/solaris/device.c
index
748b545
..
295a2f8
100644
(file)
--- a/
src/solaris/device.c
+++ b/
src/solaris/device.c
@@
-43,8
+43,7
@@
static 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;
@@
-109,8
+108,7
@@
bool setup_device(void)
return true;
}
return true;
}
-void close_device(void)
-{
+void close_device(void) {
cp();
close(device_fd);
cp();
close(device_fd);
@@
-119,13
+117,12
@@
void close_device(void)
free(iface);
}
free(iface);
}
-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;
@@
-147,7
+144,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;
@@
-157,8
+154,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"),
@@
-175,8
+171,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);