From c23fcf555ee4b69f03b76a0ffb731c3a475a77e7 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Thu, 24 Sep 2009 23:29:46 +0200 Subject: [PATCH 1/9] Update copyright information. - Update year numbers in copyright headers. - Add copyright information for Michael Tokarev and Florian Forster to the copyright headers of files to which they have contributed significantly. - Mention Michael and Florian in AUTHORS. - Mention that tinc is GPLv3 or later if compiled with the --enable-tunemu flag. --- AUTHORS | 11 +++++++++-- COPYING.README | 11 +++++++---- doc/tincd.8.in | 2 +- have.h | 2 +- lib/dropin.c | 2 +- lib/dropin.h | 2 +- lib/utils.c | 2 +- lib/utils.h | 2 +- src/connection.c | 2 +- src/connection.h | 2 +- src/meta.c | 2 +- src/net_socket.c | 1 + src/netutl.c | 2 +- src/netutl.h | 2 +- src/process.c | 2 +- src/protocol.c | 2 +- src/protocol.h | 2 +- src/protocol_edge.c | 3 ++- src/protocol_misc.c | 2 +- src/protocol_subnet.c | 1 + src/tincd.c | 1 + 21 files changed, 36 insertions(+), 22 deletions(-) diff --git a/AUTHORS b/AUTHORS index e822cb9a..15691192 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,11 +1,18 @@ Main tinc authors: -Guus Sliepen -Ivo Timmermans (inactive) +- Guus Sliepen +- Ivo Timmermans (inactive) + +Significant contributions from: +- Michael Tokarev +- Florian Forster These files are from other sources: * lib/pidfile.h and lib/pidfile.c are by Martin Schulze, taken from the syslog 1.3 sources. +* src/bsd/tunemu.c and tunemu.h are by Friedrich Schöller + + Also some of the macro files in the directory m4, and their accompanying files in lib, were taken from GNU fileutils. diff --git a/COPYING.README b/COPYING.README index 26b4b1db..efeb98c0 100644 --- a/COPYING.README +++ b/COPYING.README @@ -7,8 +7,11 @@ of the GPL are met. The following applies to the LZO library: -Hereby I grant a special exception to the tinc VPN project -(http://tinc.nl.linux.org/) to link the LZO library with the OpenSSL library -(http://www.openssl.org). + Hereby I grant a special exception to the tinc VPN project + (http://tinc.nl.linux.org/) to link the LZO library with the OpenSSL library + (http://www.openssl.org). -Markus F.X.J. Oberhumer + Markus F.X.J. Oberhumer + +When tinc is compiled with the --enable-tunemu option, the resulting binary +falls under the GPL version 3 or later. diff --git a/doc/tincd.8.in b/doc/tincd.8.in index 7e168fd0..358e9701 100644 --- a/doc/tincd.8.in +++ b/doc/tincd.8.in @@ -1,4 +1,4 @@ -.Dd 2002-03-25 +.Dd 2009-05-18 .Dt TINCD 8 .\" Manual page created by: .\" Ivo Timmermans diff --git a/have.h b/have.h index 7e2930dc..39a4dd48 100644 --- a/have.h +++ b/have.h @@ -1,7 +1,7 @@ /* have.h -- include headers which are known to exist Copyright (C) 1998-2005 Ivo Timmermans - 2003-2006 Guus Sliepen + 2003-2009 Guus Sliepen 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 diff --git a/lib/dropin.c b/lib/dropin.c index 1c2592df..a169cf6a 100644 --- a/lib/dropin.c +++ b/lib/dropin.c @@ -1,7 +1,7 @@ /* dropin.c -- a set of drop-in replacements for libc functions Copyright (C) 2000-2005 Ivo Timmermans, - 2000-2006 Guus Sliepen + 2000-2009 Guus Sliepen 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 diff --git a/lib/dropin.h b/lib/dropin.h index 8c2e94a3..d1064857 100644 --- a/lib/dropin.h +++ b/lib/dropin.h @@ -1,7 +1,7 @@ /* dropin.h -- header file for dropin.c Copyright (C) 2000-2005 Ivo Timmermans, - 2000-2006 Guus Sliepen + 2000-2009 Guus Sliepen 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 diff --git a/lib/utils.c b/lib/utils.c index 02b7b344..d7552ce0 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -1,7 +1,7 @@ /* utils.c -- gathering of some stupid small functions Copyright (C) 1999-2005 Ivo Timmermans - 2000-2006 Guus Sliepen + 2000-2009 Guus Sliepen 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 diff --git a/lib/utils.h b/lib/utils.h index ce726482..4f1291fd 100644 --- a/lib/utils.h +++ b/lib/utils.h @@ -1,7 +1,7 @@ /* utils.h -- header file for utils.c Copyright (C) 1999-2005 Ivo Timmermans - 2000-2006 Guus Sliepen + 2000-2009 Guus Sliepen 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 diff --git a/src/connection.c b/src/connection.c index 283ebd71..6d77cb56 100644 --- a/src/connection.c +++ b/src/connection.c @@ -1,6 +1,6 @@ /* connection.c -- connection list management - Copyright (C) 2000-2007 Guus Sliepen , + Copyright (C) 2000-2009 Guus Sliepen , 2000-2005 Ivo Timmermans This program is free software; you can redistribute it and/or modify diff --git a/src/connection.h b/src/connection.h index 8948d4fa..5ad7fcb9 100644 --- a/src/connection.h +++ b/src/connection.h @@ -1,6 +1,6 @@ /* connection.h -- header for connection.c - Copyright (C) 2000-2006 Guus Sliepen , + Copyright (C) 2000-2009 Guus Sliepen , 2000-2005 Ivo Timmermans This program is free software; you can redistribute it and/or modify diff --git a/src/meta.c b/src/meta.c index b59f15b0..91ebf01d 100644 --- a/src/meta.c +++ b/src/meta.c @@ -1,6 +1,6 @@ /* meta.c -- handle the meta communication - Copyright (C) 2000-2006 Guus Sliepen , + Copyright (C) 2000-2009 Guus Sliepen , 2000-2005 Ivo Timmermans This program is free software; you can redistribute it and/or modify diff --git a/src/net_socket.c b/src/net_socket.c index 8df9f380..f60f2f11 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -2,6 +2,7 @@ net_socket.c -- Handle various kinds of sockets. Copyright (C) 1998-2005 Ivo Timmermans, 2000-2009 Guus Sliepen + 2009 Florian Forster 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 diff --git a/src/netutl.c b/src/netutl.c index 909441e1..757bc5d8 100644 --- a/src/netutl.c +++ b/src/netutl.c @@ -1,7 +1,7 @@ /* netutl.c -- some supporting network utility code Copyright (C) 1998-2005 Ivo Timmermans - 2000-2006 Guus Sliepen + 2000-2009 Guus Sliepen 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 diff --git a/src/netutl.h b/src/netutl.h index aa2a173b..dc1fec6a 100644 --- a/src/netutl.h +++ b/src/netutl.h @@ -1,7 +1,7 @@ /* netutl.h -- header file for netutl.c Copyright (C) 1998-2005 Ivo Timmermans - 2000-2006 Guus Sliepen + 2000-2009 Guus Sliepen 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 diff --git a/src/process.c b/src/process.c index 544c2242..2ca93008 100644 --- a/src/process.c +++ b/src/process.c @@ -1,7 +1,7 @@ /* process.c -- process management functions Copyright (C) 1999-2005 Ivo Timmermans, - 2000-2007 Guus Sliepen + 2000-2009 Guus Sliepen 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 diff --git a/src/protocol.c b/src/protocol.c index 85133954..22c5f9c1 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -1,7 +1,7 @@ /* protocol.c -- handle the meta-protocol, basic functions Copyright (C) 1999-2005 Ivo Timmermans, - 2000-2006 Guus Sliepen + 2000-2009 Guus Sliepen 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 diff --git a/src/protocol.h b/src/protocol.h index ac86198e..6bac7110 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -1,7 +1,7 @@ /* protocol.h -- header for protocol.c Copyright (C) 1999-2005 Ivo Timmermans, - 2000-2006 Guus Sliepen + 2000-2009 Guus Sliepen 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 diff --git a/src/protocol_edge.c b/src/protocol_edge.c index 4066a30d..571304ac 100644 --- a/src/protocol_edge.c +++ b/src/protocol_edge.c @@ -1,7 +1,8 @@ /* protocol_edge.c -- handle the meta-protocol, edges Copyright (C) 1999-2005 Ivo Timmermans, - 2000-2006 Guus Sliepen + 2000-2009 Guus Sliepen + 2009 Michael Tokarev 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 diff --git a/src/protocol_misc.c b/src/protocol_misc.c index 18ff13c8..309deffd 100644 --- a/src/protocol_misc.c +++ b/src/protocol_misc.c @@ -1,7 +1,7 @@ /* protocol_misc.c -- handle the meta-protocol, miscellaneous functions Copyright (C) 1999-2005 Ivo Timmermans, - 2000-2006 Guus Sliepen + 2000-2009 Guus Sliepen 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 diff --git a/src/protocol_subnet.c b/src/protocol_subnet.c index b50cf6a3..eef7e374 100644 --- a/src/protocol_subnet.c +++ b/src/protocol_subnet.c @@ -2,6 +2,7 @@ protocol_subnet.c -- handle the meta-protocol, subnets Copyright (C) 1999-2005 Ivo Timmermans, 2000-2009 Guus Sliepen + 2009 Michael Tokarev 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 diff --git a/src/tincd.c b/src/tincd.c index 602f18b1..b0ac6f65 100644 --- a/src/tincd.c +++ b/src/tincd.c @@ -2,6 +2,7 @@ tincd.c -- the main file for tincd Copyright (C) 1998-2005 Ivo Timmermans 2000-2009 Guus Sliepen + 2009 Michael Tokarev 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 From c217d214f4f071c235bc7c463a1da6124e2570a6 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Thu, 24 Sep 2009 23:39:16 +0200 Subject: [PATCH 2/9] Remove all occurences of $Id$. --- configure.in | 2 -- doc/CONNECTIVITY | 2 -- doc/NETWORKING | 2 -- doc/PROTOCOL | 3 --- doc/SECURITY2 | 2 -- doc/tinc.texi | 5 ----- lib/Makefile.am | 1 - lib/avl_tree.c | 2 -- lib/avl_tree.h | 2 -- lib/dropin.c | 2 -- lib/dropin.h | 2 -- lib/ethernet.h | 2 -- lib/fake-gai-errnos.h | 2 -- lib/fake-getaddrinfo.h | 2 -- lib/fake-getnameinfo.h | 2 -- lib/ipv4.h | 2 -- lib/ipv6.h | 2 -- lib/list.c | 2 -- lib/list.h | 2 -- lib/splay_tree.c | 2 -- lib/splay_tree.h | 2 -- src/Makefile.am | 1 - src/bsd/device.c | 2 -- src/conf.c | 2 -- src/conf.h | 2 -- src/connection.c | 2 -- src/connection.h | 2 -- src/cygwin/device.c | 2 -- src/device.h | 2 -- src/edge.c | 2 -- src/edge.h | 2 -- src/event.c | 2 -- src/event.h | 2 -- src/graph.c | 2 -- src/graph.h | 2 -- src/linux/device.c | 2 -- src/logger.c | 2 -- src/meta.c | 2 -- src/meta.h | 2 -- src/mingw/device.c | 2 -- src/net.c | 2 -- src/net.h | 2 -- src/net_packet.c | 2 -- src/net_setup.c | 2 -- src/net_socket.c | 2 -- src/netutl.c | 2 -- src/netutl.h | 2 -- src/node.c | 2 -- src/node.h | 2 -- src/process.c | 2 -- src/process.h | 2 -- src/protocol.c | 2 -- src/protocol.h | 2 -- src/protocol_auth.c | 2 -- src/protocol_edge.c | 2 -- src/protocol_key.c | 2 -- src/protocol_misc.c | 2 -- src/protocol_subnet.c | 2 -- src/raw_socket/device.c | 2 -- src/route.c | 2 -- src/route.h | 2 -- src/solaris/device.c | 2 -- src/subnet.c | 2 -- src/subnet.h | 2 -- src/tincd.c | 2 -- src/uml_socket/device.c | 2 -- 66 files changed, 134 deletions(-) diff --git a/configure.in b/configure.in index 1ff36b3f..67715862 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -dnl $Id$ - AC_PREREQ(2.61) AC_INIT AC_CONFIG_SRCDIR([src/tincd.c]) diff --git a/doc/CONNECTIVITY b/doc/CONNECTIVITY index 67004d49..bf31451e 100644 --- a/doc/CONNECTIVITY +++ b/doc/CONNECTIVITY @@ -12,8 +12,6 @@ maintain a stable network. provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. - $Id$ - 1. Synchronisation ================== diff --git a/doc/NETWORKING b/doc/NETWORKING index e6e50776..5cb4b69e 100644 --- a/doc/NETWORKING +++ b/doc/NETWORKING @@ -12,8 +12,6 @@ Network daemon. provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. - $Id$ - 1. Packet flow ============== diff --git a/doc/PROTOCOL b/doc/PROTOCOL index 74741e7c..b8d37ed9 100644 --- a/doc/PROTOCOL +++ b/doc/PROTOCOL @@ -12,9 +12,6 @@ This is the protocol documentation for tinc, a Virtual Private Network daemon. provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. - $Id$ - - 1. Protocols used in tinc ------------------------- diff --git a/doc/SECURITY2 b/doc/SECURITY2 index dfa45405..62d6a07c 100644 --- a/doc/SECURITY2 +++ b/doc/SECURITY2 @@ -12,8 +12,6 @@ This is the security documentation for tinc, a Virtual Private Network daemon. provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. - $Id$ - Proposed new authentication scheme ---------------------------------- diff --git a/doc/tinc.texi b/doc/tinc.texi index 5cd4a400..e07e49ed 100644 --- a/doc/tinc.texi +++ b/doc/tinc.texi @@ -1,5 +1,4 @@ \input texinfo @c -*-texinfo-*- -@c $Id$ @c %**start of header @setfilename tinc.info @settitle tinc Manual @@ -20,8 +19,6 @@ Copyright @copyright{} 1998-2009 Ivo Timmermans, Guus Sliepen and Wessel Dankers . -$Id$ - Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. @@ -47,8 +44,6 @@ Copyright @copyright{} 1998-2009 Ivo Timmermans, Guus Sliepen and Wessel Dankers . -$Id$ - Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. diff --git a/lib/Makefile.am b/lib/Makefile.am index 57436fd5..3bf58a78 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,5 +1,4 @@ ## Process this file with automake to produce Makefile.in -# $Id$ noinst_LIBRARIES = libvpn.a diff --git a/lib/avl_tree.c b/lib/avl_tree.c index 3bfdfeee..8bb06cbf 100644 --- a/lib/avl_tree.c +++ b/lib/avl_tree.c @@ -28,8 +28,6 @@ Cleaned up and incorporated some of the ideas from the red-black tree library for inclusion into tinc (http://www.tinc-vpn.org/) by Guus Sliepen . - - $Id$ */ #include "system.h" diff --git a/lib/avl_tree.h b/lib/avl_tree.h index 3ad0751f..0494e499 100644 --- a/lib/avl_tree.h +++ b/lib/avl_tree.h @@ -28,8 +28,6 @@ Cleaned up and incorporated some of the ideas from the red-black tree library for inclusion into tinc (http://www.tinc-vpn.org/) by Guus Sliepen . - - $Id$ */ diff --git a/lib/dropin.c b/lib/dropin.c index a169cf6a..0a665ccc 100644 --- a/lib/dropin.c +++ b/lib/dropin.c @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" diff --git a/lib/dropin.h b/lib/dropin.h index d1064857..332a70df 100644 --- a/lib/dropin.h +++ b/lib/dropin.h @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #ifndef __DROPIN_H__ diff --git a/lib/ethernet.h b/lib/ethernet.h index 42bee4c5..1cde1407 100644 --- a/lib/ethernet.h +++ b/lib/ethernet.h @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #ifndef __TINC_ETHERNET_H__ diff --git a/lib/fake-gai-errnos.h b/lib/fake-gai-errnos.h index c4213cfd..4ffabb69 100644 --- a/lib/fake-gai-errnos.h +++ b/lib/fake-gai-errnos.h @@ -5,8 +5,6 @@ * See getaddrinfo.c and getnameinfo.c. */ -/* $Id$ */ - /* for old netdb.h */ #ifndef EAI_NODATA #define EAI_NODATA 1 diff --git a/lib/fake-getaddrinfo.h b/lib/fake-getaddrinfo.h index d31a89a1..5af74918 100644 --- a/lib/fake-getaddrinfo.h +++ b/lib/fake-getaddrinfo.h @@ -1,5 +1,3 @@ -/* $Id$ */ - #ifndef _FAKE_GETADDRINFO_H #define _FAKE_GETADDRINFO_H diff --git a/lib/fake-getnameinfo.h b/lib/fake-getnameinfo.h index 02ac77a1..4389a8fe 100644 --- a/lib/fake-getnameinfo.h +++ b/lib/fake-getnameinfo.h @@ -1,5 +1,3 @@ -/* $Id$ */ - #ifndef _FAKE_GETNAMEINFO_H #define _FAKE_GETNAMEINFO_H diff --git a/lib/ipv4.h b/lib/ipv4.h index dd4a8b96..704dd064 100644 --- a/lib/ipv4.h +++ b/lib/ipv4.h @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #ifndef __TINC_IPV4_H__ diff --git a/lib/ipv6.h b/lib/ipv6.h index 9fc93b39..0c1544b8 100644 --- a/lib/ipv6.h +++ b/lib/ipv6.h @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #ifndef __TINC_IPV6_H__ diff --git a/lib/list.c b/lib/list.c index 2f9f611d..e627650f 100644 --- a/lib/list.c +++ b/lib/list.c @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" diff --git a/lib/list.h b/lib/list.h index 21785672..0e9ffd7c 100644 --- a/lib/list.h +++ b/lib/list.h @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #ifndef __TINC_LIST_H__ diff --git a/lib/splay_tree.c b/lib/splay_tree.c index 62e9e316..97abecc2 100644 --- a/lib/splay_tree.c +++ b/lib/splay_tree.c @@ -15,8 +15,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id: splay_tree.c 1374 2004-03-21 14:21:22Z guus $ */ #include "system.h" diff --git a/lib/splay_tree.h b/lib/splay_tree.h index 9c3b1cf0..8c16b00f 100644 --- a/lib/splay_tree.h +++ b/lib/splay_tree.h @@ -15,8 +15,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id: splay_tree.h 1374 2004-03-21 14:21:22Z guus $ */ diff --git a/src/Makefile.am b/src/Makefile.am index 501fdf66..1a0554d4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,5 +1,4 @@ ## Produce this file with automake to get Makefile.in -# $Id: Makefile.am,v 1.4.4.33 2003/08/02 15:13:08 guus Exp $ sbin_PROGRAMS = tincd diff --git a/src/bsd/device.c b/src/bsd/device.c index fe85d10f..bbd7c00e 100644 --- a/src/bsd/device.c +++ b/src/bsd/device.c @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id: device.c 1398 2004-11-01 15:18:53Z guus $ */ #include "system.h" diff --git a/src/conf.c b/src/conf.c index d8a8d832..8af2c6a2 100644 --- a/src/conf.c +++ b/src/conf.c @@ -18,8 +18,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" diff --git a/src/conf.h b/src/conf.h index d1eae978..c1afc47b 100644 --- a/src/conf.h +++ b/src/conf.h @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #ifndef __TINC_CONF_H__ diff --git a/src/connection.c b/src/connection.c index 6d77cb56..07960940 100644 --- a/src/connection.c +++ b/src/connection.c @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" diff --git a/src/connection.h b/src/connection.h index 5ad7fcb9..e262846c 100644 --- a/src/connection.h +++ b/src/connection.h @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #ifndef __TINC_CONNECTION_H__ diff --git a/src/cygwin/device.c b/src/cygwin/device.c index c6e6f353..868a8ae6 100644 --- a/src/cygwin/device.c +++ b/src/cygwin/device.c @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" diff --git a/src/device.h b/src/device.h index b88caf60..c1435a69 100644 --- a/src/device.h +++ b/src/device.h @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #ifndef __TINC_DEVICE_H__ diff --git a/src/edge.c b/src/edge.c index 99ec1415..0943dd00 100644 --- a/src/edge.c +++ b/src/edge.c @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" diff --git a/src/edge.h b/src/edge.h index 83759203..744a95b3 100644 --- a/src/edge.h +++ b/src/edge.h @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #ifndef __TINC_EDGE_H__ diff --git a/src/event.c b/src/event.c index 5fee783d..bd9bfa28 100644 --- a/src/event.c +++ b/src/event.c @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" diff --git a/src/event.h b/src/event.h index 7c1873d3..b2dc61f8 100644 --- a/src/event.h +++ b/src/event.h @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #ifndef __TINC_EVENT_H__ diff --git a/src/graph.c b/src/graph.c index a267f052..f7054eee 100644 --- a/src/graph.c +++ b/src/graph.c @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ /* We need to generate two trees from the graph: diff --git a/src/graph.h b/src/graph.h index 0d5be20c..a701f489 100644 --- a/src/graph.h +++ b/src/graph.h @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #ifndef __TINC_GRAPH_H__ diff --git a/src/linux/device.c b/src/linux/device.c index 4e9591c2..802a1861 100644 --- a/src/linux/device.c +++ b/src/linux/device.c @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" diff --git a/src/logger.c b/src/logger.c index 8e73a6d3..9d7f08ae 100644 --- a/src/logger.c +++ b/src/logger.c @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" diff --git a/src/meta.c b/src/meta.c index 91ebf01d..9d5358e5 100644 --- a/src/meta.c +++ b/src/meta.c @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" diff --git a/src/meta.h b/src/meta.h index 192bf24c..552d0faa 100644 --- a/src/meta.h +++ b/src/meta.h @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #ifndef __TINC_META_H__ diff --git a/src/mingw/device.c b/src/mingw/device.c index fa134332..db3f5a65 100644 --- a/src/mingw/device.c +++ b/src/mingw/device.c @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" diff --git a/src/net.c b/src/net.c index 82b0ede1..2e67de60 100644 --- a/src/net.c +++ b/src/net.c @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" diff --git a/src/net.h b/src/net.h index ff32b73c..31375fd3 100644 --- a/src/net.h +++ b/src/net.h @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #ifndef __TINC_NET_H__ diff --git a/src/net_packet.c b/src/net_packet.c index aca84683..ee3026a6 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" diff --git a/src/net_setup.c b/src/net_setup.c index 3c4bf48c..ce84c80f 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" diff --git a/src/net_socket.c b/src/net_socket.c index f60f2f11..e5a030d2 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -17,8 +17,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" diff --git a/src/netutl.c b/src/netutl.c index 757bc5d8..84596732 100644 --- a/src/netutl.c +++ b/src/netutl.c @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" diff --git a/src/netutl.h b/src/netutl.h index dc1fec6a..6b280ad7 100644 --- a/src/netutl.h +++ b/src/netutl.h @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #ifndef __TINC_NETUTL_H__ diff --git a/src/node.c b/src/node.c index 4fbec08f..b55c7317 100644 --- a/src/node.c +++ b/src/node.c @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" diff --git a/src/node.h b/src/node.h index 528716de..6a8e6413 100644 --- a/src/node.h +++ b/src/node.h @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #ifndef __TINC_NODE_H__ diff --git a/src/process.c b/src/process.c index 2ca93008..f7735988 100644 --- a/src/process.c +++ b/src/process.c @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" diff --git a/src/process.h b/src/process.h index 5f2579f6..7333ac27 100644 --- a/src/process.h +++ b/src/process.h @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #ifndef __TINC_PROCESS_H__ diff --git a/src/protocol.c b/src/protocol.c index 22c5f9c1..45567d20 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" diff --git a/src/protocol.h b/src/protocol.h index 6bac7110..26de2a59 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #ifndef __TINC_PROTOCOL_H__ diff --git a/src/protocol_auth.c b/src/protocol_auth.c index 48166105..ee73e6b5 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" diff --git a/src/protocol_edge.c b/src/protocol_edge.c index 571304ac..0ae0acf9 100644 --- a/src/protocol_edge.c +++ b/src/protocol_edge.c @@ -17,8 +17,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" diff --git a/src/protocol_key.c b/src/protocol_key.c index 7ae98036..0d9e7863 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" diff --git a/src/protocol_misc.c b/src/protocol_misc.c index 309deffd..e1496294 100644 --- a/src/protocol_misc.c +++ b/src/protocol_misc.c @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" diff --git a/src/protocol_subnet.c b/src/protocol_subnet.c index eef7e374..a0e52f4a 100644 --- a/src/protocol_subnet.c +++ b/src/protocol_subnet.c @@ -17,8 +17,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" diff --git a/src/raw_socket/device.c b/src/raw_socket/device.c index f2a135d3..f71b6ee7 100644 --- a/src/raw_socket/device.c +++ b/src/raw_socket/device.c @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" diff --git a/src/route.c b/src/route.c index 9b689039..e0e5db0d 100644 --- a/src/route.c +++ b/src/route.c @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" diff --git a/src/route.h b/src/route.h index 807b707a..67b20903 100644 --- a/src/route.h +++ b/src/route.h @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #ifndef __TINC_ROUTE_H__ diff --git a/src/solaris/device.c b/src/solaris/device.c index f76bbbd5..961a13ca 100644 --- a/src/solaris/device.c +++ b/src/solaris/device.c @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ diff --git a/src/subnet.c b/src/subnet.c index 140b6145..baef115b 100644 --- a/src/subnet.c +++ b/src/subnet.c @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" diff --git a/src/subnet.h b/src/subnet.h index 3efed1be..a56922f1 100644 --- a/src/subnet.h +++ b/src/subnet.h @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #ifndef __TINC_SUBNET_H__ diff --git a/src/tincd.c b/src/tincd.c index b0ac6f65..4eba1f59 100644 --- a/src/tincd.c +++ b/src/tincd.c @@ -17,8 +17,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include "system.h" diff --git a/src/uml_socket/device.c b/src/uml_socket/device.c index de0b4a55..86afc39c 100644 --- a/src/uml_socket/device.c +++ b/src/uml_socket/device.c @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id: device.c 1374 2004-03-21 14:21:22Z guus $ */ #include "system.h" From 0e6856b1379e278aa5ed116d0911851339a6064c Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Thu, 24 Sep 2009 23:42:30 +0200 Subject: [PATCH 3/9] Remove Ivo's old email addresses. --- doc/tinc.texi | 2 +- lib/utils.c | 2 +- lib/utils.h | 2 +- src/device.h | 2 +- src/net.h | 2 +- src/netutl.h | 2 +- src/route.h | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/tinc.texi b/doc/tinc.texi index e07e49ed..d07958c7 100644 --- a/doc/tinc.texi +++ b/doc/tinc.texi @@ -2358,7 +2358,7 @@ and join channel #tinc. @section Authors @table @asis -@item Ivo Timmermans (zarq) (@email{ivo@@tinc-vpn.org}) +@item Ivo Timmermans (zarq) @item Guus Sliepen (guus) (@email{guus@@tinc-vpn.org}) @end table diff --git a/lib/utils.c b/lib/utils.c index d7552ce0..c5c8a9af 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -1,6 +1,6 @@ /* utils.c -- gathering of some stupid small functions - Copyright (C) 1999-2005 Ivo Timmermans + Copyright (C) 1999-2005 Ivo Timmermans 2000-2009 Guus Sliepen This program is free software; you can redistribute it and/or modify diff --git a/lib/utils.h b/lib/utils.h index 4f1291fd..a8fb86a0 100644 --- a/lib/utils.h +++ b/lib/utils.h @@ -1,6 +1,6 @@ /* utils.h -- header file for utils.c - Copyright (C) 1999-2005 Ivo Timmermans + Copyright (C) 1999-2005 Ivo Timmermans 2000-2009 Guus Sliepen This program is free software; you can redistribute it and/or modify diff --git a/src/device.h b/src/device.h index c1435a69..34a6e4d4 100644 --- a/src/device.h +++ b/src/device.h @@ -1,6 +1,6 @@ /* net.h -- generic header for device.c - Copyright (C) 2001-2005 Ivo Timmermans + Copyright (C) 2001-2005 Ivo Timmermans 2001-2006 Guus Sliepen This program is free software; you can redistribute it and/or modify diff --git a/src/net.h b/src/net.h index 31375fd3..7dd311d3 100644 --- a/src/net.h +++ b/src/net.h @@ -1,6 +1,6 @@ /* net.h -- header for net.c - Copyright (C) 1998-2005 Ivo Timmermans + Copyright (C) 1998-2005 Ivo Timmermans 2000-2009 Guus Sliepen This program is free software; you can redistribute it and/or modify diff --git a/src/netutl.h b/src/netutl.h index 6b280ad7..c94a7038 100644 --- a/src/netutl.h +++ b/src/netutl.h @@ -1,6 +1,6 @@ /* netutl.h -- header file for netutl.c - Copyright (C) 1998-2005 Ivo Timmermans + Copyright (C) 1998-2005 Ivo Timmermans 2000-2009 Guus Sliepen This program is free software; you can redistribute it and/or modify diff --git a/src/route.h b/src/route.h index 67b20903..d5868922 100644 --- a/src/route.h +++ b/src/route.h @@ -1,6 +1,6 @@ /* route.h -- header file for route.c - Copyright (C) 2000-2005 Ivo Timmermans + Copyright (C) 2000-2005 Ivo Timmermans 2000-2006 Guus Sliepen This program is free software; you can redistribute it and/or modify From ab7c61b06f6c6e991225f2fcc32d02b8e1084aee Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Fri, 25 Sep 2009 00:01:00 +0200 Subject: [PATCH 4/9] Update the address of the Free Software Foundation in all copyright headers. --- have.h | 6 +++--- lib/avl_tree.c | 6 +++--- lib/avl_tree.h | 6 +++--- lib/dropin.c | 6 +++--- lib/dropin.h | 6 +++--- lib/ethernet.h | 6 +++--- lib/getopt.c | 8 ++++---- lib/getopt.h | 8 ++++---- lib/getopt1.c | 8 ++++---- lib/gettext.h | 8 ++++---- lib/ipv4.h | 6 +++--- lib/ipv6.h | 6 +++--- lib/list.c | 6 +++--- lib/list.h | 6 +++--- lib/malloc.c | 6 +++--- lib/memcmp.c | 8 ++++---- lib/pidfile.c | 6 +++--- lib/pidfile.h | 6 +++--- lib/realloc.c | 6 +++--- lib/splay_tree.c | 6 +++--- lib/splay_tree.h | 6 +++--- lib/utils.c | 6 +++--- lib/utils.h | 6 +++--- lib/xmalloc.c | 6 +++--- src/bsd/device.c | 6 +++--- src/conf.c | 6 +++--- src/conf.h | 6 +++--- src/connection.c | 6 +++--- src/connection.h | 6 +++--- src/cygwin/device.c | 6 +++--- src/device.h | 6 +++--- src/edge.c | 6 +++--- src/edge.h | 6 +++--- src/event.c | 6 +++--- src/event.h | 6 +++--- src/graph.c | 6 +++--- src/graph.h | 6 +++--- src/linux/device.c | 6 +++--- src/logger.c | 6 +++--- src/meta.c | 6 +++--- src/meta.h | 6 +++--- src/mingw/common.h | 7 +++---- src/mingw/device.c | 6 +++--- src/net.c | 6 +++--- src/net.h | 6 +++--- src/net_packet.c | 6 +++--- src/net_setup.c | 6 +++--- src/net_socket.c | 6 +++--- src/netutl.c | 6 +++--- src/netutl.h | 6 +++--- src/node.c | 6 +++--- src/node.h | 6 +++--- src/process.c | 6 +++--- src/process.h | 6 +++--- src/protocol.c | 6 +++--- src/protocol.h | 6 +++--- src/protocol_auth.c | 6 +++--- src/protocol_edge.c | 6 +++--- src/protocol_key.c | 6 +++--- src/protocol_misc.c | 6 +++--- src/protocol_subnet.c | 6 +++--- src/raw_socket/device.c | 6 +++--- src/route.c | 6 +++--- src/route.h | 6 +++--- src/solaris/device.c | 6 +++--- src/subnet.c | 6 +++--- src/subnet.h | 6 +++--- src/tincd.c | 6 +++--- src/uml_socket/device.c | 6 +++--- system.h | 6 +++--- 70 files changed, 215 insertions(+), 216 deletions(-) diff --git a/have.h b/have.h index 39a4dd48..9a9efcb8 100644 --- a/have.h +++ b/have.h @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef __TINC_HAVE_H__ diff --git a/lib/avl_tree.c b/lib/avl_tree.c index 8bb06cbf..a8bf5d5f 100644 --- a/lib/avl_tree.c +++ b/lib/avl_tree.c @@ -15,9 +15,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Original AVL tree library by Michael H. Buselli . diff --git a/lib/avl_tree.h b/lib/avl_tree.h index 0494e499..f4429340 100644 --- a/lib/avl_tree.h +++ b/lib/avl_tree.h @@ -15,9 +15,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Original AVL tree library by Michael H. Buselli . diff --git a/lib/dropin.c b/lib/dropin.c index 0a665ccc..572617c6 100644 --- a/lib/dropin.c +++ b/lib/dropin.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/lib/dropin.h b/lib/dropin.h index 332a70df..e9d13535 100644 --- a/lib/dropin.h +++ b/lib/dropin.h @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef __DROPIN_H__ diff --git a/lib/ethernet.h b/lib/ethernet.h index 1cde1407..eef5f424 100644 --- a/lib/ethernet.h +++ b/lib/ethernet.h @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef __TINC_ETHERNET_H__ diff --git a/lib/getopt.c b/lib/getopt.c index 5e397baa..5f74dee1 100644 --- a/lib/getopt.c +++ b/lib/getopt.c @@ -19,10 +19,10 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -USA. */ +You should have received a copy of the GNU General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ /* This tells Alpha OSF/1 not to define a getopt prototype in . Ditto for AIX 3.2 and . */ diff --git a/lib/getopt.h b/lib/getopt.h index 69256fd3..ddf6fdda 100644 --- a/lib/getopt.h +++ b/lib/getopt.h @@ -14,10 +14,10 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -USA. */ +You should have received a copy of the GNU General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ #ifndef _GETOPT_H #define _GETOPT_H 1 diff --git a/lib/getopt1.c b/lib/getopt1.c index 6507ba1b..86545f2e 100644 --- a/lib/getopt1.c +++ b/lib/getopt1.c @@ -14,10 +14,10 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -USA. */ +You should have received a copy of the GNU General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ #ifdef HAVE_CONFIG_H #include diff --git a/lib/gettext.h b/lib/gettext.h index a9074031..759d81f4 100644 --- a/lib/gettext.h +++ b/lib/gettext.h @@ -11,10 +11,10 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, - USA. */ + You should have received a copy of the GNU Library Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ #ifndef _LIBGETTEXT_H #define _LIBGETTEXT_H 1 diff --git a/lib/ipv4.h b/lib/ipv4.h index 704dd064..80ab17c5 100644 --- a/lib/ipv4.h +++ b/lib/ipv4.h @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef __TINC_IPV4_H__ diff --git a/lib/ipv6.h b/lib/ipv6.h index 0c1544b8..fee74f5e 100644 --- a/lib/ipv6.h +++ b/lib/ipv6.h @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef __TINC_IPV6_H__ diff --git a/lib/list.c b/lib/list.c index e627650f..bf522809 100644 --- a/lib/list.c +++ b/lib/list.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/lib/list.h b/lib/list.h index 0e9ffd7c..197fbb8b 100644 --- a/lib/list.h +++ b/lib/list.h @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef __TINC_LIST_H__ diff --git a/lib/malloc.c b/lib/malloc.c index b859e586..2a996d44 100644 --- a/lib/malloc.c +++ b/lib/malloc.c @@ -11,9 +11,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., Foundation, + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ /* written by Jim Meyering */ diff --git a/lib/memcmp.c b/lib/memcmp.c index 12269472..9d808338 100644 --- a/lib/memcmp.c +++ b/lib/memcmp.c @@ -14,10 +14,10 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, - USA. */ + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ #ifdef HAVE_CONFIG_H # include "config.h" diff --git a/lib/pidfile.c b/lib/pidfile.c index dd6788a6..47f6359f 100644 --- a/lib/pidfile.c +++ b/lib/pidfile.c @@ -14,9 +14,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ /* left unaltered for tinc -- Ivo Timmermans */ diff --git a/lib/pidfile.h b/lib/pidfile.h index 152ae2c4..d7b970c1 100644 --- a/lib/pidfile.h +++ b/lib/pidfile.h @@ -14,9 +14,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef HAVE_MINGW diff --git a/lib/realloc.c b/lib/realloc.c index d0d3e4ab..4971b28f 100644 --- a/lib/realloc.c +++ b/lib/realloc.c @@ -11,9 +11,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., Foundation, + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ /* written by Jim Meyering */ diff --git a/lib/splay_tree.c b/lib/splay_tree.c index 97abecc2..3a792e8b 100644 --- a/lib/splay_tree.c +++ b/lib/splay_tree.c @@ -12,9 +12,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/lib/splay_tree.h b/lib/splay_tree.h index 8c16b00f..e4af0c4f 100644 --- a/lib/splay_tree.h +++ b/lib/splay_tree.h @@ -12,9 +12,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ diff --git a/lib/utils.c b/lib/utils.c index c5c8a9af..4795ed0e 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/lib/utils.h b/lib/utils.h index a8fb86a0..a94548fe 100644 --- a/lib/utils.h +++ b/lib/utils.h @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef __TINC_UTILS_H__ diff --git a/lib/xmalloc.c b/lib/xmalloc.c index 51356e46..83c57932 100644 --- a/lib/xmalloc.c +++ b/lib/xmalloc.c @@ -11,9 +11,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., Foundation, + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #if HAVE_CONFIG_H # include diff --git a/src/bsd/device.c b/src/bsd/device.c index bbd7c00e..7633a0df 100644 --- a/src/bsd/device.c +++ b/src/bsd/device.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/src/conf.c b/src/conf.c index 8af2c6a2..5058d315 100644 --- a/src/conf.c +++ b/src/conf.c @@ -15,9 +15,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/src/conf.h b/src/conf.h index c1afc47b..be497336 100644 --- a/src/conf.h +++ b/src/conf.h @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef __TINC_CONF_H__ diff --git a/src/connection.c b/src/connection.c index 07960940..a329cd7e 100644 --- a/src/connection.c +++ b/src/connection.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/src/connection.h b/src/connection.h index e262846c..24c95f4c 100644 --- a/src/connection.h +++ b/src/connection.h @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef __TINC_CONNECTION_H__ diff --git a/src/cygwin/device.c b/src/cygwin/device.c index 868a8ae6..4a7b1395 100644 --- a/src/cygwin/device.c +++ b/src/cygwin/device.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/src/device.h b/src/device.h index 34a6e4d4..5841253a 100644 --- a/src/device.h +++ b/src/device.h @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef __TINC_DEVICE_H__ diff --git a/src/edge.c b/src/edge.c index 0943dd00..9509880e 100644 --- a/src/edge.c +++ b/src/edge.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/src/edge.h b/src/edge.h index 744a95b3..dc5cf461 100644 --- a/src/edge.h +++ b/src/edge.h @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef __TINC_EDGE_H__ diff --git a/src/event.c b/src/event.c index bd9bfa28..2fb65ec0 100644 --- a/src/event.c +++ b/src/event.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/src/event.h b/src/event.h index b2dc61f8..345a5f91 100644 --- a/src/event.h +++ b/src/event.h @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef __TINC_EVENT_H__ diff --git a/src/graph.c b/src/graph.c index f7054eee..12ef8b0f 100644 --- a/src/graph.c +++ b/src/graph.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ /* We need to generate two trees from the graph: diff --git a/src/graph.h b/src/graph.h index a701f489..26006015 100644 --- a/src/graph.h +++ b/src/graph.h @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef __TINC_GRAPH_H__ diff --git a/src/linux/device.c b/src/linux/device.c index 802a1861..6d02b470 100644 --- a/src/linux/device.c +++ b/src/linux/device.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/src/logger.c b/src/logger.c index 9d7f08ae..a1cc2073 100644 --- a/src/logger.c +++ b/src/logger.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/src/meta.c b/src/meta.c index 9d5358e5..275eae35 100644 --- a/src/meta.c +++ b/src/meta.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/src/meta.h b/src/meta.h index 552d0faa..fcb09fc2 100644 --- a/src/meta.h +++ b/src/meta.h @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef __TINC_META_H__ diff --git a/src/mingw/common.h b/src/mingw/common.h index 39a83492..6e5e75ce 100644 --- a/src/mingw/common.h +++ b/src/mingw/common.h @@ -21,10 +21,9 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program (see the file COPYING included with this - * distribution); if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ //=============================================== diff --git a/src/mingw/device.c b/src/mingw/device.c index db3f5a65..7d906b78 100644 --- a/src/mingw/device.c +++ b/src/mingw/device.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/src/net.c b/src/net.c index 2e67de60..8af464b1 100644 --- a/src/net.c +++ b/src/net.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/src/net.h b/src/net.h index 7dd311d3..31438e52 100644 --- a/src/net.h +++ b/src/net.h @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef __TINC_NET_H__ diff --git a/src/net_packet.c b/src/net_packet.c index ee3026a6..426fa491 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/src/net_setup.c b/src/net_setup.c index ce84c80f..a667a676 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/src/net_socket.c b/src/net_socket.c index e5a030d2..312030b6 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -14,9 +14,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/src/netutl.c b/src/netutl.c index 84596732..84054912 100644 --- a/src/netutl.c +++ b/src/netutl.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/src/netutl.h b/src/netutl.h index c94a7038..7fc41e8a 100644 --- a/src/netutl.h +++ b/src/netutl.h @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef __TINC_NETUTL_H__ diff --git a/src/node.c b/src/node.c index b55c7317..4951007b 100644 --- a/src/node.c +++ b/src/node.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/src/node.h b/src/node.h index 6a8e6413..619baa94 100644 --- a/src/node.h +++ b/src/node.h @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef __TINC_NODE_H__ diff --git a/src/process.c b/src/process.c index f7735988..598e8561 100644 --- a/src/process.c +++ b/src/process.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/src/process.h b/src/process.h index 7333ac27..bb42cd0f 100644 --- a/src/process.h +++ b/src/process.h @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef __TINC_PROCESS_H__ diff --git a/src/protocol.c b/src/protocol.c index 45567d20..04763512 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/src/protocol.h b/src/protocol.h index 26de2a59..e611f6ed 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef __TINC_PROTOCOL_H__ diff --git a/src/protocol_auth.c b/src/protocol_auth.c index ee73e6b5..a88c36ba 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/src/protocol_edge.c b/src/protocol_edge.c index 0ae0acf9..c2a391b7 100644 --- a/src/protocol_edge.c +++ b/src/protocol_edge.c @@ -14,9 +14,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/src/protocol_key.c b/src/protocol_key.c index 0d9e7863..5370e612 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/src/protocol_misc.c b/src/protocol_misc.c index e1496294..2e610cb9 100644 --- a/src/protocol_misc.c +++ b/src/protocol_misc.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/src/protocol_subnet.c b/src/protocol_subnet.c index a0e52f4a..90c89af9 100644 --- a/src/protocol_subnet.c +++ b/src/protocol_subnet.c @@ -14,9 +14,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/src/raw_socket/device.c b/src/raw_socket/device.c index f71b6ee7..6c56ed64 100644 --- a/src/raw_socket/device.c +++ b/src/raw_socket/device.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/src/route.c b/src/route.c index e0e5db0d..a200983a 100644 --- a/src/route.c +++ b/src/route.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/src/route.h b/src/route.h index d5868922..1fcc6be7 100644 --- a/src/route.h +++ b/src/route.h @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef __TINC_ROUTE_H__ diff --git a/src/solaris/device.c b/src/solaris/device.c index 961a13ca..28c8ff7d 100644 --- a/src/solaris/device.c +++ b/src/solaris/device.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ diff --git a/src/subnet.c b/src/subnet.c index baef115b..3c7ccc53 100644 --- a/src/subnet.c +++ b/src/subnet.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/src/subnet.h b/src/subnet.h index a56922f1..c9bb10e8 100644 --- a/src/subnet.h +++ b/src/subnet.h @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef __TINC_SUBNET_H__ diff --git a/src/tincd.c b/src/tincd.c index 4eba1f59..1f364427 100644 --- a/src/tincd.c +++ b/src/tincd.c @@ -14,9 +14,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/src/uml_socket/device.c b/src/uml_socket/device.c index 86afc39c..81a4c219 100644 --- a/src/uml_socket/device.c +++ b/src/uml_socket/device.c @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "system.h" diff --git a/system.h b/system.h index a67498fb..973869a1 100644 --- a/system.h +++ b/system.h @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef __TINC_SYSTEM_H__ From 5dde6461a321ee47b06e33f8203f2acf00a31a51 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Fri, 25 Sep 2009 00:14:03 +0200 Subject: [PATCH 5/9] K&R style braces. This is essentially commit f02d3ed3e135b5326003e7f69f8331ff6a3cc219 from the 1.1 branch, making it easier to merge between master and 1.1. --- lib/dropin.c | 6 ++--- lib/list.c | 45 +++++++++++--------------------- lib/utils.c | 12 +++------ src/bsd/device.c | 6 ++--- src/conf.c | 51 ++++++++++++------------------------ src/connection.c | 27 +++++++------------ src/cygwin/device.c | 15 ++++------- src/edge.c | 36 +++++++++----------------- src/event.c | 27 +++++++------------ src/graph.c | 12 +++------ src/linux/device.c | 15 ++++------- src/meta.c | 12 +++------ src/mingw/device.c | 15 ++++------- src/net.c | 18 +++++-------- src/net_packet.c | 33 ++++++++---------------- src/net_setup.c | 15 ++++------- src/net_socket.c | 35 ++++++++++--------------- src/netutl.c | 33 ++++++++---------------- src/node.c | 36 +++++++++----------------- src/process.c | 57 ++++++++++++++--------------------------- src/protocol.c | 30 ++++++++-------------- src/protocol_auth.c | 33 ++++++++---------------- src/protocol_edge.c | 12 +++------ src/protocol_key.c | 18 +++++-------- src/protocol_misc.c | 36 +++++++++----------------- src/protocol_subnet.c | 12 +++------ src/raw_socket/device.c | 15 ++++------- src/route.c | 39 ++++++++++------------------ src/solaris/device.c | 15 ++++------- src/subnet.c | 57 ++++++++++++++--------------------------- src/tincd.c | 21 +++++---------- src/uml_socket/device.c | 15 ++++------- 32 files changed, 271 insertions(+), 538 deletions(-) diff --git a/lib/dropin.c b/lib/dropin.c index 572617c6..89039da3 100644 --- a/lib/dropin.c +++ b/lib/dropin.c @@ -36,8 +36,7 @@ Unless the argument noclose is non-zero, daemon() will redirect standard input, standard output and standard error to /dev/null. */ -int daemon(int nochdir, int noclose) -{ +int daemon(int nochdir, int noclose) { #ifdef HAVE_FORK pid_t pid; int fd; @@ -95,8 +94,7 @@ int daemon(int nochdir, int noclose) current directory name. If the environment variable PWD is set, and its value is correct, then that value will be returned. */ -char *get_current_dir_name(void) -{ +char *get_current_dir_name(void) { size_t size; char *buf; char *r; diff --git a/lib/list.c b/lib/list.c index bf522809..a26c58d6 100644 --- a/lib/list.c +++ b/lib/list.c @@ -25,8 +25,7 @@ /* (De)constructors */ -list_t *list_alloc(list_action_t delete) -{ +list_t *list_alloc(list_action_t delete) { list_t *list; list = xmalloc_and_zero(sizeof(list_t)); @@ -35,18 +34,15 @@ list_t *list_alloc(list_action_t delete) return list; } -void list_free(list_t *list) -{ +void list_free(list_t *list) { free(list); } -list_node_t *list_alloc_node(void) -{ +list_node_t *list_alloc_node(void) { return xmalloc_and_zero(sizeof(list_node_t)); } -void list_free_node(list_t *list, list_node_t *node) -{ +void list_free_node(list_t *list, list_node_t *node) { if(node->data && list->delete) list->delete(node->data); @@ -55,8 +51,7 @@ void list_free_node(list_t *list, list_node_t *node) /* Insertion and deletion */ -list_node_t *list_insert_head(list_t *list, void *data) -{ +list_node_t *list_insert_head(list_t *list, void *data) { list_node_t *node; node = list_alloc_node(); @@ -76,8 +71,7 @@ list_node_t *list_insert_head(list_t *list, void *data) return node; } -list_node_t *list_insert_tail(list_t *list, void *data) -{ +list_node_t *list_insert_tail(list_t *list, void *data) { list_node_t *node; node = list_alloc_node(); @@ -97,8 +91,7 @@ list_node_t *list_insert_tail(list_t *list, void *data) return node; } -void list_unlink_node(list_t *list, list_node_t *node) -{ +void list_unlink_node(list_t *list, list_node_t *node) { if(node->prev) node->prev->next = node->next; else @@ -112,34 +105,29 @@ void list_unlink_node(list_t *list, list_node_t *node) list->count--; } -void list_delete_node(list_t *list, list_node_t *node) -{ +void list_delete_node(list_t *list, list_node_t *node) { list_unlink_node(list, node); list_free_node(list, node); } -void list_delete_head(list_t *list) -{ +void list_delete_head(list_t *list) { list_delete_node(list, list->head); } -void list_delete_tail(list_t *list) -{ +void list_delete_tail(list_t *list) { list_delete_node(list, list->tail); } /* Head/tail lookup */ -void *list_get_head(list_t *list) -{ +void *list_get_head(list_t *list) { if(list->head) return list->head->data; else return NULL; } -void *list_get_tail(list_t *list) -{ +void *list_get_tail(list_t *list) { if(list->tail) return list->tail->data; else @@ -148,8 +136,7 @@ void *list_get_tail(list_t *list) /* Fast list deletion */ -void list_delete_list(list_t *list) -{ +void list_delete_list(list_t *list) { list_node_t *node, *next; for(node = list->head; node; node = next) { @@ -162,8 +149,7 @@ void list_delete_list(list_t *list) /* Traversing */ -void list_foreach_node(list_t *list, list_action_node_t action) -{ +void list_foreach_node(list_t *list, list_action_node_t action) { list_node_t *node, *next; for(node = list->head; node; node = next) { @@ -172,8 +158,7 @@ void list_foreach_node(list_t *list, list_action_node_t action) } } -void list_foreach(list_t *list, list_action_t action) -{ +void list_foreach(list_t *list, list_action_t action) { list_node_t *node, *next; for(node = list->head; node; node = next) { diff --git a/lib/utils.c b/lib/utils.c index 4795ed0e..b327a49f 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -31,8 +31,7 @@ volatile int cp_index = 0; const char hexadecimals[] = "0123456789ABCDEF"; -int charhex2bin(char c) -{ +int charhex2bin(char c) { if(isdigit(c)) return c - '0'; else @@ -40,15 +39,13 @@ int charhex2bin(char c) } -void hex2bin(char *src, char *dst, int length) -{ +void hex2bin(char *src, char *dst, int length) { int i; for(i = 0; i < length; i++) dst[i] = charhex2bin(src[i * 2]) * 16 + charhex2bin(src[i * 2 + 1]); } -void bin2hex(char *src, char *dst, int length) -{ +void bin2hex(char *src, char *dst, int length) { int i; for(i = length - 1; i >= 0; i--) { dst[i * 2 + 1] = hexadecimals[(unsigned char) src[i] & 15]; @@ -57,8 +54,7 @@ void bin2hex(char *src, char *dst, int length) } #ifdef ENABLE_TRACING -void cp_trace() -{ +void cp_trace() { logger(LOG_DEBUG, "Checkpoint trace: %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d...", cp_file[(cp_index + 15) % 16], cp_line[(cp_index + 15) % 16], cp_file[(cp_index + 14) % 16], cp_line[(cp_index + 14) % 16], diff --git a/src/bsd/device.c b/src/bsd/device.c index 7633a0df..5fe8dc0d 100644 --- a/src/bsd/device.c +++ b/src/bsd/device.c @@ -277,8 +277,7 @@ bool read_packet(vpn_packet_t *packet) { 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"), @@ -349,8 +348,7 @@ bool write_packet(vpn_packet_t *packet) return true; } -void dump_device_stats(void) -{ +void dump_device_stats(void) { cp(); logger(LOG_DEBUG, _("Statistics for %s %s:"), device_info, device); diff --git a/src/conf.c b/src/conf.c index 5058d315..e7703c16 100644 --- a/src/conf.c +++ b/src/conf.c @@ -36,8 +36,7 @@ int pingtimeout = 0; /* seconds to wait for response */ char *confbase = NULL; /* directory in which all config files are */ char *netname = NULL; /* name of the vpn network */ -static int config_compare(const config_t *a, const config_t *b) -{ +static int config_compare(const config_t *a, const config_t *b) { int result; result = strcasecmp(a->variable, b->variable); @@ -53,30 +52,26 @@ static int config_compare(const config_t *a, const config_t *b) return strcmp(a->file, b->file); } -void init_configuration(avl_tree_t ** config_tree) -{ +void init_configuration(avl_tree_t ** config_tree) { cp(); *config_tree = avl_alloc_tree((avl_compare_t) config_compare, (avl_action_t) free_config); } -void exit_configuration(avl_tree_t ** config_tree) -{ +void exit_configuration(avl_tree_t ** config_tree) { cp(); avl_delete_tree(*config_tree); *config_tree = NULL; } -config_t *new_config(void) -{ +config_t *new_config(void) { cp(); return xmalloc_and_zero(sizeof(config_t)); } -void free_config(config_t *cfg) -{ +void free_config(config_t *cfg) { cp(); if(cfg->variable) @@ -91,15 +86,13 @@ void free_config(config_t *cfg) free(cfg); } -void config_add(avl_tree_t *config_tree, config_t *cfg) -{ +void config_add(avl_tree_t *config_tree, config_t *cfg) { cp(); avl_insert(config_tree, cfg); } -config_t *lookup_config(avl_tree_t *config_tree, char *variable) -{ +config_t *lookup_config(avl_tree_t *config_tree, char *variable) { config_t cfg, *found; cp(); @@ -119,8 +112,7 @@ config_t *lookup_config(avl_tree_t *config_tree, char *variable) return found; } -config_t *lookup_config_next(avl_tree_t *config_tree, const config_t *cfg) -{ +config_t *lookup_config_next(avl_tree_t *config_tree, const config_t *cfg) { avl_node_t *node; config_t *found; @@ -140,8 +132,7 @@ config_t *lookup_config_next(avl_tree_t *config_tree, const config_t *cfg) return NULL; } -bool get_config_bool(const config_t *cfg, bool *result) -{ +bool get_config_bool(const config_t *cfg, bool *result) { cp(); if(!cfg) @@ -161,8 +152,7 @@ bool get_config_bool(const config_t *cfg, bool *result) return false; } -bool get_config_int(const config_t *cfg, int *result) -{ +bool get_config_int(const config_t *cfg, int *result) { cp(); if(!cfg) @@ -177,8 +167,7 @@ bool get_config_int(const config_t *cfg, int *result) return false; } -bool get_config_string(const config_t *cfg, char **result) -{ +bool get_config_string(const config_t *cfg, char **result) { cp(); if(!cfg) @@ -189,8 +178,7 @@ bool get_config_string(const config_t *cfg, char **result) return true; } -bool get_config_address(const config_t *cfg, struct addrinfo **result) -{ +bool get_config_address(const config_t *cfg, struct addrinfo **result) { struct addrinfo *ai; cp(); @@ -211,8 +199,7 @@ bool get_config_address(const config_t *cfg, struct addrinfo **result) return false; } -bool get_config_subnet(const config_t *cfg, subnet_t ** result) -{ +bool get_config_subnet(const config_t *cfg, subnet_t ** result) { subnet_t subnet = {0}; cp(); @@ -252,8 +239,7 @@ bool get_config_subnet(const config_t *cfg, subnet_t ** result) given, and buf needs to be expanded, the var pointed to by buflen will be increased. */ -static char *readline(FILE * fp, char **buf, size_t *buflen) -{ +static char *readline(FILE * fp, char **buf, size_t *buflen) { char *newline = NULL; char *p; char *line; /* The array that contains everything that has been read so far */ @@ -317,8 +303,7 @@ static char *readline(FILE * fp, char **buf, size_t *buflen) Parse a configuration file and put the results in the configuration tree starting at *base. */ -int read_config_file(avl_tree_t *config_tree, const char *fname) -{ +int read_config_file(avl_tree_t *config_tree, const char *fname) { int err = -2; /* Parse error */ FILE *fp; char *buffer, *line; @@ -408,8 +393,7 @@ int read_config_file(avl_tree_t *config_tree, const char *fname) return err; } -bool read_server_config() -{ +bool read_server_config() { char *fname; int x; @@ -427,8 +411,7 @@ bool read_server_config() return x == 0; } -FILE *ask_and_open(const char *filename, const char *what) -{ +FILE *ask_and_open(const char *filename, const char *what) { FILE *r; char *directory; char *fn; diff --git a/src/connection.c b/src/connection.c index a329cd7e..289c233b 100644 --- a/src/connection.c +++ b/src/connection.c @@ -33,13 +33,11 @@ avl_tree_t *connection_tree; /* Meta connections */ connection_t *broadcast; -static int connection_compare(const connection_t *a, const connection_t *b) -{ +static int connection_compare(const connection_t *a, const connection_t *b) { return a < b ? -1 : a == b ? 0 : 1; } -void init_connections(void) -{ +void init_connections(void) { cp(); connection_tree = avl_alloc_tree((avl_compare_t) connection_compare, (avl_action_t) free_connection); @@ -48,16 +46,14 @@ void init_connections(void) broadcast->hostname = xstrdup(_("BROADCAST")); } -void exit_connections(void) -{ +void exit_connections(void) { cp(); avl_delete_tree(connection_tree); free_connection(broadcast); } -connection_t *new_connection(void) -{ +connection_t *new_connection(void) { connection_t *c; cp(); @@ -72,8 +68,7 @@ connection_t *new_connection(void) return c; } -void free_connection(connection_t *c) -{ +void free_connection(connection_t *c) { cp(); if(c->name) @@ -116,22 +111,19 @@ void free_connection(connection_t *c) free(c); } -void connection_add(connection_t *c) -{ +void connection_add(connection_t *c) { cp(); avl_insert(connection_tree, c); } -void connection_del(connection_t *c) -{ +void connection_del(connection_t *c) { cp(); avl_delete(connection_tree, c); } -void dump_connections(void) -{ +void dump_connections(void) { avl_node_t *node; connection_t *c; @@ -149,8 +141,7 @@ void dump_connections(void) logger(LOG_DEBUG, _("End of connections.")); } -bool read_connection_config(connection_t *c) -{ +bool read_connection_config(connection_t *c) { char *fname; int x; diff --git a/src/cygwin/device.c b/src/cygwin/device.c index 4a7b1395..921205cf 100644 --- a/src/cygwin/device.c +++ b/src/cygwin/device.c @@ -44,8 +44,7 @@ static int device_total_out = 0; static pid_t reader_pid; static int sp[2]; -bool setup_device(void) -{ +bool setup_device(void) { HKEY key, key2; int i, err; @@ -216,8 +215,7 @@ bool setup_device(void) return true; } -void close_device(void) -{ +void close_device(void) { cp(); close(sp[0]); @@ -230,8 +228,7 @@ void close_device(void) free(iface); } -bool read_packet(vpn_packet_t *packet) -{ +bool read_packet(vpn_packet_t *packet) { int lenin; cp(); @@ -252,8 +249,7 @@ bool read_packet(vpn_packet_t *packet) return true; } -bool write_packet(vpn_packet_t *packet) -{ +bool write_packet(vpn_packet_t *packet) { long lenout; cp(); @@ -271,8 +267,7 @@ bool write_packet(vpn_packet_t *packet) return true; } -void dump_device_stats(void) -{ +void dump_device_stats(void) { cp(); logger(LOG_DEBUG, _("Statistics for %s %s:"), device_info, device); diff --git a/src/edge.c b/src/edge.c index 9509880e..403dfff6 100644 --- a/src/edge.c +++ b/src/edge.c @@ -30,13 +30,11 @@ avl_tree_t *edge_weight_tree; /* Tree with all edges, sorted on weight */ -static int edge_compare(const edge_t *a, const edge_t *b) -{ +static int edge_compare(const edge_t *a, const edge_t *b) { return strcmp(a->to->name, b->to->name); } -static int edge_weight_compare(const edge_t *a, const edge_t *b) -{ +static int edge_weight_compare(const edge_t *a, const edge_t *b) { int result; result = a->weight - b->weight; @@ -52,29 +50,25 @@ static int edge_weight_compare(const edge_t *a, const edge_t *b) return strcmp(a->to->name, b->to->name); } -void init_edges(void) -{ +void init_edges(void) { cp(); edge_weight_tree = avl_alloc_tree((avl_compare_t) edge_weight_compare, NULL); } -avl_tree_t *new_edge_tree(void) -{ +avl_tree_t *new_edge_tree(void) { cp(); return avl_alloc_tree((avl_compare_t) edge_compare, (avl_action_t) free_edge); } -void free_edge_tree(avl_tree_t *edge_tree) -{ +void free_edge_tree(avl_tree_t *edge_tree) { cp(); avl_delete_tree(edge_tree); } -void exit_edges(void) -{ +void exit_edges(void) { cp(); avl_delete_tree(edge_weight_tree); @@ -82,15 +76,13 @@ void exit_edges(void) /* Creation and deletion of connection elements */ -edge_t *new_edge(void) -{ +edge_t *new_edge(void) { cp(); return xmalloc_and_zero(sizeof(edge_t)); } -void free_edge(edge_t *e) -{ +void free_edge(edge_t *e) { cp(); sockaddrfree(&e->address); @@ -98,8 +90,7 @@ void free_edge(edge_t *e) free(e); } -void edge_add(edge_t *e) -{ +void edge_add(edge_t *e) { cp(); avl_insert(edge_weight_tree, e); @@ -111,8 +102,7 @@ void edge_add(edge_t *e) e->reverse->reverse = e; } -void edge_del(edge_t *e) -{ +void edge_del(edge_t *e) { cp(); if(e->reverse) @@ -122,8 +112,7 @@ void edge_del(edge_t *e) avl_delete(e->from->edge_tree, e); } -edge_t *lookup_edge(node_t *from, node_t *to) -{ +edge_t *lookup_edge(node_t *from, node_t *to) { edge_t v; cp(); @@ -134,8 +123,7 @@ edge_t *lookup_edge(node_t *from, node_t *to) return avl_search(from->edge_tree, &v); } -void dump_edges(void) -{ +void dump_edges(void) { avl_node_t *node, *node2; node_t *n; edge_t *e; diff --git a/src/event.c b/src/event.c index 2fb65ec0..304360c6 100644 --- a/src/event.c +++ b/src/event.c @@ -30,8 +30,7 @@ extern time_t now; int id; -static int event_compare(const event_t *a, const event_t *b) -{ +static int event_compare(const event_t *a, const event_t *b) { if(a->time > b->time) return 1; @@ -41,22 +40,19 @@ static int event_compare(const event_t *a, const event_t *b) return a->id - b->id; } -void init_events(void) -{ +void init_events(void) { cp(); event_tree = avl_alloc_tree((avl_compare_t) event_compare, (avl_action_t) free_event); } -void exit_events(void) -{ +void exit_events(void) { cp(); avl_delete_tree(event_tree); } -void expire_events(void) -{ +void expire_events(void) { avl_node_t *node; event_t *event; time_t diff; @@ -83,37 +79,32 @@ void expire_events(void) } } -event_t *new_event(void) -{ +event_t *new_event(void) { cp(); return xmalloc_and_zero(sizeof(event_t)); } -void free_event(event_t *event) -{ +void free_event(event_t *event) { cp(); free(event); } -void event_add(event_t *event) -{ +void event_add(event_t *event) { cp(); event->id = ++id; avl_insert(event_tree, event); } -void event_del(event_t *event) -{ +void event_del(event_t *event) { cp(); avl_delete(event_tree, event); } -event_t *get_expired_event(void) -{ +event_t *get_expired_event(void) { event_t *event; cp(); diff --git a/src/graph.c b/src/graph.c index 12ef8b0f..4f2ea498 100644 --- a/src/graph.c +++ b/src/graph.c @@ -64,8 +64,7 @@ static bool graph_changed = true; Please note that sorting on weight is already done by add_edge(). */ -void mst_kruskal(void) -{ +void mst_kruskal(void) { avl_node_t *node, *next; edge_t *e; node_t *n; @@ -148,8 +147,7 @@ void mst_kruskal(void) Running time: O(E) */ -void sssp_bfs(void) -{ +void sssp_bfs(void) { avl_node_t *node, *next, *to; edge_t *e; node_t *n; @@ -296,8 +294,7 @@ void sssp_bfs(void) } } -void graph(void) -{ +void graph(void) { subnet_cache_flush(); sssp_bfs(); mst_kruskal(); @@ -312,8 +309,7 @@ void graph(void) dot -Tpng graph_filename -o image_filename.png -Gconcentrate=true */ -void dump_graph(void) -{ +void dump_graph(void) { avl_node_t *node; node_t *n; edge_t *e; diff --git a/src/linux/device.c b/src/linux/device.c index 6d02b470..9af50388 100644 --- a/src/linux/device.c +++ b/src/linux/device.c @@ -50,8 +50,7 @@ static char *device_info; static int device_total_in = 0; static int device_total_out = 0; -bool setup_device(void) -{ +bool setup_device(void) { struct ifreq ifr; cp(); @@ -116,8 +115,7 @@ bool setup_device(void) return true; } -void close_device(void) -{ +void close_device(void) { cp(); close(device_fd); @@ -126,8 +124,7 @@ void close_device(void) free(iface); } -bool read_packet(vpn_packet_t *packet) -{ +bool read_packet(vpn_packet_t *packet) { int lenin; cp(); @@ -176,8 +173,7 @@ bool read_packet(vpn_packet_t *packet) 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"), @@ -215,8 +211,7 @@ bool write_packet(vpn_packet_t *packet) return true; } -void dump_device_stats(void) -{ +void dump_device_stats(void) { cp(); logger(LOG_DEBUG, _("Statistics for %s %s:"), device_info, device); diff --git a/src/meta.c b/src/meta.c index 275eae35..27d2394a 100644 --- a/src/meta.c +++ b/src/meta.c @@ -32,8 +32,7 @@ #include "utils.h" #include "xalloc.h" -bool send_meta(connection_t *c, const char *buffer, int length) -{ +bool send_meta(connection_t *c, const char *buffer, int length) { int outlen; int result; @@ -82,8 +81,7 @@ bool send_meta(connection_t *c, const char *buffer, int length) return true; } -bool flush_meta(connection_t *c) -{ +bool flush_meta(connection_t *c) { int result; ifdebug(META) logger(LOG_DEBUG, _("Flushing %d bytes to %s (%s)"), @@ -119,8 +117,7 @@ bool flush_meta(connection_t *c) return true; } -void broadcast_meta(connection_t *from, const char *buffer, int length) -{ +void broadcast_meta(connection_t *from, const char *buffer, int length) { avl_node_t *node; connection_t *c; @@ -134,8 +131,7 @@ void broadcast_meta(connection_t *from, const char *buffer, int length) } } -bool receive_meta(connection_t *c) -{ +bool receive_meta(connection_t *c) { int oldlen, i, result; int lenin, lenout, reqlen; bool decrypted = false; diff --git a/src/mingw/device.c b/src/mingw/device.c index 7d906b78..c0f02f2a 100644 --- a/src/mingw/device.c +++ b/src/mingw/device.c @@ -82,8 +82,7 @@ static DWORD WINAPI tapreader(void *bla) { } } -bool setup_device(void) -{ +bool setup_device(void) { HKEY key, key2; int i; @@ -220,8 +219,7 @@ bool setup_device(void) return true; } -void close_device(void) -{ +void close_device(void) { cp(); CloseHandle(device_handle); @@ -230,13 +228,11 @@ void close_device(void) free(iface); } -bool read_packet(vpn_packet_t *packet) -{ +bool read_packet(vpn_packet_t *packet) { return false; } -bool write_packet(vpn_packet_t *packet) -{ +bool write_packet(vpn_packet_t *packet) { long lenout; OVERLAPPED overlapped = {0}; @@ -255,8 +251,7 @@ bool write_packet(vpn_packet_t *packet) return true; } -void dump_device_stats(void) -{ +void dump_device_stats(void) { cp(); logger(LOG_DEBUG, _("Statistics for %s %s:"), device_info, device); diff --git a/src/net.c b/src/net.c index 8af464b1..0b617bd0 100644 --- a/src/net.c +++ b/src/net.c @@ -46,8 +46,7 @@ time_t now = 0; /* Purge edges and subnets of unreachable nodes. Use carefully. */ -static void purge(void) -{ +static void purge(void) { avl_node_t *nnode, *nnext, *enode, *enext, *snode, *snext; node_t *n; edge_t *e; @@ -110,8 +109,7 @@ static void purge(void) put all file descriptors in an fd_set array While we're at it, purge stuff that needs to be removed. */ -static int build_fdset(fd_set *readset, fd_set *writeset) -{ +static int build_fdset(fd_set *readset, fd_set *writeset) { avl_node_t *node, *next; connection_t *c; int i, max = 0; @@ -162,8 +160,7 @@ static int build_fdset(fd_set *readset, fd_set *writeset) - Check if we need to retry making an outgoing connection - Deactivate the host */ -void terminate_connection(connection_t *c, bool report) -{ +void terminate_connection(connection_t *c, bool report) { cp(); if(c->status.remove) @@ -226,8 +223,7 @@ void terminate_connection(connection_t *c, bool report) end does not reply in time, we consider them dead and close the connection. */ -static void check_dead_connections(void) -{ +static void check_dead_connections(void) { avl_node_t *node, *next; connection_t *c; @@ -282,8 +278,7 @@ static void check_dead_connections(void) check all connections to see if anything happened on their sockets */ -static void check_network_activity(fd_set * readset, fd_set * writeset) -{ +static void check_network_activity(fd_set * readset, fd_set * writeset) { connection_t *c; avl_node_t *node; int result, i; @@ -350,8 +345,7 @@ static void check_network_activity(fd_set * readset, fd_set * writeset) /* this is where it all happens... */ -int main_loop(void) -{ +int main_loop(void) { fd_set readset, writeset; struct timeval tv; int r, maxfd; diff --git a/src/net_packet.c b/src/net_packet.c index 426fa491..0059b278 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -58,8 +58,7 @@ static void send_udppacket(node_t *, vpn_packet_t *); #define MAX_SEQNO 1073741824 -void send_mtu_probe(node_t *n) -{ +void send_mtu_probe(node_t *n) { vpn_packet_t packet; int len, i; @@ -118,8 +117,7 @@ void mtu_probe_h(node_t *n, vpn_packet_t *packet, length_t len) { } } -static length_t compress_packet(uint8_t *dest, const uint8_t *source, length_t len, int level) -{ +static length_t compress_packet(uint8_t *dest, const uint8_t *source, length_t len, int level) { if(level == 10) { lzo_uint lzolen = MAXSIZE; lzo1x_1_compress(source, len, dest, &lzolen, lzo_wrkmem); @@ -139,8 +137,7 @@ static length_t compress_packet(uint8_t *dest, const uint8_t *source, length_t l return -1; } -static length_t uncompress_packet(uint8_t *dest, const uint8_t *source, length_t len, int level) -{ +static length_t uncompress_packet(uint8_t *dest, const uint8_t *source, length_t len, int level) { if(level > 9) { lzo_uint lzolen = MAXSIZE; if(lzo1x_decompress_safe(source, len, dest, &lzolen, NULL) == LZO_E_OK) @@ -160,8 +157,7 @@ static length_t uncompress_packet(uint8_t *dest, const uint8_t *source, length_t /* VPN packet I/O */ -static void receive_packet(node_t *n, vpn_packet_t *packet) -{ +static void receive_packet(node_t *n, vpn_packet_t *packet) { cp(); ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Received packet of %d bytes from %s (%s)"), @@ -170,8 +166,7 @@ static void receive_packet(node_t *n, vpn_packet_t *packet) route(n, packet); } -static bool try_mac(const node_t *n, const vpn_packet_t *inpkt) -{ +static bool try_mac(const node_t *n, const vpn_packet_t *inpkt) { unsigned char hmac[EVP_MAX_MD_SIZE]; if(!n->indigest || !n->inmaclength || !n->inkey || inpkt->len < sizeof inpkt->seqno + n->inmaclength) @@ -182,8 +177,7 @@ static bool try_mac(const node_t *n, const vpn_packet_t *inpkt) return !memcmp(hmac, (char *) &inpkt->seqno + inpkt->len - n->inmaclength, n->inmaclength); } -static void receive_udppacket(node_t *n, vpn_packet_t *inpkt) -{ +static void receive_udppacket(node_t *n, vpn_packet_t *inpkt) { vpn_packet_t pkt1, pkt2; vpn_packet_t *pkt[] = { &pkt1, &pkt2, &pkt1, &pkt2 }; int nextpkt = 0; @@ -300,8 +294,7 @@ static void receive_udppacket(node_t *n, vpn_packet_t *inpkt) receive_packet(n, inpkt); } -void receive_tcppacket(connection_t *c, char *buffer, int len) -{ +void receive_tcppacket(connection_t *c, char *buffer, int len) { vpn_packet_t outpkt; cp(); @@ -316,8 +309,7 @@ void receive_tcppacket(connection_t *c, char *buffer, int len) receive_packet(c->node, &outpkt); } -static void send_udppacket(node_t *n, vpn_packet_t *origpkt) -{ +static void send_udppacket(node_t *n, vpn_packet_t *origpkt) { vpn_packet_t pkt1, pkt2; vpn_packet_t *pkt[] = { &pkt1, &pkt2, &pkt1, &pkt2 }; vpn_packet_t *inpkt = origpkt; @@ -449,8 +441,7 @@ end: /* send a packet to the given vpn ip. */ -void send_packet(const node_t *n, vpn_packet_t *packet) -{ +void send_packet(const node_t *n, vpn_packet_t *packet) { node_t *via; cp(); @@ -486,8 +477,7 @@ void send_packet(const node_t *n, vpn_packet_t *packet) /* Broadcast a packet using the minimum spanning tree */ -void broadcast_packet(const node_t *from, vpn_packet_t *packet) -{ +void broadcast_packet(const node_t *from, vpn_packet_t *packet) { avl_node_t *node; connection_t *c; @@ -537,8 +527,7 @@ static node_t *try_harder(const sockaddr_t *from, const vpn_packet_t *pkt) { return n; } -void handle_incoming_vpn_data(int sock) -{ +void handle_incoming_vpn_data(int sock) { vpn_packet_t pkt; char *hostname; sockaddr_t from; diff --git a/src/net_setup.c b/src/net_setup.c index a667a676..a6fd3d06 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -44,8 +44,7 @@ char *myport; -bool read_rsa_public_key(connection_t *c) -{ +bool read_rsa_public_key(connection_t *c) { FILE *fp; char *fname; char *key; @@ -145,8 +144,7 @@ bool read_rsa_public_key(connection_t *c) return false; } -bool read_rsa_private_key(void) -{ +bool read_rsa_private_key(void) { FILE *fp; char *fname, *key, *pubkey; struct stat s; @@ -209,8 +207,7 @@ bool read_rsa_private_key(void) /* Configure node_t myself and set up the local sockets (listen only) */ -bool setup_myself(void) -{ +bool setup_myself(void) { config_t *cfg; subnet_t *subnet; char *name, *hostname, *mode, *afname, *cipher, *digest; @@ -506,8 +503,7 @@ bool setup_myself(void) /* initialize network */ -bool setup_network(void) -{ +bool setup_network(void) { cp(); now = time(NULL); @@ -543,8 +539,7 @@ bool setup_network(void) /* close all open network connections */ -void close_network_connections(void) -{ +void close_network_connections(void) { avl_node_t *node, *next; connection_t *c; char *envp[5]; diff --git a/src/net_socket.c b/src/net_socket.c index 312030b6..5f6cd2a1 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -54,8 +54,7 @@ list_t *outgoing_list = NULL; /* Setup sockets */ -static void configure_tcp(connection_t *c) -{ +static void configure_tcp(connection_t *c) { int option; #ifdef O_NONBLOCK @@ -83,7 +82,7 @@ static void configure_tcp(connection_t *c) #endif } -static bool bind_to_interface(int sd) { /* {{{ */ +static bool bind_to_interface(int sd) { char *iface; #if defined(SOL_SOCKET) && defined(SO_BINDTODEVICE) @@ -110,9 +109,9 @@ static bool bind_to_interface(int sd) { /* {{{ */ #endif return true; -} /* }}} bool bind_to_interface */ +} -static bool bind_to_address(connection_t *c) { /* {{{ */ +static bool bind_to_address(connection_t *c) { char *node; struct addrinfo *ai_list; struct addrinfo *ai_ptr; @@ -168,10 +167,9 @@ static bool bind_to_address(connection_t *c) { /* {{{ */ freeaddrinfo(ai_list); return status ? false : true; -} /* }}} bool bind_to_address */ +} -int setup_listen_socket(const sockaddr_t *sa) -{ +int setup_listen_socket(const sockaddr_t *sa) { int nfd; char *addrstr; int option; @@ -234,8 +232,7 @@ int setup_listen_socket(const sockaddr_t *sa) return nfd; } -int setup_vpn_in_socket(const sockaddr_t *sa) -{ +int setup_vpn_in_socket(const sockaddr_t *sa) { int nfd; char *addrstr; int option; @@ -311,8 +308,7 @@ int setup_vpn_in_socket(const sockaddr_t *sa) return nfd; } /* int setup_vpn_in_socket */ -void retry_outgoing(outgoing_t *outgoing) -{ +void retry_outgoing(outgoing_t *outgoing) { event_t *event; cp(); @@ -333,8 +329,7 @@ void retry_outgoing(outgoing_t *outgoing) outgoing->timeout); } -void finish_connecting(connection_t *c) -{ +void finish_connecting(connection_t *c) { cp(); ifdebug(CONNECTIONS) logger(LOG_INFO, _("Connected to %s (%s)"), c->name, c->hostname); @@ -346,8 +341,7 @@ void finish_connecting(connection_t *c) send_id(c); } -void do_outgoing_connection(connection_t *c) -{ +void do_outgoing_connection(connection_t *c) { char *address, *port; int result; @@ -442,8 +436,7 @@ begin: return; } -void setup_outgoing_connection(outgoing_t *outgoing) -{ +void setup_outgoing_connection(outgoing_t *outgoing) { connection_t *c; node_t *n; @@ -489,8 +482,7 @@ void setup_outgoing_connection(outgoing_t *outgoing) accept a new tcp connect and create a new connection */ -bool handle_new_meta_connection(int sock) -{ +bool handle_new_meta_connection(int sock) { connection_t *c; sockaddr_t sa; int fd; @@ -542,8 +534,7 @@ void free_outgoing(outgoing_t *outgoing) { free(outgoing); } -void try_outgoing_connections(void) -{ +void try_outgoing_connections(void) { static config_t *cfg = NULL; char *name; outgoing_t *outgoing; diff --git a/src/netutl.c b/src/netutl.c index 84054912..9872480f 100644 --- a/src/netutl.c +++ b/src/netutl.c @@ -32,8 +32,7 @@ bool hostnames = false; Turn a string into a struct addrinfo. Return NULL on failure. */ -struct addrinfo *str2addrinfo(const char *address, const char *service, int socktype) -{ +struct addrinfo *str2addrinfo(const char *address, const char *service, int socktype) { struct addrinfo *ai, hint = {0}; int err; @@ -53,8 +52,7 @@ struct addrinfo *str2addrinfo(const char *address, const char *service, int sock return ai; } -sockaddr_t str2sockaddr(const char *address, const char *port) -{ +sockaddr_t str2sockaddr(const char *address, const char *port) { struct addrinfo *ai, hint = {0}; sockaddr_t result; int err; @@ -82,8 +80,7 @@ sockaddr_t str2sockaddr(const char *address, const char *port) return result; } -void sockaddr2str(const sockaddr_t *sa, char **addrstr, char **portstr) -{ +void sockaddr2str(const sockaddr_t *sa, char **addrstr, char **portstr) { char address[NI_MAXHOST]; char port[NI_MAXSERV]; char *scopeid; @@ -116,8 +113,7 @@ void sockaddr2str(const sockaddr_t *sa, char **addrstr, char **portstr) *portstr = xstrdup(port); } -char *sockaddr2hostname(const sockaddr_t *sa) -{ +char *sockaddr2hostname(const sockaddr_t *sa) { char *str; char address[NI_MAXHOST] = "unknown"; char port[NI_MAXSERV] = "unknown"; @@ -142,8 +138,7 @@ char *sockaddr2hostname(const sockaddr_t *sa) return str; } -int sockaddrcmp_noport(const sockaddr_t *a, const sockaddr_t *b) -{ +int sockaddrcmp_noport(const sockaddr_t *a, const sockaddr_t *b) { int result; cp(); @@ -175,8 +170,7 @@ int sockaddrcmp_noport(const sockaddr_t *a, const sockaddr_t *b) } } -int sockaddrcmp(const sockaddr_t *a, const sockaddr_t *b) -{ +int sockaddrcmp(const sockaddr_t *a, const sockaddr_t *b) { int result; cp(); @@ -244,8 +238,7 @@ void sockaddrfree(sockaddr_t *a) { } } -void sockaddrunmap(sockaddr_t *sa) -{ +void sockaddrunmap(sockaddr_t *sa) { cp(); if(sa->sa.sa_family == AF_INET6 && IN6_IS_ADDR_V4MAPPED(&sa->in6.sin6_addr)) { @@ -256,8 +249,7 @@ void sockaddrunmap(sockaddr_t *sa) /* Subnet mask handling */ -int maskcmp(const void *va, const void *vb, int masklen) -{ +int maskcmp(const void *va, const void *vb, int masklen) { int i, m, result; const char *a = va; const char *b = vb; @@ -277,8 +269,7 @@ int maskcmp(const void *va, const void *vb, int masklen) return 0; } -void mask(void *va, int masklen, int len) -{ +void mask(void *va, int masklen, int len) { int i; char *a = va; @@ -294,8 +285,7 @@ void mask(void *va, int masklen, int len) a[i] = 0; } -void maskcpy(void *va, const void *vb, int masklen, int len) -{ +void maskcpy(void *va, const void *vb, int masklen, int len) { int i, m; char *a = va; const char *b = vb; @@ -314,8 +304,7 @@ void maskcpy(void *va, const void *vb, int masklen, int len) a[i] = 0; } -bool maskcheck(const void *va, int masklen, int len) -{ +bool maskcheck(const void *va, int masklen, int len) { int i; const char *a = va; diff --git a/src/node.c b/src/node.c index 4951007b..92af66a9 100644 --- a/src/node.c +++ b/src/node.c @@ -33,34 +33,29 @@ avl_tree_t *node_udp_tree; /* Known nodes, sorted by address and port */ node_t *myself; -static int node_compare(const node_t *a, const node_t *b) -{ +static int node_compare(const node_t *a, const node_t *b) { return strcmp(a->name, b->name); } -static int node_udp_compare(const node_t *a, const node_t *b) -{ +static int node_udp_compare(const node_t *a, const node_t *b) { return sockaddrcmp(&a->address, &b->address); } -void init_nodes(void) -{ +void init_nodes(void) { cp(); node_tree = avl_alloc_tree((avl_compare_t) node_compare, (avl_action_t) free_node); node_udp_tree = avl_alloc_tree((avl_compare_t) node_udp_compare, NULL); } -void exit_nodes(void) -{ +void exit_nodes(void) { cp(); avl_delete_tree(node_udp_tree); avl_delete_tree(node_tree); } -node_t *new_node(void) -{ +node_t *new_node(void) { node_t *n = xmalloc_and_zero(sizeof(*n)); cp(); @@ -75,8 +70,7 @@ node_t *new_node(void) return n; } -void free_node(node_t *n) -{ +void free_node(node_t *n) { cp(); if(n->inkey) @@ -108,15 +102,13 @@ void free_node(node_t *n) free(n); } -void node_add(node_t *n) -{ +void node_add(node_t *n) { cp(); avl_insert(node_tree, n); } -void node_del(node_t *n) -{ +void node_del(node_t *n) { avl_node_t *node, *next; edge_t *e; subnet_t *s; @@ -139,8 +131,7 @@ void node_del(node_t *n) avl_delete(node_tree, n); } -node_t *lookup_node(char *name) -{ +node_t *lookup_node(char *name) { node_t n = {0}; cp(); @@ -150,8 +141,7 @@ node_t *lookup_node(char *name) return avl_search(node_tree, &n); } -node_t *lookup_node_udp(const sockaddr_t *sa) -{ +node_t *lookup_node_udp(const sockaddr_t *sa) { node_t n = {0}; cp(); @@ -162,8 +152,7 @@ node_t *lookup_node_udp(const sockaddr_t *sa) return avl_search(node_udp_tree, &n); } -void update_node_udp(node_t *n, const sockaddr_t *sa) -{ +void update_node_udp(node_t *n, const sockaddr_t *sa) { avl_delete(node_udp_tree, n); if(n->hostname) @@ -181,8 +170,7 @@ void update_node_udp(node_t *n, const sockaddr_t *sa) } } -void dump_nodes(void) -{ +void dump_nodes(void) { avl_node_t *node; node_t *n; diff --git a/src/process.c b/src/process.c index 598e8561..40666103 100644 --- a/src/process.c +++ b/src/process.c @@ -47,8 +47,7 @@ sigset_t emptysigset; static int saved_debug_level = -1; -static void memory_full(int size) -{ +static void memory_full(int size) { logger(LOG_ERR, _("Memory exhausted (couldn't allocate %d bytes), exitting."), size); cp_trace(); exit(1); @@ -181,8 +180,7 @@ DWORD WINAPI controlhandler(DWORD request, DWORD type, LPVOID boe, LPVOID bah) { } -VOID WINAPI run_service(DWORD argc, LPTSTR* argv) -{ +VOID WINAPI run_service(DWORD argc, LPTSTR* argv) { int err = 1; extern int main2(int argc, char **argv); @@ -240,8 +238,7 @@ bool init_service(void) { /* check for an existing tinc for this net, and write pid to pidfile */ -static bool write_pidfile(void) -{ +static bool write_pidfile(void) { pid_t pid; cp(); @@ -270,8 +267,7 @@ static bool write_pidfile(void) /* kill older tincd for this net */ -bool kill_other(int signal) -{ +bool kill_other(int signal) { #ifndef HAVE_MINGW pid_t pid; @@ -311,8 +307,7 @@ bool kill_other(int signal) /* Detach from current terminal, write pidfile, kill parent */ -bool detach(void) -{ +bool detach(void) { cp(); setup_signals(); @@ -358,8 +353,7 @@ bool detach(void) return true; } -bool execute_script(const char *name, char **envp) -{ +bool execute_script(const char *name, char **envp) { #ifdef HAVE_SYSTEM int status, len; char *scriptname, *p; @@ -443,8 +437,7 @@ bool execute_script(const char *name, char **envp) */ #ifndef HAVE_MINGW -static RETSIGTYPE sigterm_handler(int a) -{ +static RETSIGTYPE sigterm_handler(int a) { logger(LOG_NOTICE, _("Got %s signal"), "TERM"); if(running) running = false; @@ -452,8 +445,7 @@ static RETSIGTYPE sigterm_handler(int a) exit(1); } -static RETSIGTYPE sigquit_handler(int a) -{ +static RETSIGTYPE sigquit_handler(int a) { logger(LOG_NOTICE, _("Got %s signal"), "QUIT"); if(running) running = false; @@ -461,16 +453,14 @@ static RETSIGTYPE sigquit_handler(int a) exit(1); } -static RETSIGTYPE fatal_signal_square(int a) -{ +static RETSIGTYPE fatal_signal_square(int a) { logger(LOG_ERR, _("Got another fatal signal %d (%s): not restarting."), a, strsignal(a)); cp_trace(); exit(1); } -static RETSIGTYPE fatal_signal_handler(int a) -{ +static RETSIGTYPE fatal_signal_handler(int a) { struct sigaction act; logger(LOG_ERR, _("Got fatal signal %d (%s)"), a, strsignal(a)); cp_trace(); @@ -493,14 +483,12 @@ static RETSIGTYPE fatal_signal_handler(int a) } } -static RETSIGTYPE sighup_handler(int a) -{ +static RETSIGTYPE sighup_handler(int a) { logger(LOG_NOTICE, _("Got %s signal"), "HUP"); sighup = true; } -static RETSIGTYPE sigint_handler(int a) -{ +static RETSIGTYPE sigint_handler(int a) { logger(LOG_NOTICE, _("Got %s signal"), "INT"); if(saved_debug_level != -1) { @@ -517,38 +505,32 @@ static RETSIGTYPE sigint_handler(int a) } } -static RETSIGTYPE sigalrm_handler(int a) -{ +static RETSIGTYPE sigalrm_handler(int a) { logger(LOG_NOTICE, _("Got %s signal"), "ALRM"); sigalrm = true; } -static RETSIGTYPE sigusr1_handler(int a) -{ +static RETSIGTYPE sigusr1_handler(int a) { dump_connections(); } -static RETSIGTYPE sigusr2_handler(int a) -{ +static RETSIGTYPE sigusr2_handler(int a) { dump_device_stats(); dump_nodes(); dump_edges(); dump_subnets(); } -static RETSIGTYPE sigwinch_handler(int a) -{ +static RETSIGTYPE sigwinch_handler(int a) { do_purge = true; } -static RETSIGTYPE unexpected_signal_handler(int a) -{ +static RETSIGTYPE unexpected_signal_handler(int a) { logger(LOG_WARNING, _("Got unexpected signal %d (%s)"), a, strsignal(a)); cp_trace(); } -static RETSIGTYPE ignore_signal_handler(int a) -{ +static RETSIGTYPE ignore_signal_handler(int a) { ifdebug(SCARY_THINGS) logger(LOG_DEBUG, _("Ignored signal %d (%s)"), a, strsignal(a)); } @@ -573,8 +555,7 @@ static struct { }; #endif -void setup_signals(void) -{ +void setup_signals(void) { #ifndef HAVE_MINGW int i; struct sigaction act; diff --git a/src/protocol.c b/src/protocol.c index 04763512..78781a6c 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -53,8 +53,7 @@ static char (*request_name[]) = { static avl_tree_t *past_request_tree; -bool check_id(const char *id) -{ +bool check_id(const char *id) { for(; *id; id++) if(!isalnum(*id) && *id != '_') return false; @@ -65,8 +64,7 @@ bool check_id(const char *id) /* Generic request routines - takes care of logging and error detection as well */ -bool send_request(connection_t *c, const char *format, ...) -{ +bool send_request(connection_t *c, const char *format, ...) { va_list args; char buffer[MAXBUFSIZE]; int len, request; @@ -106,8 +104,7 @@ bool send_request(connection_t *c, const char *format, ...) return send_meta(c, buffer, len); } -void forward_request(connection_t *from) -{ +void forward_request(connection_t *from) { int request; cp(); @@ -128,8 +125,7 @@ void forward_request(connection_t *from) broadcast_meta(from, from->buffer, from->reqlen); } -bool receive_request(connection_t *c) -{ +bool receive_request(connection_t *c) { int request; cp(); @@ -178,13 +174,11 @@ bool receive_request(connection_t *c) return true; } -static int past_request_compare(const past_request_t *a, const past_request_t *b) -{ +static int past_request_compare(const past_request_t *a, const past_request_t *b) { return strcmp(a->request, b->request); } -static void free_past_request(past_request_t *r) -{ +static void free_past_request(past_request_t *r) { cp(); if(r->request) @@ -193,22 +187,19 @@ static void free_past_request(past_request_t *r) free(r); } -void init_requests(void) -{ +void init_requests(void) { cp(); past_request_tree = avl_alloc_tree((avl_compare_t) past_request_compare, (avl_action_t) free_past_request); } -void exit_requests(void) -{ +void exit_requests(void) { cp(); avl_delete_tree(past_request_tree); } -bool seen_request(char *request) -{ +bool seen_request(char *request) { past_request_t *new, p = {0}; cp(); @@ -227,8 +218,7 @@ bool seen_request(char *request) } } -void age_past_requests(void) -{ +void age_past_requests(void) { avl_node_t *node, *next; past_request_t *p; int left = 0, deleted = 0; diff --git a/src/protocol_auth.c b/src/protocol_auth.c index a88c36ba..5926a124 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -38,16 +38,14 @@ #include "utils.h" #include "xalloc.h" -bool send_id(connection_t *c) -{ +bool send_id(connection_t *c) { cp(); return send_request(c, "%d %s %d", ID, myself->connection->name, myself->connection->protocol_version); } -bool id_h(connection_t *c) -{ +bool id_h(connection_t *c) { char name[MAX_STRING_SIZE]; cp(); @@ -114,8 +112,7 @@ bool id_h(connection_t *c) return send_metakey(c); } -bool send_metakey(connection_t *c) -{ +bool send_metakey(connection_t *c) { char *buffer; int len; bool x; @@ -199,8 +196,7 @@ bool send_metakey(connection_t *c) return x; } -bool metakey_h(connection_t *c) -{ +bool metakey_h(connection_t *c) { char buffer[MAX_STRING_SIZE]; int cipher, digest, maclength, compression; int len; @@ -298,8 +294,7 @@ bool metakey_h(connection_t *c) return send_challenge(c); } -bool send_challenge(connection_t *c) -{ +bool send_challenge(connection_t *c) { char *buffer; int len; @@ -329,8 +324,7 @@ bool send_challenge(connection_t *c) return send_request(c, "%d %s", CHALLENGE, buffer); } -bool challenge_h(connection_t *c) -{ +bool challenge_h(connection_t *c) { char buffer[MAX_STRING_SIZE]; int len; @@ -367,8 +361,7 @@ bool challenge_h(connection_t *c) return send_chal_reply(c); } -bool send_chal_reply(connection_t *c) -{ +bool send_chal_reply(connection_t *c) { char hash[EVP_MAX_MD_SIZE * 2 + 1]; EVP_MD_CTX ctx; @@ -394,8 +387,7 @@ bool send_chal_reply(connection_t *c) return send_request(c, "%d %s", CHAL_REPLY, hash); } -bool chal_reply_h(connection_t *c) -{ +bool chal_reply_h(connection_t *c) { char hishash[MAX_STRING_SIZE]; char myhash[EVP_MAX_MD_SIZE]; EVP_MD_CTX ctx; @@ -454,8 +446,7 @@ bool chal_reply_h(connection_t *c) return send_ack(c); } -bool send_ack(connection_t *c) -{ +bool send_ack(connection_t *c) { /* ACK message contains rest of the information the other end needs to create node_t and edge_t structures. */ @@ -485,8 +476,7 @@ bool send_ack(connection_t *c) return send_request(c, "%d %s %d %lx", ACK, myport, c->estimated_weight, c->options); } -static void send_everything(connection_t *c) -{ +static void send_everything(connection_t *c) { avl_node_t *node, *node2; node_t *n; subnet_t *s; @@ -518,8 +508,7 @@ static void send_everything(connection_t *c) } } -bool ack_h(connection_t *c) -{ +bool ack_h(connection_t *c) { char hisport[MAX_STRING_SIZE]; char *hisaddress, *dummy; int weight, mtu; diff --git a/src/protocol_edge.c b/src/protocol_edge.c index c2a391b7..6fa9dee8 100644 --- a/src/protocol_edge.c +++ b/src/protocol_edge.c @@ -35,8 +35,7 @@ #include "utils.h" #include "xalloc.h" -bool send_add_edge(connection_t *c, const edge_t *e) -{ +bool send_add_edge(connection_t *c, const edge_t *e) { bool x; char *address, *port; @@ -53,8 +52,7 @@ bool send_add_edge(connection_t *c, const edge_t *e) return x; } -bool add_edge_h(connection_t *c) -{ +bool add_edge_h(connection_t *c) { edge_t *e; node_t *from, *to; char from_name[MAX_STRING_SIZE]; @@ -173,16 +171,14 @@ bool add_edge_h(connection_t *c) return true; } -bool send_del_edge(connection_t *c, const edge_t *e) -{ +bool send_del_edge(connection_t *c, const edge_t *e) { cp(); return send_request(c, "%d %x %s %s", DEL_EDGE, rand(), e->from->name, e->to->name); } -bool del_edge_h(connection_t *c) -{ +bool del_edge_h(connection_t *c) { edge_t *e; char from_name[MAX_STRING_SIZE]; char to_name[MAX_STRING_SIZE]; diff --git a/src/protocol_key.c b/src/protocol_key.c index 5370e612..cd95d9c4 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -36,8 +36,7 @@ bool mykeyused = false; -bool send_key_changed() -{ +bool send_key_changed() { cp(); /* Only send this message if some other daemon requested our key previously. @@ -50,8 +49,7 @@ bool send_key_changed() return send_request(broadcast, "%d %x %s", KEY_CHANGED, rand(), myself->name); } -bool key_changed_h(connection_t *c) -{ +bool key_changed_h(connection_t *c) { char name[MAX_STRING_SIZE]; node_t *n; @@ -85,15 +83,13 @@ bool key_changed_h(connection_t *c) return true; } -bool send_req_key(node_t *to) -{ +bool send_req_key(node_t *to) { cp(); return send_request(to->nexthop->connection, "%d %s %s", REQ_KEY, myself->name, to->name); } -bool req_key_h(connection_t *c) -{ +bool req_key_h(connection_t *c) { char from_name[MAX_STRING_SIZE]; char to_name[MAX_STRING_SIZE]; node_t *from, *to; @@ -142,8 +138,7 @@ bool req_key_h(connection_t *c) return true; } -bool send_ans_key(node_t *to) -{ +bool send_ans_key(node_t *to) { char *key; cp(); @@ -180,8 +175,7 @@ bool send_ans_key(node_t *to) to->incompression); } -bool ans_key_h(connection_t *c) -{ +bool ans_key_h(connection_t *c) { char from_name[MAX_STRING_SIZE]; char to_name[MAX_STRING_SIZE]; char key[MAX_STRING_SIZE]; diff --git a/src/protocol_misc.c b/src/protocol_misc.c index 2e610cb9..5499b344 100644 --- a/src/protocol_misc.c +++ b/src/protocol_misc.c @@ -33,8 +33,7 @@ int maxoutbufsize = 0; /* Status and error notification routines */ -bool send_status(connection_t *c, int statusno, const char *statusstring) -{ +bool send_status(connection_t *c, int statusno, const char *statusstring) { cp(); if(!statusstring) @@ -43,8 +42,7 @@ bool send_status(connection_t *c, int statusno, const char *statusstring) return send_request(c, "%d %d %s", STATUS, statusno, statusstring); } -bool status_h(connection_t *c) -{ +bool status_h(connection_t *c) { int statusno; char statusstring[MAX_STRING_SIZE]; @@ -62,8 +60,7 @@ bool status_h(connection_t *c) return true; } -bool send_error(connection_t *c, int err, const char *errstring) -{ +bool send_error(connection_t *c, int err, const char *errstring) { cp(); if(!errstring) @@ -72,8 +69,7 @@ bool send_error(connection_t *c, int err, const char *errstring) return send_request(c, "%d %d %s", ERROR, err, errstring); } -bool error_h(connection_t *c) -{ +bool error_h(connection_t *c) { int err; char errorstring[MAX_STRING_SIZE]; @@ -93,15 +89,13 @@ bool error_h(connection_t *c) return true; } -bool send_termreq(connection_t *c) -{ +bool send_termreq(connection_t *c) { cp(); return send_request(c, "%d", TERMREQ); } -bool termreq_h(connection_t *c) -{ +bool termreq_h(connection_t *c) { cp(); terminate_connection(c, c->status.active); @@ -109,8 +103,7 @@ bool termreq_h(connection_t *c) return true; } -bool send_ping(connection_t *c) -{ +bool send_ping(connection_t *c) { cp(); c->status.pinged = true; @@ -119,22 +112,19 @@ bool send_ping(connection_t *c) return send_request(c, "%d", PING); } -bool ping_h(connection_t *c) -{ +bool ping_h(connection_t *c) { cp(); return send_pong(c); } -bool send_pong(connection_t *c) -{ +bool send_pong(connection_t *c) { cp(); return send_request(c, "%d", PONG); } -bool pong_h(connection_t *c) -{ +bool pong_h(connection_t *c) { cp(); c->status.pinged = false; @@ -149,8 +139,7 @@ bool pong_h(connection_t *c) /* Sending and receiving packets via TCP */ -bool send_tcppacket(connection_t *c, vpn_packet_t *packet) -{ +bool send_tcppacket(connection_t *c, vpn_packet_t *packet) { cp(); /* If there already is a lot of data in the outbuf buffer, discard this packet. @@ -165,8 +154,7 @@ bool send_tcppacket(connection_t *c, vpn_packet_t *packet) return send_meta(c, (char *)packet->data, packet->len); } -bool tcppacket_h(connection_t *c) -{ +bool tcppacket_h(connection_t *c) { short int len; cp(); diff --git a/src/protocol_subnet.c b/src/protocol_subnet.c index 90c89af9..c6c01874 100644 --- a/src/protocol_subnet.c +++ b/src/protocol_subnet.c @@ -32,8 +32,7 @@ #include "utils.h" #include "xalloc.h" -bool send_add_subnet(connection_t *c, const subnet_t *subnet) -{ +bool send_add_subnet(connection_t *c, const subnet_t *subnet) { char netstr[MAXNETSTR]; cp(); @@ -44,8 +43,7 @@ bool send_add_subnet(connection_t *c, const subnet_t *subnet) return send_request(c, "%d %x %s %s", ADD_SUBNET, rand(), subnet->owner->name, netstr); } -bool add_subnet_h(connection_t *c) -{ +bool add_subnet_h(connection_t *c) { char subnetstr[MAX_STRING_SIZE]; char name[MAX_STRING_SIZE]; node_t *owner; @@ -151,8 +149,7 @@ bool add_subnet_h(connection_t *c) return true; } -bool send_del_subnet(connection_t *c, const subnet_t *s) -{ +bool send_del_subnet(connection_t *c, const subnet_t *s) { char netstr[MAXNETSTR]; cp(); @@ -163,8 +160,7 @@ bool send_del_subnet(connection_t *c, const subnet_t *s) return send_request(c, "%d %x %s %s", DEL_SUBNET, rand(), s->owner->name, netstr); } -bool del_subnet_h(connection_t *c) -{ +bool del_subnet_h(connection_t *c) { char subnetstr[MAX_STRING_SIZE]; char name[MAX_STRING_SIZE]; node_t *owner; diff --git a/src/raw_socket/device.c b/src/raw_socket/device.c index 6c56ed64..5cefbce8 100644 --- a/src/raw_socket/device.c +++ b/src/raw_socket/device.c @@ -38,8 +38,7 @@ static char *device_info; static int device_total_in = 0; static int device_total_out = 0; -bool setup_device(void) -{ +bool setup_device(void) { struct ifreq ifr; struct sockaddr_ll sa; @@ -83,8 +82,7 @@ bool setup_device(void) return true; } -void close_device(void) -{ +void close_device(void) { cp(); close(device_fd); @@ -93,8 +91,7 @@ void close_device(void) free(iface); } -bool read_packet(vpn_packet_t *packet) -{ +bool read_packet(vpn_packet_t *packet) { int lenin; cp(); @@ -115,8 +112,7 @@ bool read_packet(vpn_packet_t *packet) 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"), @@ -133,8 +129,7 @@ bool write_packet(vpn_packet_t *packet) return true; } -void dump_device_stats(void) -{ +void dump_device_stats(void) { cp(); logger(LOG_DEBUG, _("Statistics for %s %s:"), device_info, device); diff --git a/src/route.c b/src/route.c index a200983a..6cc2fc1c 100644 --- a/src/route.c +++ b/src/route.c @@ -51,8 +51,7 @@ static const size_t opt_size = sizeof(struct nd_opt_hdr); /* RFC 1071 */ -static uint16_t inet_checksum(void *data, int len, uint16_t prevsum) -{ +static uint16_t inet_checksum(void *data, int len, uint16_t prevsum) { uint16_t *p = data; uint32_t checksum = prevsum ^ 0xFFFF; @@ -100,8 +99,7 @@ static void swap_mac_addresses(vpn_packet_t *packet) { memcpy(&packet->data[6], &tmp, sizeof tmp); } -static void learn_mac(mac_t *address) -{ +static void learn_mac(mac_t *address) { subnet_t *subnet; avl_node_t *node; connection_t *c; @@ -136,8 +134,7 @@ static void learn_mac(mac_t *address) subnet->expires = now + macexpire; } -void age_subnets(void) -{ +void age_subnets(void) { subnet_t *s; connection_t *c; avl_node_t *node, *next, *node2; @@ -167,8 +164,7 @@ void age_subnets(void) /* RFC 792 */ -static void route_ipv4_unreachable(node_t *source, vpn_packet_t *packet, uint8_t type, uint8_t code) -{ +static void route_ipv4_unreachable(node_t *source, vpn_packet_t *packet, uint8_t type, uint8_t code) { struct ip ip = {0}; struct icmp icmp = {0}; @@ -293,8 +289,7 @@ static void fragment_ipv4_packet(node_t *dest, vpn_packet_t *packet) { } } -static void route_ipv4_unicast(node_t *source, vpn_packet_t *packet) -{ +static void route_ipv4_unicast(node_t *source, vpn_packet_t *packet) { subnet_t *subnet; node_t *via; ipv4_t dest; @@ -344,8 +339,7 @@ static void route_ipv4_unicast(node_t *source, vpn_packet_t *packet) send_packet(subnet->owner, packet); } -static void route_ipv4(node_t *source, vpn_packet_t *packet) -{ +static void route_ipv4(node_t *source, vpn_packet_t *packet) { cp(); if(!checklength(source, packet, ether_size + ip_size)) @@ -363,8 +357,7 @@ static void route_ipv4(node_t *source, vpn_packet_t *packet) /* RFC 2463 */ -static void route_ipv6_unreachable(node_t *source, vpn_packet_t *packet, uint8_t type, uint8_t code) -{ +static void route_ipv6_unreachable(node_t *source, vpn_packet_t *packet, uint8_t type, uint8_t code) { struct ip6_hdr ip6; struct icmp6_hdr icmp6 = {0}; uint16_t checksum; @@ -444,8 +437,7 @@ static void route_ipv6_unreachable(node_t *source, vpn_packet_t *packet, uint8_t send_packet(source, packet); } -static void route_ipv6_unicast(node_t *source, vpn_packet_t *packet) -{ +static void route_ipv6_unicast(node_t *source, vpn_packet_t *packet) { subnet_t *subnet; node_t *via; ipv6_t dest; @@ -493,8 +485,7 @@ static void route_ipv6_unicast(node_t *source, vpn_packet_t *packet) /* RFC 2461 */ -static void route_neighborsol(node_t *source, vpn_packet_t *packet) -{ +static void route_neighborsol(node_t *source, vpn_packet_t *packet) { struct ip6_hdr ip6; struct nd_neighbor_solicit ns; struct nd_opt_hdr opt; @@ -635,8 +626,7 @@ static void route_neighborsol(node_t *source, vpn_packet_t *packet) send_packet(source, packet); } -static void route_ipv6(node_t *source, vpn_packet_t *packet) -{ +static void route_ipv6(node_t *source, vpn_packet_t *packet) { cp(); if(!checklength(source, packet, ether_size + ip6_size)) @@ -655,8 +645,7 @@ static void route_ipv6(node_t *source, vpn_packet_t *packet) /* RFC 826 */ -static void route_arp(node_t *source, vpn_packet_t *packet) -{ +static void route_arp(node_t *source, vpn_packet_t *packet) { struct ether_arp arp; subnet_t *subnet; struct in_addr addr; @@ -722,8 +711,7 @@ static void route_arp(node_t *source, vpn_packet_t *packet) send_packet(source, packet); } -static void route_mac(node_t *source, vpn_packet_t *packet) -{ +static void route_mac(node_t *source, vpn_packet_t *packet) { subnet_t *subnet; mac_t dest; @@ -779,8 +767,7 @@ static void route_mac(node_t *source, vpn_packet_t *packet) } -void route(node_t *source, vpn_packet_t *packet) -{ +void route(node_t *source, vpn_packet_t *packet) { cp(); if(!checklength(source, packet, ether_size)) diff --git a/src/solaris/device.c b/src/solaris/device.c index 28c8ff7d..71d9bda9 100644 --- a/src/solaris/device.c +++ b/src/solaris/device.c @@ -41,8 +41,7 @@ static char *device_info = NULL; 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; @@ -107,8 +106,7 @@ bool setup_device(void) return true; } -void close_device(void) -{ +void close_device(void) { cp(); close(device_fd); @@ -117,8 +115,7 @@ void close_device(void) free(iface); } -bool read_packet(vpn_packet_t *packet) -{ +bool read_packet(vpn_packet_t *packet) { int lenin; cp(); @@ -155,8 +152,7 @@ bool read_packet(vpn_packet_t *packet) 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"), @@ -173,8 +169,7 @@ bool write_packet(vpn_packet_t *packet) return true; } -void dump_device_stats(void) -{ +void dump_device_stats(void) { cp(); logger(LOG_DEBUG, _("Statistics for %s %s:"), device_info, device); diff --git a/src/subnet.c b/src/subnet.c index 3c7ccc53..fa1ee630 100644 --- a/src/subnet.c +++ b/src/subnet.c @@ -54,8 +54,7 @@ void subnet_cache_flush() { /* Subnet comparison */ -static int subnet_compare_mac(const subnet_t *a, const subnet_t *b) -{ +static int subnet_compare_mac(const subnet_t *a, const subnet_t *b) { int result; result = memcmp(&a->net.mac.address, &b->net.mac.address, sizeof(mac_t)); @@ -71,8 +70,7 @@ static int subnet_compare_mac(const subnet_t *a, const subnet_t *b) return strcmp(a->owner->name, b->owner->name); } -static int subnet_compare_ipv4(const subnet_t *a, const subnet_t *b) -{ +static int subnet_compare_ipv4(const subnet_t *a, const subnet_t *b) { int result; result = b->net.ipv4.prefixlength - a->net.ipv4.prefixlength; @@ -93,8 +91,7 @@ static int subnet_compare_ipv4(const subnet_t *a, const subnet_t *b) return strcmp(a->owner->name, b->owner->name); } -static int subnet_compare_ipv6(const subnet_t *a, const subnet_t *b) -{ +static int subnet_compare_ipv6(const subnet_t *a, const subnet_t *b) { int result; result = b->net.ipv6.prefixlength - a->net.ipv6.prefixlength; @@ -115,8 +112,7 @@ static int subnet_compare_ipv6(const subnet_t *a, const subnet_t *b) return strcmp(a->owner->name, b->owner->name); } -int subnet_compare(const subnet_t *a, const subnet_t *b) -{ +int subnet_compare(const subnet_t *a, const subnet_t *b) { int result; result = a->type - b->type; @@ -143,8 +139,7 @@ int subnet_compare(const subnet_t *a, const subnet_t *b) /* Initialising trees */ -void init_subnets(void) -{ +void init_subnets(void) { cp(); subnet_tree = avl_alloc_tree((avl_compare_t) subnet_compare, (avl_action_t) free_subnet); @@ -152,22 +147,19 @@ void init_subnets(void) subnet_cache_flush(); } -void exit_subnets(void) -{ +void exit_subnets(void) { cp(); avl_delete_tree(subnet_tree); } -avl_tree_t *new_subnet_tree(void) -{ +avl_tree_t *new_subnet_tree(void) { cp(); return avl_alloc_tree((avl_compare_t) subnet_compare, NULL); } -void free_subnet_tree(avl_tree_t *subnet_tree) -{ +void free_subnet_tree(avl_tree_t *subnet_tree) { cp(); avl_delete_tree(subnet_tree); @@ -175,15 +167,13 @@ void free_subnet_tree(avl_tree_t *subnet_tree) /* Allocating and freeing space for subnets */ -subnet_t *new_subnet(void) -{ +subnet_t *new_subnet(void) { cp(); return xmalloc_and_zero(sizeof(subnet_t)); } -void free_subnet(subnet_t *subnet) -{ +void free_subnet(subnet_t *subnet) { cp(); free(subnet); @@ -191,8 +181,7 @@ void free_subnet(subnet_t *subnet) /* Adding and removing subnets */ -void subnet_add(node_t *n, subnet_t *subnet) -{ +void subnet_add(node_t *n, subnet_t *subnet) { cp(); subnet->owner = n; @@ -203,8 +192,7 @@ void subnet_add(node_t *n, subnet_t *subnet) subnet_cache_flush(); } -void subnet_del(node_t *n, subnet_t *subnet) -{ +void subnet_del(node_t *n, subnet_t *subnet) { cp(); avl_delete(n->subnet_tree, subnet); @@ -215,8 +203,7 @@ void subnet_del(node_t *n, subnet_t *subnet) /* Ascii representation of subnets */ -bool str2net(subnet_t *subnet, const char *subnetstr) -{ +bool str2net(subnet_t *subnet, const char *subnetstr) { int i, l; uint16_t x[8]; int weight = 10; @@ -297,8 +284,7 @@ bool str2net(subnet_t *subnet, const char *subnetstr) return false; } -bool net2str(char *netstr, int len, const subnet_t *subnet) -{ +bool net2str(char *netstr, int len, const subnet_t *subnet) { cp(); if(!netstr || !subnet) { @@ -355,15 +341,13 @@ bool net2str(char *netstr, int len, const subnet_t *subnet) /* Subnet lookup routines */ -subnet_t *lookup_subnet(const node_t *owner, const subnet_t *subnet) -{ +subnet_t *lookup_subnet(const node_t *owner, const subnet_t *subnet) { cp(); return avl_search(owner->subnet_tree, subnet); } -subnet_t *lookup_subnet_mac(const mac_t *address) -{ +subnet_t *lookup_subnet_mac(const mac_t *address) { subnet_t *p, subnet = {0}; cp(); @@ -377,8 +361,7 @@ subnet_t *lookup_subnet_mac(const mac_t *address) return p; } -subnet_t *lookup_subnet_ipv4(const ipv4_t *address) -{ +subnet_t *lookup_subnet_ipv4(const ipv4_t *address) { subnet_t *p, *r = NULL, subnet = {0}; avl_node_t *n; int i; @@ -424,8 +407,7 @@ subnet_t *lookup_subnet_ipv4(const ipv4_t *address) return r; } -subnet_t *lookup_subnet_ipv6(const ipv6_t *address) -{ +subnet_t *lookup_subnet_ipv6(const ipv6_t *address) { subnet_t *p, *r = NULL, subnet = {0}; avl_node_t *n; int i; @@ -538,8 +520,7 @@ void subnet_update(node_t *owner, subnet_t *subnet, bool up) { free(envp[i]); } -void dump_subnets(void) -{ +void dump_subnets(void) { char netstr[MAXNETSTR]; subnet_t *subnet; avl_node_t *node; diff --git a/src/tincd.c b/src/tincd.c index 1f364427..a01ed58b 100644 --- a/src/tincd.c +++ b/src/tincd.c @@ -117,8 +117,7 @@ static struct WSAData wsa_state; CRITICAL_SECTION mutex; #endif -static void usage(bool status) -{ +static void usage(bool status) { if(status) fprintf(stderr, _("Try `%s --help\' for more information.\n"), program_name); @@ -141,8 +140,7 @@ static void usage(bool status) } } -static bool parse_options(int argc, char **argv) -{ +static bool parse_options(int argc, char **argv) { int r; int option_index = 0; @@ -275,8 +273,7 @@ static bool parse_options(int argc, char **argv) /* This function prettyprints the key generation process */ -static void indicator(int a, int b, void *p) -{ +static void indicator(int a, int b, void *p) { switch (a) { case 0: fprintf(stderr, "."); @@ -314,8 +311,7 @@ static void indicator(int a, int b, void *p) Generate a public/private RSA keypair, and ask for a file to store them in. */ -static bool keygen(int bits) -{ +static bool keygen(int bits) { RSA *rsa_key; FILE *f; char *name = NULL; @@ -380,8 +376,7 @@ static bool keygen(int bits) /* Set all files and paths according to netname */ -static void make_names(void) -{ +static void make_names(void) { #ifdef HAVE_MINGW HKEY key; char installdir[1024] = ""; @@ -493,8 +488,7 @@ static bool drop_privs() { # define setpriority(level) nice(level) #endif -int main(int argc, char **argv) -{ +int main(int argc, char **argv) { program_name = argv[0]; setlocale(LC_ALL, ""); @@ -566,8 +560,7 @@ int main(int argc, char **argv) return 1; } -int main2(int argc, char **argv) -{ +int main2(int argc, char **argv) { InitializeCriticalSection(&mutex); EnterCriticalSection(&mutex); #endif diff --git a/src/uml_socket/device.c b/src/uml_socket/device.c index 81a4c219..fa46f65a 100644 --- a/src/uml_socket/device.c +++ b/src/uml_socket/device.c @@ -55,8 +55,7 @@ static struct request { static struct sockaddr_un data_sun; -bool setup_device(void) -{ +bool setup_device(void) { struct sockaddr_un listen_sun; static const int one = 1; struct { @@ -152,8 +151,7 @@ bool setup_device(void) return true; } -void close_device(void) -{ +void close_device(void) { cp(); if(listen_fd >= 0) @@ -174,8 +172,7 @@ void close_device(void) if(iface) free(iface); } -bool read_packet(vpn_packet_t *packet) -{ +bool read_packet(vpn_packet_t *packet) { int lenin; cp(); @@ -255,8 +252,7 @@ bool read_packet(vpn_packet_t *packet) } } -bool write_packet(vpn_packet_t *packet) -{ +bool write_packet(vpn_packet_t *packet) { cp(); if(state != 2) { @@ -282,8 +278,7 @@ bool write_packet(vpn_packet_t *packet) return true; } -void dump_device_stats(void) -{ +void dump_device_stats(void) { cp(); logger(LOG_DEBUG, _("Statistics for %s %s:"), device_info, device); From a227843b739d279b63adcf3736ebb03d856080c4 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Fri, 25 Sep 2009 00:33:04 +0200 Subject: [PATCH 6/9] Remove checkpoint tracing. This feature is not necessary anymore since we have tools like valgrind today that can catch stack overflow errors before they make a backtrace in gdb impossible. --- configure.in | 6 ------ lib/utils.c | 29 ----------------------------- lib/utils.h | 14 -------------- src/bsd/device.c | 10 ---------- src/conf.c | 28 ---------------------------- src/connection.c | 16 ---------------- src/cygwin/device.c | 10 ---------- src/edge.c | 20 -------------------- src/event.c | 16 ---------------- src/graph.c | 4 ---- src/linux/device.c | 10 ---------- src/meta.c | 6 ------ src/mingw/device.c | 8 -------- src/net.c | 13 ------------- src/net_packet.c | 16 ---------------- src/net_setup.c | 10 ---------- src/net_socket.c | 16 ---------------- src/netutl.c | 29 ----------------------------- src/node.c | 18 ------------------ src/process.c | 12 ------------ src/protocol.c | 16 ---------------- src/protocol_auth.c | 23 +---------------------- src/protocol_edge.c | 8 -------- src/protocol_key.c | 12 ------------ src/protocol_misc.c | 24 ------------------------ src/protocol_subnet.c | 8 -------- src/raw_socket/device.c | 10 ---------- src/route.c | 28 ---------------------------- src/solaris/device.c | 10 ---------- src/subnet.c | 32 -------------------------------- src/uml_socket/device.c | 10 ---------- 31 files changed, 1 insertion(+), 471 deletions(-) diff --git a/configure.in b/configure.in index 67715862..4c28426e 100644 --- a/configure.in +++ b/configure.in @@ -164,12 +164,6 @@ AC_ARG_ENABLE(jumbograms, [ AC_DEFINE(ENABLE_JUMBOGRAMS, 1, [Support for jumbograms (packets up to 9000 bytes)]) ] ) -dnl Check if checkpoint tracing has to be enabled -AC_ARG_ENABLE(tracing, - AS_HELP_STRING([--enable-tracing], [enable checkpoint tracing (debugging only)]), - [ AC_DEFINE(ENABLE_TRACING, 1, [Checkpoint tracing]) ] -) - AC_SUBST(INCLUDES) AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile lib/Makefile po/Makefile.in m4/Makefile]) diff --git a/lib/utils.c b/lib/utils.c index b327a49f..3283472d 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -23,12 +23,6 @@ #include "../src/logger.h" #include "utils.h" -#ifdef ENABLE_TRACING -volatile int (cp_line[]) = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; -volatile char (*cp_file[]) = {"?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?"}; -volatile int cp_index = 0; -#endif - const char hexadecimals[] = "0123456789ABCDEF"; int charhex2bin(char c) { @@ -53,29 +47,6 @@ void bin2hex(char *src, char *dst, int length) { } } -#ifdef ENABLE_TRACING -void cp_trace() { - logger(LOG_DEBUG, "Checkpoint trace: %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d <- %s:%d...", - cp_file[(cp_index + 15) % 16], cp_line[(cp_index + 15) % 16], - cp_file[(cp_index + 14) % 16], cp_line[(cp_index + 14) % 16], - cp_file[(cp_index + 13) % 16], cp_line[(cp_index + 13) % 16], - cp_file[(cp_index + 12) % 16], cp_line[(cp_index + 12) % 16], - cp_file[(cp_index + 11) % 16], cp_line[(cp_index + 11) % 16], - cp_file[(cp_index + 10) % 16], cp_line[(cp_index + 10) % 16], - cp_file[(cp_index + 9) % 16], cp_line[(cp_index + 9) % 16], - cp_file[(cp_index + 8) % 16], cp_line[(cp_index + 8) % 16], - cp_file[(cp_index + 7) % 16], cp_line[(cp_index + 7) % 16], - cp_file[(cp_index + 6) % 16], cp_line[(cp_index + 6) % 16], - cp_file[(cp_index + 5) % 16], cp_line[(cp_index + 5) % 16], - cp_file[(cp_index + 4) % 16], cp_line[(cp_index + 4) % 16], - cp_file[(cp_index + 3) % 16], cp_line[(cp_index + 3) % 16], - cp_file[(cp_index + 2) % 16], cp_line[(cp_index + 2) % 16], - cp_file[(cp_index + 1) % 16], cp_line[(cp_index + 1) % 16], - cp_file[cp_index], cp_line[cp_index] - ); -} -#endif - #if defined(HAVE_MINGW) || defined(HAVE_CYGWIN) #ifdef HAVE_CYGWIN #include diff --git a/lib/utils.h b/lib/utils.h index a94548fe..c6fb1807 100644 --- a/lib/utils.h +++ b/lib/utils.h @@ -21,20 +21,6 @@ #ifndef __TINC_UTILS_H__ #define __TINC_UTILS_H__ -#ifdef ENABLE_TRACING -extern volatile int cp_line[]; -extern volatile char *cp_file[]; -extern volatile int cp_index; -extern void cp_trace(void); - -#define cp() { cp_line[cp_index] = __LINE__; cp_file[cp_index] = __FILE__; cp_index++; cp_index %= 16; } -#define ecp() { fprintf(stderr, "Explicit checkpoint in %s line %d\n", __FILE__, __LINE__); } -#else -#define cp() -#define ecp() -#define cp_trace() -#endif - extern void hex2bin(char *src, char *dst, int length); extern void bin2hex(char *src, char *dst, int length); diff --git a/src/bsd/device.c b/src/bsd/device.c index 5fe8dc0d..be026b70 100644 --- a/src/bsd/device.c +++ b/src/bsd/device.c @@ -59,8 +59,6 @@ static device_type_t device_type = DEVICE_TYPE_TUN; bool setup_device(void) { char *type; - cp(); - if(!get_config_string(lookup_config(config_tree, "Device"), &device)) device = xstrdup(DEFAULT_DEVICE); @@ -165,8 +163,6 @@ bool setup_device(void) { } void close_device(void) { - cp(); - switch(device_type) { #ifdef HAVE_TUNEMU case DEVICE_TYPE_TUNEMU: @@ -184,8 +180,6 @@ void close_device(void) { bool read_packet(vpn_packet_t *packet) { int lenin; - cp(); - switch(device_type) { case DEVICE_TYPE_TUN: #ifdef HAVE_TUNEMU @@ -278,8 +272,6 @@ bool read_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"), packet->len, device_info); @@ -349,8 +341,6 @@ bool write_packet(vpn_packet_t *packet) { } void dump_device_stats(void) { - cp(); - logger(LOG_DEBUG, _("Statistics for %s %s:"), device_info, device); logger(LOG_DEBUG, _(" total bytes in: %10d"), device_total_in); logger(LOG_DEBUG, _(" total bytes out: %10d"), device_total_out); diff --git a/src/conf.c b/src/conf.c index e7703c16..688974ba 100644 --- a/src/conf.c +++ b/src/conf.c @@ -53,27 +53,19 @@ static int config_compare(const config_t *a, const config_t *b) { } void init_configuration(avl_tree_t ** config_tree) { - cp(); - *config_tree = avl_alloc_tree((avl_compare_t) config_compare, (avl_action_t) free_config); } void exit_configuration(avl_tree_t ** config_tree) { - cp(); - avl_delete_tree(*config_tree); *config_tree = NULL; } config_t *new_config(void) { - cp(); - return xmalloc_and_zero(sizeof(config_t)); } void free_config(config_t *cfg) { - cp(); - if(cfg->variable) free(cfg->variable); @@ -87,16 +79,12 @@ void free_config(config_t *cfg) { } void config_add(avl_tree_t *config_tree, config_t *cfg) { - cp(); - avl_insert(config_tree, cfg); } config_t *lookup_config(avl_tree_t *config_tree, char *variable) { config_t cfg, *found; - cp(); - cfg.variable = variable; cfg.file = ""; cfg.line = 0; @@ -116,8 +104,6 @@ config_t *lookup_config_next(avl_tree_t *config_tree, const config_t *cfg) { avl_node_t *node; config_t *found; - cp(); - node = avl_search_node(config_tree, cfg); if(node) { @@ -133,8 +119,6 @@ config_t *lookup_config_next(avl_tree_t *config_tree, const config_t *cfg) { } bool get_config_bool(const config_t *cfg, bool *result) { - cp(); - if(!cfg) return false; @@ -153,8 +137,6 @@ bool get_config_bool(const config_t *cfg, bool *result) { } bool get_config_int(const config_t *cfg, int *result) { - cp(); - if(!cfg) return false; @@ -168,8 +150,6 @@ bool get_config_int(const config_t *cfg, int *result) { } bool get_config_string(const config_t *cfg, char **result) { - cp(); - if(!cfg) return false; @@ -181,8 +161,6 @@ bool get_config_string(const config_t *cfg, char **result) { bool get_config_address(const config_t *cfg, struct addrinfo **result) { struct addrinfo *ai; - cp(); - if(!cfg) return false; @@ -202,8 +180,6 @@ bool get_config_address(const config_t *cfg, struct addrinfo **result) { bool get_config_subnet(const config_t *cfg, subnet_t ** result) { subnet_t subnet = {0}; - cp(); - if(!cfg) return false; @@ -314,8 +290,6 @@ int read_config_file(avl_tree_t *config_tree, const char *fname) { config_t *cfg; size_t bufsize; - cp(); - fp = fopen(fname, "r"); if(!fp) { @@ -397,8 +371,6 @@ bool read_server_config() { char *fname; int x; - cp(); - xasprintf(&fname, "%s/tinc.conf", confbase); x = read_config_file(config_tree, fname); diff --git a/src/connection.c b/src/connection.c index 289c233b..7c8cd0ba 100644 --- a/src/connection.c +++ b/src/connection.c @@ -38,8 +38,6 @@ static int connection_compare(const connection_t *a, const connection_t *b) { } void init_connections(void) { - cp(); - connection_tree = avl_alloc_tree((avl_compare_t) connection_compare, (avl_action_t) free_connection); broadcast = new_connection(); broadcast->name = xstrdup(_("everyone")); @@ -47,8 +45,6 @@ void init_connections(void) { } void exit_connections(void) { - cp(); - avl_delete_tree(connection_tree); free_connection(broadcast); } @@ -56,8 +52,6 @@ void exit_connections(void) { connection_t *new_connection(void) { connection_t *c; - cp(); - c = xmalloc_and_zero(sizeof(connection_t)); if(!c) @@ -69,8 +63,6 @@ connection_t *new_connection(void) { } void free_connection(connection_t *c) { - cp(); - if(c->name) free(c->name); @@ -112,14 +104,10 @@ void free_connection(connection_t *c) { } void connection_add(connection_t *c) { - cp(); - avl_insert(connection_tree, c); } void connection_del(connection_t *c) { - cp(); - avl_delete(connection_tree, c); } @@ -127,8 +115,6 @@ void dump_connections(void) { avl_node_t *node; connection_t *c; - cp(); - logger(LOG_DEBUG, _("Connections:")); for(node = connection_tree->head; node; node = node->next) { @@ -145,8 +131,6 @@ bool read_connection_config(connection_t *c) { char *fname; int x; - cp(); - xasprintf(&fname, "%s/hosts/%s", confbase, c->name); x = read_config_file(c->config_tree, fname); free(fname); diff --git a/src/cygwin/device.c b/src/cygwin/device.c index 921205cf..617214d0 100644 --- a/src/cygwin/device.c +++ b/src/cygwin/device.c @@ -57,8 +57,6 @@ bool setup_device(void) { bool found = false; - cp(); - get_config_string(lookup_config(config_tree, "Device"), &device); get_config_string(lookup_config(config_tree, "Interface"), &iface); @@ -216,8 +214,6 @@ bool setup_device(void) { } void close_device(void) { - cp(); - close(sp[0]); close(sp[1]); CloseHandle(device_handle); @@ -231,8 +227,6 @@ void close_device(void) { bool read_packet(vpn_packet_t *packet) { int lenin; - cp(); - if((lenin = read(sp[0], packet->data, MTU)) <= 0) { logger(LOG_ERR, _("Error while reading from %s %s: %s"), device_info, device, strerror(errno)); @@ -252,8 +246,6 @@ bool read_packet(vpn_packet_t *packet) { bool write_packet(vpn_packet_t *packet) { long lenout; - cp(); - ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Writing packet of %d bytes to %s"), packet->len, device_info); @@ -268,8 +260,6 @@ bool write_packet(vpn_packet_t *packet) { } void dump_device_stats(void) { - cp(); - logger(LOG_DEBUG, _("Statistics for %s %s:"), device_info, device); logger(LOG_DEBUG, _(" total bytes in: %10d"), device_total_in); logger(LOG_DEBUG, _(" total bytes out: %10d"), device_total_out); diff --git a/src/edge.c b/src/edge.c index 403dfff6..d1ff3249 100644 --- a/src/edge.c +++ b/src/edge.c @@ -51,48 +51,34 @@ static int edge_weight_compare(const edge_t *a, const edge_t *b) { } void init_edges(void) { - cp(); - edge_weight_tree = avl_alloc_tree((avl_compare_t) edge_weight_compare, NULL); } avl_tree_t *new_edge_tree(void) { - cp(); - return avl_alloc_tree((avl_compare_t) edge_compare, (avl_action_t) free_edge); } void free_edge_tree(avl_tree_t *edge_tree) { - cp(); - avl_delete_tree(edge_tree); } void exit_edges(void) { - cp(); - avl_delete_tree(edge_weight_tree); } /* Creation and deletion of connection elements */ edge_t *new_edge(void) { - cp(); - return xmalloc_and_zero(sizeof(edge_t)); } void free_edge(edge_t *e) { - cp(); - sockaddrfree(&e->address); free(e); } void edge_add(edge_t *e) { - cp(); - avl_insert(edge_weight_tree, e); avl_insert(e->from->edge_tree, e); @@ -103,8 +89,6 @@ void edge_add(edge_t *e) { } void edge_del(edge_t *e) { - cp(); - if(e->reverse) e->reverse->reverse = NULL; @@ -115,8 +99,6 @@ void edge_del(edge_t *e) { edge_t *lookup_edge(node_t *from, node_t *to) { edge_t v; - cp(); - v.from = from; v.to = to; @@ -129,8 +111,6 @@ void dump_edges(void) { edge_t *e; char *address; - cp(); - logger(LOG_DEBUG, _("Edges:")); for(node = node_tree->head; node; node = node->next) { diff --git a/src/event.c b/src/event.c index 304360c6..99e6a238 100644 --- a/src/event.c +++ b/src/event.c @@ -41,14 +41,10 @@ static int event_compare(const event_t *a, const event_t *b) { } void init_events(void) { - cp(); - event_tree = avl_alloc_tree((avl_compare_t) event_compare, (avl_action_t) free_event); } void exit_events(void) { - cp(); - avl_delete_tree(event_tree); } @@ -62,8 +58,6 @@ void expire_events(void) { * the expiration time of the last event and the current time. */ - cp(); - if(!event_tree->tail) return; @@ -80,35 +74,25 @@ void expire_events(void) { } event_t *new_event(void) { - cp(); - return xmalloc_and_zero(sizeof(event_t)); } void free_event(event_t *event) { - cp(); - free(event); } void event_add(event_t *event) { - cp(); - event->id = ++id; avl_insert(event_tree, event); } void event_del(event_t *event) { - cp(); - avl_delete(event_tree, event); } event_t *get_expired_event(void) { event_t *event; - cp(); - if(event_tree->head) { event = event_tree->head->data; diff --git a/src/graph.c b/src/graph.c index 4f2ea498..c8430d82 100644 --- a/src/graph.c +++ b/src/graph.c @@ -73,8 +73,6 @@ void mst_kruskal(void) { int safe_edges = 0; bool skipped; - cp(); - /* Clear MST status on connections */ for(node = connection_tree->head; node; node = node->next) { @@ -159,8 +157,6 @@ void sssp_bfs(void) { char *envp[7]; int i; - cp(); - todo_list = list_alloc(NULL); /* Clear visited status on nodes */ diff --git a/src/linux/device.c b/src/linux/device.c index 9af50388..8ae8fefb 100644 --- a/src/linux/device.c +++ b/src/linux/device.c @@ -53,8 +53,6 @@ static int device_total_out = 0; bool setup_device(void) { struct ifreq ifr; - cp(); - if(!get_config_string(lookup_config(config_tree, "Device"), &device)) device = xstrdup(DEFAULT_DEVICE); @@ -116,8 +114,6 @@ bool setup_device(void) { } void close_device(void) { - cp(); - close(device_fd); free(device); @@ -127,8 +123,6 @@ void close_device(void) { bool read_packet(vpn_packet_t *packet) { int lenin; - cp(); - switch(device_type) { case DEVICE_TYPE_TUN: lenin = read(device_fd, packet->data + 10, MTU - 10); @@ -174,8 +168,6 @@ bool read_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"), packet->len, device_info); @@ -212,8 +204,6 @@ bool write_packet(vpn_packet_t *packet) { } void dump_device_stats(void) { - cp(); - logger(LOG_DEBUG, _("Statistics for %s %s:"), device_info, device); logger(LOG_DEBUG, _(" total bytes in: %10d"), device_total_in); logger(LOG_DEBUG, _(" total bytes out: %10d"), device_total_out); diff --git a/src/meta.c b/src/meta.c index 27d2394a..9c38fefb 100644 --- a/src/meta.c +++ b/src/meta.c @@ -36,8 +36,6 @@ bool send_meta(connection_t *c, const char *buffer, int length) { int outlen; int result; - cp(); - if(!c) { logger(LOG_ERR, _("send_meta() called with NULL pointer!")); abort(); @@ -121,8 +119,6 @@ void broadcast_meta(connection_t *from, const char *buffer, int length) { avl_node_t *node; connection_t *c; - cp(); - for(node = connection_tree->head; node; node = node->next) { c = node->data; @@ -137,8 +133,6 @@ bool receive_meta(connection_t *c) { bool decrypted = false; char inbuf[MAXBUFSIZE]; - cp(); - /* Strategy: - Read as much as possible from the TCP socket in one go. - Decrypt it. diff --git a/src/mingw/device.c b/src/mingw/device.c index c0f02f2a..132ef8f7 100644 --- a/src/mingw/device.c +++ b/src/mingw/device.c @@ -106,8 +106,6 @@ bool setup_device(void) { .ai_flags = 0, }; - cp(); - get_config_string(lookup_config(config_tree, "Device"), &device); get_config_string(lookup_config(config_tree, "Interface"), &iface); @@ -220,8 +218,6 @@ bool setup_device(void) { } void close_device(void) { - cp(); - CloseHandle(device_handle); free(device); @@ -236,8 +232,6 @@ bool write_packet(vpn_packet_t *packet) { long lenout; OVERLAPPED overlapped = {0}; - cp(); - ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Writing packet of %d bytes to %s"), packet->len, device_info); @@ -252,8 +246,6 @@ bool write_packet(vpn_packet_t *packet) { } void dump_device_stats(void) { - cp(); - logger(LOG_DEBUG, _("Statistics for %s %s:"), device_info, device); logger(LOG_DEBUG, _(" total bytes in: %10d"), device_total_in); logger(LOG_DEBUG, _(" total bytes out: %10d"), device_total_out); diff --git a/src/net.c b/src/net.c index 0b617bd0..da5be4e6 100644 --- a/src/net.c +++ b/src/net.c @@ -52,8 +52,6 @@ static void purge(void) { edge_t *e; subnet_t *s; - cp(); - ifdebug(PROTOCOL) logger(LOG_DEBUG, _("Purging unreachable nodes")); /* Remove all edges and subnets owned by unreachable nodes. */ @@ -114,8 +112,6 @@ static int build_fdset(fd_set *readset, fd_set *writeset) { connection_t *c; int i, max = 0; - cp(); - FD_ZERO(readset); FD_ZERO(writeset); @@ -161,8 +157,6 @@ static int build_fdset(fd_set *readset, fd_set *writeset) { - Deactivate the host */ void terminate_connection(connection_t *c, bool report) { - cp(); - if(c->status.remove) return; @@ -227,8 +221,6 @@ static void check_dead_connections(void) { avl_node_t *node, *next; connection_t *c; - cp(); - for(node = connection_tree->head; node; node = next) { next = node->next; c = node->data; @@ -285,8 +277,6 @@ static void check_network_activity(fd_set * readset, fd_set * writeset) { socklen_t len = sizeof(result); vpn_packet_t packet; - cp(); - /* check input from kernel */ if(device_fd >= 0 && FD_ISSET(device_fd, readset)) { if(read_packet(&packet)) { @@ -352,8 +342,6 @@ int main_loop(void) { time_t last_ping_check, last_config_check, last_graph_dump; event_t *event; - cp(); - last_ping_check = now; last_config_check = now; last_graph_dump = now; @@ -383,7 +371,6 @@ int main_loop(void) { if(errno != EINTR && errno != EAGAIN) { logger(LOG_ERR, _("Error while waiting for input: %s"), strerror(errno)); - cp_trace(); dump_connections(); return 1; } diff --git a/src/net_packet.c b/src/net_packet.c index 0059b278..05336b0f 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -62,8 +62,6 @@ void send_mtu_probe(node_t *n) { vpn_packet_t packet; int len, i; - cp(); - n->mtuprobes++; n->mtuevent = NULL; @@ -158,8 +156,6 @@ static length_t uncompress_packet(uint8_t *dest, const uint8_t *source, length_t /* VPN packet I/O */ static void receive_packet(node_t *n, vpn_packet_t *packet) { - cp(); - ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Received packet of %d bytes from %s (%s)"), packet->len, n->name, n->hostname); @@ -186,8 +182,6 @@ static void receive_udppacket(node_t *n, vpn_packet_t *inpkt) { unsigned char hmac[EVP_MAX_MD_SIZE]; int i; - cp(); - if(!n->inkey) { ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Got packet from %s (%s) but he hasn't got our key yet"), n->name, n->hostname); @@ -297,8 +291,6 @@ static void receive_udppacket(node_t *n, vpn_packet_t *inpkt) { void receive_tcppacket(connection_t *c, char *buffer, int len) { vpn_packet_t outpkt; - cp(); - outpkt.len = len; if(c->options & OPTION_TCPONLY) outpkt.priority = 0; @@ -321,8 +313,6 @@ static void send_udppacket(node_t *n, vpn_packet_t *origpkt) { int origpriority; int sock; - cp(); - if(!n->status.reachable) { ifdebug(TRAFFIC) logger(LOG_INFO, _("Trying to send UDP packet to unreachable node %s (%s)"), n->name, n->hostname); return; @@ -444,8 +434,6 @@ end: void send_packet(const node_t *n, vpn_packet_t *packet) { node_t *via; - cp(); - if(n == myself) { if(overwrite_mac) memcpy(packet->data, mymac.x, ETH_ALEN); @@ -481,8 +469,6 @@ void broadcast_packet(const node_t *from, vpn_packet_t *packet) { avl_node_t *node; connection_t *c; - cp(); - ifdebug(TRAFFIC) logger(LOG_INFO, _("Broadcasting packet of %d bytes from %s (%s)"), packet->len, from->name, from->hostname); @@ -534,8 +520,6 @@ void handle_incoming_vpn_data(int sock) { socklen_t fromlen = sizeof(from); node_t *n; - cp(); - pkt.len = recvfrom(sock, (char *) &pkt.seqno, MAXSIZE, 0, &from.sa, &fromlen); if(pkt.len < 0) { diff --git a/src/net_setup.c b/src/net_setup.c index a6fd3d06..12b09a91 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -49,8 +49,6 @@ bool read_rsa_public_key(connection_t *c) { char *fname; char *key; - cp(); - if(!c->rsa_key) { c->rsa_key = RSA_new(); // RSA_blinding_on(c->rsa_key, NULL); @@ -149,8 +147,6 @@ bool read_rsa_private_key(void) { char *fname, *key, *pubkey; struct stat s; - cp(); - if(get_config_string(lookup_config(config_tree, "PrivateKey"), &key)) { if(!get_config_string(lookup_config(myself->connection->config_tree, "PublicKey"), &pubkey)) { logger(LOG_ERR, _("PrivateKey used but no PublicKey found!")); @@ -217,8 +213,6 @@ bool setup_myself(void) { bool choice; int i, err; - cp(); - myself = new_node(); myself->connection = new_connection(); init_configuration(&myself->connection->config_tree); @@ -504,8 +498,6 @@ bool setup_myself(void) { initialize network */ bool setup_network(void) { - cp(); - now = time(NULL); init_events(); @@ -545,8 +537,6 @@ void close_network_connections(void) { char *envp[5]; int i; - cp(); - for(node = connection_tree->head; node; node = next) { next = node->next; c = node->data; diff --git a/src/net_socket.c b/src/net_socket.c index 5f6cd2a1..8c805490 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -175,8 +175,6 @@ int setup_listen_socket(const sockaddr_t *sa) { int option; char *iface; - cp(); - nfd = socket(sa->sa.sa_family, SOCK_STREAM, IPPROTO_TCP); if(nfd < 0) { @@ -237,8 +235,6 @@ int setup_vpn_in_socket(const sockaddr_t *sa) { char *addrstr; int option; - cp(); - nfd = socket(sa->sa.sa_family, SOCK_DGRAM, IPPROTO_UDP); if(nfd < 0) { @@ -311,8 +307,6 @@ int setup_vpn_in_socket(const sockaddr_t *sa) { void retry_outgoing(outgoing_t *outgoing) { event_t *event; - cp(); - outgoing->timeout += 5; if(outgoing->timeout > maxtimeout) @@ -330,8 +324,6 @@ void retry_outgoing(outgoing_t *outgoing) { } void finish_connecting(connection_t *c) { - cp(); - ifdebug(CONNECTIONS) logger(LOG_INFO, _("Connected to %s (%s)"), c->name, c->hostname); configure_tcp(c); @@ -345,8 +337,6 @@ void do_outgoing_connection(connection_t *c) { char *address, *port; int result; - cp(); - begin: if(!c->outgoing->ai) { if(!c->outgoing->cfg) { @@ -440,8 +430,6 @@ void setup_outgoing_connection(outgoing_t *outgoing) { connection_t *c; node_t *n; - cp(); - n = lookup_node(outgoing->name); if(n) @@ -488,8 +476,6 @@ bool handle_new_meta_connection(int sock) { int fd; socklen_t len = sizeof(sa); - cp(); - fd = accept(sock, &sa.sa, &len); if(fd < 0) { @@ -541,8 +527,6 @@ void try_outgoing_connections(void) { connection_t *c; avl_node_t *node; - cp(); - if(outgoing_list) { for(node = connection_tree->head; node; node = node->next) { c = node->data; diff --git a/src/netutl.c b/src/netutl.c index 9872480f..7eadaebf 100644 --- a/src/netutl.c +++ b/src/netutl.c @@ -36,8 +36,6 @@ struct addrinfo *str2addrinfo(const char *address, const char *service, int sock struct addrinfo *ai, hint = {0}; int err; - cp(); - hint.ai_family = addressfamily; hint.ai_socktype = socktype; @@ -57,8 +55,6 @@ sockaddr_t str2sockaddr(const char *address, const char *port) { sockaddr_t result; int err; - cp(); - hint.ai_family = AF_UNSPEC; hint.ai_flags = AI_NUMERICHOST; hint.ai_socktype = SOCK_STREAM; @@ -86,8 +82,6 @@ void sockaddr2str(const sockaddr_t *sa, char **addrstr, char **portstr) { char *scopeid; int err; - cp(); - if(sa->sa.sa_family == AF_UNKNOWN) { *addrstr = xstrdup(sa->unknown.address); *portstr = xstrdup(sa->unknown.port); @@ -99,7 +93,6 @@ void sockaddr2str(const sockaddr_t *sa, char **addrstr, char **portstr) { if(err) { logger(LOG_ERR, _("Error while translating addresses: %s"), gai_strerror(err)); - cp_trace(); raise(SIGFPE); exit(0); } @@ -119,8 +112,6 @@ char *sockaddr2hostname(const sockaddr_t *sa) { char port[NI_MAXSERV] = "unknown"; int err; - cp(); - if(sa->sa.sa_family == AF_UNKNOWN) { xasprintf(&str, _("%s port %s"), sa->unknown.address, sa->unknown.port); return str; @@ -141,8 +132,6 @@ char *sockaddr2hostname(const sockaddr_t *sa) { int sockaddrcmp_noport(const sockaddr_t *a, const sockaddr_t *b) { int result; - cp(); - result = a->sa.sa_family - b->sa.sa_family; if(result) @@ -164,7 +153,6 @@ int sockaddrcmp_noport(const sockaddr_t *a, const sockaddr_t *b) { default: logger(LOG_ERR, _("sockaddrcmp() was called with unknown address family %d, exitting!"), a->sa.sa_family); - cp_trace(); raise(SIGFPE); exit(0); } @@ -173,8 +161,6 @@ int sockaddrcmp_noport(const sockaddr_t *a, const sockaddr_t *b) { int sockaddrcmp(const sockaddr_t *a, const sockaddr_t *b) { int result; - cp(); - result = a->sa.sa_family - b->sa.sa_family; if(result) @@ -211,15 +197,12 @@ int sockaddrcmp(const sockaddr_t *a, const sockaddr_t *b) { default: logger(LOG_ERR, _("sockaddrcmp() was called with unknown address family %d, exitting!"), a->sa.sa_family); - cp_trace(); raise(SIGFPE); exit(0); } } void sockaddrcpy(sockaddr_t *a, const sockaddr_t *b) { - cp(); - if(b->sa.sa_family != AF_UNKNOWN) { *a = *b; } else { @@ -230,8 +213,6 @@ void sockaddrcpy(sockaddr_t *a, const sockaddr_t *b) { } void sockaddrfree(sockaddr_t *a) { - cp(); - if(a->sa.sa_family == AF_UNKNOWN) { free(a->unknown.address); free(a->unknown.port); @@ -239,8 +220,6 @@ void sockaddrfree(sockaddr_t *a) { } void sockaddrunmap(sockaddr_t *sa) { - cp(); - if(sa->sa.sa_family == AF_INET6 && IN6_IS_ADDR_V4MAPPED(&sa->in6.sin6_addr)) { sa->in.sin_addr.s_addr = ((uint32_t *) & sa->in6.sin6_addr)[3]; sa->in.sin_family = AF_INET; @@ -254,8 +233,6 @@ int maskcmp(const void *va, const void *vb, int masklen) { const char *a = va; const char *b = vb; - cp(); - for(m = masklen, i = 0; m >= 8; m -= 8, i++) { result = a[i] - b[i]; if(result) @@ -273,8 +250,6 @@ void mask(void *va, int masklen, int len) { int i; char *a = va; - cp(); - i = masklen / 8; masklen %= 8; @@ -290,8 +265,6 @@ void maskcpy(void *va, const void *vb, int masklen, int len) { char *a = va; const char *b = vb; - cp(); - for(m = masklen, i = 0; m >= 8; m -= 8, i++) a[i] = b[i]; @@ -308,8 +281,6 @@ bool maskcheck(const void *va, int masklen, int len) { int i; const char *a = va; - cp(); - i = masklen / 8; masklen %= 8; diff --git a/src/node.c b/src/node.c index 92af66a9..579f05c2 100644 --- a/src/node.c +++ b/src/node.c @@ -42,15 +42,11 @@ static int node_udp_compare(const node_t *a, const node_t *b) { } void init_nodes(void) { - cp(); - node_tree = avl_alloc_tree((avl_compare_t) node_compare, (avl_action_t) free_node); node_udp_tree = avl_alloc_tree((avl_compare_t) node_udp_compare, NULL); } void exit_nodes(void) { - cp(); - avl_delete_tree(node_udp_tree); avl_delete_tree(node_tree); } @@ -58,8 +54,6 @@ void exit_nodes(void) { node_t *new_node(void) { node_t *n = xmalloc_and_zero(sizeof(*n)); - cp(); - n->subnet_tree = new_subnet_tree(); n->edge_tree = new_edge_tree(); EVP_CIPHER_CTX_init(&n->inctx); @@ -71,8 +65,6 @@ node_t *new_node(void) { } void free_node(node_t *n) { - cp(); - if(n->inkey) free(n->inkey); @@ -103,8 +95,6 @@ void free_node(node_t *n) { } void node_add(node_t *n) { - cp(); - avl_insert(node_tree, n); } @@ -113,8 +103,6 @@ void node_del(node_t *n) { edge_t *e; subnet_t *s; - cp(); - for(node = n->subnet_tree->head; node; node = next) { next = node->next; s = node->data; @@ -134,8 +122,6 @@ void node_del(node_t *n) { node_t *lookup_node(char *name) { node_t n = {0}; - cp(); - n.name = name; return avl_search(node_tree, &n); @@ -144,8 +130,6 @@ node_t *lookup_node(char *name) { node_t *lookup_node_udp(const sockaddr_t *sa) { node_t n = {0}; - cp(); - n.address = *sa; n.name = NULL; @@ -174,8 +158,6 @@ void dump_nodes(void) { avl_node_t *node; node_t *n; - cp(); - logger(LOG_DEBUG, _("Nodes:")); for(node = node_tree->head; node; node = node->next) { diff --git a/src/process.c b/src/process.c index 40666103..b8bb8214 100644 --- a/src/process.c +++ b/src/process.c @@ -49,7 +49,6 @@ static int saved_debug_level = -1; static void memory_full(int size) { logger(LOG_ERR, _("Memory exhausted (couldn't allocate %d bytes), exitting."), size); - cp_trace(); exit(1); } @@ -241,8 +240,6 @@ bool init_service(void) { static bool write_pidfile(void) { pid_t pid; - cp(); - pid = check_pid(pidfilename); if(pid) { @@ -271,8 +268,6 @@ bool kill_other(int signal) { #ifndef HAVE_MINGW pid_t pid; - cp(); - pid = read_pid(pidfilename); if(!pid) { @@ -308,8 +303,6 @@ bool kill_other(int signal) { Detach from current terminal, write pidfile, kill parent */ bool detach(void) { - cp(); - setup_signals(); /* First check if we can open a fresh new pidfile */ @@ -359,8 +352,6 @@ bool execute_script(const char *name, char **envp) { char *scriptname, *p; int i; - cp(); - #ifndef HAVE_MINGW len = xasprintf(&scriptname, "\"%s/%s\"", confbase, name); #else @@ -456,14 +447,12 @@ static RETSIGTYPE sigquit_handler(int a) { static RETSIGTYPE fatal_signal_square(int a) { logger(LOG_ERR, _("Got another fatal signal %d (%s): not restarting."), a, strsignal(a)); - cp_trace(); exit(1); } static RETSIGTYPE fatal_signal_handler(int a) { struct sigaction act; logger(LOG_ERR, _("Got fatal signal %d (%s)"), a, strsignal(a)); - cp_trace(); if(do_detach) { logger(LOG_NOTICE, _("Trying to re-execute in 5 seconds...")); @@ -527,7 +516,6 @@ static RETSIGTYPE sigwinch_handler(int a) { static RETSIGTYPE unexpected_signal_handler(int a) { logger(LOG_WARNING, _("Got unexpected signal %d (%s)"), a, strsignal(a)); - cp_trace(); } static RETSIGTYPE ignore_signal_handler(int a) { diff --git a/src/protocol.c b/src/protocol.c index 78781a6c..5e088163 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -69,8 +69,6 @@ bool send_request(connection_t *c, const char *format, ...) { char buffer[MAXBUFSIZE]; int len, request; - cp(); - /* Use vsnprintf instead of vxasprintf: faster, no memory fragmentation, cleanup is automatic, and there is a limit on the input buffer anyway */ @@ -107,8 +105,6 @@ bool send_request(connection_t *c, const char *format, ...) { void forward_request(connection_t *from) { int request; - cp(); - ifdebug(PROTOCOL) { sscanf(from->buffer, "%d", &request); ifdebug(META) @@ -128,8 +124,6 @@ void forward_request(connection_t *from) { bool receive_request(connection_t *c) { int request; - cp(); - if(sscanf(c->buffer, "%d", &request) == 1) { if((request < 0) || (request >= LAST) || !request_handlers[request]) { ifdebug(META) @@ -179,8 +173,6 @@ static int past_request_compare(const past_request_t *a, const past_request_t *b } static void free_past_request(past_request_t *r) { - cp(); - if(r->request) free(r->request); @@ -188,22 +180,16 @@ static void free_past_request(past_request_t *r) { } void init_requests(void) { - cp(); - past_request_tree = avl_alloc_tree((avl_compare_t) past_request_compare, (avl_action_t) free_past_request); } void exit_requests(void) { - cp(); - avl_delete_tree(past_request_tree); } bool seen_request(char *request) { past_request_t *new, p = {0}; - cp(); - p.request = request; if(avl_search(past_request_tree, &p)) { @@ -223,8 +209,6 @@ void age_past_requests(void) { past_request_t *p; int left = 0, deleted = 0; - cp(); - for(node = past_request_tree->head; node; node = next) { next = node->next; p = node->data; diff --git a/src/protocol_auth.c b/src/protocol_auth.c index 5926a124..1c6df401 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -39,8 +39,6 @@ #include "xalloc.h" bool send_id(connection_t *c) { - cp(); - return send_request(c, "%d %s %d", ID, myself->connection->name, myself->connection->protocol_version); } @@ -48,8 +46,6 @@ bool send_id(connection_t *c) { bool id_h(connection_t *c) { char name[MAX_STRING_SIZE]; - cp(); - if(sscanf(c->buffer, "%*d " MAX_STRING " %d", name, &c->protocol_version) != 2) { logger(LOG_ERR, _("Got bad %s from %s (%s)"), "ID", c->name, c->hostname); @@ -117,8 +113,6 @@ bool send_metakey(connection_t *c) { int len; bool x; - cp(); - len = RSA_size(c->rsa_key); /* Allocate buffers for the meta key */ @@ -129,7 +123,7 @@ bool send_metakey(connection_t *c) { if(!c->outctx) c->outctx = xmalloc_and_zero(sizeof(*c->outctx)); - cp(); + /* Copy random data to the buffer */ RAND_pseudo_bytes((unsigned char *)c->outkey, len); @@ -201,8 +195,6 @@ bool metakey_h(connection_t *c) { int cipher, digest, maclength, compression; int len; - cp(); - if(sscanf(c->buffer, "%*d %d %d %d %d " MAX_STRING, &cipher, &digest, &maclength, &compression, buffer) != 5) { logger(LOG_ERR, _("Got bad %s from %s (%s)"), "METAKEY", c->name, c->hostname); @@ -298,8 +290,6 @@ bool send_challenge(connection_t *c) { char *buffer; int len; - cp(); - /* CHECKME: what is most reasonable value for len? */ len = RSA_size(c->rsa_key); @@ -328,8 +318,6 @@ bool challenge_h(connection_t *c) { char buffer[MAX_STRING_SIZE]; int len; - cp(); - if(sscanf(c->buffer, "%*d " MAX_STRING, buffer) != 1) { logger(LOG_ERR, _("Got bad %s from %s (%s)"), "CHALLENGE", c->name, c->hostname); @@ -365,8 +353,6 @@ bool send_chal_reply(connection_t *c) { char hash[EVP_MAX_MD_SIZE * 2 + 1]; EVP_MD_CTX ctx; - cp(); - /* Calculate the hash from the challenge we received */ if(!EVP_DigestInit(&ctx, c->indigest) @@ -392,8 +378,6 @@ bool chal_reply_h(connection_t *c) { char myhash[EVP_MAX_MD_SIZE]; EVP_MD_CTX ctx; - cp(); - if(sscanf(c->buffer, "%*d " MAX_STRING, hishash) != 1) { logger(LOG_ERR, _("Got bad %s from %s (%s)"), "CHAL_REPLY", c->name, c->hostname); @@ -453,8 +437,6 @@ bool send_ack(connection_t *c) { struct timeval now; bool choice; - cp(); - /* Estimate weight */ gettimeofday(&now, NULL); @@ -515,8 +497,6 @@ bool ack_h(connection_t *c) { long int options; node_t *n; - cp(); - if(sscanf(c->buffer, "%*d " MAX_STRING " %d %lx", hisport, &weight, &options) != 3) { logger(LOG_ERR, _("Got bad %s from %s (%s)"), "ACK", c->name, c->hostname); @@ -571,7 +551,6 @@ bool ack_h(connection_t *c) { /* Create an edge_t for this connection */ c->edge = new_edge(); - cp(); c->edge->from = myself; c->edge->to = n; sockaddr2str(&c->address, &hisaddress, &dummy); diff --git a/src/protocol_edge.c b/src/protocol_edge.c index 6fa9dee8..03a91ba2 100644 --- a/src/protocol_edge.c +++ b/src/protocol_edge.c @@ -39,8 +39,6 @@ bool send_add_edge(connection_t *c, const edge_t *e) { bool x; char *address, *port; - cp(); - sockaddr2str(&e->address, &address, &port); x = send_request(c, "%d %x %s %s %s %s %lx %d", ADD_EDGE, rand(), @@ -63,8 +61,6 @@ bool add_edge_h(connection_t *c) { long int options; int weight; - cp(); - if(sscanf(c->buffer, "%*d %*x "MAX_STRING" "MAX_STRING" "MAX_STRING" "MAX_STRING" %lx %d", from_name, to_name, to_address, to_port, &options, &weight) != 6) { logger(LOG_ERR, _("Got bad %s from %s (%s)"), "ADD_EDGE", c->name, @@ -172,8 +168,6 @@ bool add_edge_h(connection_t *c) { } bool send_del_edge(connection_t *c, const edge_t *e) { - cp(); - return send_request(c, "%d %x %s %s", DEL_EDGE, rand(), e->from->name, e->to->name); } @@ -184,8 +178,6 @@ bool del_edge_h(connection_t *c) { char to_name[MAX_STRING_SIZE]; node_t *from, *to; - cp(); - if(sscanf(c->buffer, "%*d %*x "MAX_STRING" "MAX_STRING, from_name, to_name) != 2) { logger(LOG_ERR, _("Got bad %s from %s (%s)"), "DEL_EDGE", c->name, c->hostname); diff --git a/src/protocol_key.c b/src/protocol_key.c index cd95d9c4..85174118 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -37,8 +37,6 @@ bool mykeyused = false; bool send_key_changed() { - cp(); - /* Only send this message if some other daemon requested our key previously. This reduces unnecessary key_changed broadcasts. */ @@ -53,8 +51,6 @@ bool key_changed_h(connection_t *c) { char name[MAX_STRING_SIZE]; node_t *n; - cp(); - if(sscanf(c->buffer, "%*d %*x " MAX_STRING, name) != 1) { logger(LOG_ERR, _("Got bad %s from %s (%s)"), "KEY_CHANGED", c->name, c->hostname); @@ -84,8 +80,6 @@ bool key_changed_h(connection_t *c) { } bool send_req_key(node_t *to) { - cp(); - return send_request(to->nexthop->connection, "%d %s %s", REQ_KEY, myself->name, to->name); } @@ -94,8 +88,6 @@ bool req_key_h(connection_t *c) { char to_name[MAX_STRING_SIZE]; node_t *from, *to; - cp(); - if(sscanf(c->buffer, "%*d " MAX_STRING " " MAX_STRING, from_name, to_name) != 2) { logger(LOG_ERR, _("Got bad %s from %s (%s)"), "REQ_KEY", c->name, c->hostname); @@ -141,8 +133,6 @@ bool req_key_h(connection_t *c) { bool send_ans_key(node_t *to) { char *key; - cp(); - // Set key parameters to->incipher = myself->incipher; to->inkeylength = myself->inkeylength; @@ -182,8 +172,6 @@ bool ans_key_h(connection_t *c) { int cipher, digest, maclength, compression; node_t *from, *to; - cp(); - if(sscanf(c->buffer, "%*d "MAX_STRING" "MAX_STRING" "MAX_STRING" %d %d %d %d", from_name, to_name, key, &cipher, &digest, &maclength, &compression) != 7) { diff --git a/src/protocol_misc.c b/src/protocol_misc.c index 5499b344..8a536e37 100644 --- a/src/protocol_misc.c +++ b/src/protocol_misc.c @@ -34,8 +34,6 @@ int maxoutbufsize = 0; /* Status and error notification routines */ bool send_status(connection_t *c, int statusno, const char *statusstring) { - cp(); - if(!statusstring) statusstring = "Status"; @@ -46,8 +44,6 @@ bool status_h(connection_t *c) { int statusno; char statusstring[MAX_STRING_SIZE]; - cp(); - if(sscanf(c->buffer, "%*d %d " MAX_STRING, &statusno, statusstring) != 2) { logger(LOG_ERR, _("Got bad %s from %s (%s)"), "STATUS", c->name, c->hostname); @@ -61,8 +57,6 @@ bool status_h(connection_t *c) { } bool send_error(connection_t *c, int err, const char *errstring) { - cp(); - if(!errstring) errstring = "Error"; @@ -73,8 +67,6 @@ bool error_h(connection_t *c) { int err; char errorstring[MAX_STRING_SIZE]; - cp(); - if(sscanf(c->buffer, "%*d %d " MAX_STRING, &err, errorstring) != 2) { logger(LOG_ERR, _("Got bad %s from %s (%s)"), "ERROR", c->name, c->hostname); @@ -90,22 +82,16 @@ bool error_h(connection_t *c) { } bool send_termreq(connection_t *c) { - cp(); - return send_request(c, "%d", TERMREQ); } bool termreq_h(connection_t *c) { - cp(); - terminate_connection(c, c->status.active); return true; } bool send_ping(connection_t *c) { - cp(); - c->status.pinged = true; c->last_ping_time = now; @@ -113,20 +99,14 @@ bool send_ping(connection_t *c) { } bool ping_h(connection_t *c) { - cp(); - return send_pong(c); } bool send_pong(connection_t *c) { - cp(); - return send_request(c, "%d", PONG); } bool pong_h(connection_t *c) { - cp(); - c->status.pinged = false; /* Succesful connection, reset timeout if this is an outgoing connection. */ @@ -140,8 +120,6 @@ bool pong_h(connection_t *c) { /* Sending and receiving packets via TCP */ bool send_tcppacket(connection_t *c, vpn_packet_t *packet) { - cp(); - /* If there already is a lot of data in the outbuf buffer, discard this packet. We use a very simple Random Early Drop algorithm. */ @@ -157,8 +135,6 @@ bool send_tcppacket(connection_t *c, vpn_packet_t *packet) { bool tcppacket_h(connection_t *c) { short int len; - cp(); - if(sscanf(c->buffer, "%*d %hd", &len) != 1) { logger(LOG_ERR, _("Got bad %s from %s (%s)"), "PACKET", c->name, c->hostname); diff --git a/src/protocol_subnet.c b/src/protocol_subnet.c index c6c01874..cdfcb6d0 100644 --- a/src/protocol_subnet.c +++ b/src/protocol_subnet.c @@ -35,8 +35,6 @@ bool send_add_subnet(connection_t *c, const subnet_t *subnet) { char netstr[MAXNETSTR]; - cp(); - if(!net2str(netstr, sizeof netstr, subnet)) return false; @@ -49,8 +47,6 @@ bool add_subnet_h(connection_t *c) { node_t *owner; subnet_t s = {0}, *new; - cp(); - if(sscanf(c->buffer, "%*d %*x " MAX_STRING " " MAX_STRING, name, subnetstr) != 2) { logger(LOG_ERR, _("Got bad %s from %s (%s)"), "ADD_SUBNET", c->name, c->hostname); @@ -152,8 +148,6 @@ bool add_subnet_h(connection_t *c) { bool send_del_subnet(connection_t *c, const subnet_t *s) { char netstr[MAXNETSTR]; - cp(); - if(!net2str(netstr, sizeof netstr, s)) return false; @@ -166,8 +160,6 @@ bool del_subnet_h(connection_t *c) { node_t *owner; subnet_t s = {0}, *find; - cp(); - if(sscanf(c->buffer, "%*d %*x " MAX_STRING " " MAX_STRING, name, subnetstr) != 2) { logger(LOG_ERR, _("Got bad %s from %s (%s)"), "DEL_SUBNET", c->name, c->hostname); diff --git a/src/raw_socket/device.c b/src/raw_socket/device.c index 5cefbce8..e52097eb 100644 --- a/src/raw_socket/device.c +++ b/src/raw_socket/device.c @@ -42,8 +42,6 @@ bool setup_device(void) { struct ifreq ifr; struct sockaddr_ll sa; - cp(); - if(!get_config_string(lookup_config(config_tree, "Interface"), &iface)) iface = xstrdup("eth0"); @@ -83,8 +81,6 @@ bool setup_device(void) { } void close_device(void) { - cp(); - close(device_fd); free(device); @@ -94,8 +90,6 @@ void close_device(void) { bool read_packet(vpn_packet_t *packet) { int lenin; - cp(); - if((lenin = read(device_fd, packet->data, MTU)) <= 0) { logger(LOG_ERR, _("Error while reading from %s %s: %s"), device_info, device, strerror(errno)); @@ -113,8 +107,6 @@ bool read_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"), packet->len, device_info); @@ -130,8 +122,6 @@ bool write_packet(vpn_packet_t *packet) { } void dump_device_stats(void) { - cp(); - logger(LOG_DEBUG, _("Statistics for %s %s:"), device_info, device); logger(LOG_DEBUG, _(" total bytes in: %10d"), device_total_in); logger(LOG_DEBUG, _(" total bytes out: %10d"), device_total_out); diff --git a/src/route.c b/src/route.c index 6cc2fc1c..7538bec5 100644 --- a/src/route.c +++ b/src/route.c @@ -104,8 +104,6 @@ static void learn_mac(mac_t *address) { avl_node_t *node; connection_t *c; - cp(); - subnet = lookup_subnet_mac(address); /* If we don't know this MAC address yet, store it */ @@ -139,8 +137,6 @@ void age_subnets(void) { connection_t *c; avl_node_t *node, *next, *node2; - cp(); - for(node = myself->subnet_tree->head; node; node = next) { next = node->next; s = node->data; @@ -175,8 +171,6 @@ static void route_ipv4_unreachable(node_t *source, vpn_packet_t *packet, uint8_t if(ratelimit(3)) return; - cp(); - /* Swap Ethernet source and destination addresses */ swap_mac_addresses(packet); @@ -246,8 +240,6 @@ static void fragment_ipv4_packet(node_t *dest, vpn_packet_t *packet) { uint8_t *offset; uint16_t ip_off, origf; - cp(); - memcpy(&ip, packet->data + ether_size, ip_size); fragment.priority = packet->priority; @@ -294,8 +286,6 @@ static void route_ipv4_unicast(node_t *source, vpn_packet_t *packet) { node_t *via; ipv4_t dest; - cp(); - memcpy(&dest, &packet->data[30], sizeof dest); subnet = lookup_subnet_ipv4(&dest); @@ -340,8 +330,6 @@ static void route_ipv4_unicast(node_t *source, vpn_packet_t *packet) { } static void route_ipv4(node_t *source, vpn_packet_t *packet) { - cp(); - if(!checklength(source, packet, ether_size + ip_size)) return; @@ -372,8 +360,6 @@ static void route_ipv6_unreachable(node_t *source, vpn_packet_t *packet, uint8_t if(ratelimit(3)) return; - cp(); - /* Swap Ethernet source and destination addresses */ swap_mac_addresses(packet); @@ -442,8 +428,6 @@ static void route_ipv6_unicast(node_t *source, vpn_packet_t *packet) { node_t *via; ipv6_t dest; - cp(); - memcpy(&dest, &packet->data[38], sizeof dest); subnet = lookup_subnet_ipv6(&dest); @@ -500,8 +484,6 @@ static void route_neighborsol(node_t *source, vpn_packet_t *packet) { uint32_t next; } pseudo; - cp(); - if(!checklength(source, packet, ether_size + ip6_size + ns_size)) return; @@ -627,8 +609,6 @@ static void route_neighborsol(node_t *source, vpn_packet_t *packet) { } static void route_ipv6(node_t *source, vpn_packet_t *packet) { - cp(); - if(!checklength(source, packet, ether_size + ip6_size)) return; @@ -650,8 +630,6 @@ static void route_arp(node_t *source, vpn_packet_t *packet) { subnet_t *subnet; struct in_addr addr; - cp(); - if(!checklength(source, packet, ether_size + arp_size)) return; @@ -715,9 +693,6 @@ static void route_mac(node_t *source, vpn_packet_t *packet) { subnet_t *subnet; mac_t dest; - cp(); - - /* Learn source address */ if(source == myself) { @@ -766,10 +741,7 @@ static void route_mac(node_t *source, vpn_packet_t *packet) { send_packet(subnet->owner, packet); } - void route(node_t *source, vpn_packet_t *packet) { - cp(); - if(!checklength(source, packet, ether_size)) return; diff --git a/src/solaris/device.c b/src/solaris/device.c index 71d9bda9..f1d648d3 100644 --- a/src/solaris/device.c +++ b/src/solaris/device.c @@ -46,8 +46,6 @@ bool setup_device(void) { int ppa; char *ptr; - cp(); - if(!get_config_string(lookup_config(config_tree, "Device"), &device)) device = xstrdup(DEFAULT_DEVICE); @@ -107,8 +105,6 @@ bool setup_device(void) { } void close_device(void) { - cp(); - close(device_fd); free(device); @@ -118,8 +114,6 @@ void close_device(void) { bool read_packet(vpn_packet_t *packet) { int lenin; - cp(); - if((lenin = read(device_fd, packet->data + 14, MTU - 14)) <= 0) { logger(LOG_ERR, _("Error while reading from %s %s: %s"), device_info, device, strerror(errno)); @@ -153,8 +147,6 @@ bool read_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"), packet->len, device_info); @@ -170,8 +162,6 @@ bool write_packet(vpn_packet_t *packet) { } void dump_device_stats(void) { - cp(); - logger(LOG_DEBUG, _("Statistics for %s %s:"), device_info, device); logger(LOG_DEBUG, _(" total bytes in: %10d"), device_total_in); logger(LOG_DEBUG, _(" total bytes out: %10d"), device_total_out); diff --git a/src/subnet.c b/src/subnet.c index fa1ee630..db7aeb1e 100644 --- a/src/subnet.c +++ b/src/subnet.c @@ -130,7 +130,6 @@ int subnet_compare(const subnet_t *a, const subnet_t *b) { default: logger(LOG_ERR, _("subnet_compare() was called with unknown subnet type %d, exitting!"), a->type); - cp_trace(); exit(0); } @@ -140,50 +139,36 @@ int subnet_compare(const subnet_t *a, const subnet_t *b) { /* Initialising trees */ void init_subnets(void) { - cp(); - subnet_tree = avl_alloc_tree((avl_compare_t) subnet_compare, (avl_action_t) free_subnet); subnet_cache_flush(); } void exit_subnets(void) { - cp(); - avl_delete_tree(subnet_tree); } avl_tree_t *new_subnet_tree(void) { - cp(); - return avl_alloc_tree((avl_compare_t) subnet_compare, NULL); } void free_subnet_tree(avl_tree_t *subnet_tree) { - cp(); - avl_delete_tree(subnet_tree); } /* Allocating and freeing space for subnets */ subnet_t *new_subnet(void) { - cp(); - return xmalloc_and_zero(sizeof(subnet_t)); } void free_subnet(subnet_t *subnet) { - cp(); - free(subnet); } /* Adding and removing subnets */ void subnet_add(node_t *n, subnet_t *subnet) { - cp(); - subnet->owner = n; avl_insert(subnet_tree, subnet); @@ -193,8 +178,6 @@ void subnet_add(node_t *n, subnet_t *subnet) { } void subnet_del(node_t *n, subnet_t *subnet) { - cp(); - avl_delete(n->subnet_tree, subnet); avl_delete(subnet_tree, subnet); @@ -208,8 +191,6 @@ bool str2net(subnet_t *subnet, const char *subnetstr) { uint16_t x[8]; int weight = 10; - cp(); - if(sscanf(subnetstr, "%hu.%hu.%hu.%hu/%d#%d", &x[0], &x[1], &x[2], &x[3], &l, &weight) >= 5) { if(l < 0 || l > 32) @@ -285,8 +266,6 @@ bool str2net(subnet_t *subnet, const char *subnetstr) { } bool net2str(char *netstr, int len, const subnet_t *subnet) { - cp(); - if(!netstr || !subnet) { logger(LOG_ERR, _("net2str() was called with netstr=%p, subnet=%p!\n"), netstr, subnet); return false; @@ -332,7 +311,6 @@ bool net2str(char *netstr, int len, const subnet_t *subnet) { logger(LOG_ERR, _("net2str() was called with unknown subnet type %d, exiting!"), subnet->type); - cp_trace(); exit(0); } @@ -342,16 +320,12 @@ bool net2str(char *netstr, int len, const subnet_t *subnet) { /* Subnet lookup routines */ subnet_t *lookup_subnet(const node_t *owner, const subnet_t *subnet) { - cp(); - return avl_search(owner->subnet_tree, subnet); } subnet_t *lookup_subnet_mac(const mac_t *address) { subnet_t *p, subnet = {0}; - cp(); - subnet.type = SUBNET_MAC; subnet.net.mac.address = *address; subnet.owner = NULL; @@ -366,8 +340,6 @@ subnet_t *lookup_subnet_ipv4(const ipv4_t *address) { avl_node_t *n; int i; - cp(); - // Check if this address is cached for(i = 0; i < 2; i++) { @@ -412,8 +384,6 @@ subnet_t *lookup_subnet_ipv6(const ipv6_t *address) { avl_node_t *n; int i; - cp(); - // Check if this address is cached for(i = 0; i < 2; i++) { @@ -525,8 +495,6 @@ void dump_subnets(void) { subnet_t *subnet; avl_node_t *node; - cp(); - logger(LOG_DEBUG, _("Subnet list:")); for(node = subnet_tree->head; node; node = node->next) { diff --git a/src/uml_socket/device.c b/src/uml_socket/device.c index fa46f65a..aaaab443 100644 --- a/src/uml_socket/device.c +++ b/src/uml_socket/device.c @@ -65,8 +65,6 @@ bool setup_device(void) { } name; struct timeval tv; - cp(); - if(!get_config_string(lookup_config(config_tree, "Device"), &device)) xasprintf(&device, LOCALSTATEDIR "/run/%s.umlsocket", identname); @@ -152,8 +150,6 @@ bool setup_device(void) { } void close_device(void) { - cp(); - if(listen_fd >= 0) close(listen_fd); @@ -175,8 +171,6 @@ void close_device(void) { bool read_packet(vpn_packet_t *packet) { int lenin; - cp(); - switch(state) { case 0: { struct sockaddr sa; @@ -253,8 +247,6 @@ bool read_packet(vpn_packet_t *packet) { } bool write_packet(vpn_packet_t *packet) { - cp(); - if(state != 2) { ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Dropping packet of %d bytes to %s: not connected to UML yet"), packet->len, device_info); @@ -279,8 +271,6 @@ bool write_packet(vpn_packet_t *packet) { } void dump_device_stats(void) { - cp(); - logger(LOG_DEBUG, _("Statistics for %s %s:"), device_info, device); logger(LOG_DEBUG, _(" total bytes in: %10d"), device_total_in); logger(LOG_DEBUG, _(" total bytes out: %10d"), device_total_out); From 4c85542894f7fca823b119b05e07179deb24229a Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Fri, 25 Sep 2009 00:54:07 +0200 Subject: [PATCH 7/9] Drop support for localisation. Localised messages don't make much sense for a daemon, and there is only the Dutch translation which costs time to maintain. --- Makefile.am | 2 +- configure.in | 7 +- lib/Makefile.am | 2 +- lib/getopt.c | 28 +- lib/gettext.h | 79 -- lib/utils.c | 2 +- lib/xmalloc.c | 3 +- po/Makevars | 41 - po/POTFILES.in | 35 - po/nl.po | 1623 --------------------------------------- src/Makefile.am | 2 +- src/bsd/device.c | 44 +- src/conf.c | 22 +- src/connection.c | 10 +- src/cygwin/device.c | 36 +- src/edge.c | 6 +- src/graph.c | 4 +- src/linux/device.c | 34 +- src/meta.c | 24 +- src/mingw/device.c | 28 +- src/net.c | 24 +- src/net_packet.c | 54 +- src/net_setup.c | 54 +- src/net_socket.c | 54 +- src/netutl.c | 14 +- src/node.c | 6 +- src/process.c | 94 +-- src/protocol.c | 28 +- src/protocol_auth.c | 58 +- src/protocol_edge.c | 38 +- src/protocol_key.c | 32 +- src/protocol_misc.c | 10 +- src/protocol_subnet.c | 34 +- src/raw_socket/device.c | 24 +- src/route.c | 42 +- src/solaris/device.c | 32 +- src/subnet.c | 12 +- src/tincd.c | 66 +- src/uml_socket/device.c | 50 +- system.h | 4 - 40 files changed, 486 insertions(+), 2276 deletions(-) delete mode 100644 lib/gettext.h delete mode 100644 po/Makevars delete mode 100644 po/POTFILES.in delete mode 100644 po/nl.po diff --git a/Makefile.am b/Makefile.am index e4019930..3a8e51fe 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,7 +2,7 @@ AUTOMAKE_OPTIONS = gnu -SUBDIRS = m4 lib src doc po +SUBDIRS = m4 lib src doc ACLOCAL_AMFLAGS = -I m4 diff --git a/configure.in b/configure.in index 4c28426e..01f56ebf 100644 --- a/configure.in +++ b/configure.in @@ -7,9 +7,6 @@ AM_INIT_AUTOMAKE(tinc, 1.0-cvs) AC_CONFIG_HEADERS([config.h]) AM_MAINTAINER_MODE -AM_GNU_GETTEXT([external]) -AM_GNU_GETTEXT_VERSION(0.14.1) - # Enable GNU extensions. # Define this here, not in acconfig's @TOP@ section, since definitions # in the latter don't make it into the configure-time tests. @@ -27,7 +24,7 @@ AC_PROG_RANLIB dnl Check and set OS -#AC_CANONICAL_HOST +AC_CANONICAL_HOST case $host_os in *linux*) @@ -166,6 +163,6 @@ AC_ARG_ENABLE(jumbograms, AC_SUBST(INCLUDES) -AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile lib/Makefile po/Makefile.in m4/Makefile]) +AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile lib/Makefile m4/Makefile]) AC_OUTPUT diff --git a/lib/Makefile.am b/lib/Makefile.am index 3bf58a78..734bb640 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -9,6 +9,6 @@ libvpn_a_SOURCES = xmalloc.c pidfile.c utils.c getopt.c getopt1.c list.c avl_tre libvpn_a_LIBADD = @LIBOBJS@ @ALLOCA@ libvpn_a_DEPENDENCIES = $(libvpn_a_LIBADD) -noinst_HEADERS = xalloc.h pidfile.h utils.h getopt.h list.h avl_tree.h dropin.h fake-getaddrinfo.h fake-getnameinfo.h fake-gai-errnos.h gettext.h ipv6.h ipv4.h ethernet.h +noinst_HEADERS = xalloc.h pidfile.h utils.h getopt.h list.h avl_tree.h dropin.h fake-getaddrinfo.h fake-getnameinfo.h fake-gai-errnos.h ipv6.h ipv4.h ethernet.h EXTRA_DIST = diff --git a/lib/getopt.c b/lib/getopt.c index 5f74dee1..fce2f0c7 100644 --- a/lib/getopt.c +++ b/lib/getopt.c @@ -669,7 +669,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) if (ambig && !exact) { if (opterr) - fprintf (stderr, _("%s: option `%s' is ambiguous\n"), + fprintf (stderr, "%s: option `%s' is ambiguous\n", argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; @@ -693,12 +693,12 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) if (argv[optind - 1][1] == '-') /* --option */ fprintf (stderr, - _("%s: option `--%s' doesn't allow an argument\n"), + "%s: option `--%s' doesn't allow an argument\n", argv[0], pfound->name); else /* +option or -option */ fprintf (stderr, - _("%s: option `%c%s' doesn't allow an argument\n"), + "%s: option `%c%s' doesn't allow an argument\n", argv[0], argv[optind - 1][0], pfound->name); nextchar += strlen (nextchar); @@ -715,7 +715,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) { if (opterr) fprintf (stderr, - _("%s: option `%s' requires an argument\n"), + "%s: option `%s' requires an argument\n", argv[0], argv[optind - 1]); nextchar += strlen (nextchar); optopt = pfound->val; @@ -744,11 +744,11 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) { if (argv[optind][1] == '-') /* --option */ - fprintf (stderr, _("%s: unrecognized option `--%s'\n"), + fprintf (stderr, "%s: unrecognized option `--%s'\n", argv[0], nextchar); else /* +option or -option */ - fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), + fprintf (stderr, "%s: unrecognized option `%c%s'\n", argv[0], argv[optind][0], nextchar); } nextchar = (char *) ""; @@ -774,10 +774,10 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) { if (posixly_correct) /* 1003.2 specifies the format of this message. */ - fprintf (stderr, _("%s: illegal option -- %c\n"), + fprintf (stderr, "%s: illegal option -- %c\n", argv[0], c); else - fprintf (stderr, _("%s: invalid option -- %c\n"), + fprintf (stderr, "%s: invalid option -- %c\n", argv[0], c); } optopt = c; @@ -807,7 +807,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) if (opterr) { /* 1003.2 specifies the format of this message. */ - fprintf (stderr, _("%s: option requires an argument -- %c\n"), + fprintf (stderr, "%s: option requires an argument -- %c\n", argv[0], c); } optopt = c; @@ -854,7 +854,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) if (ambig && !exact) { if (opterr) - fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), + fprintf (stderr, "%s: option `-W %s' is ambiguous\n", argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; @@ -872,8 +872,8 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) else { if (opterr) - fprintf (stderr, _("\ -%s: option `-W %s' doesn't allow an argument\n"), + fprintf (stderr, + "%s: option `-W %s' doesn't allow an argument\n", argv[0], pfound->name); nextchar += strlen (nextchar); @@ -888,7 +888,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) { if (opterr) fprintf (stderr, - _("%s: option `%s' requires an argument\n"), + "%s: option `%s' requires an argument\n", argv[0], argv[optind - 1]); nextchar += strlen (nextchar); return optstring[0] == ':' ? ':' : '?'; @@ -937,7 +937,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) { /* 1003.2 specifies the format of this message. */ fprintf (stderr, - _("%s: option requires an argument -- %c\n"), + "%s: option requires an argument -- %c\n", argv[0], c); } optopt = c; diff --git a/lib/gettext.h b/lib/gettext.h deleted file mode 100644 index 759d81f4..00000000 --- a/lib/gettext.h +++ /dev/null @@ -1,79 +0,0 @@ -/* Convenience header for conditional use of GNU . - Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published - by the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ - -#ifndef _LIBGETTEXT_H -#define _LIBGETTEXT_H 1 - -/* NLS can be disabled through the configure --disable-nls option. */ -#if ENABLE_NLS - -/* Get declarations of GNU message catalog functions. */ -# include -# include - -/* Shorthand notation */ - -# define _(Text) gettext (Text) - -#else - -/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which - chokes if dcgettext is defined as a macro. So include it now, to make - later inclusions of a NOP. We don't include - as well because people using "gettext.h" will not include , - and also including would fail on SunOS 4, whereas - is OK. */ -#if defined(__sun) -# include -#endif - -/* Disabled NLS. - The casts to 'const char *' serve the purpose of producing warnings - for invalid uses of the value returned from these functions. - On pre-ANSI systems without 'const', the config.h file is supposed to - contain "#define const". */ -# define gettext(Msgid) ((const char *) (Msgid)) -# define dgettext(Domainname, Msgid) ((const char *) (Msgid)) -# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid)) -# define ngettext(Msgid1, Msgid2, N) \ - ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) -# define dngettext(Domainname, Msgid1, Msgid2, N) \ - ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) -# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ - ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) -# define textdomain(Domainname) ((const char *) (Domainname)) -# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname)) -# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset)) - -# define _(Text) Text -# define setlocale(Category, Locale) ((const char *) (Locale)) - -#endif - -/* A pseudo function call that serves as a marker for the automated - extraction of messages, but does not call gettext(). The run-time - translation is done at a different place in the code. - The argument, String, should be a literal string. Concatenated strings - and other string expressions won't work. - The macro's expansion is not parenthesized, so that it is suitable as - initializer for static 'char[]' or 'const char[]' variables. */ -#define gettext_noop(String) String - -#define N_(Text) Text - -#endif /* _LIBGETTEXT_H */ diff --git a/lib/utils.c b/lib/utils.c index 3283472d..dd7e4de2 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -57,7 +57,7 @@ const char *winerror(int err) { if (!FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), buf, sizeof(buf), NULL)) { - strncpy(buf, _("(unable to format errormessage)"), sizeof(buf)); + strncpy(buf, "(unable to format errormessage)", sizeof(buf)); }; if((newline = strchr(buf, '\r'))) diff --git a/lib/xmalloc.c b/lib/xmalloc.c index 83c57932..9563391e 100644 --- a/lib/xmalloc.c +++ b/lib/xmalloc.c @@ -34,7 +34,6 @@ void *realloc (); void free (); #endif -#include "gettext.h" #include "xalloc.h" #ifndef EXIT_FAILURE @@ -53,7 +52,7 @@ void *xrealloc (void *p, size_t n); int xalloc_exit_failure = EXIT_FAILURE; /* FIXME: describe */ -char *const xalloc_msg_memory_exhausted = N_("Memory exhausted"); +char *const xalloc_msg_memory_exhausted = "Memory exhausted"; /* FIXME: describe */ void (*xalloc_fail_func) (int) = 0; diff --git a/po/Makevars b/po/Makevars deleted file mode 100644 index 485b60eb..00000000 --- a/po/Makevars +++ /dev/null @@ -1,41 +0,0 @@ -# Makefile variables for PO directory in any package using GNU gettext. - -# Usually the message domain is the same as the package name. -DOMAIN = $(PACKAGE) - -# These two variables depend on the location of this directory. -subdir = po -top_builddir = .. - -# These options get passed to xgettext. -XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ - -# This is the copyright holder that gets inserted into the header of the -# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding -# package. (Note that the msgstr strings, extracted from the package's -# sources, belong to the copyright holder of the package.) Translators are -# expected to transfer the copyright for their translations to this person -# or entity, or to disclaim their copyright. The empty string stands for -# the public domain; in this case the translators are expected to disclaim -# their copyright. -COPYRIGHT_HOLDER = Ivo Timmermans and Guus Sliepen - -# This is the email address or URL to which the translators shall report -# bugs in the untranslated strings: -# - Strings which are not entire sentences, see the maintainer guidelines -# in the GNU gettext documentation, section 'Preparing Strings'. -# - Strings which use unclear terms or require additional context to be -# understood. -# - Strings which make invalid assumptions about notation of date, time or -# money. -# - Pluralisation problems. -# - Incorrect English spelling. -# - Incorrect formatting. -# It can be your email address, or a mailing list address where translators -# can write to without being subscribed, or the URL of a web page through -# which the translators can contact you. -MSGID_BUGS_ADDRESS = tinc-devel@tinc-vpn.org - -# This is the list of locale categories, beyond LC_MESSAGES, for which the -# message catalogs shall be used. It is usually empty. -EXTRA_LOCALE_CATEGORIES = diff --git a/po/POTFILES.in b/po/POTFILES.in deleted file mode 100644 index e1df6e78..00000000 --- a/po/POTFILES.in +++ /dev/null @@ -1,35 +0,0 @@ -# List of files which contain translatable strings. -# Copyright (C) 1999,2000 Ivo Timmermans - -# Package source files - -lib/pidfile.c -lib/utils.c -src/conf.c -src/connection.c -src/meta.c -src/net.c -src/net_packet.c -src/net_setup.c -src/net_socket.c -src/netutl.c -src/protocol.c -src/protocol_auth.c -src/protocol_edge.c -src/protocol_key.c -src/protocol_misc.c -src/protocol_subnet.c -src/subnet.c -src/tincd.c -src/process.c -src/route.c -src/node.c -src/edge.c -src/graph.c -src/linux/device.c -src/solaris/device.c -src/bsd/device.c -src/cygwin/device.c -src/mingw/device.c -src/raw_socket/device.c -src/uml_socket/device.c diff --git a/po/nl.po b/po/nl.po deleted file mode 100644 index 1c60b28e..00000000 --- a/po/nl.po +++ /dev/null @@ -1,1623 +0,0 @@ -# Dutch messages for tinc -# Copyright (C) 1999-2008 Ivo Timmermans, Guus Sliepen. -# Ivo Timmermans , 1999-2006. -# Guus Sliepen , 2000-2008. -msgid "" -msgstr "" -"Project-Id-Version: tinc 1.0-svn\n" -"Report-Msgid-Bugs-To: tinc-devel@tinc-vpn.org\n" -"POT-Creation-Date: 2008-12-24 11:43+0100\n" -"PO-Revision-Date: 2008-12-24 11:45+0100\n" -"Last-Translator: Guus Sliepen \n" -"Language-Team: Dutch\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: lib/utils.c:93 -msgid "(unable to format errormessage)" -msgstr "(kon foutmelding niet samenstellen)" - -#: src/conf.c:160 -#, c-format -msgid "\"yes\" or \"no\" expected for configuration variable %s in %s line %d" -msgstr "" -"\"ja\" of \"nee\" verwacht voor configuratievariabele %s in %s regel %d" - -#: src/conf.c:176 -#, c-format -msgid "Integer expected for configuration variable %s in %s line %d" -msgstr "Geheel getal verwacht voor configuratievariabele %s in %s regel %d" - -#: src/conf.c:210 -#, c-format -msgid "" -"Hostname or IP address expected for configuration variable %s in %s line %d" -msgstr "" -"Hostnaam of IP adres verwacht voor configuratievariabele %s in %s regel %d" - -#: src/conf.c:226 -#, c-format -msgid "Subnet expected for configuration variable %s in %s line %d" -msgstr "Subnet verwacht voor configuratievariabele %s in %s regel %d" - -#: src/conf.c:237 -#, c-format -msgid "" -"Network address and prefix length do not match for configuration variable %s " -"in %s line %d" -msgstr "" -"Netwerk adres en prefix lengte komen niet overeen bij configuratievariabele %" -"s in %s regel %d" - -#: src/conf.c:337 -#, c-format -msgid "Cannot open config file %s: %s" -msgstr "Kan configuratie bestand %s niet openen: %s" - -#: src/conf.c:391 -#, c-format -msgid "No value for variable `%s' on line %d while reading config file %s" -msgstr "" -"Geen waarde voor variabele `%s' op regel %d tijdens het lezen van " -"configuratie bestand %s" - -#: src/conf.c:422 -#, c-format -msgid "Failed to read `%s': %s" -msgstr "Lezen van `%s' mislukte: %s" - -#: src/conf.c:444 -#, c-format -msgid "Please enter a file to save %s to [%s]: " -msgstr "Geef een bestand om de %s naar de schrijven [%s]: " - -#: src/conf.c:451 -#, c-format -msgid "Error while reading stdin: %s\n" -msgstr "Fout tijdens lezen van standaardinvoer: %s\n" - -#: src/conf.c:483 -#, c-format -msgid "Error opening file `%s': %s\n" -msgstr "Fout bij het openen van het bestand `%s': %s\n" - -#: src/connection.c:49 -msgid "everyone" -msgstr "iedereen" - -#: src/connection.c:50 -msgid "BROADCAST" -msgstr "BROADCAST" - -#: src/connection.c:142 -msgid "Connections:" -msgstr "Verbindingen:" - -#: src/connection.c:146 -#, c-format -msgid " %s at %s options %lx socket %d status %04x outbuf %d/%d/%d" -msgstr " %s op %s opties %lx socket %d status %04x outbuf %d/%d/%d" - -#: src/connection.c:151 -msgid "End of connections." -msgstr "Einde van verbindingen." - -#: src/meta.c:44 -#, c-format -msgid "Sending %d bytes of metadata to %s (%s)" -msgstr "Verzenden van %d bytes metadata naar %s (%s)" - -#: src/meta.c:66 -#, c-format -msgid "Error while encrypting metadata to %s (%s): %s" -msgstr "Fout tijdens versleutelen van metadata naar %s (%s): %s" - -#: src/meta.c:70 -msgid "Encrypted data too long! Heap corrupted!" -msgstr "Versleutelde data te lang! Heap gecorrumpeerd!" - -#: src/meta.c:86 -#, c-format -msgid "Flushing %d bytes to %s (%s)" -msgstr "Wegschrijven %d bytes naar %s (%s)" - -#: src/meta.c:93 src/meta.c:156 -#, c-format -msgid "Connection closed by %s (%s)" -msgstr "Verbinding beëindigd door %s (%s)" - -#: src/meta.c:99 -#, c-format -msgid "Flushing %d bytes to %s (%s) would block" -msgstr "Wegschrijven %d bytes naar %s (%s) zou blokkeren" - -#: src/meta.c:104 -#, c-format -msgid "Flushing meta data to %s (%s) failed: %s" -msgstr "Wegschrijven metadata naar %s (%s) faalde: %s" - -#: src/meta.c:161 -#, c-format -msgid "Metadata socket read error for %s (%s): %s" -msgstr "Fout op metadata socket voor %s (%s) tijdens lezen: %s" - -#: src/meta.c:176 -#, c-format -msgid "Error while decrypting metadata from %s (%s): %s" -msgstr "Fout tijdens ontsleutelen van metadata van %s (%s): %s" - -#: src/meta.c:229 -#, c-format -msgid "Metadata read buffer overflow for %s (%s)" -msgstr "Metadata leesbuffer overloop voor %s (%s)" - -#: src/net.c:60 -msgid "Purging unreachable nodes" -msgstr "Verwijderen onbereikbare nodes" - -#: src/net.c:69 -#, c-format -msgid "Purging node %s (%s)" -msgstr "Verwijdering node %s (%s)" - -#: src/net.c:173 -#, c-format -msgid "Closing connection with %s (%s)" -msgstr "Beëindigen verbinding met %s (%s)" - -#: src/net.c:244 -#, c-format -msgid "%s (%s) didn't respond to PING in %ld seconds" -msgstr "%s (%s) antwoordde niet binnen %ld seconden op PING" - -#: src/net.c:253 -#, c-format -msgid "Old connection_t for %s (%s) status %04x still lingering, deleting..." -msgstr "" -"Oude connection_t voor %s (%s) status %04x nog steeds aanwezig, wordt " -"verwijderd..." - -#: src/net.c:258 -#, c-format -msgid "Timeout from %s (%s) during authentication" -msgstr "Timeout van %s (%s) tijdens authenticatie" - -#: src/net.c:273 -#, c-format -msgid "%s (%s) could not flush for %ld seconds (%d bytes remaining)" -msgstr "%s (%s) kon niet binnen %ld seconden wegschrijven (%d bytes over)" - -#: src/net.c:318 -#, c-format -msgid "Error while connecting to %s (%s): %s" -msgstr "Fout tijdens schrijven naar %s (%s): %s" - -#: src/net.c:383 -#, c-format -msgid "Error while waiting for input: %s" -msgstr "Fout tijdens wachten op invoer: %s" - -#: src/net.c:414 -msgid "Regenerating symmetric key" -msgstr "Hergenereren symmetrische sleutel" - -#: src/net.c:431 -msgid "Flushing event queue" -msgstr "Legen taakrij" - -#: src/net.c:450 -msgid "Unable to reread configuration file, exitting." -msgstr "Kan configuratiebestand niet herlezen, beëindigen." - -#: src/net_packet.c:75 -#, c-format -msgid "No response to MTU probes from %s (%s)" -msgstr "Geen antwoord van %s (%s) op MTU probes" - -#: src/net_packet.c:82 -#, c-format -msgid "Fixing MTU of %s (%s) to %d after %d probes" -msgstr "MTU van %s (%s) vastgezet op %d na %d probes" - -#: src/net_packet.c:94 -#, c-format -msgid "Sending MTU probe length %d to %s (%s)" -msgstr "Verzending MTU probe lengte %d naar %s (%s)" - -#: src/net_packet.c:107 -#, c-format -msgid "Got MTU probe length %d from %s (%s)" -msgstr "Kreeg MTU probe met verkeerde lengte %d van %s (%s)" - -#: src/net_packet.c:164 -#, c-format -msgid "Received packet of %d bytes from %s (%s)" -msgstr "Ontvangst pakket van %d bytes van %s (%s)" - -#: src/net_packet.c:185 src/route.c:92 -#, c-format -msgid "Got too short packet from %s (%s)" -msgstr "Kreeg te kort pakket van %s (%s)" - -#: src/net_packet.c:198 -#, c-format -msgid "Got unauthenticated packet from %s (%s)" -msgstr "Kreeg niet-geauthenticeerd pakket van %s (%s)" - -#: src/net_packet.c:213 -#, c-format -msgid "Error decrypting packet from %s (%s): %s" -msgstr "Fout tijdens ontsleutelen pakket van %s (%s): %s" - -#: src/net_packet.c:229 -#, c-format -msgid "Lost %d packets from %s (%s)" -msgstr "%d pakketten van %s (%s) verloren" - -#: src/net_packet.c:235 -#, c-format -msgid "Got late or replayed packet from %s (%s), seqno %d, last received %d" -msgstr "" -"Kreeg laat of gedupliceerd pakket van %s (%s), seqno %d, laatste ontvangen %d" - -#: src/net_packet.c:259 -#, c-format -msgid "Error while uncompressing packet from %s (%s)" -msgstr "Fout tijdens decomprimeren pakket van %s (%s)" - -#: src/net_packet.c:308 -#, c-format -msgid "No valid key known yet for %s (%s), queueing packet" -msgstr "" -"Nog geen geldige sleutel bekend voor %s (%s), pakket wordt in wachtrij gezet" - -#: src/net_packet.c:337 -#, c-format -msgid "Error while compressing packet to %s (%s)" -msgstr "Fout tijdens comprimeren pakket naar %s (%s)" - -#: src/net_packet.c:359 -#, c-format -msgid "Error while encrypting packet to %s (%s): %s" -msgstr "Fout tijdens versleutelen pakket naar %s (%s): %s" - -#: src/net_packet.c:391 -#, c-format -msgid "Setting outgoing packet priority to %d" -msgstr "Instellen prioriteit uitgaand pakket op %d" - -#: src/net_packet.c:393 src/net_setup.c:478 src/net_socket.c:140 -#: src/net_socket.c:169 src/tincd.c:435 src/tincd.c:472 src/process.c:201 -#: src/process.c:234 src/process.c:433 src/bsd/device.c:93 -#: src/bsd/device.c:112 src/cygwin/device.c:140 src/cygwin/device.c:171 -#: src/mingw/device.c:73 src/mingw/device.c:80 src/mingw/device.c:86 -#: src/mingw/device.c:258 src/mingw/device.c:265 src/mingw/device.c:270 -#: src/mingw/device.c:277 src/mingw/device.c:286 src/mingw/device.c:293 -#: src/uml_socket/device.c:89 src/uml_socket/device.c:103 -#: src/uml_socket/device.c:130 src/uml_socket/device.c:194 -#, c-format -msgid "System call `%s' failed: %s" -msgstr "Systeemaanroep `%s' mislukte: %s" - -#: src/net_packet.c:404 -#, c-format -msgid "Error sending packet to %s (%s): %s" -msgstr "Fout tijdens verzenden pakket naar %s (%s): %s" - -#: src/net_packet.c:427 -#, c-format -msgid "Sending packet of %d bytes to %s (%s)" -msgstr "Verzending pakket van %d bytes naar %s (%s)" - -#: src/net_packet.c:431 -#, c-format -msgid "Node %s (%s) is not reachable" -msgstr "Node %s (%s) is niet bereikbaar" - -#: src/net_packet.c:439 -#, c-format -msgid "Sending packet to %s via %s (%s)" -msgstr "Verzending pakket naar %s via %s (%s)" - -#: src/net_packet.c:458 -#, c-format -msgid "Broadcasting packet of %d bytes from %s (%s)" -msgstr "Verspreiding pakket van %d bytes van %s (%s)" - -#: src/net_packet.c:478 -#, c-format -msgid "Flushing queue for %s (%s)" -msgstr "Legen van wachtrij voor %s (%s)" - -#: src/net_packet.c:500 -#, c-format -msgid "Receiving packet failed: %s" -msgstr "Ontvangst pakket mislukt: %s" - -#: src/net_packet.c:510 -#, c-format -msgid "Received UDP packet from unknown source %s" -msgstr "Ontvangst UDP pakket van onbekende oorsprong %s" - -#: src/net_setup.c:77 src/net_setup.c:94 -#, c-format -msgid "Error reading RSA public key file `%s': %s" -msgstr "Fout tijdens lezen RSA publieke sleutel bestand `%s': %s" - -#: src/net_setup.c:109 -#, c-format -msgid "Reading RSA public key file `%s' failed: %s" -msgstr "Lezen RSA publieke sleutel bestand `%s' mislukt: %s" - -#: src/net_setup.c:145 -#, c-format -msgid "No public key for %s specified!" -msgstr "Geen publieke sleutel bekend voor %s gespecificeerd!" - -#: src/net_setup.c:160 -msgid "PrivateKey used but no PublicKey found!" -msgstr "PrivateKey gebruikt maar geen PublicKey gevonden!" - -#: src/net_setup.c:179 -#, c-format -msgid "Error reading RSA private key file `%s': %s" -msgstr "Fout tijdens lezen RSA privé sleutel bestand `%s': %s" - -#: src/net_setup.c:187 -#, c-format -msgid "Could not stat RSA private key file `%s': %s'" -msgstr "Kon gegevens RSA privé sleutel bestand `%s' niet opvragen: %s" - -#: src/net_setup.c:194 -#, c-format -msgid "Warning: insecure file permissions for RSA private key file `%s'!" -msgstr "" -"Waarschuwing: onveilige permissies voor RSA privé sleutel bestand `%s'!" - -#: src/net_setup.c:201 -#, c-format -msgid "Reading RSA private key file `%s' failed: %s" -msgstr "Fout tijdens lezen RSA privé sleutel bestand `%s': %s" - -#: src/net_setup.c:231 src/net_setup.c:232 -msgid "MYSELF" -msgstr "MIJZELF" - -#: src/net_setup.c:238 -msgid "Name for tinc daemon required!" -msgstr "Naam voor tinc daemon verplicht!" - -#: src/net_setup.c:243 -msgid "Invalid name for myself!" -msgstr "Ongeldige naam voor mijzelf!" - -#: src/net_setup.c:252 -msgid "Cannot open host configuration file for myself!" -msgstr "Kan host configuratie bestand voor mijzelf niet openen!" - -#: src/net_setup.c:305 -msgid "Invalid routing mode!" -msgstr "Ongeldige routing modus!" - -#: src/net_setup.c:316 -msgid "PriorityInheritance not supported on this platform" -msgstr "PriorityInheritance wordt niet ondersteund op dit platform" - -#: src/net_setup.c:324 -msgid "Bogus maximum timeout!" -msgstr "Onzinnige maximum timeout!" - -#: src/net_setup.c:338 -msgid "Invalid address family!" -msgstr "Ongeldige adresfamilie!" - -#: src/net_setup.c:356 -msgid "Unrecognized cipher type!" -msgstr "Onbekend cipher type!" - -#: src/net_setup.c:381 src/protocol_auth.c:194 -#, c-format -msgid "Error during initialisation of cipher for %s (%s): %s" -msgstr "Fout tijdens initialisatie van cipher voor %s (%s): %s" - -#: src/net_setup.c:398 -msgid "Unrecognized digest type!" -msgstr "Onbekend digest type!" - -#: src/net_setup.c:411 -msgid "MAC length exceeds size of digest!" -msgstr "MAC lengte is groter dan dat van digest!" - -#: src/net_setup.c:414 -msgid "Bogus MAC length!" -msgstr "Onzinnige MAC lengte!" - -#: src/net_setup.c:428 -msgid "Bogus compression level!" -msgstr "Onzinnig compressieniveau!" - -#: src/net_setup.c:500 -#, c-format -msgid "Listening on %s" -msgstr "Luisterend op %s" - -#: src/net_setup.c:511 -msgid "Ready" -msgstr "Gereed" - -#: src/net_setup.c:513 -msgid "Unable to create any listening socket!" -msgstr "Kon geen enkele luistersocket aanmaken!" - -#: src/net_socket.c:63 -#, c-format -msgid "fcntl for %s: %s" -msgstr "fcntl voor %s: %s" - -#: src/net_socket.c:69 -#, c-format -msgid "ioctlsocket for %s: WSA error %d" -msgstr "ioctlsocket voor %s: WSA fout %d" - -#: src/net_socket.c:96 -#, c-format -msgid "Creating metasocket failed: %s" -msgstr "Aanmaak van metasocket mislukt: %s" - -#: src/net_socket.c:120 src/net_socket.c:227 -#, c-format -msgid "Can't bind to interface %s: %s" -msgstr "Kan niet aan interface %s binden: %s" - -#: src/net_socket.c:125 -msgid "BindToInterface not supported on this platform" -msgstr "BindToInterface wordt niet ondersteund op dit platform" - -#: src/net_socket.c:132 -#, c-format -msgid "Can't bind to %s/tcp: %s" -msgstr "Kan niet aan %s/tcp binden: %s" - -#: src/net_socket.c:159 -#, c-format -msgid "Creating UDP socket failed: %s" -msgstr "Aanmaak UDP socket mislukte: %s" - -#: src/net_socket.c:179 -#, c-format -msgid "Call to `%s' failed: WSA error %d" -msgstr "Systeemaanroep `%s' mislukte: WSA fout %d" - -#: src/net_socket.c:238 -#, c-format -msgid "Can't bind to %s/udp: %s" -msgstr "Kan niet aan %s/udp binden: %s" - -#: src/net_socket.c:265 -#, c-format -msgid "Trying to re-establish outgoing connection in %d seconds" -msgstr "Poging tot herstellen van uitgaande verbinding over %d seconden" - -#: src/net_socket.c:273 -#, c-format -msgid "Connected to %s (%s)" -msgstr "Verbonden met %s (%s)" - -#: src/net_socket.c:292 -#, c-format -msgid "Could not set up a meta connection to %s" -msgstr "Kon geen metaverbinding aangaan met %s" - -#: src/net_socket.c:327 -#, c-format -msgid "Trying to connect to %s (%s)" -msgstr "Poging tot verbinden met %s (%s)" - -#: src/net_socket.c:333 -#, c-format -msgid "Creating socket for %s failed: %s" -msgstr "Aanmaken socket voor %s mislukt: %s" - -#: src/net_socket.c:365 -#, c-format -msgid "%s: %s" -msgstr "%s: %s" - -#: src/net_socket.c:386 -#, c-format -msgid "Already connected to %s" -msgstr "Reeds verbonden met %s" - -#: src/net_socket.c:405 -#, c-format -msgid "No address specified for %s" -msgstr "Geen adres gespecificeerd voor %s" - -#: src/net_socket.c:436 -#, c-format -msgid "Accepting a new connection failed: %s" -msgstr "Aanname van nieuwe verbinding is mislukt: %s" - -#: src/net_socket.c:455 -#, c-format -msgid "Connection from %s" -msgstr "Verbinding van %s" - -#: src/net_socket.c:480 -#, c-format -msgid "Invalid name for outgoing connection in %s line %d" -msgstr "Ongeldige naam voor uitgaande verbinding in %s regel %d" - -#: src/netutl.c:50 -#, c-format -msgid "Error looking up %s port %s: %s" -msgstr "Fout bij het opzoeken van %s poort %s: %s" - -#: src/netutl.c:105 -#, c-format -msgid "Error while translating addresses: %s" -msgstr "Fout tijdens vertalen adressen: %s" - -#: src/netutl.c:131 src/netutl.c:142 -#, c-format -msgid "%s port %s" -msgstr "%s poort %s" - -#: src/netutl.c:138 -#, c-format -msgid "Error while looking up hostname: %s" -msgstr "Fout bij het opzoeken van hostnaam: %s" - -#: src/netutl.c:187 -#, c-format -msgid "sockaddrcmp() was called with unknown address family %d, exitting!" -msgstr "" -"sockaddrcmp() werd aangeroepen met onbekende adresfamilie %d, beëindigen!" - -#: src/protocol.c:87 -#, c-format -msgid "Output buffer overflow while sending request to %s (%s)" -msgstr "Uitvoer buffer overvol tijdens zenden verzoek naar %s (%s)" - -#: src/protocol.c:95 -#, c-format -msgid "Sending %s to %s (%s): %s" -msgstr "Verzending %s naar %s (%s): %s" - -#: src/protocol.c:98 -#, c-format -msgid "Sending %s to %s (%s)" -msgstr "Verzending %s naar %s (%s)" - -#: src/protocol.c:120 -#, c-format -msgid "Forwarding %s from %s (%s): %s" -msgstr "Doorsturen %s van %s (%s): %s" - -#: src/protocol.c:124 -#, c-format -msgid "Forwarding %s from %s (%s)" -msgstr "Doorsturen %s van %s (%s)" - -#: src/protocol.c:142 -#, c-format -msgid "Unknown request from %s (%s): %s" -msgstr "Onbekend verzoek van %s (%s): %s" - -#: src/protocol.c:145 -#, c-format -msgid "Unknown request from %s (%s)" -msgstr "Onbekend verzoek van %s (%s)" - -#: src/protocol.c:152 -#, c-format -msgid "Got %s from %s (%s): %s" -msgstr "Kreeg %s van %s (%s): %s" - -#: src/protocol.c:156 -#, c-format -msgid "Got %s from %s (%s)" -msgstr "Kreeg %s van %s (%s)" - -#: src/protocol.c:162 -#, c-format -msgid "Unauthorized request from %s (%s)" -msgstr "Niet toegestaan verzoek van %s (%s)" - -#: src/protocol.c:170 -#, c-format -msgid "Error while processing %s from %s (%s)" -msgstr "Fout tijdens afhandelen %s van %s (%s)" - -#: src/protocol.c:175 -#, c-format -msgid "Bogus data received from %s (%s)" -msgstr "Onzinnige data ontvangen van %s (%s)" - -#: src/protocol.c:221 -msgid "Already seen request" -msgstr "Verzoek reeds gezien" - -#: src/protocol.c:251 -#, c-format -msgid "Aging past requests: deleted %d, left %d" -msgstr "Veroudering vorige verzoeken: %d gewist, %d overgebleven" - -#: src/protocol_auth.c:58 src/protocol_auth.c:214 src/protocol_auth.c:345 -#: src/protocol_auth.c:412 src/protocol_auth.c:538 src/protocol_edge.c:73 -#: src/protocol_edge.c:188 src/protocol_key.c:62 src/protocol_key.c:105 -#: src/protocol_key.c:179 src/protocol_misc.c:56 src/protocol_misc.c:85 -#: src/protocol_misc.c:176 src/protocol_subnet.c:58 src/protocol_subnet.c:170 -#, c-format -msgid "Got bad %s from %s (%s)" -msgstr "Kreeg verkeerde %s van %s (%s)" - -#: src/protocol_auth.c:66 src/protocol_edge.c:81 src/protocol_edge.c:87 -#: src/protocol_edge.c:196 src/protocol_edge.c:202 src/protocol_subnet.c:66 -#: src/protocol_subnet.c:74 src/protocol_subnet.c:178 -#: src/protocol_subnet.c:199 -#, c-format -msgid "Got bad %s from %s (%s): %s" -msgstr "Kreeg verkeerde %s van %s (%s): %s" - -#: src/protocol_auth.c:75 -#, c-format -msgid "Peer %s is %s instead of %s" -msgstr "Ander %s is %s in plaats van %s" - -#: src/protocol_auth.c:88 -#, c-format -msgid "Peer %s (%s) uses incompatible version %d" -msgstr "Ander %s (%s) gebruikt incompatibele versie %d" - -#: src/protocol_auth.c:104 -#, c-format -msgid "Peer %s had unknown identity (%s)" -msgstr "Ander %s heeft onbekende identiteit (%s)" - -#: src/protocol_auth.c:158 -#, c-format -msgid "Generated random meta key (unencrypted): %s" -msgstr "Willekeurige meta sleutel aangemaakt (niet versleuteld): %s" - -#: src/protocol_auth.c:170 -#, c-format -msgid "Error during encryption of meta key for %s (%s)" -msgstr "Fout tijdens versleutelen van meta key voor %s (%s)" - -#: src/protocol_auth.c:224 src/protocol_auth.c:355 src/protocol_auth.c:420 -#: src/protocol_auth.c:442 -#, c-format -msgid "Possible intruder %s (%s): %s" -msgstr "Mogelijke indringer %s (%s): %s" - -#: src/protocol_auth.c:243 -#, c-format -msgid "Error during decryption of meta key for %s (%s)" -msgstr "Fout tijdens ontsleutelen van meta key voor %s (%s)" - -#: src/protocol_auth.c:251 -#, c-format -msgid "Received random meta key (unencrypted): %s" -msgstr "Ontving willekeurige meta key (niet versleuteld): %s" - -#: src/protocol_auth.c:262 -#, c-format -msgid "%s (%s) uses unknown cipher!" -msgstr "%s (%s) gebruikt onbekende cipher!" - -#: src/protocol_auth.c:270 -#, c-format -msgid "Error during initialisation of cipher from %s (%s): %s" -msgstr "Fout tijdens initalisatie van cipher van %s (%s): %s" - -#: src/protocol_auth.c:286 src/protocol_key.c:255 -#, c-format -msgid "Node %s (%s) uses unknown digest!" -msgstr "Node %s (%s) gebruikt onbekende digest!" - -#: src/protocol_auth.c:291 -#, c-format -msgid "%s (%s) uses bogus MAC length!" -msgstr "%s (%s) gebruikt onzinnige MAC lengte!" - -#: src/protocol_auth.c:388 -#, c-format -msgid "Error during calculation of response for %s (%s): %s" -msgstr "Fout tijdens berekenen van antwoord voor %s (%s): %s" - -#: src/protocol_auth.c:421 -msgid "wrong challenge reply length" -msgstr "verkeerde lengte antwoord op uitdaging" - -#: src/protocol_auth.c:434 -#, c-format -msgid "Error during calculation of response from %s (%s): %s" -msgstr "Fout tijdens narekenen van antwoord van %s (%s): %s" - -#: src/protocol_auth.c:443 -msgid "wrong challenge reply" -msgstr "verkeerd antwoord op uitdaging" - -#: src/protocol_auth.c:448 -#, c-format -msgid "Expected challenge reply: %s" -msgstr "Verwachtte antwoord op uitdaging: %s" - -#: src/protocol_auth.c:554 -#, c-format -msgid "Established a second connection with %s (%s), closing old connection" -msgstr "Tweede verbinding met %s (%s) gemaakt, oude verbinding wordt gesloten" - -#: src/protocol_auth.c:577 -#, c-format -msgid "Connection with %s (%s) activated" -msgstr "Verbinding met %s (%s) geactiveerd" - -#: src/protocol_edge.c:82 src/protocol_edge.c:88 src/protocol_edge.c:197 -#: src/protocol_edge.c:203 src/protocol_subnet.c:67 src/protocol_subnet.c:179 -msgid "invalid name" -msgstr "ongeldige naam" - -#: src/protocol_edge.c:127 -#, c-format -msgid "Got %s from %s (%s) for ourself which does not match existing entry" -msgstr "" -"Kreeg %s van %s (%s) voor onszelf welke niet overeenkomt met reeds bekende" - -#: src/protocol_edge.c:132 -#, c-format -msgid "Got %s from %s (%s) which does not match existing entry" -msgstr "Kreeg %s van %s (%s) welke niet overeenkomt met reeds bekende" - -#: src/protocol_edge.c:140 -#, c-format -msgid "Got %s from %s (%s) for ourself which does not exist" -msgstr "Kreeg %s van %s (%s) voor onszelf welke niet bestaat" - -#: src/protocol_edge.c:215 src/protocol_edge.c:223 src/protocol_edge.c:236 -#, c-format -msgid "Got %s from %s (%s) which does not appear in the edge tree" -msgstr "Kreeg %s van %s (%s) welke niet voorkomt in de edge tree" - -#: src/protocol_edge.c:242 src/protocol_subnet.c:103 src/protocol_subnet.c:222 -#, c-format -msgid "Got %s from %s (%s) for ourself" -msgstr "Kreeg %s van %s (%s) voor onszelf" - -#: src/protocol_key.c:73 -#, c-format -msgid "Got %s from %s (%s) origin %s which does not exist" -msgstr "Kreeg %s van %s (%s) herkomst %s welke niet bestaat" - -#: src/protocol_key.c:113 src/protocol_key.c:187 -#, c-format -msgid "" -"Got %s from %s (%s) origin %s which does not exist in our connection list" -msgstr "" -"Kreeg %s van %s (%s) herkomst %s welke niet voorkomt in de verbindingslijst" - -#: src/protocol_key.c:121 src/protocol_key.c:195 -#, c-format -msgid "" -"Got %s from %s (%s) destination %s which does not exist in our connection " -"list" -msgstr "" -"Kreeg %s van %s (%s) doel %s welke niet voorkomt in de verbindingslijst" - -#: src/protocol_key.c:138 src/protocol_key.c:207 -#, c-format -msgid "Got %s from %s (%s) destination %s which is not reachable" -msgstr "Kreeg %s van %s (%s) doel %s welke niet bereikbaar is" - -#: src/protocol_key.c:235 -#, c-format -msgid "Node %s (%s) uses unknown cipher!" -msgstr "Node %s (%s) gebruikt onbekende cipher!" - -#: src/protocol_key.c:241 -#, c-format -msgid "Node %s (%s) uses wrong keylength!" -msgstr "Node %s (%s) gebruikt verkeerde lengte sleutel!" - -#: src/protocol_key.c:261 -#, c-format -msgid "Node %s (%s) uses bogus MAC length!" -msgstr "Node %s (%s) gebruikt onzinnige MAC lengte!" - -#: src/protocol_key.c:270 -#, c-format -msgid "Node %s (%s) uses bogus compression level!" -msgstr "Node %s (%s) gebruikt onzinnig compressieniveau!" - -#: src/protocol_key.c:278 -#, c-format -msgid "Error during initialisation of key from %s (%s): %s" -msgstr "Fout tijdens initialisatie van sleutel van %s (%s): %s" - -#: src/protocol_misc.c:61 -#, c-format -msgid "Status message from %s (%s): %d: %s" -msgstr "Statusmelding van %s (%s): %d: %s" - -#: src/protocol_misc.c:90 -#, c-format -msgid "Error message from %s (%s): %d: %s" -msgstr "Foutmelding van %s (%s): %d: %s" - -#: src/protocol_subnet.c:75 src/protocol_subnet.c:200 -msgid "invalid subnet string" -msgstr "ongeldige subnet string" - -#: src/protocol_subnet.c:188 -#, c-format -msgid "Got %s from %s (%s) for %s which is not in our node tree" -msgstr "Kreeg %s van %s (%s) voor %s welke niet voorkomt in de node boom" - -#: src/protocol_subnet.c:214 -#, c-format -msgid "Got %s from %s (%s) for %s which does not appear in his subnet tree" -msgstr "Kreeg %s van %s (%s) voor %s welke niet voorkomt in zijn subnet boom" - -#: src/subnet.c:105 -#, c-format -msgid "subnet_compare() was called with unknown subnet type %d, exitting!" -msgstr "" -"subnet_compare() werd aangeroepen met onbekend subnet type %d, beëindigen!" - -#: src/subnet.c:263 -#, c-format -msgid "net2str() was called with netstr=%p, subnet=%p!\n" -msgstr "net2str() werd aangeroepen met netstr=%p, subnet=%p!\n" - -#: src/subnet.c:300 -#, c-format -msgid "net2str() was called with unknown subnet type %d, exiting!" -msgstr "net2str() werd aangeroepen met onbekend subnet type %d, beëindigen!" - -#: src/subnet.c:465 -msgid "Subnet list:" -msgstr "Subnet lijst:" - -#: src/subnet.c:471 -#, c-format -msgid " %s owner %s" -msgstr " %s eigenaar %s" - -#: src/subnet.c:474 -msgid "End of subnet list." -msgstr "Einde van subnet lijst." - -#: src/tincd.c:109 -#, c-format -msgid "Try `%s --help' for more information.\n" -msgstr "Probeer `%s --help' voor meer informatie.\n" - -#: src/tincd.c:112 -#, c-format -msgid "" -"Usage: %s [option]...\n" -"\n" -msgstr "" -"Gebruik: %s [optie]...\n" -"\n" - -#: src/tincd.c:113 -#, c-format -msgid "" -" -c, --config=DIR Read configuration options from DIR.\n" -" -D, --no-detach Don't fork and detach.\n" -" -d, --debug[=LEVEL] Increase debug level or set it to LEVEL.\n" -" -k, --kill[=SIGNAL] Attempt to kill a running tincd and exit.\n" -" -n, --net=NETNAME Connect to net NETNAME.\n" -" -K, --generate-keys[=BITS] Generate public/private RSA keypair.\n" -" -L, --mlock Lock tinc into main memory.\n" -" --logfile[=FILENAME] Write log entries to a logfile.\n" -" --pidfile=FILENAME Write PID to FILENAME.\n" -" --help Display this help and exit.\n" -" --version Output version information and exit.\n" -"\n" -msgstr "" -" -c, --config=MAP Lees configuratie uit MAP.\n" -" -D, --no-detach Start geen nieuw proces.\n" -" -d, --debug[=NIVEAU] Verhoog debugniveau of stel het in op NIVEAU.\n" -" -k, --kill[=SIGNAAL] Poging tot zenden signaal naar lopende tincd en " -"beëindig.\n" -" -n, --net=NETNAAM Verbind met net NETNAAM.\n" -" -K, --generate-keys[=BITS] Genereer publiek/privé RSA sleutelpaar.\n" -" -L, --mlock Houd tinc vast in het centrale geheugen.\n" -" --logfile[=BESTAND] Schrijf log naar BESTAND.\n" -" --pidfile=BESTAND Schrijf PID naar BESTAND.\n" -" --help Geef deze hulp en beëindig.\n" -" --version Geef versie informatie en beëindig.\n" -"\n" - -#: src/tincd.c:124 -#, c-format -msgid "Report bugs to tinc@tinc-vpn.org.\n" -msgstr "" -"Meld fouten in het programma aan tinc@tinc-vpn.org;\n" -"Meld fouten in de vertaling aan vertaling@nl.linux.org.\n" - -#: src/tincd.c:180 -#, c-format -msgid "" -"Invalid argument `%s'; SIGNAL must be a number or one of HUP, TERM, KILL, " -"USR1, USR2, WINCH, INT or ALRM.\n" -msgstr "" -"Ongeldig argument `%s'; SIGNAAL moet een getal zijn of één van HUP, TERM, " -"KILL, USR1, USR2, WINCH, INT of ALRM.\n" - -#: src/tincd.c:202 -#, c-format -msgid "" -"Invalid argument `%s'; BITS must be a number equal to or greater than 512.\n" -msgstr "" -"Ongeldig argument `%s'; BITS moet een nummer zijn gelijk aan of groter dan " -"512.\n" - -#: src/tincd.c:295 -#, c-format -msgid "Generating %d bits keys:\n" -msgstr "Bezig met genereren van een %d bits sleutel:\n" - -#: src/tincd.c:299 -#, c-format -msgid "Error during key generation!\n" -msgstr "Fout tijdens genereren sleutel!\n" - -#: src/tincd.c:302 -#, c-format -msgid "Done.\n" -msgstr "Klaar.\n" - -#: src/tincd.c:305 -msgid "private RSA key" -msgstr "geheime RSA sleutel" - -#: src/tincd.c:316 src/tincd.c:335 -#, c-format -msgid "" -"Appending key to existing contents.\n" -"Make sure only one key is stored in the file.\n" -msgstr "" -"Sleutel wordt toegevoegd aan bestaande inhoud.\n" -"Let er op dat er slechts één sleutel in het bestand is.\n" - -#: src/tincd.c:329 -msgid "public RSA key" -msgstr "openbare RSA sleutel" - -#: src/tincd.c:388 -msgid "Both netname and configuration directory given, using the latter..." -msgstr "" -"Zowel netnaam als configuratiemap zijn gegeven, laatste wordt gebruikt..." - -#: src/tincd.c:409 -#, c-format -msgid "%s version %s (built %s %s, protocol %d)\n" -msgstr "%s versie %s (gemaakt %s %s, protocol %d)\n" - -#: src/tincd.c:411 -#, c-format -msgid "" -"Copyright (C) 1998-2008 Ivo Timmermans, Guus Sliepen and others.\n" -"See the AUTHORS file for a complete list.\n" -"\n" -"tinc comes with ABSOLUTELY NO WARRANTY. This is free software,\n" -"and you are welcome to redistribute it under certain conditions;\n" -"see the file COPYING for details.\n" -msgstr "" -"Copyright (C) 1998-2008 Ivo Timmermans, Guus Sliepen en anderen.\n" -"Zie het bestand AUTHORS voor een volledige lijst.\n" -"\n" -"tinc wordt gedistribueerd ZONDER ENIGE GARANTIE. Dit is vrije " -"programmatuur,\n" -"en je bent welkom om het te distribueren onder bepaalde voorwaarden;\n" -"zie het bestand COPYING voor details.\n" - -#: src/tincd.c:439 -msgid "mlockall() not supported on this platform!" -msgstr "mlockall() wordt niet ondersteund op dit platform!" - -#: src/tincd.c:466 -msgid "Error initializing LZO compressor!" -msgstr "Fout tijdens initialiseren LZO compressor!" - -#: src/tincd.c:507 -msgid "Terminating" -msgstr "Beëindigen" - -#: src/process.c:54 -#, c-format -msgid "Memory exhausted (couldn't allocate %d bytes), exitting." -msgstr "Geheugen uitgeput (kon geen %d bytes reserveren), beëindigen." - -#: src/process.c:79 src/process.c:129 -#, c-format -msgid "Could not open service manager: %s" -msgstr "Kon service manager niet openen: %s" - -#: src/process.c:110 -#, c-format -msgid "Could not create %s service: %s" -msgstr "Kon %s service niet aanmaken: %s" - -#: src/process.c:116 -#, c-format -msgid "%s service installed" -msgstr "%s service geïnstalleerd" - -#: src/process.c:119 -#, c-format -msgid "Could not start %s service: %s" -msgstr "Kon %s service niet starten: %s" - -#: src/process.c:121 -#, c-format -msgid "%s service started" -msgstr "%s service gestart" - -#: src/process.c:136 -#, c-format -msgid "Could not open %s service: %s" -msgstr "Kon %s service niet openen: %s" - -#: src/process.c:141 -#, c-format -msgid "Could not stop %s service: %s" -msgstr "Kon %s service niet stoppen: %s" - -#: src/process.c:143 -#, c-format -msgid "%s service stopped" -msgstr "%s service gestopt" - -#: src/process.c:146 -#, c-format -msgid "Could not remove %s service: %s" -msgstr "Kon %s service niet verwijderen: %s" - -#: src/process.c:150 -#, c-format -msgid "%s service removed" -msgstr "%s service verwijderd" - -#: src/process.c:161 src/process.c:164 -#, c-format -msgid "Got %s request" -msgstr "Kreeg %s verzoek" - -#: src/process.c:167 -#, c-format -msgid "Got unexpected request %d" -msgstr "Kreeg onverwacht verzoek %d" - -#: src/process.c:255 -#, c-format -msgid "A tincd is already running for net `%s' with pid %ld.\n" -msgstr "Een tincd draait al voor net `%s' met pid %ld.\n" - -#: src/process.c:258 -#, c-format -msgid "A tincd is already running with pid %ld.\n" -msgstr "Een tincd draait al met pid %ld.\n" - -#: src/process.c:264 -#, c-format -msgid "Could write pid file %s: %s\n" -msgstr "Kon pid bestand %s niet openen: %s\n" - -#: src/process.c:286 -#, c-format -msgid "No other tincd is running for net `%s'.\n" -msgstr "Geen andere tincd draait voor net `%s'.\n" - -#: src/process.c:289 -#, c-format -msgid "No other tincd is running.\n" -msgstr "Geen andere tincd draait.\n" - -#: src/process.c:298 -#, c-format -msgid "The tincd for net `%s' is no longer running. " -msgstr "De tincd voor net `%s' draait niet meer. " - -#: src/process.c:301 -#, c-format -msgid "The tincd is no longer running. " -msgstr "De tincd draait niet meer. " - -#: src/process.c:303 -#, c-format -msgid "Removing stale lock file.\n" -msgstr "Verwijdering oud vergrendelingsbestand.\n" - -#: src/process.c:336 -#, c-format -msgid "Couldn't detach from terminal: %s" -msgstr "Kon niet ontkoppelen van terminal: %s" - -#: src/process.c:344 -#, c-format -msgid "Could not write pid file %s: %s\n" -msgstr "Kon pid bestand %s niet schrijven: %s\n" - -#: src/process.c:355 -#, c-format -msgid "tincd %s (%s %s) starting, debug level %d" -msgstr "tincd %s (%s %s) start, debug niveau %d" - -#: src/process.c:390 -#, c-format -msgid "Executing script %s" -msgstr "Uitvoeren script %s" - -#: src/process.c:420 -#, c-format -msgid "Script %s exited with non-zero status %d" -msgstr "Script %s beëindigde met status %d" - -#: src/process.c:425 -#, c-format -msgid "Script %s was killed by signal %d (%s)" -msgstr "Script %s was gestopt door signaal %d (%s)" - -#: src/process.c:429 -#, c-format -msgid "Script %s terminated abnormally" -msgstr "Script %s abnormaal beëindigd" - -#: src/process.c:449 src/process.c:458 src/process.c:499 src/process.c:505 -#: src/process.c:523 -#, c-format -msgid "Got %s signal" -msgstr "Kreeg %s signaal" - -#: src/process.c:467 -#, c-format -msgid "Got another fatal signal %d (%s): not restarting." -msgstr "Kreeg nog een fataal signaal %d (%s): geen herstart." - -#: src/process.c:476 -#, c-format -msgid "Got fatal signal %d (%s)" -msgstr "Kreeg fataal signaal %d (%s)" - -#: src/process.c:480 -msgid "Trying to re-execute in 5 seconds..." -msgstr "Poging tot herstarten over 5 seconden..." - -#: src/process.c:492 -msgid "Not restarting." -msgstr "Geen herstart." - -#: src/process.c:508 -#, c-format -msgid "Reverting to old debug level (%d)" -msgstr "Herstellen van oud debug niveau (%d)" - -#: src/process.c:514 -#, c-format -msgid "" -"Temporarily setting debug level to 5. Kill me with SIGINT again to go back " -"to level %d." -msgstr "" -"Tijdelijk instellen debug niveau op 5. Zend nog een SIGINT signaal om niveau " -"%d te herstellen." - -#: src/process.c:547 -#, c-format -msgid "Got unexpected signal %d (%s)" -msgstr "Kreeg onverwacht signaal %d (%s)" - -#: src/process.c:553 -#, c-format -msgid "Ignored signal %d (%s)" -msgstr "Signaal %d (%s) genegeerd" - -#: src/process.c:607 -#, c-format -msgid "Installing signal handler for signal %d (%s) failed: %s\n" -msgstr "Installeren van signaal afhandelaar voor signaal %d (%s) faalde: %s\n" - -#: src/route.c:111 -#, c-format -msgid "Learned new MAC address %hx:%hx:%hx:%hx:%hx:%hx" -msgstr "Nieuw MAC adres %hx:%hx:%hx:%hx:%hx:%hx geleerd" - -#: src/route.c:149 -#, c-format -msgid "Subnet %s expired" -msgstr "Subnet %s is verlopen" - -#: src/route.c:190 src/route.c:345 src/route.c:496 -#, c-format -msgid "Packet looping back to %s (%s)!" -msgstr "Pakket komt terug naar %s (%s)!" - -#: src/route.c:289 -#, c-format -msgid "Length of packet (%d) doesn't match length in IPv4 header (%zd)" -msgstr "" -"Lengte van pakket (%d) komt niet overeen met lengte in IPv4 header (%zd)" - -#: src/route.c:293 -#, c-format -msgid "Fragmenting packet of %d bytes to %s (%s)" -msgstr "Fragmentatie pakket van %d bytes naar %s (%s)" - -#: src/route.c:333 -#, c-format -msgid "" -"Cannot route packet from %s (%s): unknown IPv4 destination address %d.%d.%d.%" -"d" -msgstr "" -"Kan pakket van %s (%s) niet routeren: onbekend IPv4 doeladres %d.%d.%d.%d" - -#: src/route.c:358 src/route.c:506 -#, c-format -msgid "Packet for %s (%s) length %d larger than MTU %d" -msgstr "Packet voor %s (%s) lengte %d groter dan MTU %d" - -#: src/route.c:480 -#, c-format -msgid "" -"Cannot route packet from %s (%s): unknown IPv6 destination address %hx:%hx:%" -"hx:%hx:%hx:%hx:%hx:%hx" -msgstr "" -"Kan pakket van %s (%s) niet routeren: onbekend IPv6 doeladres %hx:%hx:%hx:%" -"hx:%hx:%hx:%hx:%hx" - -#: src/route.c:538 -#, c-format -msgid "Got neighbor solicitation request from %s (%s) while in router mode!" -msgstr "" -"Kreeg neighbor solicitation request van %s (%s) terwijl we in router mode " -"werken!" - -#: src/route.c:557 -msgid "" -"Cannot route packet: received unknown type neighbor solicitation request" -msgstr "" -"Kan pakket niet routeren: ontvangst van onbekend type neighbor solicitation " -"verzoek" - -#: src/route.c:576 -msgid "Cannot route packet: checksum error for neighbor solicitation request" -msgstr "" -"Kan pakket niet routeren: checksum fout voor neighbor solicitation verzoek" - -#: src/route.c:585 -#, c-format -msgid "" -"Cannot route packet: neighbor solicitation request for unknown address %hx:%" -"hx:%hx:%hx:%hx:%hx:%hx:%hx" -msgstr "" -"Kan pakket niet routeren: neighbor solicitation verzoek voor onbekend adres %" -"hx:%hx:%hx:%hx:%hx:%hx:%hx:%hx" - -#: src/route.c:675 -#, c-format -msgid "Got ARP request from %s (%s) while in router mode!" -msgstr "Kreeg ARP request van %s (%s) terwijl we in router mode werken!" - -#: src/route.c:692 -msgid "Cannot route packet: received unknown type ARP request" -msgstr "Kan pakket niet routeren: ontvangst van onbekend type ARP verzoek" - -#: src/route.c:701 -#, c-format -msgid "Cannot route packet: ARP request for unknown address %d.%d.%d.%d" -msgstr "Kan pakket niet routeren: ARP verzoek voor onbekend adres %d.%d.%d.%d" - -#: src/route.c:757 -#, c-format -msgid "Cannot route packet from %s (%s): unknown type %hx" -msgstr "Kan pakket van %s (%s) niet routeren: onbekend type %hx" - -#: src/node.c:183 -msgid "Nodes:" -msgstr "Nodes:" - -#: src/node.c:187 -#, c-format -msgid "" -" %s at %s cipher %d digest %d maclength %d compression %d options %lx status " -"%04x nexthop %s via %s pmtu %d (min %d max %d)" -msgstr "" -" %s op %s cipher %d digest %d maclengte %d compressie %d opties %lx status %" -"04x nexthop %s via %s pmtu %d (min %d max %d)" - -#: src/node.c:194 -msgid "End of nodes." -msgstr "Einde van nodes." - -#: src/edge.c:148 -msgid "Edges:" -msgstr "Edges:" - -#: src/edge.c:155 -#, c-format -msgid " %s to %s at %s options %lx weight %d" -msgstr " %s naar %s op %s opties %lx gewicht %d" - -#: src/edge.c:161 -msgid "End of edges." -msgstr "Einde van edges." - -#: src/graph.c:270 -#, c-format -msgid "Node %s (%s) became reachable" -msgstr "Node %s (%s) werd bereikbaar" - -#: src/graph.c:274 -#, c-format -msgid "Node %s (%s) became unreachable" -msgstr "Node %s (%s) is niet meer bereikbaar" - -#: src/linux/device.c:72 src/solaris/device.c:57 src/bsd/device.c:63 -#: src/raw_socket/device.c:59 src/uml_socket/device.c:122 -#, c-format -msgid "Could not open %s: %s" -msgstr "Kon `%s' niet openen: %s" - -#: src/linux/device.c:83 -msgid "Linux tun/tap device (tun mode)" -msgstr "Linux tun/tap apparaat (tun modus)" - -#: src/linux/device.c:87 -msgid "Linux tun/tap device (tap mode)" -msgstr "Linux tun/tap apparaat (tap modus)" - -#: src/linux/device.c:97 -#, c-format -msgid "Old ioctl() request was needed for %s" -msgstr "Oud ioctl() verzoek was nodig voor %s" - -#: src/linux/device.c:105 -msgid "Linux ethertap device" -msgstr "Linux ethertap apparaat" - -#: src/linux/device.c:110 src/solaris/device.c:106 src/bsd/device.c:133 -#: src/raw_socket/device.c:83 src/uml_socket/device.c:149 -#, c-format -msgid "%s is a %s" -msgstr "%s is een %s" - -#: src/linux/device.c:133 src/linux/device.c:144 src/linux/device.c:155 -#: src/solaris/device.c:125 src/bsd/device.c:152 src/bsd/device.c:181 -#: src/bsd/device.c:210 src/cygwin/device.c:239 src/mingw/device.c:112 -#: src/mingw/device.c:325 src/raw_socket/device.c:102 -#: src/uml_socket/device.c:239 -#, c-format -msgid "Error while reading from %s %s: %s" -msgstr "Fout tijdens lezen van %s %s: %s" - -#: src/linux/device.c:166 src/solaris/device.c:150 src/bsd/device.c:224 -#: src/cygwin/device.c:248 src/mingw/device.c:335 src/raw_socket/device.c:111 -#: src/uml_socket/device.c:249 -#, c-format -msgid "Read packet of %d bytes from %s" -msgstr "Pakket van %d bytes gelezen van %s" - -#: src/linux/device.c:176 src/solaris/device.c:160 src/bsd/device.c:234 -#: src/cygwin/device.c:260 src/mingw/device.c:348 src/raw_socket/device.c:121 -#: src/uml_socket/device.c:267 -#, c-format -msgid "Writing packet of %d bytes to %s" -msgstr "Pakket van %d bytes geschreven naar %s" - -#: src/linux/device.c:183 src/linux/device.c:190 src/linux/device.c:199 -#: src/solaris/device.c:164 src/bsd/device.c:268 src/raw_socket/device.c:125 -#: src/uml_socket/device.c:272 -#, c-format -msgid "Can't write to %s %s: %s" -msgstr "Kan niet schrijven naar %s %s: %s" - -#: src/linux/device.c:215 src/solaris/device.c:178 src/bsd/device.c:296 -#: src/cygwin/device.c:277 src/mingw/device.c:365 src/raw_socket/device.c:139 -#: src/uml_socket/device.c:288 -#, c-format -msgid "Statistics for %s %s:" -msgstr "Statistieken voor %s %s:" - -#: src/linux/device.c:216 src/solaris/device.c:179 src/bsd/device.c:297 -#: src/cygwin/device.c:278 src/mingw/device.c:366 src/raw_socket/device.c:140 -#: src/uml_socket/device.c:289 -#, c-format -msgid " total bytes in: %10d" -msgstr " totaal aantal bytes in: %10d" - -#: src/linux/device.c:217 src/solaris/device.c:180 src/bsd/device.c:298 -#: src/cygwin/device.c:279 src/mingw/device.c:367 src/raw_socket/device.c:141 -#: src/uml_socket/device.c:290 -#, c-format -msgid " total bytes out: %10d" -msgstr " totaal aantal bytes uit: %10d" - -#: src/solaris/device.c:69 -#, c-format -msgid "Could not open /dev/ip: %s" -msgstr "Kon /dev/ip niet openen: %s" - -#: src/solaris/device.c:75 -#, c-format -msgid "Can't assign new interface: %s" -msgstr "Kan geen nieuwe interface toekennen: %s" - -#: src/solaris/device.c:80 -#, c-format -msgid "Could not open %s twice: %s" -msgstr "Kon `%s' niet twee keer openen: %s" - -#: src/solaris/device.c:86 -#, c-format -msgid "Can't push IP module: %s" -msgstr "Kan IP module niet invoegen: %s" - -#: src/solaris/device.c:92 -#, c-format -msgid "Can't set PPA %d: %s" -msgstr "Kon PPA %d niet instellen: %s" - -#: src/solaris/device.c:97 -#, c-format -msgid "Can't link TUN device to IP: %s" -msgstr "Kan TUN apparaat niet koppelen aan IP: %s" - -#: src/solaris/device.c:104 -msgid "Solaris tun device" -msgstr "Solaris tun apparaat" - -#: src/solaris/device.c:141 src/bsd/device.c:168 -#, c-format -msgid "Unknown IP version %d while reading packet from %s %s" -msgstr "Onbekende IP versie %d tijdens ontvangst pakket van %s %s" - -#: src/bsd/device.c:77 -#, c-format -msgid "Unknown device type %s!" -msgstr "Onbekend apparaattype %s!" - -#: src/bsd/device.c:105 src/bsd/device.c:124 -msgid "Generic BSD tun device" -msgstr "Generiek BSD tun apparaat" - -#: src/bsd/device.c:129 -msgid "Generic BSD tap device" -msgstr "Generiek BSD tap apparaat" - -#: src/bsd/device.c:199 -#, c-format -msgid "Unknown address family %x while reading packet from %s %s" -msgstr "Onbekende adresfamilie %x tijdens ontvangst pakket van %s %s" - -#: src/bsd/device.c:240 src/bsd/device.c:277 src/cygwin/device.c:264 -#: src/mingw/device.c:352 -#, c-format -msgid "Error while writing to %s %s: %s" -msgstr "Fout tijdens schrijven naar %s %s: %s" - -#: src/bsd/device.c:262 -#, c-format -msgid "Unknown address family %x while writing packet to %s %s" -msgstr "Onbekende adresfamiliy %x tijdens versturen pakket naar %s %s" - -#: src/cygwin/device.c:71 src/mingw/device.c:159 -#, c-format -msgid "Unable to read registry: %s" -msgstr "Kon registry niet lezen: %s" - -#: src/cygwin/device.c:123 src/mingw/device.c:210 -msgid "No Windows tap device found!" -msgstr "Geen Windows tap apparaat gevonden!" - -#: src/cygwin/device.c:149 -#, c-format -msgid "Could not open Windows tap device %s (%s) for writing: %s" -msgstr "Kon Windows tap apparaat %s (%s) niet openen om te schrijven: %s" - -#: src/cygwin/device.c:158 src/mingw/device.c:235 -#, c-format -msgid "Could not get MAC address from Windows tap device %s (%s): %s" -msgstr "Kon MAC adres niet achterhalen van Windows tap apparaat %s (%s): %s" - -#: src/cygwin/device.c:187 -#, c-format -msgid "Could not open Windows tap device %s (%s) for reading: %s" -msgstr "Kon Windows tap apparaat %s (%s) niet openen om te lezen: %s" - -#: src/cygwin/device.c:193 -msgid "Tap reader forked and running." -msgstr "Taplezer is geforked en draait." - -#: src/cygwin/device.c:210 -msgid "Tap reader failed!" -msgstr "Taplezer faalde!" - -#: src/cygwin/device.c:214 src/mingw/device.c:304 -msgid "Windows tap device" -msgstr "Windows tap apparaat" - -#: src/cygwin/device.c:216 src/mingw/device.c:306 -#, c-format -msgid "%s (%s) is a %s" -msgstr "%s (%s) is een %s" - -#: src/mingw/device.c:93 -msgid "Tap reader running" -msgstr "Taplezer draait" - -#: src/mingw/device.c:228 -#, c-format -msgid "%s (%s) is not a usable Windows tap device: %s" -msgstr "%s (%s) is geen bruikbaar Windows tap apparaat: %s" - -#: src/raw_socket/device.c:56 -msgid "raw socket" -msgstr "raw socket" - -#: src/raw_socket/device.c:68 -#, c-format -msgid "Can't find interface %s: %s" -msgstr "Kan interface %s niet vinden: %s" - -#: src/raw_socket/device.c:79 src/uml_socket/device.c:137 -#, c-format -msgid "Could not bind %s to %s: %s" -msgstr "Kon %s niet aan %s binden: %s" - -#: src/uml_socket/device.c:78 -msgid "UML network socket" -msgstr "UML network socket" - -#: src/uml_socket/device.c:81 -#, c-format -msgid "Could not open write %s: %s" -msgstr "Kon `%s' niet openen: %s" - -#: src/uml_socket/device.c:95 -#, c-format -msgid "Could not open data %s: %s" -msgstr "Kon data-%s niet openen: %s" - -#: src/uml_socket/device.c:116 -#, c-format -msgid "Could not bind data %s: %s" -msgstr "Kon data-%s niet binden: %s" - -#: src/uml_socket/device.c:142 -#, c-format -msgid "Could not listen on %s %s: %s" -msgstr "Kon niet luisteren op %s %s: %s" - -#: src/uml_socket/device.c:189 -#, c-format -msgid "Could not accept connection to %s %s: %s" -msgstr "Kon verbinding met %s %s niet accepteren: %s" - -#: src/uml_socket/device.c:209 -#, c-format -msgid "Error while reading request from %s %s: %s" -msgstr "Fout tijdens lezen verzoek van %s %s: %s" - -#: src/uml_socket/device.c:216 -#, c-format -msgid "Unknown magic %x, version %d, request type %d from %s %s" -msgstr "Onbekende magische waarde %x, versie %d, verzoektype %d van %s %s" - -#: src/uml_socket/device.c:223 -#, c-format -msgid "Could not bind write %s: %s" -msgstr "Kon niet aan schrijf-%s binden: %s" - -#: src/uml_socket/device.c:231 -msgid "Connection with UML established" -msgstr "Verbinding met UML geactiveerd" - -#: src/uml_socket/device.c:262 -#, c-format -msgid "Dropping packet of %d bytes to %s: not connected to UML yet" -msgstr "Pakket van %d bytes naar %s laten vallen: nog niet verbonden met UML" diff --git a/src/Makefile.am b/src/Makefile.am index 1a0554d4..bdd1a3f8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -21,7 +21,7 @@ INCLUDES = @INCLUDES@ -I$(top_builddir) -I$(top_srcdir)/lib noinst_HEADERS = conf.h connection.h device.h edge.h event.h graph.h logger.h meta.h net.h netutl.h node.h process.h \ protocol.h route.h subnet.h bsd/tunemu.h -LIBS = @LIBS@ @LIBINTL@ +LIBS = @LIBS@ if TUNEMU LIBS += -lpcap diff --git a/src/bsd/device.c b/src/bsd/device.c index be026b70..4dd2b57f 100644 --- a/src/bsd/device.c +++ b/src/bsd/device.c @@ -79,7 +79,7 @@ bool setup_device(void) { else if(!strcasecmp(type, "tap")) device_type = DEVICE_TYPE_TAP; else { - logger(LOG_ERR, _("Unknown device type %s!"), type); + logger(LOG_ERR, "Unknown device type %s!", type); return false; } } else { @@ -100,7 +100,7 @@ bool setup_device(void) { } if(device_fd < 0) { - logger(LOG_ERR, _("Could not open %s: %s"), device, strerror(errno)); + logger(LOG_ERR, "Could not open %s: %s", device, strerror(errno)); return false; } @@ -112,7 +112,7 @@ bool setup_device(void) { { const int zero = 0; if(ioctl(device_fd, TUNSIFHEAD, &zero, sizeof zero) == -1) { - logger(LOG_ERR, _("System call `%s' failed: %s"), "ioctl", strerror(errno)); + logger(LOG_ERR, "System call `%s' failed: %s", "ioctl", strerror(errno)); return false; } } @@ -124,14 +124,14 @@ bool setup_device(void) { } #endif - device_info = _("Generic BSD tun device"); + device_info = "Generic BSD tun device"; break; case DEVICE_TYPE_TUNIFHEAD: #ifdef TUNSIFHEAD { const int one = 1; if(ioctl(device_fd, TUNSIFHEAD, &one, sizeof one) == -1) { - logger(LOG_ERR, _("System call `%s' failed: %s"), "ioctl", strerror(errno)); + logger(LOG_ERR, "System call `%s' failed: %s", "ioctl", strerror(errno)); return false; } } @@ -143,21 +143,21 @@ bool setup_device(void) { } #endif - device_info = _("Generic BSD tun device"); + device_info = "Generic BSD tun device"; break; case DEVICE_TYPE_TAP: if(routing_mode == RMODE_ROUTER) overwrite_mac = true; - device_info = _("Generic BSD tap device"); + device_info = "Generic BSD tap device"; break; #ifdef HAVE_TUNEMU case DEVICE_TYPE_TUNEMU: - device_info = _("BSD tunemu device"); + device_info = "BSD tunemu device"; break; #endif } - logger(LOG_INFO, _("%s is a %s"), device, device_info); + logger(LOG_INFO, "%s is a %s", device, device_info); return true; } @@ -192,7 +192,7 @@ bool read_packet(vpn_packet_t *packet) { #endif if(lenin <= 0) { - logger(LOG_ERR, _("Error while reading from %s %s: %s"), device_info, + logger(LOG_ERR, "Error while reading from %s %s: %s", device_info, device, strerror(errno)); return false; } @@ -221,7 +221,7 @@ bool read_packet(vpn_packet_t *packet) { struct iovec vector[2] = {{&type, sizeof(type)}, {packet->data + 14, MTU - 14}}; if((lenin = readv(device_fd, vector, 2)) <= 0) { - logger(LOG_ERR, _("Error while reading from %s %s: %s"), device_info, + logger(LOG_ERR, "Error while reading from %s %s: %s", device_info, device, strerror(errno)); return false; } @@ -250,7 +250,7 @@ bool read_packet(vpn_packet_t *packet) { case DEVICE_TYPE_TAP: if((lenin = read(device_fd, packet->data, MTU)) <= 0) { - logger(LOG_ERR, _("Error while reading from %s %s: %s"), device_info, + logger(LOG_ERR, "Error while reading from %s %s: %s", device_info, device, strerror(errno)); return false; } @@ -264,7 +264,7 @@ bool read_packet(vpn_packet_t *packet) { device_total_in += packet->len; - ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Read packet of %d bytes from %s"), + ifdebug(TRAFFIC) logger(LOG_DEBUG, "Read packet of %d bytes from %s", packet->len, device_info); logger(LOG_INFO, "E:fd_read"); @@ -272,13 +272,13 @@ bool read_packet(vpn_packet_t *packet) { } bool write_packet(vpn_packet_t *packet) { - ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Writing packet of %d bytes to %s"), + ifdebug(TRAFFIC) logger(LOG_DEBUG, "Writing packet of %d bytes to %s", packet->len, device_info); switch(device_type) { case DEVICE_TYPE_TUN: if(write(device_fd, packet->data + 14, packet->len - 14) < 0) { - logger(LOG_ERR, _("Error while writing to %s %s: %s"), device_info, + logger(LOG_ERR, "Error while writing to %s %s: %s", device_info, device, strerror(errno)); return false; } @@ -300,13 +300,13 @@ bool write_packet(vpn_packet_t *packet) { break; default: ifdebug(TRAFFIC) logger(LOG_ERR, - _("Unknown address family %x while writing packet to %s %s"), + "Unknown address family %x while writing packet to %s %s", af, device_info, device); return false; } if(writev(device_fd, vector, 2) < 0) { - logger(LOG_ERR, _("Can't write to %s %s: %s"), device_info, device, + logger(LOG_ERR, "Can't write to %s %s: %s", device_info, device, strerror(errno)); return false; } @@ -315,7 +315,7 @@ bool write_packet(vpn_packet_t *packet) { case DEVICE_TYPE_TAP: if(write(device_fd, packet->data, packet->len) < 0) { - logger(LOG_ERR, _("Error while writing to %s %s: %s"), device_info, + logger(LOG_ERR, "Error while writing to %s %s: %s", device_info, device, strerror(errno)); return false; } @@ -324,7 +324,7 @@ bool write_packet(vpn_packet_t *packet) { #ifdef HAVE_TUNEMU case DEVICE_TYPE_TUNEMU: if(tunemu_write(device_fd, packet->data + 14, packet->len - 14) < 0) { - logger(LOG_ERR, _("Error while writing to %s %s: %s"), device_info, + logger(LOG_ERR, "Error while writing to %s %s: %s", device_info, device, strerror(errno)); return false; } @@ -341,7 +341,7 @@ bool write_packet(vpn_packet_t *packet) { } void dump_device_stats(void) { - logger(LOG_DEBUG, _("Statistics for %s %s:"), device_info, device); - logger(LOG_DEBUG, _(" total bytes in: %10d"), device_total_in); - logger(LOG_DEBUG, _(" total bytes out: %10d"), device_total_out); + logger(LOG_DEBUG, "Statistics for %s %s:", device_info, device); + logger(LOG_DEBUG, " total bytes in: %10d", device_total_in); + logger(LOG_DEBUG, " total bytes out: %10d", device_total_out); } diff --git a/src/conf.c b/src/conf.c index 688974ba..e67c7ac1 100644 --- a/src/conf.c +++ b/src/conf.c @@ -130,7 +130,7 @@ bool get_config_bool(const config_t *cfg, bool *result) { return true; } - logger(LOG_ERR, _("\"yes\" or \"no\" expected for configuration variable %s in %s line %d"), + logger(LOG_ERR, "\"yes\" or \"no\" expected for configuration variable %s in %s line %d", cfg->variable, cfg->file, cfg->line); return false; @@ -143,7 +143,7 @@ bool get_config_int(const config_t *cfg, int *result) { if(sscanf(cfg->value, "%d", result) == 1) return true; - logger(LOG_ERR, _("Integer expected for configuration variable %s in %s line %d"), + logger(LOG_ERR, "Integer expected for configuration variable %s in %s line %d", cfg->variable, cfg->file, cfg->line); return false; @@ -171,7 +171,7 @@ bool get_config_address(const config_t *cfg, struct addrinfo **result) { return true; } - logger(LOG_ERR, _("Hostname or IP address expected for configuration variable %s in %s line %d"), + logger(LOG_ERR, "Hostname or IP address expected for configuration variable %s in %s line %d", cfg->variable, cfg->file, cfg->line); return false; @@ -184,7 +184,7 @@ bool get_config_subnet(const config_t *cfg, subnet_t ** result) { return false; if(!str2net(&subnet, cfg->value)) { - logger(LOG_ERR, _("Subnet expected for configuration variable %s in %s line %d"), + logger(LOG_ERR, "Subnet expected for configuration variable %s in %s line %d", cfg->variable, cfg->file, cfg->line); return false; } @@ -195,7 +195,7 @@ bool get_config_subnet(const config_t *cfg, subnet_t ** result) { && !maskcheck(&subnet.net.ipv4.address, subnet.net.ipv4.prefixlength, sizeof(ipv4_t))) || ((subnet.type == SUBNET_IPV6) && !maskcheck(&subnet.net.ipv6.address, subnet.net.ipv6.prefixlength, sizeof(ipv6_t)))) { - logger(LOG_ERR, _ ("Network address and prefix length do not match for configuration variable %s in %s line %d"), + logger(LOG_ERR, "Network address and prefix length do not match for configuration variable %s in %s line %d", cfg->variable, cfg->file, cfg->line); return false; } @@ -293,7 +293,7 @@ int read_config_file(avl_tree_t *config_tree, const char *fname) { fp = fopen(fname, "r"); if(!fp) { - logger(LOG_ERR, _("Cannot open config file %s: %s"), fname, + logger(LOG_ERR, "Cannot open config file %s: %s", fname, strerror(errno)); return -3; } @@ -347,7 +347,7 @@ int read_config_file(avl_tree_t *config_tree, const char *fname) { if(!*value) { - logger(LOG_ERR, _("No value for variable `%s' on line %d while reading config file %s"), + logger(LOG_ERR, "No value for variable `%s' on line %d while reading config file %s", variable, lineno, fname); break; } @@ -375,7 +375,7 @@ bool read_server_config() { x = read_config_file(config_tree, fname); if(x == -1) { /* System error: complain */ - logger(LOG_ERR, _("Failed to read `%s': %s"), fname, strerror(errno)); + logger(LOG_ERR, "Failed to read `%s': %s", fname, strerror(errno)); } free(fname); @@ -396,14 +396,14 @@ FILE *ask_and_open(const char *filename, const char *what) { fn = xstrdup(filename); } else { /* Ask for a file and/or directory name. */ - fprintf(stdout, _("Please enter a file to save %s to [%s]: "), + fprintf(stdout, "Please enter a file to save %s to [%s]: ", what, filename); fflush(stdout); fn = readline(stdin, NULL, NULL); if(!fn) { - fprintf(stderr, _("Error while reading stdin: %s\n"), + fprintf(stderr, "Error while reading stdin: %s\n", strerror(errno)); return NULL; } @@ -435,7 +435,7 @@ FILE *ask_and_open(const char *filename, const char *what) { r = fopen(fn, "r+") ?: fopen(fn, "w+"); if(!r) { - fprintf(stderr, _("Error opening file `%s': %s\n"), + fprintf(stderr, "Error opening file `%s': %s\n", fn, strerror(errno)); free(fn); return NULL; diff --git a/src/connection.c b/src/connection.c index 7c8cd0ba..0fd9e169 100644 --- a/src/connection.c +++ b/src/connection.c @@ -40,8 +40,8 @@ static int connection_compare(const connection_t *a, const connection_t *b) { void init_connections(void) { connection_tree = avl_alloc_tree((avl_compare_t) connection_compare, (avl_action_t) free_connection); broadcast = new_connection(); - broadcast->name = xstrdup(_("everyone")); - broadcast->hostname = xstrdup(_("BROADCAST")); + broadcast->name = xstrdup("everyone"); + broadcast->hostname = xstrdup("BROADCAST"); } void exit_connections(void) { @@ -115,16 +115,16 @@ void dump_connections(void) { avl_node_t *node; connection_t *c; - logger(LOG_DEBUG, _("Connections:")); + logger(LOG_DEBUG, "Connections:"); for(node = connection_tree->head; node; node = node->next) { c = node->data; - logger(LOG_DEBUG, _(" %s at %s options %lx socket %d status %04x outbuf %d/%d/%d"), + logger(LOG_DEBUG, " %s at %s options %lx socket %d status %04x outbuf %d/%d/%d", c->name, c->hostname, c->options, c->socket, bitfield_to_int(&c->status, sizeof c->status), c->outbufsize, c->outbufstart, c->outbuflen); } - logger(LOG_DEBUG, _("End of connections.")); + logger(LOG_DEBUG, "End of connections."); } bool read_connection_config(connection_t *c) { diff --git a/src/cygwin/device.c b/src/cygwin/device.c index 617214d0..958184bd 100644 --- a/src/cygwin/device.c +++ b/src/cygwin/device.c @@ -63,7 +63,7 @@ bool setup_device(void) { /* Open registry and look for network adapters */ if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, NETWORK_CONNECTIONS_KEY, 0, KEY_READ, &key)) { - logger(LOG_ERR, _("Unable to read registry: %s"), winerror(GetLastError())); + logger(LOG_ERR, "Unable to read registry: %s", winerror(GetLastError())); return false; } @@ -115,7 +115,7 @@ bool setup_device(void) { RegCloseKey(key); if(!found) { - logger(LOG_ERR, _("No Windows tap device found!")); + logger(LOG_ERR, "No Windows tap device found!"); return false; } @@ -132,7 +132,7 @@ bool setup_device(void) { Furthermore I don't really know how to do it the "Windows" way. */ if(socketpair(AF_UNIX, SOCK_DGRAM, PF_UNIX, sp)) { - logger(LOG_DEBUG, _("System call `%s' failed: %s"), "socketpair", strerror(errno)); + logger(LOG_DEBUG, "System call `%s' failed: %s", "socketpair", strerror(errno)); return false; } @@ -141,7 +141,7 @@ bool setup_device(void) { device_handle = CreateFile(tapname, GENERIC_WRITE, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_SYSTEM , 0); if(device_handle == INVALID_HANDLE_VALUE) { - logger(LOG_ERR, _("Could not open Windows tap device %s (%s) for writing: %s"), device, iface, winerror(GetLastError())); + logger(LOG_ERR, "Could not open Windows tap device %s (%s) for writing: %s", device, iface, winerror(GetLastError())); return false; } @@ -150,7 +150,7 @@ bool setup_device(void) { /* Get MAC address from tap device */ if(!DeviceIoControl(device_handle, TAP_IOCTL_GET_MAC, mymac.x, sizeof(mymac.x), mymac.x, sizeof(mymac.x), &len, 0)) { - logger(LOG_ERR, _("Could not get MAC address from Windows tap device %s (%s): %s"), device, iface, winerror(GetLastError())); + logger(LOG_ERR, "Could not get MAC address from Windows tap device %s (%s): %s", device, iface, winerror(GetLastError())); return false; } @@ -163,7 +163,7 @@ bool setup_device(void) { reader_pid = fork(); if(reader_pid == -1) { - logger(LOG_DEBUG, _("System call `%s' failed: %s"), "fork", strerror(errno)); + logger(LOG_DEBUG, "System call `%s' failed: %s", "fork", strerror(errno)); return false; } @@ -179,13 +179,13 @@ bool setup_device(void) { device_handle = CreateFile(tapname, GENERIC_READ, FILE_SHARE_WRITE, 0, OPEN_EXISTING, FILE_ATTRIBUTE_SYSTEM, 0); if(device_handle == INVALID_HANDLE_VALUE) { - logger(LOG_ERR, _("Could not open Windows tap device %s (%s) for reading: %s"), device, iface, winerror(GetLastError())); + logger(LOG_ERR, "Could not open Windows tap device %s (%s) for reading: %s", device, iface, winerror(GetLastError())); buf[0] = 0; write(sp[1], buf, 1); exit(1); } - logger(LOG_DEBUG, _("Tap reader forked and running.")); + logger(LOG_DEBUG, "Tap reader forked and running."); /* Notify success */ @@ -202,13 +202,13 @@ bool setup_device(void) { read(device_fd, &gelukt, 1); if(gelukt != 1) { - logger(LOG_DEBUG, _("Tap reader failed!")); + logger(LOG_DEBUG, "Tap reader failed!"); return false; } - device_info = _("Windows tap device"); + device_info = "Windows tap device"; - logger(LOG_INFO, _("%s (%s) is a %s"), device, iface, device_info); + logger(LOG_INFO, "%s (%s) is a %s", device, iface, device_info); return true; } @@ -228,7 +228,7 @@ bool read_packet(vpn_packet_t *packet) { int lenin; if((lenin = read(sp[0], packet->data, MTU)) <= 0) { - logger(LOG_ERR, _("Error while reading from %s %s: %s"), device_info, + logger(LOG_ERR, "Error while reading from %s %s: %s", device_info, device, strerror(errno)); return false; } @@ -237,7 +237,7 @@ bool read_packet(vpn_packet_t *packet) { device_total_in += packet->len; - ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Read packet of %d bytes from %s"), packet->len, + ifdebug(TRAFFIC) logger(LOG_DEBUG, "Read packet of %d bytes from %s", packet->len, device_info); return true; @@ -246,11 +246,11 @@ bool read_packet(vpn_packet_t *packet) { bool write_packet(vpn_packet_t *packet) { long lenout; - ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Writing packet of %d bytes to %s"), + ifdebug(TRAFFIC) logger(LOG_DEBUG, "Writing packet of %d bytes to %s", packet->len, device_info); if(!WriteFile (device_handle, packet->data, packet->len, &lenout, NULL)) { - logger(LOG_ERR, _("Error while writing to %s %s: %s"), device_info, device, winerror(GetLastError())); + logger(LOG_ERR, "Error while writing to %s %s: %s", device_info, device, winerror(GetLastError())); return false; } @@ -260,7 +260,7 @@ bool write_packet(vpn_packet_t *packet) { } void dump_device_stats(void) { - logger(LOG_DEBUG, _("Statistics for %s %s:"), device_info, device); - logger(LOG_DEBUG, _(" total bytes in: %10d"), device_total_in); - logger(LOG_DEBUG, _(" total bytes out: %10d"), device_total_out); + logger(LOG_DEBUG, "Statistics for %s %s:", device_info, device); + logger(LOG_DEBUG, " total bytes in: %10d", device_total_in); + logger(LOG_DEBUG, " total bytes out: %10d", device_total_out); } diff --git a/src/edge.c b/src/edge.c index d1ff3249..9e1b31eb 100644 --- a/src/edge.c +++ b/src/edge.c @@ -111,18 +111,18 @@ void dump_edges(void) { edge_t *e; char *address; - logger(LOG_DEBUG, _("Edges:")); + logger(LOG_DEBUG, "Edges:"); for(node = node_tree->head; node; node = node->next) { n = node->data; for(node2 = n->edge_tree->head; node2; node2 = node2->next) { e = node2->data; address = sockaddr2hostname(&e->address); - logger(LOG_DEBUG, _(" %s to %s at %s options %lx weight %d"), + logger(LOG_DEBUG, " %s to %s at %s options %lx weight %d", e->from->name, e->to->name, address, e->options, e->weight); free(address); } } - logger(LOG_DEBUG, _("End of edges.")); + logger(LOG_DEBUG, "End of edges."); } diff --git a/src/graph.c b/src/graph.c index c8430d82..148f23c4 100644 --- a/src/graph.c +++ b/src/graph.c @@ -241,10 +241,10 @@ void sssp_bfs(void) { n->status.reachable = !n->status.reachable; if(n->status.reachable) { - ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Node %s (%s) became reachable"), + ifdebug(TRAFFIC) logger(LOG_DEBUG, "Node %s (%s) became reachable", n->name, n->hostname); } else { - ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Node %s (%s) became unreachable"), + ifdebug(TRAFFIC) logger(LOG_DEBUG, "Node %s (%s) became unreachable", n->name, n->hostname); } diff --git a/src/linux/device.c b/src/linux/device.c index 8ae8fefb..35c66d55 100644 --- a/src/linux/device.c +++ b/src/linux/device.c @@ -66,7 +66,7 @@ bool setup_device(void) { device_fd = open(device, O_RDWR | O_NONBLOCK); if(device_fd < 0) { - logger(LOG_ERR, _("Could not open %s: %s"), device, strerror(errno)); + logger(LOG_ERR, "Could not open %s: %s", device, strerror(errno)); return false; } @@ -77,11 +77,11 @@ bool setup_device(void) { if(routing_mode == RMODE_ROUTER) { ifr.ifr_flags = IFF_TUN; device_type = DEVICE_TYPE_TUN; - device_info = _("Linux tun/tap device (tun mode)"); + device_info = "Linux tun/tap device (tun mode)"; } else { ifr.ifr_flags = IFF_TAP | IFF_NO_PI; device_type = DEVICE_TYPE_TAP; - device_info = _("Linux tun/tap device (tap mode)"); + device_info = "Linux tun/tap device (tap mode)"; } if(iface) @@ -92,7 +92,7 @@ bool setup_device(void) { if(iface) free(iface); iface = xstrdup(ifrname); } else if(!ioctl(device_fd, (('T' << 8) | 202), &ifr)) { - logger(LOG_WARNING, _("Old ioctl() request was needed for %s"), device); + logger(LOG_WARNING, "Old ioctl() request was needed for %s", device); strncpy(ifrname, ifr.ifr_name, IFNAMSIZ); if(iface) free(iface); iface = xstrdup(ifrname); @@ -101,14 +101,14 @@ bool setup_device(void) { { if(routing_mode == RMODE_ROUTER) overwrite_mac = true; - device_info = _("Linux ethertap device"); + device_info = "Linux ethertap device"; device_type = DEVICE_TYPE_ETHERTAP; if(iface) free(iface); iface = xstrdup(rindex(device, '/') ? rindex(device, '/') + 1 : device); } - logger(LOG_INFO, _("%s is a %s"), device, device_info); + logger(LOG_INFO, "%s is a %s", device, device_info); return true; } @@ -128,7 +128,7 @@ bool read_packet(vpn_packet_t *packet) { lenin = read(device_fd, packet->data + 10, MTU - 10); if(lenin <= 0) { - logger(LOG_ERR, _("Error while reading from %s %s: %s"), + logger(LOG_ERR, "Error while reading from %s %s: %s", device_info, device, strerror(errno)); return false; } @@ -139,7 +139,7 @@ bool read_packet(vpn_packet_t *packet) { lenin = read(device_fd, packet->data, MTU); if(lenin <= 0) { - logger(LOG_ERR, _("Error while reading from %s %s: %s"), + logger(LOG_ERR, "Error while reading from %s %s: %s", device_info, device, strerror(errno)); return false; } @@ -150,7 +150,7 @@ bool read_packet(vpn_packet_t *packet) { lenin = read(device_fd, packet->data - 2, MTU + 2); if(lenin <= 0) { - logger(LOG_ERR, _("Error while reading from %s %s: %s"), + logger(LOG_ERR, "Error while reading from %s %s: %s", device_info, device, strerror(errno)); return false; } @@ -161,28 +161,28 @@ bool read_packet(vpn_packet_t *packet) { device_total_in += packet->len; - ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Read packet of %d bytes from %s"), packet->len, + ifdebug(TRAFFIC) logger(LOG_DEBUG, "Read packet of %d bytes from %s", packet->len, device_info); return true; } bool write_packet(vpn_packet_t *packet) { - ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Writing packet of %d bytes to %s"), + ifdebug(TRAFFIC) logger(LOG_DEBUG, "Writing packet of %d bytes to %s", packet->len, device_info); switch(device_type) { case DEVICE_TYPE_TUN: packet->data[10] = packet->data[11] = 0; if(write(device_fd, packet->data + 10, packet->len - 10) < 0) { - logger(LOG_ERR, _("Can't write to %s %s: %s"), device_info, device, + logger(LOG_ERR, "Can't write to %s %s: %s", device_info, device, strerror(errno)); return false; } break; case DEVICE_TYPE_TAP: if(write(device_fd, packet->data, packet->len) < 0) { - logger(LOG_ERR, _("Can't write to %s %s: %s"), device_info, device, + logger(LOG_ERR, "Can't write to %s %s: %s", device_info, device, strerror(errno)); return false; } @@ -191,7 +191,7 @@ bool write_packet(vpn_packet_t *packet) { *(short int *)(packet->data - 2) = packet->len; if(write(device_fd, packet->data - 2, packet->len + 2) < 0) { - logger(LOG_ERR, _("Can't write to %s %s: %s"), device_info, device, + logger(LOG_ERR, "Can't write to %s %s: %s", device_info, device, strerror(errno)); return false; } @@ -204,7 +204,7 @@ bool write_packet(vpn_packet_t *packet) { } void dump_device_stats(void) { - logger(LOG_DEBUG, _("Statistics for %s %s:"), device_info, device); - logger(LOG_DEBUG, _(" total bytes in: %10d"), device_total_in); - logger(LOG_DEBUG, _(" total bytes out: %10d"), device_total_out); + logger(LOG_DEBUG, "Statistics for %s %s:", device_info, device); + logger(LOG_DEBUG, " total bytes in: %10d", device_total_in); + logger(LOG_DEBUG, " total bytes out: %10d", device_total_out); } diff --git a/src/meta.c b/src/meta.c index 9c38fefb..a56f4618 100644 --- a/src/meta.c +++ b/src/meta.c @@ -37,11 +37,11 @@ bool send_meta(connection_t *c, const char *buffer, int length) { int result; if(!c) { - logger(LOG_ERR, _("send_meta() called with NULL pointer!")); + logger(LOG_ERR, "send_meta() called with NULL pointer!"); abort(); } - ifdebug(META) logger(LOG_DEBUG, _("Sending %d bytes of metadata to %s (%s)"), length, + ifdebug(META) logger(LOG_DEBUG, "Sending %d bytes of metadata to %s (%s)", length, c->name, c->hostname); if(!c->outbuflen) @@ -63,11 +63,11 @@ bool send_meta(connection_t *c, const char *buffer, int length) { result = EVP_EncryptUpdate(c->outctx, (unsigned char *)c->outbuf + c->outbufstart + c->outbuflen, &outlen, (unsigned char *)buffer, length); if(!result || outlen < length) { - logger(LOG_ERR, _("Error while encrypting metadata to %s (%s): %s"), + logger(LOG_ERR, "Error while encrypting metadata to %s (%s): %s", c->name, c->hostname, ERR_error_string(ERR_get_error(), NULL)); return false; } else if(outlen > length) { - logger(LOG_EMERG, _("Encrypted data too long! Heap corrupted!")); + logger(LOG_EMERG, "Encrypted data too long! Heap corrupted!"); abort(); } c->outbuflen += outlen; @@ -82,25 +82,25 @@ bool send_meta(connection_t *c, const char *buffer, int length) { bool flush_meta(connection_t *c) { int result; - ifdebug(META) logger(LOG_DEBUG, _("Flushing %d bytes to %s (%s)"), + ifdebug(META) logger(LOG_DEBUG, "Flushing %d bytes to %s (%s)", c->outbuflen, c->name, c->hostname); while(c->outbuflen) { result = send(c->socket, c->outbuf + c->outbufstart, c->outbuflen, 0); if(result <= 0) { if(!errno || errno == EPIPE) { - ifdebug(CONNECTIONS) logger(LOG_NOTICE, _("Connection closed by %s (%s)"), + ifdebug(CONNECTIONS) logger(LOG_NOTICE, "Connection closed by %s (%s)", c->name, c->hostname); } else if(errno == EINTR) { continue; #ifdef EWOULDBLOCK } else if(errno == EWOULDBLOCK) { - ifdebug(CONNECTIONS) logger(LOG_DEBUG, _("Flushing %d bytes to %s (%s) would block"), + ifdebug(CONNECTIONS) logger(LOG_DEBUG, "Flushing %d bytes to %s (%s) would block", c->outbuflen, c->name, c->hostname); return true; #endif } else { - logger(LOG_ERR, _("Flushing meta data to %s (%s) failed: %s"), c->name, + logger(LOG_ERR, "Flushing meta data to %s (%s) failed: %s", c->name, c->hostname, strerror(errno)); } @@ -146,12 +146,12 @@ bool receive_meta(connection_t *c) { if(lenin <= 0) { if(!lenin || !errno) { - ifdebug(CONNECTIONS) logger(LOG_NOTICE, _("Connection closed by %s (%s)"), + ifdebug(CONNECTIONS) logger(LOG_NOTICE, "Connection closed by %s (%s)", c->name, c->hostname); } else if(errno == EINTR) return true; else - logger(LOG_ERR, _("Metadata socket read error for %s (%s): %s"), + logger(LOG_ERR, "Metadata socket read error for %s (%s): %s", c->name, c->hostname, strerror(errno)); return false; @@ -166,7 +166,7 @@ bool receive_meta(connection_t *c) { if(c->status.decryptin && !decrypted) { result = EVP_DecryptUpdate(c->inctx, (unsigned char *)inbuf, &lenout, (unsigned char *)c->buffer + oldlen, lenin); if(!result || lenout != lenin) { - logger(LOG_ERR, _("Error while decrypting metadata from %s (%s): %s"), + logger(LOG_ERR, "Error while decrypting metadata from %s (%s): %s", c->name, c->hostname, ERR_error_string(ERR_get_error(), NULL)); return false; } @@ -219,7 +219,7 @@ bool receive_meta(connection_t *c) { } if(c->buflen >= MAXBUFSIZE) { - logger(LOG_ERR, _("Metadata read buffer overflow for %s (%s)"), + logger(LOG_ERR, "Metadata read buffer overflow for %s (%s)", c->name, c->hostname); return false; } diff --git a/src/mingw/device.c b/src/mingw/device.c index 132ef8f7..c0f5d296 100644 --- a/src/mingw/device.c +++ b/src/mingw/device.c @@ -49,7 +49,7 @@ static DWORD WINAPI tapreader(void *bla) { OVERLAPPED overlapped; vpn_packet_t packet; - logger(LOG_DEBUG, _("Tap reader running")); + logger(LOG_DEBUG, "Tap reader running"); /* Read from tap device and send to parent */ @@ -68,7 +68,7 @@ static DWORD WINAPI tapreader(void *bla) { if(!GetOverlappedResult(device_handle, &overlapped, &len, FALSE)) continue; } else { - logger(LOG_ERR, _("Error while reading from %s %s: %s"), device_info, + logger(LOG_ERR, "Error while reading from %s %s: %s", device_info, device, strerror(errno)); return -1; } @@ -112,7 +112,7 @@ bool setup_device(void) { /* Open registry and look for network adapters */ if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, NETWORK_CONNECTIONS_KEY, 0, KEY_READ, &key)) { - logger(LOG_ERR, _("Unable to read registry: %s"), winerror(GetLastError())); + logger(LOG_ERR, "Unable to read registry: %s", winerror(GetLastError())); return false; } @@ -163,7 +163,7 @@ bool setup_device(void) { RegCloseKey(key); if(!found) { - logger(LOG_ERR, _("No Windows tap device found!")); + logger(LOG_ERR, "No Windows tap device found!"); return false; } @@ -181,14 +181,14 @@ bool setup_device(void) { } if(device_handle == INVALID_HANDLE_VALUE) { - logger(LOG_ERR, _("%s (%s) is not a usable Windows tap device: %s"), device, iface, winerror(GetLastError())); + logger(LOG_ERR, "%s (%s) is not a usable Windows tap device: %s", device, iface, winerror(GetLastError())); return false; } /* Get MAC address from tap device */ if(!DeviceIoControl(device_handle, TAP_IOCTL_GET_MAC, mymac.x, sizeof(mymac.x), mymac.x, sizeof(mymac.x), &len, 0)) { - logger(LOG_ERR, _("Could not get MAC address from Windows tap device %s (%s): %s"), device, iface, winerror(GetLastError())); + logger(LOG_ERR, "Could not get MAC address from Windows tap device %s (%s): %s", device, iface, winerror(GetLastError())); return false; } @@ -201,7 +201,7 @@ bool setup_device(void) { thread = CreateThread(NULL, 0, tapreader, NULL, 0, NULL); if(!thread) { - logger(LOG_ERR, _("System call `%s' failed: %s"), "CreateThread", winerror(GetLastError())); + logger(LOG_ERR, "System call `%s' failed: %s", "CreateThread", winerror(GetLastError())); return false; } @@ -210,9 +210,9 @@ bool setup_device(void) { status = true; DeviceIoControl(device_handle, TAP_IOCTL_SET_MEDIA_STATUS, &status, sizeof(status), &status, sizeof(status), &len, NULL); - device_info = _("Windows tap device"); + device_info = "Windows tap device"; - logger(LOG_INFO, _("%s (%s) is a %s"), device, iface, device_info); + logger(LOG_INFO, "%s (%s) is a %s", device, iface, device_info); return true; } @@ -232,11 +232,11 @@ bool write_packet(vpn_packet_t *packet) { long lenout; OVERLAPPED overlapped = {0}; - ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Writing packet of %d bytes to %s"), + ifdebug(TRAFFIC) logger(LOG_DEBUG, "Writing packet of %d bytes to %s", packet->len, device_info); if(!WriteFile(device_handle, packet->data, packet->len, &lenout, &overlapped)) { - logger(LOG_ERR, _("Error while writing to %s %s: %s"), device_info, device, winerror(GetLastError())); + logger(LOG_ERR, "Error while writing to %s %s: %s", device_info, device, winerror(GetLastError())); return false; } @@ -246,7 +246,7 @@ bool write_packet(vpn_packet_t *packet) { } void dump_device_stats(void) { - logger(LOG_DEBUG, _("Statistics for %s %s:"), device_info, device); - logger(LOG_DEBUG, _(" total bytes in: %10d"), device_total_in); - logger(LOG_DEBUG, _(" total bytes out: %10d"), device_total_out); + logger(LOG_DEBUG, "Statistics for %s %s:", device_info, device); + logger(LOG_DEBUG, " total bytes in: %10d", device_total_in); + logger(LOG_DEBUG, " total bytes out: %10d", device_total_out); } diff --git a/src/net.c b/src/net.c index da5be4e6..7f1f77b3 100644 --- a/src/net.c +++ b/src/net.c @@ -52,7 +52,7 @@ static void purge(void) { edge_t *e; subnet_t *s; - ifdebug(PROTOCOL) logger(LOG_DEBUG, _("Purging unreachable nodes")); + ifdebug(PROTOCOL) logger(LOG_DEBUG, "Purging unreachable nodes"); /* Remove all edges and subnets owned by unreachable nodes. */ @@ -61,7 +61,7 @@ static void purge(void) { n = nnode->data; if(!n->status.reachable) { - ifdebug(SCARY_THINGS) logger(LOG_DEBUG, _("Purging node %s (%s)"), n->name, + ifdebug(SCARY_THINGS) logger(LOG_DEBUG, "Purging node %s (%s)", n->name, n->hostname); for(snode = n->subnet_tree->head; snode; snode = snext) { @@ -160,7 +160,7 @@ void terminate_connection(connection_t *c, bool report) { if(c->status.remove) return; - ifdebug(CONNECTIONS) logger(LOG_NOTICE, _("Closing connection with %s (%s)"), + ifdebug(CONNECTIONS) logger(LOG_NOTICE, "Closing connection with %s (%s)", c->name, c->hostname); c->status.remove = true; @@ -228,7 +228,7 @@ static void check_dead_connections(void) { if(c->last_ping_time + pingtimeout < now) { if(c->status.active) { if(c->status.pinged) { - ifdebug(CONNECTIONS) logger(LOG_INFO, _("%s (%s) didn't respond to PING in %ld seconds"), + ifdebug(CONNECTIONS) logger(LOG_INFO, "%s (%s) didn't respond to PING in %ld seconds", c->name, c->hostname, now - c->last_ping_time); c->status.timeout = true; terminate_connection(c, true); @@ -237,12 +237,12 @@ static void check_dead_connections(void) { } } else { if(c->status.remove) { - logger(LOG_WARNING, _("Old connection_t for %s (%s) status %04x still lingering, deleting..."), + logger(LOG_WARNING, "Old connection_t for %s (%s) status %04x still lingering, deleting...", c->name, c->hostname, bitfield_to_int(&c->status, sizeof c->status)); connection_del(c); continue; } - ifdebug(CONNECTIONS) logger(LOG_WARNING, _("Timeout from %s (%s) during authentication"), + ifdebug(CONNECTIONS) logger(LOG_WARNING, "Timeout from %s (%s) during authentication", c->name, c->hostname); if(c->status.connecting) { c->status.connecting = false; @@ -257,7 +257,7 @@ static void check_dead_connections(void) { if(c->outbuflen > 0 && c->last_flushed_time + pingtimeout < now) { if(c->status.active) { ifdebug(CONNECTIONS) logger(LOG_INFO, - _("%s (%s) could not flush for %ld seconds (%d bytes remaining)"), + "%s (%s) could not flush for %ld seconds (%d bytes remaining)", c->name, c->hostname, now - c->last_flushed_time, c->outbuflen); c->status.timeout = true; terminate_connection(c, true); @@ -301,7 +301,7 @@ static void check_network_activity(fd_set * readset, fd_set * writeset) { finish_connecting(c); else { ifdebug(CONNECTIONS) logger(LOG_DEBUG, - _("Error while connecting to %s (%s): %s"), + "Error while connecting to %s (%s): %s", c->name, c->hostname, strerror(result)); closesocket(c->socket); do_outgoing_connection(c); @@ -369,7 +369,7 @@ int main_loop(void) { if(r < 0) { if(errno != EINTR && errno != EAGAIN) { - logger(LOG_ERR, _("Error while waiting for input: %s"), + logger(LOG_ERR, "Error while waiting for input: %s", strerror(errno)); dump_connections(); return 1; @@ -402,7 +402,7 @@ int main_loop(void) { avl_node_t *node; node_t *n; - ifdebug(STATUS) logger(LOG_INFO, _("Expiring symmetric keys")); + ifdebug(STATUS) logger(LOG_INFO, "Expiring symmetric keys"); for(node = node_tree->head; node; node = node->next) { n = node->data; @@ -418,7 +418,7 @@ int main_loop(void) { } if(sigalrm) { - logger(LOG_INFO, _("Flushing event queue")); + logger(LOG_INFO, "Flushing event queue"); expire_events(); sigalrm = false; } @@ -442,7 +442,7 @@ int main_loop(void) { init_configuration(&config_tree); if(!read_server_config()) { - logger(LOG_ERR, _("Unable to reread configuration file, exitting.")); + logger(LOG_ERR, "Unable to reread configuration file, exitting."); return 1; } diff --git a/src/net_packet.c b/src/net_packet.c index 05336b0f..63e3592e 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -66,19 +66,19 @@ void send_mtu_probe(node_t *n) { n->mtuevent = NULL; if(!n->status.reachable) { - logger(LOG_DEBUG, _("Trying to send MTU probe to unreachable node %s (%s)"), n->name, n->hostname); + logger(LOG_DEBUG, "Trying to send MTU probe to unreachable node %s (%s)", n->name, n->hostname); return; } if(n->mtuprobes >= 10 && !n->minmtu) { - ifdebug(TRAFFIC) logger(LOG_INFO, _("No response to MTU probes from %s (%s)"), n->name, n->hostname); + ifdebug(TRAFFIC) logger(LOG_INFO, "No response to MTU probes from %s (%s)", n->name, n->hostname); return; } for(i = 0; i < 3; i++) { if(n->mtuprobes >= 30 || n->minmtu >= n->maxmtu) { n->mtu = n->minmtu; - ifdebug(TRAFFIC) logger(LOG_INFO, _("Fixing MTU of %s (%s) to %d after %d probes"), n->name, n->hostname, n->mtu, n->mtuprobes); + ifdebug(TRAFFIC) logger(LOG_INFO, "Fixing MTU of %s (%s) to %d after %d probes", n->name, n->hostname, n->mtu, n->mtuprobes); return; } @@ -91,7 +91,7 @@ void send_mtu_probe(node_t *n) { packet.len = len; packet.priority = 0; - ifdebug(TRAFFIC) logger(LOG_INFO, _("Sending MTU probe length %d to %s (%s)"), len, n->name, n->hostname); + ifdebug(TRAFFIC) logger(LOG_INFO, "Sending MTU probe length %d to %s (%s)", len, n->name, n->hostname); send_udppacket(n, &packet); } @@ -104,7 +104,7 @@ void send_mtu_probe(node_t *n) { } void mtu_probe_h(node_t *n, vpn_packet_t *packet, length_t len) { - ifdebug(TRAFFIC) logger(LOG_INFO, _("Got MTU probe length %d from %s (%s)"), packet->len, n->name, n->hostname); + ifdebug(TRAFFIC) logger(LOG_INFO, "Got MTU probe length %d from %s (%s)", packet->len, n->name, n->hostname); if(!packet->data[0]) { packet->data[0] = 1; @@ -156,7 +156,7 @@ static length_t uncompress_packet(uint8_t *dest, const uint8_t *source, length_t /* VPN packet I/O */ static void receive_packet(node_t *n, vpn_packet_t *packet) { - ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Received packet of %d bytes from %s (%s)"), + ifdebug(TRAFFIC) logger(LOG_DEBUG, "Received packet of %d bytes from %s (%s)", packet->len, n->name, n->hostname); route(n, packet); @@ -183,7 +183,7 @@ static void receive_udppacket(node_t *n, vpn_packet_t *inpkt) { int i; if(!n->inkey) { - ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Got packet from %s (%s) but he hasn't got our key yet"), + ifdebug(TRAFFIC) logger(LOG_DEBUG, "Got packet from %s (%s) but he hasn't got our key yet", n->name, n->hostname); return; } @@ -191,7 +191,7 @@ static void receive_udppacket(node_t *n, vpn_packet_t *inpkt) { /* Check packet length */ if(inpkt->len < sizeof(inpkt->seqno) + n->inmaclength) { - ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Got too short packet from %s (%s)"), + ifdebug(TRAFFIC) logger(LOG_DEBUG, "Got too short packet from %s (%s)", n->name, n->hostname); return; } @@ -204,7 +204,7 @@ static void receive_udppacket(node_t *n, vpn_packet_t *inpkt) { (unsigned char *) &inpkt->seqno, inpkt->len, (unsigned char *)hmac, NULL); if(memcmp(hmac, (char *) &inpkt->seqno + inpkt->len, n->inmaclength)) { - ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Got unauthenticated packet from %s (%s)"), + ifdebug(TRAFFIC) logger(LOG_DEBUG, "Got unauthenticated packet from %s (%s)", n->name, n->hostname); return; } @@ -219,7 +219,7 @@ static void receive_udppacket(node_t *n, vpn_packet_t *inpkt) { || !EVP_DecryptUpdate(&n->inctx, (unsigned char *) &outpkt->seqno, &outlen, (unsigned char *) &inpkt->seqno, inpkt->len) || !EVP_DecryptFinal_ex(&n->inctx, (unsigned char *) &outpkt->seqno + outlen, &outpad)) { - ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Error decrypting packet from %s (%s): %s"), + ifdebug(TRAFFIC) logger(LOG_DEBUG, "Error decrypting packet from %s (%s): %s", n->name, n->hostname, ERR_error_string(ERR_get_error(), NULL)); return; } @@ -235,13 +235,13 @@ static void receive_udppacket(node_t *n, vpn_packet_t *inpkt) { if(inpkt->seqno != n->received_seqno + 1) { if(inpkt->seqno >= n->received_seqno + sizeof(n->late) * 8) { - logger(LOG_WARNING, _("Lost %d packets from %s (%s)"), + logger(LOG_WARNING, "Lost %d packets from %s (%s)", inpkt->seqno - n->received_seqno - 1, n->name, n->hostname); memset(n->late, 0, sizeof(n->late)); } else if (inpkt->seqno <= n->received_seqno) { if((n->received_seqno >= sizeof(n->late) * 8 && inpkt->seqno <= n->received_seqno - sizeof(n->late) * 8) || !(n->late[(inpkt->seqno / 8) % sizeof(n->late)] & (1 << inpkt->seqno % 8))) { - logger(LOG_WARNING, _("Got late or replayed packet from %s (%s), seqno %d, last received %d"), + logger(LOG_WARNING, "Got late or replayed packet from %s (%s), seqno %d, last received %d", n->name, n->hostname, inpkt->seqno, n->received_seqno); return; } @@ -267,7 +267,7 @@ static void receive_udppacket(node_t *n, vpn_packet_t *inpkt) { outpkt = pkt[nextpkt++]; if((outpkt->len = uncompress_packet(outpkt->data, inpkt->data, inpkt->len, n->incompression)) < 0) { - ifdebug(TRAFFIC) logger(LOG_ERR, _("Error while uncompressing packet from %s (%s)"), + ifdebug(TRAFFIC) logger(LOG_ERR, "Error while uncompressing packet from %s (%s)", n->name, n->hostname); return; } @@ -314,7 +314,7 @@ static void send_udppacket(node_t *n, vpn_packet_t *origpkt) { int sock; if(!n->status.reachable) { - ifdebug(TRAFFIC) logger(LOG_INFO, _("Trying to send UDP packet to unreachable node %s (%s)"), n->name, n->hostname); + ifdebug(TRAFFIC) logger(LOG_INFO, "Trying to send UDP packet to unreachable node %s (%s)", n->name, n->hostname); return; } @@ -322,7 +322,7 @@ static void send_udppacket(node_t *n, vpn_packet_t *origpkt) { if(!n->status.validkey) { ifdebug(TRAFFIC) logger(LOG_INFO, - _("No valid key known yet for %s (%s), forwarding via TCP"), + "No valid key known yet for %s (%s), forwarding via TCP", n->name, n->hostname); if(!n->status.waitingforkey) @@ -337,7 +337,7 @@ static void send_udppacket(node_t *n, vpn_packet_t *origpkt) { if(n->options & OPTION_PMTU_DISCOVERY && inpkt->len > n->minmtu && (inpkt->data[12] | inpkt->data[13])) { ifdebug(TRAFFIC) logger(LOG_INFO, - _("Packet for %s (%s) larger than minimum MTU, forwarding via TCP"), + "Packet for %s (%s) larger than minimum MTU, forwarding via TCP", n->name, n->hostname); send_tcppacket(n->nexthop->connection, origpkt); @@ -354,7 +354,7 @@ static void send_udppacket(node_t *n, vpn_packet_t *origpkt) { outpkt = pkt[nextpkt++]; if((outpkt->len = compress_packet(outpkt->data, inpkt->data, inpkt->len, n->outcompression)) < 0) { - ifdebug(TRAFFIC) logger(LOG_ERR, _("Error while compressing packet to %s (%s)"), + ifdebug(TRAFFIC) logger(LOG_ERR, "Error while compressing packet to %s (%s)", n->name, n->hostname); return; } @@ -376,7 +376,7 @@ static void send_udppacket(node_t *n, vpn_packet_t *origpkt) { || !EVP_EncryptUpdate(&n->outctx, (unsigned char *) &outpkt->seqno, &outlen, (unsigned char *) &inpkt->seqno, inpkt->len) || !EVP_EncryptFinal_ex(&n->outctx, (unsigned char *) &outpkt->seqno + outlen, &outpad)) { - ifdebug(TRAFFIC) logger(LOG_ERR, _("Error while encrypting packet to %s (%s): %s"), + ifdebug(TRAFFIC) logger(LOG_ERR, "Error while encrypting packet to %s (%s): %s", n->name, n->hostname, ERR_error_string(ERR_get_error(), NULL)); goto end; } @@ -408,9 +408,9 @@ static void send_udppacket(node_t *n, vpn_packet_t *origpkt) { if(priorityinheritance && origpriority != priority && listen_socket[sock].sa.sa.sa_family == AF_INET) { priority = origpriority; - ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Setting outgoing packet priority to %d"), priority); + ifdebug(TRAFFIC) logger(LOG_DEBUG, "Setting outgoing packet priority to %d", priority); if(setsockopt(listen_socket[sock].udp, SOL_IP, IP_TOS, &priority, sizeof(priority))) /* SO_PRIORITY doesn't seem to work */ - logger(LOG_ERR, _("System call `%s' failed: %s"), "setsockopt", strerror(errno)); + logger(LOG_ERR, "System call `%s' failed: %s", "setsockopt", strerror(errno)); } #endif @@ -421,7 +421,7 @@ static void send_udppacket(node_t *n, vpn_packet_t *origpkt) { if(n->mtu >= origlen) n->mtu = origlen - 1; } else - logger(LOG_ERR, _("Error sending packet to %s (%s): %s"), n->name, n->hostname, strerror(errno)); + logger(LOG_ERR, "Error sending packet to %s (%s): %s", n->name, n->hostname, strerror(errno)); } end: @@ -441,11 +441,11 @@ void send_packet(const node_t *n, vpn_packet_t *packet) { return; } - ifdebug(TRAFFIC) logger(LOG_ERR, _("Sending packet of %d bytes to %s (%s)"), + ifdebug(TRAFFIC) logger(LOG_ERR, "Sending packet of %d bytes to %s (%s)", packet->len, n->name, n->hostname); if(!n->status.reachable) { - ifdebug(TRAFFIC) logger(LOG_INFO, _("Node %s (%s) is not reachable"), + ifdebug(TRAFFIC) logger(LOG_INFO, "Node %s (%s) is not reachable", n->name, n->hostname); return; } @@ -453,7 +453,7 @@ void send_packet(const node_t *n, vpn_packet_t *packet) { via = (packet->priority == -1 || n->via == myself) ? n->nexthop : n->via; if(via != n) - ifdebug(TRAFFIC) logger(LOG_INFO, _("Sending packet to %s via %s (%s)"), + ifdebug(TRAFFIC) logger(LOG_INFO, "Sending packet to %s via %s (%s)", n->name, via->name, n->via->hostname); if(packet->priority == -1 || ((myself->options | via->options) & OPTION_TCPONLY)) { @@ -469,7 +469,7 @@ void broadcast_packet(const node_t *from, vpn_packet_t *packet) { avl_node_t *node; connection_t *c; - ifdebug(TRAFFIC) logger(LOG_INFO, _("Broadcasting packet of %d bytes from %s (%s)"), + ifdebug(TRAFFIC) logger(LOG_INFO, "Broadcasting packet of %d bytes from %s (%s)", packet->len, from->name, from->hostname); if(from != myself) { @@ -524,7 +524,7 @@ void handle_incoming_vpn_data(int sock) { if(pkt.len < 0) { if(errno != EAGAIN && errno != EINTR) - logger(LOG_ERR, _("Receiving packet failed: %s"), strerror(errno)); + logger(LOG_ERR, "Receiving packet failed: %s", strerror(errno)); return; } @@ -538,7 +538,7 @@ void handle_incoming_vpn_data(int sock) { update_node_udp(n, &from); else ifdebug(PROTOCOL) { hostname = sockaddr2hostname(&from); - logger(LOG_WARNING, _("Received UDP packet from unknown source %s"), hostname); + logger(LOG_WARNING, "Received UDP packet from unknown source %s", hostname); free(hostname); return; } diff --git a/src/net_setup.c b/src/net_setup.c index 12b09a91..2b177c13 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -69,7 +69,7 @@ bool read_rsa_public_key(connection_t *c) { fp = fopen(fname, "r"); if(!fp) { - logger(LOG_ERR, _("Error reading RSA public key file `%s': %s"), + logger(LOG_ERR, "Error reading RSA public key file `%s': %s", fname, strerror(errno)); free(fname); return false; @@ -86,7 +86,7 @@ bool read_rsa_public_key(connection_t *c) { fp = fopen(fname, "r"); if(!fp) { - logger(LOG_ERR, _("Error reading RSA public key file `%s': %s"), + logger(LOG_ERR, "Error reading RSA public key file `%s': %s", fname, strerror(errno)); free(fname); return false; @@ -101,7 +101,7 @@ bool read_rsa_public_key(connection_t *c) { return true; } - logger(LOG_ERR, _("Reading RSA public key file `%s' failed: %s"), + logger(LOG_ERR, "Reading RSA public key file `%s' failed: %s", fname, strerror(errno)); return false; } @@ -137,7 +137,7 @@ bool read_rsa_public_key(connection_t *c) { if(c->rsa_key) return true; - logger(LOG_ERR, _("No public key for %s specified!"), c->name); + logger(LOG_ERR, "No public key for %s specified!", c->name); return false; } @@ -149,7 +149,7 @@ bool read_rsa_private_key(void) { if(get_config_string(lookup_config(config_tree, "PrivateKey"), &key)) { if(!get_config_string(lookup_config(myself->connection->config_tree, "PublicKey"), &pubkey)) { - logger(LOG_ERR, _("PrivateKey used but no PublicKey found!")); + logger(LOG_ERR, "PrivateKey used but no PublicKey found!"); return false; } myself->connection->rsa_key = RSA_new(); @@ -168,7 +168,7 @@ bool read_rsa_private_key(void) { fp = fopen(fname, "r"); if(!fp) { - logger(LOG_ERR, _("Error reading RSA private key file `%s': %s"), + logger(LOG_ERR, "Error reading RSA private key file `%s': %s", fname, strerror(errno)); free(fname); return false; @@ -176,21 +176,21 @@ bool read_rsa_private_key(void) { #if !defined(HAVE_MINGW) && !defined(HAVE_CYGWIN) if(fstat(fileno(fp), &s)) { - logger(LOG_ERR, _("Could not stat RSA private key file `%s': %s'"), + logger(LOG_ERR, "Could not stat RSA private key file `%s': %s'", fname, strerror(errno)); free(fname); return false; } if(s.st_mode & ~0100700) - logger(LOG_WARNING, _("Warning: insecure file permissions for RSA private key file `%s'!"), fname); + logger(LOG_WARNING, "Warning: insecure file permissions for RSA private key file `%s'!", fname); #endif myself->connection->rsa_key = PEM_read_RSAPrivateKey(fp, NULL, NULL, NULL); fclose(fp); if(!myself->connection->rsa_key) { - logger(LOG_ERR, _("Reading RSA private key file `%s' failed: %s"), + logger(LOG_ERR, "Reading RSA private key file `%s' failed: %s", fname, strerror(errno)); free(fname); return false; @@ -217,19 +217,19 @@ bool setup_myself(void) { myself->connection = new_connection(); init_configuration(&myself->connection->config_tree); - xasprintf(&myself->hostname, _("MYSELF")); - xasprintf(&myself->connection->hostname, _("MYSELF")); + xasprintf(&myself->hostname, "MYSELF"); + xasprintf(&myself->connection->hostname, "MYSELF"); myself->connection->options = 0; myself->connection->protocol_version = PROT_CURRENT; if(!get_config_string(lookup_config(config_tree, "Name"), &name)) { /* Not acceptable */ - logger(LOG_ERR, _("Name for tinc daemon required!")); + logger(LOG_ERR, "Name for tinc daemon required!"); return false; } if(!check_id(name)) { - logger(LOG_ERR, _("Invalid name for myself!")); + logger(LOG_ERR, "Invalid name for myself!"); free(name); return false; } @@ -238,7 +238,7 @@ bool setup_myself(void) { myself->connection->name = xstrdup(name); if(!read_connection_config(myself->connection)) { - logger(LOG_ERR, _("Cannot open host configuration file for myself!")); + logger(LOG_ERR, "Cannot open host configuration file for myself!"); return false; } @@ -288,7 +288,7 @@ bool setup_myself(void) { else if(!strcasecmp(mode, "hub")) routing_mode = RMODE_HUB; else { - logger(LOG_ERR, _("Invalid routing mode!")); + logger(LOG_ERR, "Invalid routing mode!"); return false; } free(mode); @@ -306,7 +306,7 @@ bool setup_myself(void) { #if !defined(SOL_IP) || !defined(IP_TOS) if(priorityinheritance) - logger(LOG_WARNING, _("%s not supported on this platform"), "PriorityInheritance"); + logger(LOG_WARNING, "%s not supported on this platform", "PriorityInheritance"); #endif if(!get_config_int(lookup_config(config_tree, "MACExpire"), &macexpire)) @@ -314,7 +314,7 @@ bool setup_myself(void) { if(get_config_int(lookup_config(config_tree, "MaxTimeout"), &maxtimeout)) { if(maxtimeout <= 0) { - logger(LOG_ERR, _("Bogus maximum timeout!")); + logger(LOG_ERR, "Bogus maximum timeout!"); return false; } } else @@ -328,7 +328,7 @@ bool setup_myself(void) { else if(!strcasecmp(afname, "any")) addressfamily = AF_UNSPEC; else { - logger(LOG_ERR, _("Invalid address family!")); + logger(LOG_ERR, "Invalid address family!"); return false; } free(afname); @@ -346,7 +346,7 @@ bool setup_myself(void) { myself->incipher = EVP_get_cipherbyname(cipher); if(!myself->incipher) { - logger(LOG_ERR, _("Unrecognized cipher type!")); + logger(LOG_ERR, "Unrecognized cipher type!"); return false; } } @@ -374,7 +374,7 @@ bool setup_myself(void) { myself->indigest = EVP_get_digestbyname(digest); if(!myself->indigest) { - logger(LOG_ERR, _("Unrecognized digest type!")); + logger(LOG_ERR, "Unrecognized digest type!"); return false; } } @@ -386,10 +386,10 @@ bool setup_myself(void) { if(get_config_int(lookup_config(myself->connection->config_tree, "MACLength"), &myself->inmaclength)) { if(myself->indigest) { if(myself->inmaclength > myself->indigest->md_size) { - logger(LOG_ERR, _("MAC length exceeds size of digest!")); + logger(LOG_ERR, "MAC length exceeds size of digest!"); return false; } else if(myself->inmaclength < 0) { - logger(LOG_ERR, _("Bogus MAC length!")); + logger(LOG_ERR, "Bogus MAC length!"); return false; } } @@ -402,7 +402,7 @@ bool setup_myself(void) { if(get_config_int(lookup_config(myself->connection->config_tree, "Compression"), &myself->incompression)) { if(myself->incompression < 0 || myself->incompression > 11) { - logger(LOG_ERR, _("Bogus compression level!")); + logger(LOG_ERR, "Bogus compression level!"); return false; } } else @@ -452,7 +452,7 @@ bool setup_myself(void) { err = getaddrinfo(address, myport, &hint, &ai); if(err || !ai) { - logger(LOG_ERR, _("System call `%s' failed: %s"), "getaddrinfo", + logger(LOG_ERR, "System call `%s' failed: %s", "getaddrinfo", gai_strerror(err)); return false; } @@ -474,7 +474,7 @@ bool setup_myself(void) { ifdebug(CONNECTIONS) { hostname = sockaddr2hostname((sockaddr_t *) aip->ai_addr); - logger(LOG_NOTICE, _("Listening on %s"), hostname); + logger(LOG_NOTICE, "Listening on %s", hostname); free(hostname); } @@ -485,9 +485,9 @@ bool setup_myself(void) { freeaddrinfo(ai); if(listen_sockets) - logger(LOG_NOTICE, _("Ready")); + logger(LOG_NOTICE, "Ready"); else { - logger(LOG_ERR, _("Unable to create any listening socket!")); + logger(LOG_ERR, "Unable to create any listening socket!"); return false; } diff --git a/src/net_socket.c b/src/net_socket.c index 8c805490..21fc017a 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -61,13 +61,13 @@ static void configure_tcp(connection_t *c) { int flags = fcntl(c->socket, F_GETFL); if(fcntl(c->socket, F_SETFL, flags | O_NONBLOCK) < 0) { - logger(LOG_ERR, _("fcntl for %s: %s"), c->hostname, strerror(errno)); + logger(LOG_ERR, "fcntl for %s: %s", c->hostname, strerror(errno)); } #elif defined(WIN32) unsigned long arg = 1; if(ioctlsocket(c->socket, FIONBIO, &arg) != 0) { - logger(LOG_ERR, _("ioctlsocket for %s: WSA error %d"), c->hostname, WSAGetLastError()); + logger(LOG_ERR, "ioctlsocket for %s: WSA error %d", c->hostname, WSAGetLastError()); } #endif @@ -100,12 +100,12 @@ static bool bind_to_interface(int sd) { status = setsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, &ifr, sizeof(ifr)); if(status) { - logger(LOG_ERR, _("Can't bind to interface %s: %s"), iface, + logger(LOG_ERR, "Can't bind to interface %s: %s", iface, strerror(errno)); return false; } #else /* if !defined(SOL_SOCKET) || !defined(SO_BINDTODEVICE) */ - logger(LOG_WARNING, _("%s not supported on this platform"), "BindToInterface"); + logger(LOG_WARNING, "%s not supported on this platform", "BindToInterface"); #endif return true; @@ -140,8 +140,8 @@ static bool bind_to_address(connection_t *c) { &ai_hints, &ai_list); if(status) { free(node); - logger(LOG_WARNING, _("Error looking up %s port %s: %s"), - node, _("any"), gai_strerror(status)); + logger(LOG_WARNING, "Error looking up %s port %s: %s", + node, "any", gai_strerror(status)); return false; } assert(ai_list != NULL); @@ -156,7 +156,7 @@ static bool bind_to_address(connection_t *c) { if(status) { - logger(LOG_ERR, _("Can't bind to %s/tcp: %s"), node, + logger(LOG_ERR, "Can't bind to %s/tcp: %s", node, strerror(errno)); } else ifdebug(CONNECTIONS) { logger(LOG_DEBUG, "Successfully bound outgoing " @@ -178,7 +178,7 @@ int setup_listen_socket(const sockaddr_t *sa) { nfd = socket(sa->sa.sa_family, SOCK_STREAM, IPPROTO_TCP); if(nfd < 0) { - ifdebug(STATUS) logger(LOG_ERR, _("Creating metasocket failed: %s"), strerror(errno)); + ifdebug(STATUS) logger(LOG_ERR, "Creating metasocket failed: %s", strerror(errno)); return -1; } @@ -202,19 +202,19 @@ int setup_listen_socket(const sockaddr_t *sa) { if(setsockopt(nfd, SOL_SOCKET, SO_BINDTODEVICE, &ifr, sizeof(ifr))) { closesocket(nfd); - logger(LOG_ERR, _("Can't bind to interface %s: %s"), iface, + logger(LOG_ERR, "Can't bind to interface %s: %s", iface, strerror(errno)); return -1; } #else - logger(LOG_WARNING, _("%s not supported on this platform"), "BindToInterface"); + logger(LOG_WARNING, "%s not supported on this platform", "BindToInterface"); #endif } if(bind(nfd, &sa->sa, SALEN(sa->sa))) { closesocket(nfd); addrstr = sockaddr2hostname(sa); - logger(LOG_ERR, _("Can't bind to %s/tcp: %s"), addrstr, + logger(LOG_ERR, "Can't bind to %s/tcp: %s", addrstr, strerror(errno)); free(addrstr); return -1; @@ -222,7 +222,7 @@ int setup_listen_socket(const sockaddr_t *sa) { if(listen(nfd, 3)) { closesocket(nfd); - logger(LOG_ERR, _("System call `%s' failed: %s"), "listen", + logger(LOG_ERR, "System call `%s' failed: %s", "listen", strerror(errno)); return -1; } @@ -238,7 +238,7 @@ int setup_vpn_in_socket(const sockaddr_t *sa) { nfd = socket(sa->sa.sa_family, SOCK_DGRAM, IPPROTO_UDP); if(nfd < 0) { - logger(LOG_ERR, _("Creating UDP socket failed: %s"), strerror(errno)); + logger(LOG_ERR, "Creating UDP socket failed: %s", strerror(errno)); return -1; } @@ -248,7 +248,7 @@ int setup_vpn_in_socket(const sockaddr_t *sa) { if(fcntl(nfd, F_SETFL, flags | O_NONBLOCK) < 0) { closesocket(nfd); - logger(LOG_ERR, _("System call `%s' failed: %s"), "fcntl", + logger(LOG_ERR, "System call `%s' failed: %s", "fcntl", strerror(errno)); return -1; } @@ -258,7 +258,7 @@ int setup_vpn_in_socket(const sockaddr_t *sa) { unsigned long arg = 1; if(ioctlsocket(nfd, FIONBIO, &arg) != 0) { closesocket(nfd); - logger(LOG_ERR, _("Call to `%s' failed: WSA error %d"), "ioctlsocket", + logger(LOG_ERR, "Call to `%s' failed: WSA error %d", "ioctlsocket", WSAGetLastError()); return -1; } @@ -295,7 +295,7 @@ int setup_vpn_in_socket(const sockaddr_t *sa) { if(bind(nfd, &sa->sa, SALEN(sa->sa))) { closesocket(nfd); addrstr = sockaddr2hostname(sa); - logger(LOG_ERR, _("Can't bind to %s/udp: %s"), addrstr, + logger(LOG_ERR, "Can't bind to %s/udp: %s", addrstr, strerror(errno)); free(addrstr); return -1; @@ -319,12 +319,12 @@ void retry_outgoing(outgoing_t *outgoing) { event_add(event); ifdebug(CONNECTIONS) logger(LOG_NOTICE, - _("Trying to re-establish outgoing connection in %d seconds"), + "Trying to re-establish outgoing connection in %d seconds", outgoing->timeout); } void finish_connecting(connection_t *c) { - ifdebug(CONNECTIONS) logger(LOG_INFO, _("Connected to %s (%s)"), c->name, c->hostname); + ifdebug(CONNECTIONS) logger(LOG_INFO, "Connected to %s (%s)", c->name, c->hostname); configure_tcp(c); @@ -340,7 +340,7 @@ void do_outgoing_connection(connection_t *c) { begin: if(!c->outgoing->ai) { if(!c->outgoing->cfg) { - ifdebug(CONNECTIONS) logger(LOG_ERR, _("Could not set up a meta connection to %s"), + ifdebug(CONNECTIONS) logger(LOG_ERR, "Could not set up a meta connection to %s", c->name); c->status.remove = true; retry_outgoing(c->outgoing); @@ -375,13 +375,13 @@ begin: c->hostname = sockaddr2hostname(&c->address); - ifdebug(CONNECTIONS) logger(LOG_INFO, _("Trying to connect to %s (%s)"), c->name, + ifdebug(CONNECTIONS) logger(LOG_INFO, "Trying to connect to %s (%s)", c->name, c->hostname); c->socket = socket(c->address.sa.sa_family, SOCK_STREAM, IPPROTO_TCP); if(c->socket == -1) { - ifdebug(CONNECTIONS) logger(LOG_ERR, _("Creating socket for %s failed: %s"), c->hostname, + ifdebug(CONNECTIONS) logger(LOG_ERR, "Creating socket for %s failed: %s", c->hostname, strerror(errno)); goto begin; @@ -416,7 +416,7 @@ begin: closesocket(c->socket); - ifdebug(CONNECTIONS) logger(LOG_ERR, _("%s: %s"), c->hostname, strerror(errno)); + ifdebug(CONNECTIONS) logger(LOG_ERR, "%s: %s", c->hostname, strerror(errno)); goto begin; } @@ -434,7 +434,7 @@ void setup_outgoing_connection(outgoing_t *outgoing) { if(n) if(n->connection) { - ifdebug(CONNECTIONS) logger(LOG_INFO, _("Already connected to %s"), outgoing->name); + ifdebug(CONNECTIONS) logger(LOG_INFO, "Already connected to %s", outgoing->name); n->connection->outgoing = outgoing; return; @@ -453,7 +453,7 @@ void setup_outgoing_connection(outgoing_t *outgoing) { outgoing->cfg = lookup_config(c->config_tree, "Address"); if(!outgoing->cfg) { - logger(LOG_ERR, _("No address specified for %s"), c->name); + logger(LOG_ERR, "No address specified for %s", c->name); free_connection(c); return; } @@ -479,7 +479,7 @@ bool handle_new_meta_connection(int sock) { fd = accept(sock, &sa.sa, &len); if(fd < 0) { - logger(LOG_ERR, _("Accepting a new connection failed: %s"), + logger(LOG_ERR, "Accepting a new connection failed: %s", strerror(errno)); return false; } @@ -498,7 +498,7 @@ bool handle_new_meta_connection(int sock) { c->socket = fd; c->last_ping_time = now; - ifdebug(CONNECTIONS) logger(LOG_NOTICE, _("Connection from %s"), c->hostname); + ifdebug(CONNECTIONS) logger(LOG_NOTICE, "Connection from %s", c->hostname); configure_tcp(c); @@ -543,7 +543,7 @@ void try_outgoing_connections(void) { if(!check_id(name)) { logger(LOG_ERR, - _("Invalid name for outgoing connection in %s line %d"), + "Invalid name for outgoing connection in %s line %d", cfg->file, cfg->line); free(name); continue; diff --git a/src/netutl.c b/src/netutl.c index 7eadaebf..b8ecdd1e 100644 --- a/src/netutl.c +++ b/src/netutl.c @@ -42,7 +42,7 @@ struct addrinfo *str2addrinfo(const char *address, const char *service, int sock err = getaddrinfo(address, service, &hint, &ai); if(err) { - logger(LOG_WARNING, _("Error looking up %s port %s: %s"), address, + logger(LOG_WARNING, "Error looking up %s port %s: %s", address, service, gai_strerror(err)); return NULL; } @@ -91,7 +91,7 @@ void sockaddr2str(const sockaddr_t *sa, char **addrstr, char **portstr) { err = getnameinfo(&sa->sa, SALEN(sa->sa), address, sizeof(address), port, sizeof(port), NI_NUMERICHOST | NI_NUMERICSERV); if(err) { - logger(LOG_ERR, _("Error while translating addresses: %s"), + logger(LOG_ERR, "Error while translating addresses: %s", gai_strerror(err)); raise(SIGFPE); exit(0); @@ -113,18 +113,18 @@ char *sockaddr2hostname(const sockaddr_t *sa) { int err; if(sa->sa.sa_family == AF_UNKNOWN) { - xasprintf(&str, _("%s port %s"), sa->unknown.address, sa->unknown.port); + xasprintf(&str, "%s port %s", sa->unknown.address, sa->unknown.port); return str; } err = getnameinfo(&sa->sa, SALEN(sa->sa), address, sizeof(address), port, sizeof(port), hostnames ? 0 : (NI_NUMERICHOST | NI_NUMERICSERV)); if(err) { - logger(LOG_ERR, _("Error while looking up hostname: %s"), + logger(LOG_ERR, "Error while looking up hostname: %s", gai_strerror(err)); } - xasprintf(&str, _("%s port %s"), address, port); + xasprintf(&str, "%s port %s", address, port); return str; } @@ -151,7 +151,7 @@ int sockaddrcmp_noport(const sockaddr_t *a, const sockaddr_t *b) { return memcmp(&a->in6.sin6_addr, &b->in6.sin6_addr, sizeof(a->in6.sin6_addr)); default: - logger(LOG_ERR, _("sockaddrcmp() was called with unknown address family %d, exitting!"), + logger(LOG_ERR, "sockaddrcmp() was called with unknown address family %d, exitting!", a->sa.sa_family); raise(SIGFPE); exit(0); @@ -195,7 +195,7 @@ int sockaddrcmp(const sockaddr_t *a, const sockaddr_t *b) { return memcmp(&a->in6.sin6_port, &b->in6.sin6_port, sizeof(a->in6.sin6_port)); default: - logger(LOG_ERR, _("sockaddrcmp() was called with unknown address family %d, exitting!"), + logger(LOG_ERR, "sockaddrcmp() was called with unknown address family %d, exitting!", a->sa.sa_family); raise(SIGFPE); exit(0); diff --git a/src/node.c b/src/node.c index 579f05c2..c1f12194 100644 --- a/src/node.c +++ b/src/node.c @@ -158,16 +158,16 @@ void dump_nodes(void) { avl_node_t *node; node_t *n; - logger(LOG_DEBUG, _("Nodes:")); + logger(LOG_DEBUG, "Nodes:"); for(node = node_tree->head; node; node = node->next) { n = node->data; - logger(LOG_DEBUG, _(" %s at %s cipher %d digest %d maclength %d compression %d options %lx status %04x nexthop %s via %s pmtu %d (min %d max %d)"), + logger(LOG_DEBUG, " %s at %s cipher %d digest %d maclength %d compression %d options %lx status %04x nexthop %s via %s pmtu %d (min %d max %d)", n->name, n->hostname, n->outcipher ? n->outcipher->nid : 0, n->outdigest ? n->outdigest->type : 0, n->outmaclength, n->outcompression, n->options, bitfield_to_int(&n->status, sizeof n->status), n->nexthop ? n->nexthop->name : "-", n->via ? n->via->name : "-", n->mtu, n->minmtu, n->maxmtu); } - logger(LOG_DEBUG, _("End of nodes.")); + logger(LOG_DEBUG, "End of nodes."); } diff --git a/src/process.c b/src/process.c index b8bb8214..01ebe494 100644 --- a/src/process.c +++ b/src/process.c @@ -48,7 +48,7 @@ sigset_t emptysigset; static int saved_debug_level = -1; static void memory_full(int size) { - logger(LOG_ERR, _("Memory exhausted (couldn't allocate %d bytes), exitting."), size); + logger(LOG_ERR, "Memory exhausted (couldn't allocate %d bytes), exitting.", size); exit(1); } @@ -72,7 +72,7 @@ bool install_service(void) { manager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); if(!manager) { - logger(LOG_ERR, _("Could not open service manager: %s"), winerror(GetLastError())); + logger(LOG_ERR, "Could not open service manager: %s", winerror(GetLastError())); return false; } @@ -103,18 +103,18 @@ bool install_service(void) { command, NULL, NULL, NULL, NULL, NULL); if(!service) { - logger(LOG_ERR, _("Could not create %s service: %s"), identname, winerror(GetLastError())); + logger(LOG_ERR, "Could not create %s service: %s", identname, winerror(GetLastError())); return false; } ChangeServiceConfig2(service, SERVICE_CONFIG_DESCRIPTION, &description); - logger(LOG_INFO, _("%s service installed"), identname); + logger(LOG_INFO, "%s service installed", identname); if(!StartService(service, 0, NULL)) - logger(LOG_WARNING, _("Could not start %s service: %s"), identname, winerror(GetLastError())); + logger(LOG_WARNING, "Could not start %s service: %s", identname, winerror(GetLastError())); else - logger(LOG_INFO, _("%s service started"), identname); + logger(LOG_INFO, "%s service started", identname); return true; } @@ -122,28 +122,28 @@ bool install_service(void) { bool remove_service(void) { manager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); if(!manager) { - logger(LOG_ERR, _("Could not open service manager: %s"), winerror(GetLastError())); + logger(LOG_ERR, "Could not open service manager: %s", winerror(GetLastError())); return false; } service = OpenService(manager, identname, SERVICE_ALL_ACCESS); if(!service) { - logger(LOG_ERR, _("Could not open %s service: %s"), identname, winerror(GetLastError())); + logger(LOG_ERR, "Could not open %s service: %s", identname, winerror(GetLastError())); return false; } if(!ControlService(service, SERVICE_CONTROL_STOP, &status)) - logger(LOG_ERR, _("Could not stop %s service: %s"), identname, winerror(GetLastError())); + logger(LOG_ERR, "Could not stop %s service: %s", identname, winerror(GetLastError())); else - logger(LOG_INFO, _("%s service stopped"), identname); + logger(LOG_INFO, "%s service stopped", identname); if(!DeleteService(service)) { - logger(LOG_ERR, _("Could not remove %s service: %s"), identname, winerror(GetLastError())); + logger(LOG_ERR, "Could not remove %s service: %s", identname, winerror(GetLastError())); return false; } - logger(LOG_INFO, _("%s service removed"), identname); + logger(LOG_INFO, "%s service removed", identname); return true; } @@ -154,13 +154,13 @@ DWORD WINAPI controlhandler(DWORD request, DWORD type, LPVOID boe, LPVOID bah) { SetServiceStatus(statushandle, &status); return NO_ERROR; case SERVICE_CONTROL_STOP: - logger(LOG_NOTICE, _("Got %s request"), "SERVICE_CONTROL_STOP"); + logger(LOG_NOTICE, "Got %s request", "SERVICE_CONTROL_STOP"); break; case SERVICE_CONTROL_SHUTDOWN: - logger(LOG_NOTICE, _("Got %s request"), "SERVICE_CONTROL_SHUTDOWN"); + logger(LOG_NOTICE, "Got %s request", "SERVICE_CONTROL_SHUTDOWN"); break; default: - logger(LOG_WARNING, _("Got unexpected request %d"), request); + logger(LOG_WARNING, "Got unexpected request %d", request); return ERROR_CALL_NOT_IMPLEMENTED; } @@ -193,7 +193,7 @@ VOID WINAPI run_service(DWORD argc, LPTSTR* argv) { statushandle = RegisterServiceCtrlHandlerEx(identname, controlhandler, NULL); if (!statushandle) { - logger(LOG_ERR, _("System call `%s' failed: %s"), "RegisterServiceCtrlHandlerEx", winerror(GetLastError())); + logger(LOG_ERR, "System call `%s' failed: %s", "RegisterServiceCtrlHandlerEx", winerror(GetLastError())); err = 1; } else { status.dwWaitHint = 30000; @@ -226,7 +226,7 @@ bool init_service(void) { return false; } else - logger(LOG_ERR, _("System call `%s' failed: %s"), "StartServiceCtrlDispatcher", winerror(GetLastError())); + logger(LOG_ERR, "System call `%s' failed: %s", "StartServiceCtrlDispatcher", winerror(GetLastError())); } return true; @@ -244,16 +244,16 @@ static bool write_pidfile(void) { if(pid) { if(netname) - fprintf(stderr, _("A tincd is already running for net `%s' with pid %ld.\n"), + fprintf(stderr, "A tincd is already running for net `%s' with pid %ld.\n", netname, (long)pid); else - fprintf(stderr, _("A tincd is already running with pid %ld.\n"), (long)pid); + fprintf(stderr, "A tincd is already running with pid %ld.\n", (long)pid); return false; } /* if it's locked, write-protected, or whatever */ if(!write_pid(pidfilename)) { - fprintf(stderr, _("Could write pid file %s: %s\n"), pidfilename, strerror(errno)); + fprintf(stderr, "Could write pid file %s: %s\n", pidfilename, strerror(errno)); return false; } @@ -272,10 +272,10 @@ bool kill_other(int signal) { if(!pid) { if(netname) - fprintf(stderr, _("No other tincd is running for net `%s'.\n"), + fprintf(stderr, "No other tincd is running for net `%s'.\n", netname); else - fprintf(stderr, _("No other tincd is running.\n")); + fprintf(stderr, "No other tincd is running.\n"); return false; } @@ -284,12 +284,12 @@ bool kill_other(int signal) { /* ESRCH is returned when no process with that pid is found */ if(kill(pid, signal) && errno == ESRCH) { if(netname) - fprintf(stderr, _("The tincd for net `%s' is no longer running. "), + fprintf(stderr, "The tincd for net `%s' is no longer running. ", netname); else - fprintf(stderr, _("The tincd is no longer running. ")); + fprintf(stderr, "The tincd is no longer running. "); - fprintf(stderr, _("Removing stale lock file.\n")); + fprintf(stderr, "Removing stale lock file.\n"); remove_pid(pidfilename); } @@ -319,7 +319,7 @@ bool detach(void) { if(do_detach) { #ifndef HAVE_MINGW if(daemon(0, 0)) { - fprintf(stderr, _("Couldn't detach from terminal: %s"), + fprintf(stderr, "Couldn't detach from terminal: %s", strerror(errno)); return false; } @@ -327,7 +327,7 @@ bool detach(void) { /* Now UPDATE the pid in the pidfile, because we changed it... */ if(!write_pid(pidfilename)) { - fprintf(stderr, _("Could not write pid file %s: %s\n"), pidfilename, strerror(errno)); + fprintf(stderr, "Could not write pid file %s: %s\n", pidfilename, strerror(errno)); return false; } #else @@ -338,7 +338,7 @@ bool detach(void) { openlogger(identname, use_logfile?LOGMODE_FILE:(do_detach?LOGMODE_SYSLOG:LOGMODE_STDERR)); - logger(LOG_NOTICE, _("tincd %s (%s %s) starting, debug level %d"), + logger(LOG_NOTICE, "tincd %s (%s %s) starting, debug level %d", VERSION, __DATE__, __TIME__, debug_level); xalloc_fail_func = memory_full; @@ -371,7 +371,7 @@ bool execute_script(const char *name, char **envp) { } #endif - ifdebug(STATUS) logger(LOG_INFO, _("Executing script %s"), name); + ifdebug(STATUS) logger(LOG_INFO, "Executing script %s", name); #ifdef HAVE_PUTENV /* Set environment */ @@ -401,20 +401,20 @@ bool execute_script(const char *name, char **envp) { if(status != -1) { if(WIFEXITED(status)) { /* Child exited by itself */ if(WEXITSTATUS(status)) { - logger(LOG_ERR, _("Script %s exited with non-zero status %d"), + logger(LOG_ERR, "Script %s exited with non-zero status %d", name, WEXITSTATUS(status)); return false; } } else if(WIFSIGNALED(status)) { /* Child was killed by a signal */ - logger(LOG_ERR, _("Script %s was killed by signal %d (%s)"), + logger(LOG_ERR, "Script %s was killed by signal %d (%s)", name, WTERMSIG(status), strsignal(WTERMSIG(status))); return false; } else { /* Something strange happened */ - logger(LOG_ERR, _("Script %s terminated abnormally"), name); + logger(LOG_ERR, "Script %s terminated abnormally", name); return false; } } else { - logger(LOG_ERR, _("System call `%s' failed: %s"), "system", strerror(errno)); + logger(LOG_ERR, "System call `%s' failed: %s", "system", strerror(errno)); return false; } #endif @@ -429,7 +429,7 @@ bool execute_script(const char *name, char **envp) { #ifndef HAVE_MINGW static RETSIGTYPE sigterm_handler(int a) { - logger(LOG_NOTICE, _("Got %s signal"), "TERM"); + logger(LOG_NOTICE, "Got %s signal", "TERM"); if(running) running = false; else @@ -437,7 +437,7 @@ static RETSIGTYPE sigterm_handler(int a) { } static RETSIGTYPE sigquit_handler(int a) { - logger(LOG_NOTICE, _("Got %s signal"), "QUIT"); + logger(LOG_NOTICE, "Got %s signal", "QUIT"); if(running) running = false; else @@ -445,17 +445,17 @@ static RETSIGTYPE sigquit_handler(int a) { } static RETSIGTYPE fatal_signal_square(int a) { - logger(LOG_ERR, _("Got another fatal signal %d (%s): not restarting."), a, + logger(LOG_ERR, "Got another fatal signal %d (%s): not restarting.", a, strsignal(a)); exit(1); } static RETSIGTYPE fatal_signal_handler(int a) { struct sigaction act; - logger(LOG_ERR, _("Got fatal signal %d (%s)"), a, strsignal(a)); + logger(LOG_ERR, "Got fatal signal %d (%s)", a, strsignal(a)); if(do_detach) { - logger(LOG_NOTICE, _("Trying to re-execute in 5 seconds...")); + logger(LOG_NOTICE, "Trying to re-execute in 5 seconds..."); act.sa_handler = fatal_signal_square; act.sa_mask = emptysigset; @@ -467,27 +467,27 @@ static RETSIGTYPE fatal_signal_handler(int a) { remove_pid(pidfilename); execvp(g_argv[0], g_argv); } else { - logger(LOG_NOTICE, _("Not restarting.")); + logger(LOG_NOTICE, "Not restarting."); exit(1); } } static RETSIGTYPE sighup_handler(int a) { - logger(LOG_NOTICE, _("Got %s signal"), "HUP"); + logger(LOG_NOTICE, "Got %s signal", "HUP"); sighup = true; } static RETSIGTYPE sigint_handler(int a) { - logger(LOG_NOTICE, _("Got %s signal"), "INT"); + logger(LOG_NOTICE, "Got %s signal", "INT"); if(saved_debug_level != -1) { - logger(LOG_NOTICE, _("Reverting to old debug level (%d)"), + logger(LOG_NOTICE, "Reverting to old debug level (%d)", saved_debug_level); debug_level = saved_debug_level; saved_debug_level = -1; } else { logger(LOG_NOTICE, - _("Temporarily setting debug level to 5. Kill me with SIGINT again to go back to level %d."), + "Temporarily setting debug level to 5. Kill me with SIGINT again to go back to level %d.", debug_level); saved_debug_level = debug_level; debug_level = 5; @@ -495,7 +495,7 @@ static RETSIGTYPE sigint_handler(int a) { } static RETSIGTYPE sigalrm_handler(int a) { - logger(LOG_NOTICE, _("Got %s signal"), "ALRM"); + logger(LOG_NOTICE, "Got %s signal", "ALRM"); sigalrm = true; } @@ -515,11 +515,11 @@ static RETSIGTYPE sigwinch_handler(int a) { } static RETSIGTYPE unexpected_signal_handler(int a) { - logger(LOG_WARNING, _("Got unexpected signal %d (%s)"), a, strsignal(a)); + logger(LOG_WARNING, "Got unexpected signal %d (%s)", a, strsignal(a)); } static RETSIGTYPE ignore_signal_handler(int a) { - ifdebug(SCARY_THINGS) logger(LOG_DEBUG, _("Ignored signal %d (%s)"), a, strsignal(a)); + ifdebug(SCARY_THINGS) logger(LOG_DEBUG, "Ignored signal %d (%s)", a, strsignal(a)); } static struct { @@ -572,7 +572,7 @@ void setup_signals(void) { for(i = 0; sighandlers[i].signal; i++) { act.sa_handler = sighandlers[i].handler; if(sigaction(sighandlers[i].signal, &act, NULL) < 0) - fprintf(stderr, _("Installing signal handler for signal %d (%s) failed: %s\n"), + fprintf(stderr, "Installing signal handler for signal %d (%s) failed: %s\n", sighandlers[i].signal, strsignal(sighandlers[i].signal), strerror(errno)); } diff --git a/src/protocol.c b/src/protocol.c index 5e088163..f09aff65 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -78,7 +78,7 @@ bool send_request(connection_t *c, const char *format, ...) { va_end(args); if(len < 0 || len > MAXBUFSIZE - 1) { - logger(LOG_ERR, _("Output buffer overflow while sending request to %s (%s)"), + logger(LOG_ERR, "Output buffer overflow while sending request to %s (%s)", c->name, c->hostname); return false; } @@ -86,10 +86,10 @@ bool send_request(connection_t *c, const char *format, ...) { ifdebug(PROTOCOL) { sscanf(buffer, "%d", &request); ifdebug(META) - logger(LOG_DEBUG, _("Sending %s to %s (%s): %s"), + logger(LOG_DEBUG, "Sending %s to %s (%s): %s", request_name[request], c->name, c->hostname, buffer); else - logger(LOG_DEBUG, _("Sending %s to %s (%s)"), request_name[request], + logger(LOG_DEBUG, "Sending %s to %s (%s)", request_name[request], c->name, c->hostname); } @@ -108,11 +108,11 @@ void forward_request(connection_t *from) { ifdebug(PROTOCOL) { sscanf(from->buffer, "%d", &request); ifdebug(META) - logger(LOG_DEBUG, _("Forwarding %s from %s (%s): %s"), + logger(LOG_DEBUG, "Forwarding %s from %s (%s): %s", request_name[request], from->name, from->hostname, from->buffer); else - logger(LOG_DEBUG, _("Forwarding %s from %s (%s)"), + logger(LOG_DEBUG, "Forwarding %s from %s (%s)", request_name[request], from->name, from->hostname); } @@ -127,27 +127,27 @@ bool receive_request(connection_t *c) { if(sscanf(c->buffer, "%d", &request) == 1) { if((request < 0) || (request >= LAST) || !request_handlers[request]) { ifdebug(META) - logger(LOG_DEBUG, _("Unknown request from %s (%s): %s"), + logger(LOG_DEBUG, "Unknown request from %s (%s): %s", c->name, c->hostname, c->buffer); else - logger(LOG_ERR, _("Unknown request from %s (%s)"), + logger(LOG_ERR, "Unknown request from %s (%s)", c->name, c->hostname); return false; } else { ifdebug(PROTOCOL) { ifdebug(META) - logger(LOG_DEBUG, _("Got %s from %s (%s): %s"), + logger(LOG_DEBUG, "Got %s from %s (%s): %s", request_name[request], c->name, c->hostname, c->buffer); else - logger(LOG_DEBUG, _("Got %s from %s (%s)"), + logger(LOG_DEBUG, "Got %s from %s (%s)", request_name[request], c->name, c->hostname); } } if((c->allow_request != ALL) && (c->allow_request != request)) { - logger(LOG_ERR, _("Unauthorized request from %s (%s)"), c->name, + logger(LOG_ERR, "Unauthorized request from %s (%s)", c->name, c->hostname); return false; } @@ -155,12 +155,12 @@ bool receive_request(connection_t *c) { if(!request_handlers[request](c)) { /* Something went wrong. Probably scriptkiddies. Terminate. */ - logger(LOG_ERR, _("Error while processing %s from %s (%s)"), + logger(LOG_ERR, "Error while processing %s from %s (%s)", request_name[request], c->name, c->hostname); return false; } } else { - logger(LOG_ERR, _("Bogus data received from %s (%s)"), + logger(LOG_ERR, "Bogus data received from %s (%s)", c->name, c->hostname); return false; } @@ -193,7 +193,7 @@ bool seen_request(char *request) { p.request = request; if(avl_search(past_request_tree, &p)) { - ifdebug(SCARY_THINGS) logger(LOG_DEBUG, _("Already seen request")); + ifdebug(SCARY_THINGS) logger(LOG_DEBUG, "Already seen request"); return true; } else { new = xmalloc(sizeof(*new)); @@ -220,6 +220,6 @@ void age_past_requests(void) { } if(left || deleted) - ifdebug(SCARY_THINGS) logger(LOG_DEBUG, _("Aging past requests: deleted %d, left %d"), + ifdebug(SCARY_THINGS) logger(LOG_DEBUG, "Aging past requests: deleted %d, left %d", deleted, left); } diff --git a/src/protocol_auth.c b/src/protocol_auth.c index 1c6df401..24f591a7 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -47,7 +47,7 @@ bool id_h(connection_t *c) { char name[MAX_STRING_SIZE]; if(sscanf(c->buffer, "%*d " MAX_STRING " %d", name, &c->protocol_version) != 2) { - logger(LOG_ERR, _("Got bad %s from %s (%s)"), "ID", c->name, + logger(LOG_ERR, "Got bad %s from %s (%s)", "ID", c->name, c->hostname); return false; } @@ -55,7 +55,7 @@ bool id_h(connection_t *c) { /* Check if identity is a valid name */ if(!check_id(name)) { - logger(LOG_ERR, _("Got bad %s from %s (%s): %s"), "ID", c->name, + logger(LOG_ERR, "Got bad %s from %s (%s): %s", "ID", c->name, c->hostname, "invalid name"); return false; } @@ -64,7 +64,7 @@ bool id_h(connection_t *c) { if(c->outgoing) { if(strcmp(c->name, name)) { - logger(LOG_ERR, _("Peer %s is %s instead of %s"), c->hostname, name, + logger(LOG_ERR, "Peer %s is %s instead of %s", c->hostname, name, c->name); return false; } @@ -77,7 +77,7 @@ bool id_h(connection_t *c) { /* Check if version matches */ if(c->protocol_version != myself->connection->protocol_version) { - logger(LOG_ERR, _("Peer %s (%s) uses incompatible version %d"), + logger(LOG_ERR, "Peer %s (%s) uses incompatible version %d", c->name, c->hostname, c->protocol_version); return false; } @@ -93,7 +93,7 @@ bool id_h(connection_t *c) { init_configuration(&c->config_tree); if(!read_connection_config(c)) { - logger(LOG_ERR, _("Peer %s had unknown identity (%s)"), c->hostname, + logger(LOG_ERR, "Peer %s had unknown identity (%s)", c->hostname, c->name); return false; } @@ -143,7 +143,7 @@ bool send_metakey(connection_t *c) { ifdebug(SCARY_THINGS) { bin2hex(c->outkey, buffer, len); buffer[len * 2] = '\0'; - logger(LOG_DEBUG, _("Generated random meta key (unencrypted): %s"), + logger(LOG_DEBUG, "Generated random meta key (unencrypted): %s", buffer); } @@ -155,7 +155,7 @@ bool send_metakey(connection_t *c) { */ if(RSA_public_encrypt(len, (unsigned char *)c->outkey, (unsigned char *)buffer, c->rsa_key, RSA_NO_PADDING) != len) { - logger(LOG_ERR, _("Error during encryption of meta key for %s (%s)"), + logger(LOG_ERR, "Error during encryption of meta key for %s (%s)", c->name, c->hostname); return false; } @@ -179,7 +179,7 @@ bool send_metakey(connection_t *c) { (unsigned char *)c->outkey + len - c->outcipher->key_len, (unsigned char *)c->outkey + len - c->outcipher->key_len - c->outcipher->iv_len)) { - logger(LOG_ERR, _("Error during initialisation of cipher for %s (%s): %s"), + logger(LOG_ERR, "Error during initialisation of cipher for %s (%s): %s", c->name, c->hostname, ERR_error_string(ERR_get_error(), NULL)); return false; } @@ -196,7 +196,7 @@ bool metakey_h(connection_t *c) { int len; if(sscanf(c->buffer, "%*d %d %d %d %d " MAX_STRING, &cipher, &digest, &maclength, &compression, buffer) != 5) { - logger(LOG_ERR, _("Got bad %s from %s (%s)"), "METAKEY", c->name, + logger(LOG_ERR, "Got bad %s from %s (%s)", "METAKEY", c->name, c->hostname); return false; } @@ -206,7 +206,7 @@ bool metakey_h(connection_t *c) { /* Check if the length of the meta key is all right */ if(strlen(buffer) != len * 2) { - logger(LOG_ERR, _("Possible intruder %s (%s): %s"), c->name, c->hostname, "wrong keylength"); + logger(LOG_ERR, "Possible intruder %s (%s): %s", c->name, c->hostname, "wrong keylength"); return false; } @@ -224,7 +224,7 @@ bool metakey_h(connection_t *c) { /* Decrypt the meta key */ if(RSA_private_decrypt(len, (unsigned char *)buffer, (unsigned char *)c->inkey, myself->connection->rsa_key, RSA_NO_PADDING) != len) { /* See challenge() */ - logger(LOG_ERR, _("Error during decryption of meta key for %s (%s)"), + logger(LOG_ERR, "Error during decryption of meta key for %s (%s)", c->name, c->hostname); return false; } @@ -232,7 +232,7 @@ bool metakey_h(connection_t *c) { ifdebug(SCARY_THINGS) { bin2hex(c->inkey, buffer, len); buffer[len * 2] = '\0'; - logger(LOG_DEBUG, _("Received random meta key (unencrypted): %s"), buffer); + logger(LOG_DEBUG, "Received random meta key (unencrypted): %s", buffer); } /* All incoming requests will now be encrypted. */ @@ -243,7 +243,7 @@ bool metakey_h(connection_t *c) { c->incipher = EVP_get_cipherbynid(cipher); if(!c->incipher) { - logger(LOG_ERR, _("%s (%s) uses unknown cipher!"), c->name, c->hostname); + logger(LOG_ERR, "%s (%s) uses unknown cipher!", c->name, c->hostname); return false; } @@ -251,7 +251,7 @@ bool metakey_h(connection_t *c) { (unsigned char *)c->inkey + len - c->incipher->key_len, (unsigned char *)c->inkey + len - c->incipher->key_len - c->incipher->iv_len)) { - logger(LOG_ERR, _("Error during initialisation of cipher from %s (%s): %s"), + logger(LOG_ERR, "Error during initialisation of cipher from %s (%s): %s", c->name, c->hostname, ERR_error_string(ERR_get_error(), NULL)); return false; } @@ -267,12 +267,12 @@ bool metakey_h(connection_t *c) { c->indigest = EVP_get_digestbynid(digest); if(!c->indigest) { - logger(LOG_ERR, _("Node %s (%s) uses unknown digest!"), c->name, c->hostname); + logger(LOG_ERR, "Node %s (%s) uses unknown digest!", c->name, c->hostname); return false; } if(c->inmaclength > c->indigest->md_size || c->inmaclength < 0) { - logger(LOG_ERR, _("%s (%s) uses bogus MAC length!"), c->name, c->hostname); + logger(LOG_ERR, "%s (%s) uses bogus MAC length!", c->name, c->hostname); return false; } } else { @@ -319,7 +319,7 @@ bool challenge_h(connection_t *c) { int len; if(sscanf(c->buffer, "%*d " MAX_STRING, buffer) != 1) { - logger(LOG_ERR, _("Got bad %s from %s (%s)"), "CHALLENGE", c->name, + logger(LOG_ERR, "Got bad %s from %s (%s)", "CHALLENGE", c->name, c->hostname); return false; } @@ -329,7 +329,7 @@ bool challenge_h(connection_t *c) { /* Check if the length of the challenge is all right */ if(strlen(buffer) != len * 2) { - logger(LOG_ERR, _("Possible intruder %s (%s): %s"), c->name, + logger(LOG_ERR, "Possible intruder %s (%s): %s", c->name, c->hostname, "wrong challenge length"); return false; } @@ -358,7 +358,7 @@ bool send_chal_reply(connection_t *c) { if(!EVP_DigestInit(&ctx, c->indigest) || !EVP_DigestUpdate(&ctx, c->mychallenge, RSA_size(myself->connection->rsa_key)) || !EVP_DigestFinal(&ctx, (unsigned char *)hash, NULL)) { - logger(LOG_ERR, _("Error during calculation of response for %s (%s): %s"), + logger(LOG_ERR, "Error during calculation of response for %s (%s): %s", c->name, c->hostname, ERR_error_string(ERR_get_error(), NULL)); return false; } @@ -379,7 +379,7 @@ bool chal_reply_h(connection_t *c) { EVP_MD_CTX ctx; if(sscanf(c->buffer, "%*d " MAX_STRING, hishash) != 1) { - logger(LOG_ERR, _("Got bad %s from %s (%s)"), "CHAL_REPLY", c->name, + logger(LOG_ERR, "Got bad %s from %s (%s)", "CHAL_REPLY", c->name, c->hostname); return false; } @@ -387,8 +387,8 @@ bool chal_reply_h(connection_t *c) { /* Check if the length of the hash is all right */ if(strlen(hishash) != c->outdigest->md_size * 2) { - logger(LOG_ERR, _("Possible intruder %s (%s): %s"), c->name, - c->hostname, _("wrong challenge reply length")); + logger(LOG_ERR, "Possible intruder %s (%s): %s", c->name, + c->hostname, "wrong challenge reply length"); return false; } @@ -401,7 +401,7 @@ bool chal_reply_h(connection_t *c) { if(!EVP_DigestInit(&ctx, c->outdigest) || !EVP_DigestUpdate(&ctx, c->hischallenge, RSA_size(c->rsa_key)) || !EVP_DigestFinal(&ctx, (unsigned char *)myhash, NULL)) { - logger(LOG_ERR, _("Error during calculation of response from %s (%s): %s"), + logger(LOG_ERR, "Error during calculation of response from %s (%s): %s", c->name, c->hostname, ERR_error_string(ERR_get_error(), NULL)); return false; } @@ -409,13 +409,13 @@ bool chal_reply_h(connection_t *c) { /* Verify the incoming hash with the calculated hash */ if(memcmp(hishash, myhash, c->outdigest->md_size)) { - logger(LOG_ERR, _("Possible intruder %s (%s): %s"), c->name, - c->hostname, _("wrong challenge reply")); + logger(LOG_ERR, "Possible intruder %s (%s): %s", c->name, + c->hostname, "wrong challenge reply"); ifdebug(SCARY_THINGS) { bin2hex(myhash, hishash, SHA_DIGEST_LENGTH); hishash[SHA_DIGEST_LENGTH * 2] = '\0'; - logger(LOG_DEBUG, _("Expected challenge reply: %s"), hishash); + logger(LOG_DEBUG, "Expected challenge reply: %s", hishash); } return false; @@ -498,7 +498,7 @@ bool ack_h(connection_t *c) { node_t *n; if(sscanf(c->buffer, "%*d " MAX_STRING " %d %lx", hisport, &weight, &options) != 3) { - logger(LOG_ERR, _("Got bad %s from %s (%s)"), "ACK", c->name, + logger(LOG_ERR, "Got bad %s from %s (%s)", "ACK", c->name, c->hostname); return false; } @@ -514,7 +514,7 @@ bool ack_h(connection_t *c) { } else { if(n->connection) { /* Oh dear, we already have a connection to this node. */ - ifdebug(CONNECTIONS) logger(LOG_DEBUG, _("Established a second connection with %s (%s), closing old connection"), + ifdebug(CONNECTIONS) logger(LOG_DEBUG, "Established a second connection with %s (%s), closing old connection", n->name, n->hostname); terminate_connection(n->connection, false); /* Run graph algorithm to purge key and make sure up/down scripts are rerun with new IP addresses and stuff */ @@ -541,7 +541,7 @@ bool ack_h(connection_t *c) { c->allow_request = ALL; c->status.active = true; - ifdebug(CONNECTIONS) logger(LOG_NOTICE, _("Connection with %s (%s) activated"), c->name, + ifdebug(CONNECTIONS) logger(LOG_NOTICE, "Connection with %s (%s) activated", c->name, c->hostname); /* Send him everything we know */ diff --git a/src/protocol_edge.c b/src/protocol_edge.c index 03a91ba2..57e202f6 100644 --- a/src/protocol_edge.c +++ b/src/protocol_edge.c @@ -63,7 +63,7 @@ bool add_edge_h(connection_t *c) { if(sscanf(c->buffer, "%*d %*x "MAX_STRING" "MAX_STRING" "MAX_STRING" "MAX_STRING" %lx %d", from_name, to_name, to_address, to_port, &options, &weight) != 6) { - logger(LOG_ERR, _("Got bad %s from %s (%s)"), "ADD_EDGE", c->name, + logger(LOG_ERR, "Got bad %s from %s (%s)", "ADD_EDGE", c->name, c->hostname); return false; } @@ -71,14 +71,14 @@ bool add_edge_h(connection_t *c) { /* Check if names are valid */ if(!check_id(from_name)) { - logger(LOG_ERR, _("Got bad %s from %s (%s): %s"), "ADD_EDGE", c->name, - c->hostname, _("invalid name")); + logger(LOG_ERR, "Got bad %s from %s (%s): %s", "ADD_EDGE", c->name, + c->hostname, "invalid name"); return false; } if(!check_id(to_name)) { - logger(LOG_ERR, _("Got bad %s from %s (%s): %s"), "ADD_EDGE", c->name, - c->hostname, _("invalid name")); + logger(LOG_ERR, "Got bad %s from %s (%s): %s", "ADD_EDGE", c->name, + c->hostname, "invalid name"); return false; } @@ -95,7 +95,7 @@ bool add_edge_h(connection_t *c) { to != myself && to != c->node) { /* ignore indirect edge registrations for tunnelserver */ ifdebug(PROTOCOL) logger(LOG_WARNING, - _("Ignoring indirect %s from %s (%s)"), + "Ignoring indirect %s from %s (%s)", "ADD_EDGE", c->name, c->hostname); return true; } @@ -124,12 +124,12 @@ bool add_edge_h(connection_t *c) { if(e) { if(e->weight != weight || e->options != options || sockaddrcmp(&e->address, &address)) { if(from == myself) { - ifdebug(PROTOCOL) logger(LOG_WARNING, _("Got %s from %s (%s) for ourself which does not match existing entry"), + ifdebug(PROTOCOL) logger(LOG_WARNING, "Got %s from %s (%s) for ourself which does not match existing entry", "ADD_EDGE", c->name, c->hostname); send_add_edge(c, e); return true; } else { - ifdebug(PROTOCOL) logger(LOG_WARNING, _("Got %s from %s (%s) which does not match existing entry"), + ifdebug(PROTOCOL) logger(LOG_WARNING, "Got %s from %s (%s) which does not match existing entry", "ADD_EDGE", c->name, c->hostname); edge_del(e); graph(); @@ -137,7 +137,7 @@ bool add_edge_h(connection_t *c) { } else return true; } else if(from == myself) { - ifdebug(PROTOCOL) logger(LOG_WARNING, _("Got %s from %s (%s) for ourself which does not exist"), + ifdebug(PROTOCOL) logger(LOG_WARNING, "Got %s from %s (%s) for ourself which does not exist", "ADD_EDGE", c->name, c->hostname); e = new_edge(); e->from = from; @@ -179,7 +179,7 @@ bool del_edge_h(connection_t *c) { node_t *from, *to; if(sscanf(c->buffer, "%*d %*x "MAX_STRING" "MAX_STRING, from_name, to_name) != 2) { - logger(LOG_ERR, _("Got bad %s from %s (%s)"), "DEL_EDGE", c->name, + logger(LOG_ERR, "Got bad %s from %s (%s)", "DEL_EDGE", c->name, c->hostname); return false; } @@ -187,14 +187,14 @@ bool del_edge_h(connection_t *c) { /* Check if names are valid */ if(!check_id(from_name)) { - logger(LOG_ERR, _("Got bad %s from %s (%s): %s"), "DEL_EDGE", c->name, - c->hostname, _("invalid name")); + logger(LOG_ERR, "Got bad %s from %s (%s): %s", "DEL_EDGE", c->name, + c->hostname, "invalid name"); return false; } if(!check_id(to_name)) { - logger(LOG_ERR, _("Got bad %s from %s (%s): %s"), "DEL_EDGE", c->name, - c->hostname, _("invalid name")); + logger(LOG_ERR, "Got bad %s from %s (%s): %s", "DEL_EDGE", c->name, + c->hostname, "invalid name"); return false; } @@ -211,19 +211,19 @@ bool del_edge_h(connection_t *c) { to != myself && to != c->node) { /* ignore indirect edge registrations for tunnelserver */ ifdebug(PROTOCOL) logger(LOG_WARNING, - _("Ignoring indirect %s from %s (%s)"), + "Ignoring indirect %s from %s (%s)", "DEL_EDGE", c->name, c->hostname); return true; } if(!from) { - ifdebug(PROTOCOL) logger(LOG_ERR, _("Got %s from %s (%s) which does not appear in the edge tree"), + ifdebug(PROTOCOL) logger(LOG_ERR, "Got %s from %s (%s) which does not appear in the edge tree", "DEL_EDGE", c->name, c->hostname); return true; } if(!to) { - ifdebug(PROTOCOL) logger(LOG_ERR, _("Got %s from %s (%s) which does not appear in the edge tree"), + ifdebug(PROTOCOL) logger(LOG_ERR, "Got %s from %s (%s) which does not appear in the edge tree", "DEL_EDGE", c->name, c->hostname); return true; } @@ -233,13 +233,13 @@ bool del_edge_h(connection_t *c) { e = lookup_edge(from, to); if(!e) { - ifdebug(PROTOCOL) logger(LOG_WARNING, _("Got %s from %s (%s) which does not appear in the edge tree"), + ifdebug(PROTOCOL) logger(LOG_WARNING, "Got %s from %s (%s) which does not appear in the edge tree", "DEL_EDGE", c->name, c->hostname); return true; } if(e->from == myself) { - ifdebug(PROTOCOL) logger(LOG_WARNING, _("Got %s from %s (%s) for ourself"), + ifdebug(PROTOCOL) logger(LOG_WARNING, "Got %s from %s (%s) for ourself", "DEL_EDGE", c->name, c->hostname); send_add_edge(c, e); /* Send back a correction */ return true; diff --git a/src/protocol_key.c b/src/protocol_key.c index 85174118..92948aa4 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -52,7 +52,7 @@ bool key_changed_h(connection_t *c) { node_t *n; if(sscanf(c->buffer, "%*d %*x " MAX_STRING, name) != 1) { - logger(LOG_ERR, _("Got bad %s from %s (%s)"), "KEY_CHANGED", + logger(LOG_ERR, "Got bad %s from %s (%s)", "KEY_CHANGED", c->name, c->hostname); return false; } @@ -63,7 +63,7 @@ bool key_changed_h(connection_t *c) { n = lookup_node(name); if(!n) { - logger(LOG_ERR, _("Got %s from %s (%s) origin %s which does not exist"), + logger(LOG_ERR, "Got %s from %s (%s) origin %s which does not exist", "KEY_CHANGED", c->name, c->hostname, name); return false; } @@ -89,7 +89,7 @@ bool req_key_h(connection_t *c) { node_t *from, *to; if(sscanf(c->buffer, "%*d " MAX_STRING " " MAX_STRING, from_name, to_name) != 2) { - logger(LOG_ERR, _("Got bad %s from %s (%s)"), "REQ_KEY", c->name, + logger(LOG_ERR, "Got bad %s from %s (%s)", "REQ_KEY", c->name, c->hostname); return false; } @@ -97,7 +97,7 @@ bool req_key_h(connection_t *c) { from = lookup_node(from_name); if(!from) { - logger(LOG_ERR, _("Got %s from %s (%s) origin %s which does not exist in our connection list"), + logger(LOG_ERR, "Got %s from %s (%s) origin %s which does not exist in our connection list", "REQ_KEY", c->name, c->hostname, from_name); return false; } @@ -105,7 +105,7 @@ bool req_key_h(connection_t *c) { to = lookup_node(to_name); if(!to) { - logger(LOG_ERR, _("Got %s from %s (%s) destination %s which does not exist in our connection list"), + logger(LOG_ERR, "Got %s from %s (%s) destination %s which does not exist in our connection list", "REQ_KEY", c->name, c->hostname, to_name); return false; } @@ -119,7 +119,7 @@ bool req_key_h(connection_t *c) { return false; if(!to->status.reachable) { - logger(LOG_WARNING, _("Got %s from %s (%s) destination %s which is not reachable"), + logger(LOG_WARNING, "Got %s from %s (%s) destination %s which is not reachable", "REQ_KEY", c->name, c->hostname, to_name); return true; } @@ -175,7 +175,7 @@ bool ans_key_h(connection_t *c) { if(sscanf(c->buffer, "%*d "MAX_STRING" "MAX_STRING" "MAX_STRING" %d %d %d %d", from_name, to_name, key, &cipher, &digest, &maclength, &compression) != 7) { - logger(LOG_ERR, _("Got bad %s from %s (%s)"), "ANS_KEY", c->name, + logger(LOG_ERR, "Got bad %s from %s (%s)", "ANS_KEY", c->name, c->hostname); return false; } @@ -183,7 +183,7 @@ bool ans_key_h(connection_t *c) { from = lookup_node(from_name); if(!from) { - logger(LOG_ERR, _("Got %s from %s (%s) origin %s which does not exist in our connection list"), + logger(LOG_ERR, "Got %s from %s (%s) origin %s which does not exist in our connection list", "ANS_KEY", c->name, c->hostname, from_name); return false; } @@ -191,7 +191,7 @@ bool ans_key_h(connection_t *c) { to = lookup_node(to_name); if(!to) { - logger(LOG_ERR, _("Got %s from %s (%s) destination %s which does not exist in our connection list"), + logger(LOG_ERR, "Got %s from %s (%s) destination %s which does not exist in our connection list", "ANS_KEY", c->name, c->hostname, to_name); return false; } @@ -203,7 +203,7 @@ bool ans_key_h(connection_t *c) { return false; if(!to->status.reachable) { - logger(LOG_WARNING, _("Got %s from %s (%s) destination %s which is not reachable"), + logger(LOG_WARNING, "Got %s from %s (%s) destination %s which is not reachable", "ANS_KEY", c->name, c->hostname, to_name); return true; } @@ -225,13 +225,13 @@ bool ans_key_h(connection_t *c) { from->outcipher = EVP_get_cipherbynid(cipher); if(!from->outcipher) { - logger(LOG_ERR, _("Node %s (%s) uses unknown cipher!"), from->name, + logger(LOG_ERR, "Node %s (%s) uses unknown cipher!", from->name, from->hostname); return false; } if(from->outkeylength != from->outcipher->key_len + from->outcipher->iv_len) { - logger(LOG_ERR, _("Node %s (%s) uses wrong keylength!"), from->name, + logger(LOG_ERR, "Node %s (%s) uses wrong keylength!", from->name, from->hostname); return false; } @@ -245,13 +245,13 @@ bool ans_key_h(connection_t *c) { from->outdigest = EVP_get_digestbynid(digest); if(!from->outdigest) { - logger(LOG_ERR, _("Node %s (%s) uses unknown digest!"), from->name, + logger(LOG_ERR, "Node %s (%s) uses unknown digest!", from->name, from->hostname); return false; } if(from->outmaclength > from->outdigest->md_size || from->outmaclength < 0) { - logger(LOG_ERR, _("Node %s (%s) uses bogus MAC length!"), + logger(LOG_ERR, "Node %s (%s) uses bogus MAC length!", from->name, from->hostname); return false; } @@ -260,7 +260,7 @@ bool ans_key_h(connection_t *c) { } if(compression < 0 || compression > 11) { - logger(LOG_ERR, _("Node %s (%s) uses bogus compression level!"), from->name, from->hostname); + logger(LOG_ERR, "Node %s (%s) uses bogus compression level!", from->name, from->hostname); return false; } @@ -268,7 +268,7 @@ bool ans_key_h(connection_t *c) { if(from->outcipher) if(!EVP_EncryptInit_ex(&from->outctx, from->outcipher, NULL, (unsigned char *)from->outkey, (unsigned char *)from->outkey + from->outcipher->key_len)) { - logger(LOG_ERR, _("Error during initialisation of key from %s (%s): %s"), + logger(LOG_ERR, "Error during initialisation of key from %s (%s): %s", from->name, from->hostname, ERR_error_string(ERR_get_error(), NULL)); return false; } diff --git a/src/protocol_misc.c b/src/protocol_misc.c index 8a536e37..28571ef3 100644 --- a/src/protocol_misc.c +++ b/src/protocol_misc.c @@ -45,12 +45,12 @@ bool status_h(connection_t *c) { char statusstring[MAX_STRING_SIZE]; if(sscanf(c->buffer, "%*d %d " MAX_STRING, &statusno, statusstring) != 2) { - logger(LOG_ERR, _("Got bad %s from %s (%s)"), "STATUS", + logger(LOG_ERR, "Got bad %s from %s (%s)", "STATUS", c->name, c->hostname); return false; } - ifdebug(STATUS) logger(LOG_NOTICE, _("Status message from %s (%s): %d: %s"), + ifdebug(STATUS) logger(LOG_NOTICE, "Status message from %s (%s): %d: %s", c->name, c->hostname, statusno, statusstring); return true; @@ -68,12 +68,12 @@ bool error_h(connection_t *c) { char errorstring[MAX_STRING_SIZE]; if(sscanf(c->buffer, "%*d %d " MAX_STRING, &err, errorstring) != 2) { - logger(LOG_ERR, _("Got bad %s from %s (%s)"), "ERROR", + logger(LOG_ERR, "Got bad %s from %s (%s)", "ERROR", c->name, c->hostname); return false; } - ifdebug(ERROR) logger(LOG_NOTICE, _("Error message from %s (%s): %d: %s"), + ifdebug(ERROR) logger(LOG_NOTICE, "Error message from %s (%s): %d: %s", c->name, c->hostname, err, errorstring); terminate_connection(c, c->status.active); @@ -136,7 +136,7 @@ bool tcppacket_h(connection_t *c) { short int len; if(sscanf(c->buffer, "%*d %hd", &len) != 1) { - logger(LOG_ERR, _("Got bad %s from %s (%s)"), "PACKET", c->name, + logger(LOG_ERR, "Got bad %s from %s (%s)", "PACKET", c->name, c->hostname); return false; } diff --git a/src/protocol_subnet.c b/src/protocol_subnet.c index cdfcb6d0..e7ab8b24 100644 --- a/src/protocol_subnet.c +++ b/src/protocol_subnet.c @@ -48,7 +48,7 @@ bool add_subnet_h(connection_t *c) { subnet_t s = {0}, *new; if(sscanf(c->buffer, "%*d %*x " MAX_STRING " " MAX_STRING, name, subnetstr) != 2) { - logger(LOG_ERR, _("Got bad %s from %s (%s)"), "ADD_SUBNET", c->name, + logger(LOG_ERR, "Got bad %s from %s (%s)", "ADD_SUBNET", c->name, c->hostname); return false; } @@ -56,16 +56,16 @@ bool add_subnet_h(connection_t *c) { /* Check if owner name is valid */ if(!check_id(name)) { - logger(LOG_ERR, _("Got bad %s from %s (%s): %s"), "ADD_SUBNET", c->name, - c->hostname, _("invalid name")); + logger(LOG_ERR, "Got bad %s from %s (%s): %s", "ADD_SUBNET", c->name, + c->hostname, "invalid name"); return false; } /* Check if subnet string is valid */ if(!str2net(&s, subnetstr)) { - logger(LOG_ERR, _("Got bad %s from %s (%s): %s"), "ADD_SUBNET", c->name, - c->hostname, _("invalid subnet string")); + logger(LOG_ERR, "Got bad %s from %s (%s): %s", "ADD_SUBNET", c->name, + c->hostname, "invalid subnet string"); return false; } @@ -78,7 +78,7 @@ bool add_subnet_h(connection_t *c) { if(tunnelserver && owner != myself && owner != c->node) { /* in case of tunnelserver, ignore indirect subnet registrations */ - ifdebug(PROTOCOL) logger(LOG_WARNING, _("Ignoring indirect %s from %s (%s) for %s"), + ifdebug(PROTOCOL) logger(LOG_WARNING, "Ignoring indirect %s from %s (%s) for %s", "ADD_SUBNET", c->name, c->hostname, subnetstr); return true; } @@ -97,7 +97,7 @@ bool add_subnet_h(connection_t *c) { /* If we don't know this subnet, but we are the owner, retaliate with a DEL_SUBNET */ if(owner == myself) { - ifdebug(PROTOCOL) logger(LOG_WARNING, _("Got %s from %s (%s) for ourself"), + ifdebug(PROTOCOL) logger(LOG_WARNING, "Got %s from %s (%s) for ourself", "ADD_SUBNET", c->name, c->hostname); s.owner = myself; send_del_subnet(c, &s); @@ -121,7 +121,7 @@ bool add_subnet_h(connection_t *c) { } if(!cfg) { - logger(LOG_WARNING, _("Unauthorized %s from %s (%s) for %s"), + logger(LOG_WARNING, "Unauthorized %s from %s (%s) for %s", "ADD_SUBNET", c->name, c->hostname, subnetstr); return false; } @@ -161,7 +161,7 @@ bool del_subnet_h(connection_t *c) { subnet_t s = {0}, *find; if(sscanf(c->buffer, "%*d %*x " MAX_STRING " " MAX_STRING, name, subnetstr) != 2) { - logger(LOG_ERR, _("Got bad %s from %s (%s)"), "DEL_SUBNET", c->name, + logger(LOG_ERR, "Got bad %s from %s (%s)", "DEL_SUBNET", c->name, c->hostname); return false; } @@ -169,16 +169,16 @@ bool del_subnet_h(connection_t *c) { /* Check if owner name is valid */ if(!check_id(name)) { - logger(LOG_ERR, _("Got bad %s from %s (%s): %s"), "DEL_SUBNET", c->name, - c->hostname, _("invalid name")); + logger(LOG_ERR, "Got bad %s from %s (%s): %s", "DEL_SUBNET", c->name, + c->hostname, "invalid name"); return false; } /* Check if subnet string is valid */ if(!str2net(&s, subnetstr)) { - logger(LOG_ERR, _("Got bad %s from %s (%s): %s"), "DEL_SUBNET", c->name, - c->hostname, _("invalid subnet string")); + logger(LOG_ERR, "Got bad %s from %s (%s): %s", "DEL_SUBNET", c->name, + c->hostname, "invalid subnet string"); return false; } @@ -191,13 +191,13 @@ bool del_subnet_h(connection_t *c) { if(tunnelserver && owner != myself && owner != c->node) { /* in case of tunnelserver, ignore indirect subnet deletion */ - ifdebug(PROTOCOL) logger(LOG_WARNING, _("Ignoring indirect %s from %s (%s) for %s"), + ifdebug(PROTOCOL) logger(LOG_WARNING, "Ignoring indirect %s from %s (%s) for %s", "DEL_SUBNET", c->name, c->hostname, subnetstr); return true; } if(!owner) { - ifdebug(PROTOCOL) logger(LOG_WARNING, _("Got %s from %s (%s) for %s which is not in our node tree"), + ifdebug(PROTOCOL) logger(LOG_WARNING, "Got %s from %s (%s) for %s which is not in our node tree", "DEL_SUBNET", c->name, c->hostname, name); return true; } @@ -209,7 +209,7 @@ bool del_subnet_h(connection_t *c) { find = lookup_subnet(owner, &s); if(!find) { - ifdebug(PROTOCOL) logger(LOG_WARNING, _("Got %s from %s (%s) for %s which does not appear in his subnet tree"), + ifdebug(PROTOCOL) logger(LOG_WARNING, "Got %s from %s (%s) for %s which does not appear in his subnet tree", "DEL_SUBNET", c->name, c->hostname, name); return true; } @@ -217,7 +217,7 @@ bool del_subnet_h(connection_t *c) { /* If we are the owner of this subnet, retaliate with an ADD_SUBNET */ if(owner == myself) { - ifdebug(PROTOCOL) logger(LOG_WARNING, _("Got %s from %s (%s) for ourself"), + ifdebug(PROTOCOL) logger(LOG_WARNING, "Got %s from %s (%s) for ourself", "DEL_SUBNET", c->name, c->hostname); send_add_subnet(c, find); return true; diff --git a/src/raw_socket/device.c b/src/raw_socket/device.c index e52097eb..30bb1845 100644 --- a/src/raw_socket/device.c +++ b/src/raw_socket/device.c @@ -48,10 +48,10 @@ bool setup_device(void) { if(!get_config_string(lookup_config(config_tree, "Device"), &device)) device = xstrdup(iface); - device_info = _("raw socket"); + device_info = "raw socket"; if((device_fd = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL))) < 0) { - logger(LOG_ERR, _("Could not open %s: %s"), device_info, + logger(LOG_ERR, "Could not open %s: %s", device_info, strerror(errno)); return false; } @@ -60,7 +60,7 @@ bool setup_device(void) { strncpy(ifr.ifr_ifrn.ifrn_name, iface, IFNAMSIZ); if(ioctl(device_fd, SIOCGIFINDEX, &ifr)) { close(device_fd); - logger(LOG_ERR, _("Can't find interface %s: %s"), iface, + logger(LOG_ERR, "Can't find interface %s: %s", iface, strerror(errno)); return false; } @@ -71,11 +71,11 @@ bool setup_device(void) { sa.sll_ifindex = ifr.ifr_ifindex; if(bind(device_fd, (struct sockaddr *) &sa, (socklen_t) sizeof(sa))) { - logger(LOG_ERR, _("Could not bind %s to %s: %s"), device, iface, strerror(errno)); + logger(LOG_ERR, "Could not bind %s to %s: %s", device, iface, strerror(errno)); return false; } - logger(LOG_INFO, _("%s is a %s"), device, device_info); + logger(LOG_INFO, "%s is a %s", device, device_info); return true; } @@ -91,7 +91,7 @@ bool read_packet(vpn_packet_t *packet) { int lenin; if((lenin = read(device_fd, packet->data, MTU)) <= 0) { - logger(LOG_ERR, _("Error while reading from %s %s: %s"), device_info, + logger(LOG_ERR, "Error while reading from %s %s: %s", device_info, device, strerror(errno)); return false; } @@ -100,18 +100,18 @@ bool read_packet(vpn_packet_t *packet) { device_total_in += packet->len; - ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Read packet of %d bytes from %s"), packet->len, + ifdebug(TRAFFIC) logger(LOG_DEBUG, "Read packet of %d bytes from %s", packet->len, device_info); return true; } bool write_packet(vpn_packet_t *packet) { - ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Writing packet of %d bytes to %s"), + ifdebug(TRAFFIC) logger(LOG_DEBUG, "Writing packet of %d bytes to %s", packet->len, device_info); if(write(device_fd, packet->data, packet->len) < 0) { - logger(LOG_ERR, _("Can't write to %s %s: %s"), device_info, device, + logger(LOG_ERR, "Can't write to %s %s: %s", device_info, device, strerror(errno)); return false; } @@ -122,7 +122,7 @@ bool write_packet(vpn_packet_t *packet) { } void dump_device_stats(void) { - logger(LOG_DEBUG, _("Statistics for %s %s:"), device_info, device); - logger(LOG_DEBUG, _(" total bytes in: %10d"), device_total_in); - logger(LOG_DEBUG, _(" total bytes out: %10d"), device_total_out); + logger(LOG_DEBUG, "Statistics for %s %s:", device_info, device); + logger(LOG_DEBUG, " total bytes in: %10d", device_total_in); + logger(LOG_DEBUG, " total bytes out: %10d", device_total_out); } diff --git a/src/route.c b/src/route.c index 7538bec5..2da781e5 100644 --- a/src/route.c +++ b/src/route.c @@ -86,7 +86,7 @@ static bool ratelimit(int frequency) { static bool checklength(node_t *source, vpn_packet_t *packet, length_t length) { if(packet->len < length) { - ifdebug(TRAFFIC) logger(LOG_WARNING, _("Got too short packet from %s (%s)"), source->name, source->hostname); + ifdebug(TRAFFIC) logger(LOG_WARNING, "Got too short packet from %s (%s)", source->name, source->hostname); return false; } else return true; @@ -109,7 +109,7 @@ static void learn_mac(mac_t *address) { /* If we don't know this MAC address yet, store it */ if(!subnet) { - ifdebug(TRAFFIC) logger(LOG_INFO, _("Learned new MAC address %hx:%hx:%hx:%hx:%hx:%hx"), + ifdebug(TRAFFIC) logger(LOG_INFO, "Learned new MAC address %hx:%hx:%hx:%hx:%hx:%hx", address->x[0], address->x[1], address->x[2], address->x[3], address->x[4], address->x[5]); @@ -144,7 +144,7 @@ void age_subnets(void) { ifdebug(TRAFFIC) { char netstr[MAXNETSTR]; if(net2str(netstr, sizeof netstr, s)) - logger(LOG_INFO, _("Subnet %s expired"), netstr); + logger(LOG_INFO, "Subnet %s expired", netstr); } for(node2 = connection_tree->head; node2; node2 = node2->next) { @@ -249,11 +249,11 @@ static void fragment_ipv4_packet(node_t *dest, vpn_packet_t *packet) { todo = ntohs(ip.ip_len) - ip_size; if(ether_size + ip_size + todo != packet->len) { - ifdebug(TRAFFIC) logger(LOG_WARNING, _("Length of packet (%d) doesn't match length in IPv4 header (%zd)"), packet->len, ether_size + ip_size + todo); + ifdebug(TRAFFIC) logger(LOG_WARNING, "Length of packet (%d) doesn't match length in IPv4 header (%zd)", packet->len, ether_size + ip_size + todo); return; } - ifdebug(TRAFFIC) logger(LOG_INFO, _("Fragmenting packet of %d bytes to %s (%s)"), packet->len, dest->name, dest->hostname); + ifdebug(TRAFFIC) logger(LOG_INFO, "Fragmenting packet of %d bytes to %s (%s)", packet->len, dest->name, dest->hostname); offset = packet->data + ether_size + ip_size; maxlen = (dest->mtu - ether_size - ip_size) & ~0x7; @@ -290,7 +290,7 @@ static void route_ipv4_unicast(node_t *source, vpn_packet_t *packet) { subnet = lookup_subnet_ipv4(&dest); if(!subnet) { - ifdebug(TRAFFIC) logger(LOG_WARNING, _("Cannot route packet from %s (%s): unknown IPv4 destination address %d.%d.%d.%d"), + ifdebug(TRAFFIC) logger(LOG_WARNING, "Cannot route packet from %s (%s): unknown IPv4 destination address %d.%d.%d.%d", source->name, source->hostname, dest.x[0], dest.x[1], @@ -302,7 +302,7 @@ static void route_ipv4_unicast(node_t *source, vpn_packet_t *packet) { } if(subnet->owner == source) { - ifdebug(TRAFFIC) logger(LOG_WARNING, _("Packet looping back to %s (%s)!"), source->name, source->hostname); + ifdebug(TRAFFIC) logger(LOG_WARNING, "Packet looping back to %s (%s)!", source->name, source->hostname); return; } @@ -315,7 +315,7 @@ static void route_ipv4_unicast(node_t *source, vpn_packet_t *packet) { via = (subnet->owner->via == myself) ? subnet->owner->nexthop : subnet->owner->via; if(via && packet->len > via->mtu && via != myself) { - ifdebug(TRAFFIC) logger(LOG_INFO, _("Packet for %s (%s) length %d larger than MTU %d"), subnet->owner->name, subnet->owner->hostname, packet->len, via->mtu); + ifdebug(TRAFFIC) logger(LOG_INFO, "Packet for %s (%s) length %d larger than MTU %d", subnet->owner->name, subnet->owner->hostname, packet->len, via->mtu); if(packet->data[20] & 0x40) { packet->len = via->mtu; route_ipv4_unreachable(source, packet, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED); @@ -432,7 +432,7 @@ static void route_ipv6_unicast(node_t *source, vpn_packet_t *packet) { subnet = lookup_subnet_ipv6(&dest); if(!subnet) { - ifdebug(TRAFFIC) logger(LOG_WARNING, _("Cannot route packet from %s (%s): unknown IPv6 destination address %hx:%hx:%hx:%hx:%hx:%hx:%hx:%hx"), + ifdebug(TRAFFIC) logger(LOG_WARNING, "Cannot route packet from %s (%s): unknown IPv6 destination address %hx:%hx:%hx:%hx:%hx:%hx:%hx:%hx", source->name, source->hostname, ntohs(dest.x[0]), ntohs(dest.x[1]), @@ -448,7 +448,7 @@ static void route_ipv6_unicast(node_t *source, vpn_packet_t *packet) { } if(subnet->owner == source) { - ifdebug(TRAFFIC) logger(LOG_WARNING, _("Packet looping back to %s (%s)!"), source->name, source->hostname); + ifdebug(TRAFFIC) logger(LOG_WARNING, "Packet looping back to %s (%s)!", source->name, source->hostname); return; } @@ -458,7 +458,7 @@ static void route_ipv6_unicast(node_t *source, vpn_packet_t *packet) { via = (subnet->owner->via == myself) ? subnet->owner->nexthop : subnet->owner->via; if(via && packet->len > via->mtu && via != myself) { - ifdebug(TRAFFIC) logger(LOG_INFO, _("Packet for %s (%s) length %d larger than MTU %d"), subnet->owner->name, subnet->owner->hostname, packet->len, via->mtu); + ifdebug(TRAFFIC) logger(LOG_INFO, "Packet for %s (%s) length %d larger than MTU %d", subnet->owner->name, subnet->owner->hostname, packet->len, via->mtu); packet->len = via->mtu; route_ipv6_unreachable(source, packet, ICMP6_PACKET_TOO_BIG, 0); return; @@ -490,7 +490,7 @@ static void route_neighborsol(node_t *source, vpn_packet_t *packet) { has_opt = packet->len >= ether_size + ip6_size + ns_size + opt_size + ETH_ALEN; if(source != myself) { - ifdebug(TRAFFIC) logger(LOG_WARNING, _("Got neighbor solicitation request from %s (%s) while in router mode!"), source->name, source->hostname); + ifdebug(TRAFFIC) logger(LOG_WARNING, "Got neighbor solicitation request from %s (%s) while in router mode!", source->name, source->hostname); return; } @@ -510,7 +510,7 @@ static void route_neighborsol(node_t *source, vpn_packet_t *packet) { if(ns.nd_ns_hdr.icmp6_type != ND_NEIGHBOR_SOLICIT || (has_opt && opt.nd_opt_type != ND_OPT_SOURCE_LINKADDR)) { - ifdebug(TRAFFIC) logger(LOG_WARNING, _("Cannot route packet: received unknown type neighbor solicitation request")); + ifdebug(TRAFFIC) logger(LOG_WARNING, "Cannot route packet: received unknown type neighbor solicitation request"); return; } @@ -534,7 +534,7 @@ static void route_neighborsol(node_t *source, vpn_packet_t *packet) { } if(checksum) { - ifdebug(TRAFFIC) logger(LOG_WARNING, _("Cannot route packet: checksum error for neighbor solicitation request")); + ifdebug(TRAFFIC) logger(LOG_WARNING, "Cannot route packet: checksum error for neighbor solicitation request"); return; } @@ -543,7 +543,7 @@ static void route_neighborsol(node_t *source, vpn_packet_t *packet) { subnet = lookup_subnet_ipv6((ipv6_t *) &ns.nd_ns_target); if(!subnet) { - ifdebug(TRAFFIC) logger(LOG_WARNING, _("Cannot route packet: neighbor solicitation request for unknown address %hx:%hx:%hx:%hx:%hx:%hx:%hx:%hx"), + ifdebug(TRAFFIC) logger(LOG_WARNING, "Cannot route packet: neighbor solicitation request for unknown address %hx:%hx:%hx:%hx:%hx:%hx:%hx:%hx", ntohs(((uint16_t *) &ns.nd_ns_target)[0]), ntohs(((uint16_t *) &ns.nd_ns_target)[1]), ntohs(((uint16_t *) &ns.nd_ns_target)[2]), @@ -634,7 +634,7 @@ static void route_arp(node_t *source, vpn_packet_t *packet) { return; if(source != myself) { - ifdebug(TRAFFIC) logger(LOG_WARNING, _("Got ARP request from %s (%s) while in router mode!"), source->name, source->hostname); + ifdebug(TRAFFIC) logger(LOG_WARNING, "Got ARP request from %s (%s) while in router mode!", source->name, source->hostname); return; } @@ -651,7 +651,7 @@ static void route_arp(node_t *source, vpn_packet_t *packet) { if(ntohs(arp.arp_hrd) != ARPHRD_ETHER || ntohs(arp.arp_pro) != ETH_P_IP || arp.arp_hln != ETH_ALEN || arp.arp_pln != sizeof(addr) || ntohs(arp.arp_op) != ARPOP_REQUEST) { - ifdebug(TRAFFIC) logger(LOG_WARNING, _("Cannot route packet: received unknown type ARP request")); + ifdebug(TRAFFIC) logger(LOG_WARNING, "Cannot route packet: received unknown type ARP request"); return; } @@ -660,7 +660,7 @@ static void route_arp(node_t *source, vpn_packet_t *packet) { subnet = lookup_subnet_ipv4((ipv4_t *) &arp.arp_tpa); if(!subnet) { - ifdebug(TRAFFIC) logger(LOG_WARNING, _("Cannot route packet: ARP request for unknown address %d.%d.%d.%d"), + ifdebug(TRAFFIC) logger(LOG_WARNING, "Cannot route packet: ARP request for unknown address %d.%d.%d.%d", arp.arp_tpa[0], arp.arp_tpa[1], arp.arp_tpa[2], arp.arp_tpa[3]); return; @@ -712,7 +712,7 @@ static void route_mac(node_t *source, vpn_packet_t *packet) { } if(subnet->owner == source) { - ifdebug(TRAFFIC) logger(LOG_WARNING, _("Packet looping back to %s (%s)!"), source->name, source->hostname); + ifdebug(TRAFFIC) logger(LOG_WARNING, "Packet looping back to %s (%s)!", source->name, source->hostname); return; } @@ -721,7 +721,7 @@ static void route_mac(node_t *source, vpn_packet_t *packet) { node_t *via = (subnet->owner->via == myself) ? subnet->owner->nexthop : subnet->owner->via; if(via && packet->len > via->mtu && via != myself) { - ifdebug(TRAFFIC) logger(LOG_INFO, _("Packet for %s (%s) length %d larger than MTU %d"), subnet->owner->name, subnet->owner->hostname, packet->len, via->mtu); + ifdebug(TRAFFIC) logger(LOG_INFO, "Packet for %s (%s) length %d larger than MTU %d", subnet->owner->name, subnet->owner->hostname, packet->len, via->mtu); uint16_t type = packet->data[12] << 8 | packet->data[13]; if(type == ETH_P_IP) { if(packet->data[20] & 0x40) { @@ -764,7 +764,7 @@ void route(node_t *source, vpn_packet_t *packet) { break; default: - ifdebug(TRAFFIC) logger(LOG_WARNING, _("Cannot route packet from %s (%s): unknown type %hx"), source->name, source->hostname, type); + ifdebug(TRAFFIC) logger(LOG_WARNING, "Cannot route packet from %s (%s): unknown type %hx", source->name, source->hostname, type); break; } } diff --git a/src/solaris/device.c b/src/solaris/device.c index f1d648d3..43938006 100644 --- a/src/solaris/device.c +++ b/src/solaris/device.c @@ -50,7 +50,7 @@ bool setup_device(void) { device = xstrdup(DEFAULT_DEVICE); if((device_fd = open(device, O_RDWR | O_NONBLOCK)) < 0) { - logger(LOG_ERR, _("Could not open %s: %s"), device, strerror(errno)); + logger(LOG_ERR, "Could not open %s: %s", device, strerror(errno)); return false; } @@ -62,44 +62,44 @@ bool setup_device(void) { ppa = atoi(ptr); if((ip_fd = open("/dev/ip", O_RDWR, 0)) < 0) { - logger(LOG_ERR, _("Could not open /dev/ip: %s"), strerror(errno)); + logger(LOG_ERR, "Could not open /dev/ip: %s", strerror(errno)); return false; } /* Assign a new PPA and get its unit number. */ if((ppa = ioctl(device_fd, TUNNEWPPA, ppa)) < 0) { - logger(LOG_ERR, _("Can't assign new interface: %s"), strerror(errno)); + logger(LOG_ERR, "Can't assign new interface: %s", strerror(errno)); return false; } if((if_fd = open(device, O_RDWR, 0)) < 0) { - logger(LOG_ERR, _("Could not open %s twice: %s"), device, + logger(LOG_ERR, "Could not open %s twice: %s", device, strerror(errno)); return false; } if(ioctl(if_fd, I_PUSH, "ip") < 0) { - logger(LOG_ERR, _("Can't push IP module: %s"), strerror(errno)); + logger(LOG_ERR, "Can't push IP module: %s", strerror(errno)); return false; } /* Assign ppa according to the unit number returned by tun device */ if(ioctl(if_fd, IF_UNITSEL, (char *) &ppa) < 0) { - logger(LOG_ERR, _("Can't set PPA %d: %s"), ppa, strerror(errno)); + logger(LOG_ERR, "Can't set PPA %d: %s", ppa, strerror(errno)); return false; } if(ioctl(ip_fd, I_LINK, if_fd) < 0) { - logger(LOG_ERR, _("Can't link TUN device to IP: %s"), strerror(errno)); + logger(LOG_ERR, "Can't link TUN device to IP: %s", strerror(errno)); return false; } if(!get_config_string(lookup_config(config_tree, "Interface"), &iface)) xasprintf(&iface, "tun%d", ppa); - device_info = _("Solaris tun device"); + device_info = "Solaris tun device"; - logger(LOG_INFO, _("%s is a %s"), device, device_info); + logger(LOG_INFO, "%s is a %s", device, device_info); return true; } @@ -115,7 +115,7 @@ bool read_packet(vpn_packet_t *packet) { int lenin; if((lenin = read(device_fd, packet->data + 14, MTU - 14)) <= 0) { - logger(LOG_ERR, _("Error while reading from %s %s: %s"), device_info, + logger(LOG_ERR, "Error while reading from %s %s: %s", device_info, device, strerror(errno)); return false; } @@ -140,18 +140,18 @@ bool read_packet(vpn_packet_t *packet) { device_total_in += packet->len; - ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Read packet of %d bytes from %s"), packet->len, + ifdebug(TRAFFIC) logger(LOG_DEBUG, "Read packet of %d bytes from %s", packet->len, device_info); return true; } bool write_packet(vpn_packet_t *packet) { - ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Writing packet of %d bytes to %s"), + ifdebug(TRAFFIC) logger(LOG_DEBUG, "Writing packet of %d bytes to %s", packet->len, device_info); if(write(device_fd, packet->data + 14, packet->len - 14) < 0) { - logger(LOG_ERR, _("Can't write to %s %s: %s"), device_info, + logger(LOG_ERR, "Can't write to %s %s: %s", device_info, device, strerror(errno)); return false; } @@ -162,7 +162,7 @@ bool write_packet(vpn_packet_t *packet) { } void dump_device_stats(void) { - logger(LOG_DEBUG, _("Statistics for %s %s:"), device_info, device); - logger(LOG_DEBUG, _(" total bytes in: %10d"), device_total_in); - logger(LOG_DEBUG, _(" total bytes out: %10d"), device_total_out); + logger(LOG_DEBUG, "Statistics for %s %s:", device_info, device); + logger(LOG_DEBUG, " total bytes in: %10d", device_total_in); + logger(LOG_DEBUG, " total bytes out: %10d", device_total_out); } diff --git a/src/subnet.c b/src/subnet.c index db7aeb1e..ef4e59e9 100644 --- a/src/subnet.c +++ b/src/subnet.c @@ -128,7 +128,7 @@ int subnet_compare(const subnet_t *a, const subnet_t *b) { case SUBNET_IPV6: return subnet_compare_ipv6(a, b); default: - logger(LOG_ERR, _("subnet_compare() was called with unknown subnet type %d, exitting!"), + logger(LOG_ERR, "subnet_compare() was called with unknown subnet type %d, exitting!", a->type); exit(0); } @@ -267,7 +267,7 @@ bool str2net(subnet_t *subnet, const char *subnetstr) { bool net2str(char *netstr, int len, const subnet_t *subnet) { if(!netstr || !subnet) { - logger(LOG_ERR, _("net2str() was called with netstr=%p, subnet=%p!\n"), netstr, subnet); + logger(LOG_ERR, "net2str() was called with netstr=%p, subnet=%p!\n", netstr, subnet); return false; } @@ -309,7 +309,7 @@ bool net2str(char *netstr, int len, const subnet_t *subnet) { default: logger(LOG_ERR, - _("net2str() was called with unknown subnet type %d, exiting!"), + "net2str() was called with unknown subnet type %d, exiting!", subnet->type); exit(0); } @@ -495,14 +495,14 @@ void dump_subnets(void) { subnet_t *subnet; avl_node_t *node; - logger(LOG_DEBUG, _("Subnet list:")); + logger(LOG_DEBUG, "Subnet list:"); for(node = subnet_tree->head; node; node = node->next) { subnet = node->data; if(!net2str(netstr, sizeof netstr, subnet)) continue; - logger(LOG_DEBUG, _(" %s owner %s"), netstr, subnet->owner->name); + logger(LOG_DEBUG, " %s owner %s", netstr, subnet->owner->name); } - logger(LOG_DEBUG, _("End of subnet list.")); + logger(LOG_DEBUG, "End of subnet list."); } diff --git a/src/tincd.c b/src/tincd.c index a01ed58b..034c226a 100644 --- a/src/tincd.c +++ b/src/tincd.c @@ -119,11 +119,11 @@ CRITICAL_SECTION mutex; static void usage(bool status) { if(status) - fprintf(stderr, _("Try `%s --help\' for more information.\n"), + fprintf(stderr, "Try `%s --help\' for more information.\n", program_name); else { - printf(_("Usage: %s [option]...\n\n"), program_name); - printf(_(" -c, --config=DIR Read configuration options from DIR.\n" + printf("Usage: %s [option]...\n\n", program_name); + printf(" -c, --config=DIR Read configuration options from DIR.\n" " -D, --no-detach Don't fork and detach.\n" " -d, --debug[=LEVEL] Increase debug level or set it to LEVEL.\n" " -k, --kill[=SIGNAL] Attempt to kill a running tincd and exit.\n" @@ -135,8 +135,8 @@ static void usage(bool status) { " -R, --chroot chroot to NET dir at startup.\n" " -U, --user=USER setuid to given USER at startup.\n" " --help Display this help and exit.\n" - " --version Output version information and exit.\n\n")); - printf(_("Report bugs to tinc@tinc-vpn.org.\n")); + " --version Output version information and exit.\n\n"); + printf("Report bugs to tinc@tinc-vpn.org.\n"); } } @@ -159,7 +159,7 @@ static bool parse_options(int argc, char **argv) { case 'L': /* no detach */ #ifndef HAVE_MLOCKALL - logger(LOG_ERR, _("%s not supported on this platform"), "mlockall()"); + logger(LOG_ERR, "%s not supported on this platform", "mlockall()"); return false; #else do_mlock = true; @@ -196,7 +196,7 @@ static bool parse_options(int argc, char **argv) { kill_tincd = atoi(optarg); if(!kill_tincd) { - fprintf(stderr, _("Invalid argument `%s'; SIGNAL must be a number or one of HUP, TERM, KILL, USR1, USR2, WINCH, INT or ALRM.\n"), + fprintf(stderr, "Invalid argument `%s'; SIGNAL must be a number or one of HUP, TERM, KILL, USR1, USR2, WINCH, INT or ALRM.\n", optarg); usage(true); return false; @@ -218,7 +218,7 @@ static bool parse_options(int argc, char **argv) { generate_keys = atoi(optarg); if(generate_keys < 512) { - fprintf(stderr, _("Invalid argument `%s'; BITS must be a number equal to or greater than 512.\n"), + fprintf(stderr, "Invalid argument `%s'; BITS must be a number equal to or greater than 512.\n", optarg); usage(true); return false; @@ -320,27 +320,27 @@ static bool keygen(int bits) { get_config_string(lookup_config(config_tree, "Name"), &name); if(name && !check_id(name)) { - fprintf(stderr, _("Invalid name for myself!\n")); + fprintf(stderr, "Invalid name for myself!\n"); return false; } - fprintf(stderr, _("Generating %d bits keys:\n"), bits); + fprintf(stderr, "Generating %d bits keys:\n", bits); rsa_key = RSA_generate_key(bits, 0x10001, indicator, NULL); if(!rsa_key) { - fprintf(stderr, _("Error during key generation!\n")); + fprintf(stderr, "Error during key generation!\n"); return false; } else - fprintf(stderr, _("Done.\n")); + fprintf(stderr, "Done.\n"); xasprintf(&filename, "%s/rsa_key.priv", confbase); - f = ask_and_open(filename, _("private RSA key")); + f = ask_and_open(filename, "private RSA key"); if(!f) return false; if(disable_old_keys(f)) - fprintf(stderr, _("Warning: old key(s) found and disabled.\n")); + fprintf(stderr, "Warning: old key(s) found and disabled.\n"); #ifdef HAVE_FCHMOD /* Make it unreadable for others. */ @@ -356,13 +356,13 @@ static bool keygen(int bits) { else xasprintf(&filename, "%s/rsa_key.pub", confbase); - f = ask_and_open(filename, _("public RSA key")); + f = ask_and_open(filename, "public RSA key"); if(!f) return false; if(disable_old_keys(f)) - fprintf(stderr, _("Warning: old key(s) found and disabled.\n")); + fprintf(stderr, "Warning: old key(s) found and disabled.\n"); PEM_write_RSAPublicKey(f, rsa_key); fclose(f); @@ -416,7 +416,7 @@ static void make_names(void) { if(!confbase) xasprintf(&confbase, CONFDIR "/tinc/%s", netname); else - logger(LOG_INFO, _("Both netname and configuration directory given, using the latter...")); + logger(LOG_INFO, "Both netname and configuration directory given, using the latter..."); } else { if(!confbase) xasprintf(&confbase, CONFDIR "/tinc"); @@ -434,11 +434,11 @@ static void free_names() { static bool drop_privs() { #ifdef HAVE_MINGW if (switchuser) { - logger(LOG_ERR, _("%s not supported on this platform"), "-U"); + logger(LOG_ERR, "%s not supported on this platform", "-U"); return false; } if (do_chroot) { - logger(LOG_ERR, _("%s not supported on this platform"), "-R"); + logger(LOG_ERR, "%s not supported on this platform", "-R"); return false; } #else @@ -446,13 +446,13 @@ static bool drop_privs() { if (switchuser) { struct passwd *pw = getpwnam(switchuser); if (!pw) { - logger(LOG_ERR, _("unknown user `%s'"), switchuser); + logger(LOG_ERR, "unknown user `%s'", switchuser); return false; } uid = pw->pw_uid; if (initgroups(switchuser, pw->pw_gid) != 0 || setgid(pw->pw_gid) != 0) { - logger(LOG_ERR, _("System call `%s' failed: %s"), + logger(LOG_ERR, "System call `%s' failed: %s", "initgroups", strerror(errno)); return false; } @@ -462,7 +462,7 @@ static bool drop_privs() { if (do_chroot) { tzset(); /* for proper timestamps in logs */ if (chroot(confbase) != 0 || chdir("/") != 0) { - logger(LOG_ERR, _("System call `%s' failed: %s"), + logger(LOG_ERR, "System call `%s' failed: %s", "chroot", strerror(errno)); return false; } @@ -471,7 +471,7 @@ static bool drop_privs() { } if (switchuser) if (setuid(uid) != 0) { - logger(LOG_ERR, _("System call `%s' failed: %s"), + logger(LOG_ERR, "System call `%s' failed: %s", "setuid", strerror(errno)); return false; } @@ -491,23 +491,19 @@ static bool drop_privs() { int main(int argc, char **argv) { program_name = argv[0]; - setlocale(LC_ALL, ""); - bindtextdomain(PACKAGE, LOCALEDIR); - textdomain(PACKAGE); - if(!parse_options(argc, argv)) return 1; make_names(); if(show_version) { - printf(_("%s version %s (built %s %s, protocol %d)\n"), PACKAGE, + printf("%s version %s (built %s %s, protocol %d)\n", PACKAGE, VERSION, __DATE__, __TIME__, PROT_CURRENT); - printf(_("Copyright (C) 1998-2009 Ivo Timmermans, Guus Sliepen and others.\n" + printf("Copyright (C) 1998-2009 Ivo Timmermans, Guus Sliepen and others.\n" "See the AUTHORS file for a complete list.\n\n" "tinc comes with ABSOLUTELY NO WARRANTY. This is free software,\n" "and you are welcome to redistribute it under certain conditions;\n" - "see the file COPYING for details.\n")); + "see the file COPYING for details.\n"); return 0; } @@ -544,13 +540,13 @@ int main(int argc, char **argv) { return 1; if(lzo_init() != LZO_E_OK) { - logger(LOG_ERR, _("Error initializing LZO compressor!")); + logger(LOG_ERR, "Error initializing LZO compressor!"); return 1; } #ifdef HAVE_MINGW if(WSAStartup(MAKEWORD(2, 2), &wsa_state)) { - logger(LOG_ERR, _("System call `%s' failed: %s"), "WSAStartup", winerror(GetLastError())); + logger(LOG_ERR, "System call `%s' failed: %s", "WSAStartup", winerror(GetLastError())); return 1; } @@ -573,7 +569,7 @@ int main2(int argc, char **argv) { * This has to be done after daemon()/fork() so it works for child. * No need to do that in parent as it's very short-lived. */ if(do_mlock && mlockall(MCL_CURRENT | MCL_FUTURE) != 0) { - logger(LOG_ERR, _("System call `%s' failed: %s"), "mlockall", + logger(LOG_ERR, "System call `%s' failed: %s", "mlockall", strerror(errno)); return 1; } @@ -600,7 +596,7 @@ int main2(int argc, char **argv) { else if(!strcasecmp(priority, "High")) setpriority(HIGH_PRIORITY_CLASS); else { - logger(LOG_ERR, _("Invalid priority `%s`!"), priority); + logger(LOG_ERR, "Invalid priority `%s`!", priority); goto end; } } @@ -621,7 +617,7 @@ int main2(int argc, char **argv) { close_network_connections(); end: - logger(LOG_NOTICE, _("Terminating")); + logger(LOG_NOTICE, "Terminating"); #ifndef HAVE_MINGW remove_pid(pidfilename); diff --git a/src/uml_socket/device.c b/src/uml_socket/device.c index aaaab443..3523f647 100644 --- a/src/uml_socket/device.c +++ b/src/uml_socket/device.c @@ -70,10 +70,10 @@ bool setup_device(void) { get_config_string(lookup_config(config_tree, "Interface"), &iface); - device_info = _("UML network socket"); + device_info = "UML network socket"; if((write_fd = socket(PF_UNIX, SOCK_DGRAM, 0)) < 0) { - logger(LOG_ERR, _("Could not open write %s: %s"), device_info, strerror(errno)); + logger(LOG_ERR, "Could not open write %s: %s", device_info, strerror(errno)); running = false; return false; } @@ -81,13 +81,13 @@ bool setup_device(void) { setsockopt(write_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof one); if(fcntl(write_fd, F_SETFL, O_NONBLOCK) < 0) { - logger(LOG_ERR, _("System call `%s' failed: %s"), "fcntl", strerror(errno)); + logger(LOG_ERR, "System call `%s' failed: %s", "fcntl", strerror(errno)); running = false; return false; } if((data_fd = socket(PF_UNIX, SOCK_DGRAM, 0)) < 0) { - logger(LOG_ERR, _("Could not open data %s: %s"), device_info, strerror(errno)); + logger(LOG_ERR, "Could not open data %s: %s", device_info, strerror(errno)); running = false; return false; } @@ -95,7 +95,7 @@ bool setup_device(void) { setsockopt(data_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof one); if(fcntl(data_fd, F_SETFL, O_NONBLOCK) < 0) { - logger(LOG_ERR, _("System call `%s' failed: %s"), "fcntl", strerror(errno)); + logger(LOG_ERR, "System call `%s' failed: %s", "fcntl", strerror(errno)); running = false; return false; } @@ -108,13 +108,13 @@ bool setup_device(void) { memcpy(&data_sun.sun_path, &name, sizeof name); if(bind(data_fd, (struct sockaddr *)&data_sun, sizeof data_sun) < 0) { - logger(LOG_ERR, _("Could not bind data %s: %s"), device_info, strerror(errno)); + logger(LOG_ERR, "Could not bind data %s: %s", device_info, strerror(errno)); running = false; return false; } if((listen_fd = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) { - logger(LOG_ERR, _("Could not open %s: %s"), device_info, + logger(LOG_ERR, "Could not open %s: %s", device_info, strerror(errno)); return false; } @@ -122,26 +122,26 @@ bool setup_device(void) { setsockopt(listen_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof one); if(fcntl(listen_fd, F_SETFL, O_NONBLOCK) < 0) { - logger(LOG_ERR, _("System call `%s' failed: %s"), "fcntl", strerror(errno)); + logger(LOG_ERR, "System call `%s' failed: %s", "fcntl", strerror(errno)); return false; } listen_sun.sun_family = AF_UNIX; strncpy(listen_sun.sun_path, device, sizeof listen_sun.sun_path); if(bind(listen_fd, (struct sockaddr *)&listen_sun, sizeof listen_sun) < 0) { - logger(LOG_ERR, _("Could not bind %s to %s: %s"), device_info, device, strerror(errno)); + logger(LOG_ERR, "Could not bind %s to %s: %s", device_info, device, strerror(errno)); return false; } if(listen(listen_fd, 1) < 0) { - logger(LOG_ERR, _("Could not listen on %s %s: %s"), device_info, device, strerror(errno)); + logger(LOG_ERR, "Could not listen on %s %s: %s", device_info, device, strerror(errno)); return false; } device_fd = listen_fd; state = 0; - logger(LOG_INFO, _("%s is a %s"), device, device_info); + logger(LOG_INFO, "%s is a %s", device, device_info); if(routing_mode == RMODE_ROUTER) overwrite_mac = true; @@ -178,12 +178,12 @@ bool read_packet(vpn_packet_t *packet) { request_fd = accept(listen_fd, &sa, &salen); if(request_fd < 0) { - logger(LOG_ERR, _("Could not accept connection to %s %s: %s"), device_info, device, strerror(errno)); + logger(LOG_ERR, "Could not accept connection to %s %s: %s", device_info, device, strerror(errno)); return false; } if(fcntl(listen_fd, F_SETFL, O_NONBLOCK) < 0) { - logger(LOG_ERR, _("System call `%s' failed: %s"), "fcntl", strerror(errno)); + logger(LOG_ERR, "System call `%s' failed: %s", "fcntl", strerror(errno)); running = false; return false; } @@ -198,21 +198,21 @@ bool read_packet(vpn_packet_t *packet) { case 1: { if((lenin = read(request_fd, &request, sizeof request)) != sizeof request) { - logger(LOG_ERR, _("Error while reading request from %s %s: %s"), device_info, + logger(LOG_ERR, "Error while reading request from %s %s: %s", device_info, device, strerror(errno)); running = false; return false; } if(request.magic != 0xfeedface || request.version != 3 || request.type != REQ_NEW_CONTROL) { - logger(LOG_ERR, _("Unknown magic %x, version %d, request type %d from %s %s"), + logger(LOG_ERR, "Unknown magic %x, version %d, request type %d from %s %s", request.magic, request.version, request.type, device_info, device); running = false; return false; } if(connect(write_fd, &request.sock, sizeof request.sock) < 0) { - logger(LOG_ERR, _("Could not bind write %s: %s"), device_info, strerror(errno)); + logger(LOG_ERR, "Could not bind write %s: %s", device_info, strerror(errno)); running = false; return false; } @@ -220,7 +220,7 @@ bool read_packet(vpn_packet_t *packet) { write(request_fd, &data_sun, sizeof data_sun); device_fd = data_fd; - logger(LOG_INFO, _("Connection with UML established")); + logger(LOG_INFO, "Connection with UML established"); state = 2; return false; @@ -228,7 +228,7 @@ bool read_packet(vpn_packet_t *packet) { case 2: { if((lenin = read(data_fd, packet->data, MTU)) <= 0) { - logger(LOG_ERR, _("Error while reading from %s %s: %s"), device_info, + logger(LOG_ERR, "Error while reading from %s %s: %s", device_info, device, strerror(errno)); running = false; return false; @@ -238,7 +238,7 @@ bool read_packet(vpn_packet_t *packet) { device_total_in += packet->len; - ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Read packet of %d bytes from %s"), packet->len, + ifdebug(TRAFFIC) logger(LOG_DEBUG, "Read packet of %d bytes from %s", packet->len, device_info); return true; @@ -248,17 +248,17 @@ bool read_packet(vpn_packet_t *packet) { bool write_packet(vpn_packet_t *packet) { if(state != 2) { - ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Dropping packet of %d bytes to %s: not connected to UML yet"), + ifdebug(TRAFFIC) logger(LOG_DEBUG, "Dropping packet of %d bytes to %s: not connected to UML yet", packet->len, device_info); return false; } - ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Writing packet of %d bytes to %s"), + ifdebug(TRAFFIC) logger(LOG_DEBUG, "Writing packet of %d bytes to %s", packet->len, device_info); if(write(write_fd, packet->data, packet->len) < 0) { if(errno != EINTR && errno != EAGAIN) { - logger(LOG_ERR, _("Can't write to %s %s: %s"), device_info, device, strerror(errno)); + logger(LOG_ERR, "Can't write to %s %s: %s", device_info, device, strerror(errno)); running = false; } @@ -271,7 +271,7 @@ bool write_packet(vpn_packet_t *packet) { } void dump_device_stats(void) { - logger(LOG_DEBUG, _("Statistics for %s %s:"), device_info, device); - logger(LOG_DEBUG, _(" total bytes in: %10d"), device_total_in); - logger(LOG_DEBUG, _(" total bytes out: %10d"), device_total_out); + logger(LOG_DEBUG, "Statistics for %s %s:", device_info, device); + logger(LOG_DEBUG, " total bytes in: %10d", device_total_in); + logger(LOG_DEBUG, " total bytes out: %10d", device_total_out); } diff --git a/system.h b/system.h index 973869a1..dfb4c6d7 100644 --- a/system.h +++ b/system.h @@ -31,10 +31,6 @@ typedef int bool; #define false 0 #endif -/* Include localisation support */ - -#include "gettext.h" - #ifndef HAVE_STRSIGNAL # define strsignal(p) "" #endif From 46e481dc945c5572eb6091a3660f6bf258ee0cfa Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Fri, 25 Sep 2009 21:14:56 +0200 Subject: [PATCH 8/9] Add more authors to the copyright headers. Git's log and blame tools were used to find out which files had significant contributions from authors who sent in patches that were applied before we used git. --- AUTHORS | 3 +++ src/bsd/device.c | 1 + src/connection.c | 1 + src/meta.c | 1 + src/net.c | 1 + src/net_setup.c | 1 + src/net_socket.c | 1 + src/tincd.c | 1 + 8 files changed, 10 insertions(+) diff --git a/AUTHORS b/AUTHORS index 15691192..7c20a8df 100644 --- a/AUTHORS +++ b/AUTHORS @@ -5,6 +5,9 @@ Main tinc authors: Significant contributions from: - Michael Tokarev - Florian Forster +- Grzegorz Dymarek +- Max Rijevski +- Scott Lamb These files are from other sources: * lib/pidfile.h and lib/pidfile.c are by Martin Schulze, taken from diff --git a/src/bsd/device.c b/src/bsd/device.c index 4dd2b57f..ee9b0e53 100644 --- a/src/bsd/device.c +++ b/src/bsd/device.c @@ -2,6 +2,7 @@ device.c -- Interaction BSD tun/tap device Copyright (C) 2001-2005 Ivo Timmermans, 2001-2009 Guus Sliepen + 2009 Grzegorz Dymarek 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 diff --git a/src/connection.c b/src/connection.c index 0fd9e169..6e942f8e 100644 --- a/src/connection.c +++ b/src/connection.c @@ -2,6 +2,7 @@ connection.c -- connection list management Copyright (C) 2000-2009 Guus Sliepen , 2000-2005 Ivo Timmermans + 2008 Max Rijevski 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 diff --git a/src/meta.c b/src/meta.c index a56f4618..765baeca 100644 --- a/src/meta.c +++ b/src/meta.c @@ -2,6 +2,7 @@ meta.c -- handle the meta communication Copyright (C) 2000-2009 Guus Sliepen , 2000-2005 Ivo Timmermans + 2006 Scott Lamb 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 diff --git a/src/net.c b/src/net.c index 7f1f77b3..31970366 100644 --- a/src/net.c +++ b/src/net.c @@ -2,6 +2,7 @@ net.c -- most of the network code Copyright (C) 1998-2005 Ivo Timmermans, 2000-2009 Guus Sliepen + 2006 Scott Lamb 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 diff --git a/src/net_setup.c b/src/net_setup.c index 2b177c13..f7302db7 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -2,6 +2,7 @@ net_setup.c -- Setup. Copyright (C) 1998-2005 Ivo Timmermans, 2000-2009 Guus Sliepen + 2006 Scott Lamb 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 diff --git a/src/net_socket.c b/src/net_socket.c index 21fc017a..7189025c 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -2,6 +2,7 @@ net_socket.c -- Handle various kinds of sockets. Copyright (C) 1998-2005 Ivo Timmermans, 2000-2009 Guus Sliepen + 2006 Scott Lamb 2009 Florian Forster This program is free software; you can redistribute it and/or modify diff --git a/src/tincd.c b/src/tincd.c index 034c226a..8c2b12de 100644 --- a/src/tincd.c +++ b/src/tincd.c @@ -2,6 +2,7 @@ tincd.c -- the main file for tincd Copyright (C) 1998-2005 Ivo Timmermans 2000-2009 Guus Sliepen + 2008 Max Rijevski 2009 Michael Tokarev This program is free software; you can redistribute it and/or modify From 9a2b0f88a9cae753ebc81c939d01403178b18a35 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sat, 26 Sep 2009 12:51:52 +0200 Subject: [PATCH 9/9] Update the NEWS. --- NEWS | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/NEWS b/NEWS index 736f5e69..da10928c 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,36 @@ +Version 1.0.10 not yet released + + * Fixed potential crashes during shutdown and (in rare conditions) when other + nodes disconnected from the VPN. + + * Improved NAT handling: tinc now copes with mangled port numbers, and will + automatically fall back to TCP if direct UDP connection between nodes is not + possible. + + * Allow configuration files with CRLF line endings to be read on UNIX. + + * Disable old RSA keys when generating new ones. + + * Many fixes in the path MTU discovery code. + + * Tinc can now drop privileges and/or chroot itself. + + * The TunnelServer code now just ignores information from clients instead of + disconnecting them. + + * Improved performance on Windows by using the new ProcessPriority option and + by making the handling of packets received from the TAP-Win32 adapter more + efficient. + + * Code cleanups: tinc now follows the C99 standard, copyright headers have + been updated to include patch authors, checkpoint tracing and localisation + features have been removed. + + * Support for (jailbroken) iPhone and iPod Touch has been added. + + Thanks to Florian Forster, Grzegorz Dymarek and especially Michael Tokarev for + their contributions to this version of tinc. + Version 1.0.9 Dec 26 2008 * Fixed tinc as a service under Windows 2003. @@ -15,12 +48,16 @@ Version 1.0.9 Dec 26 2008 * Fixed a memory leak that occured when connections were closed. + Thanks to Max Rijevski for his contributions to this version of tinc. + Version 1.0.8 May 16 2007 * Fixed some memory and resource leaks. * Made network sockets non-blocking under Windows. + Thanks to Scott Lamb and "dnk" for their contributions to this version of tinc. + Version 1.0.7 Jan 5 2007 * Fixed a bug that caused slow network speeds on Windows. @@ -48,6 +85,8 @@ version 1.0.5 Nov 14 2006 * Support LZO 2.0 and later. + Thanks to Scott Lamb for his contributions to this version of tinc. + version 1.0.4 May 4 2005 * Fix switch and hub modes.