From: Guus Sliepen Date: Thu, 24 Sep 2009 22:54:07 +0000 (+0200) Subject: Drop support for localisation. X-Git-Tag: release-1.0.10~15 X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=commitdiff_plain;h=4c85542894f7fca823b119b05e07179deb24229a 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. --- 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