2 This file is part of GNUnet.
3 (C) 2011 Christian Grothoff (and other contributing authors)
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
22 * @file nat/nat_test.c
23 * @brief functions to test if the NAT configuration is successful at achieving NAT traversal (with the help of a gnunet-nat-server)
24 * @author Christian Grothoff
27 #include "gnunet_util_lib.h"
28 #include "gnunet_nat_lib.h"
33 * Handle to a NAT test.
35 struct GNUNET_NAT_Test
37 GNUNET_NAT_TestCallback report;
44 * Start testing if NAT traversal works using the
45 * given configuration (IPv4-only).
47 * @param cfg configuration for the NAT traversal
48 * @param is_tcp GNUNET_YES to test TCP, GNUNET_NO to test UDP
49 * @param bnd_port port to bind to
50 * @param adv_port externally advertised port to use
51 * @param report function to call with the result of the test
52 * @param report_cls closure for report
53 * @return handle to cancel NAT test
55 struct GNUNET_NAT_Test *
56 GNUNET_NAT_test_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
60 GNUNET_NAT_TestCallback report,
68 * Stop an active NAT test.
70 * @param tst test to stop.
73 GNUNET_NAT_test_stop (struct GNUNET_NAT_Test *tst)
78 /* end of nat_test.c */