X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fnat%2Ftest_nat.c;h=b38713a80ecb1d0889b4902888466e74d159c14d;hb=27c12911f4f2aba2d90099270d70de846e83854f;hp=6a533798e07ed39dc003e68d399ccc11cbdbad90;hpb=5746309cb4be2073d550ad7a6885e918631dbc38;p=oweals%2Fgnunet.git diff --git a/src/nat/test_nat.c b/src/nat/test_nat.c index 6a533798e..b38713a80 100644 --- a/src/nat/test_nat.c +++ b/src/nat/test_nat.c @@ -34,18 +34,14 @@ */ #include "platform.h" -#include "gnunet_common.h" #include "gnunet_util_lib.h" #include "gnunet_program_lib.h" #include "gnunet_scheduler_lib.h" #include "gnunet_nat_lib.h" -#define VERBOSE GNUNET_NO - - /** - * Time to wait before stopping NAT, in seconds + * Time to wait before stopping NAT, in seconds */ #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) @@ -87,7 +83,7 @@ struct addr_cls /** * Return the address of the default interface, - * or any interface with a valid address if the default is not valid + * or any interface with a valid address if the default is not valid * * @param cls the 'struct addr_cls' * @param name name of the interface @@ -98,7 +94,8 @@ struct addr_cls */ static int process_if (void *cls, const char *name, int isDefault, - const struct sockaddr *addr, socklen_t addrlen) + const struct sockaddr *addr, const struct sockaddr *broadcast_addr, + const struct sockaddr *netmask, socklen_t addrlen) { struct addr_cls *data = cls; @@ -163,28 +160,14 @@ main (int argc, char *const argv[]) "test-nat", "-c", "test_nat_data.conf", - "-L", -#if VERBOSE - "DEBUG", -#else - "WARNING", -#endif NULL }; - GNUNET_log_setup ("test-nat", -#if VERBOSE - "DEBUG", -#else "WARNING", -#endif NULL); - GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Testing NAT library, timeout set to %d seconds\n", TIMEOUT); - - GNUNET_PROGRAM_run (5, argv_prog, "test-nat", "nohelp", options, &run, NULL); - + GNUNET_PROGRAM_run (3, argv_prog, "test-nat", "nohelp", options, &run, NULL); return 0; }