GNUnet  0.10.x
gnunet_nat_auto_service.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2007-2017 GNUnet e.V.
4 
5  GNUnet is free software: you can redistribute it and/or modify it
6  under the terms of the GNU Affero General Public License as published
7  by the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
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  Affero General Public License for more details.
14 
15  You should have received a copy of the GNU Affero General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  SPDX-License-Identifier: AGPL3.0-or-later
19  */
20 
34 #ifndef GNUNET_NAT_AUTO_SERVICE_H
35 #define GNUNET_NAT_AUTO_SERVICE_H
36 
37 #include "gnunet_util_lib.h"
38 #include "gnunet_nat_service.h"
39 
40 
45 
46 
58 struct GNUNET_NAT_AUTO_Test *
60  uint8_t proto,
61  const char *section_name,
63  void *report_cls);
64 
65 
71 void
73 
74 
79 
80 
87 const char *
89 
90 
100 typedef void
102  const struct GNUNET_CONFIGURATION_Handle *diff,
104  enum GNUNET_NAT_Type type);
105 
106 
119  void *cb_cls);
120 
121 
127 void
129 
130 
131 #endif
132  /* end of group */
134 
135 /* end of gnunet_nat_auto_service.h */
GNUNET_NAT_TestCallback report
Function to call with success report.
void GNUNET_NAT_AUTO_autoconfig_cancel(struct GNUNET_NAT_AUTO_AutoHandle *ah)
Abort autoconfiguration.
Definition: nat_auto_api.c:283
static uint8_t proto
Protocol to use.
Definition: gnunet-nat.c:60
Handle to a NAT test.
const char * GNUNET_NAT_AUTO_status2string(enum GNUNET_NAT_StatusCode err)
Converts enum GNUNET_NAT_StatusCode to string.
Definition: nat_auto_api.c:68
void * report_cls
Closure for report.
void(* GNUNET_NAT_TestCallback)(void *cls, enum GNUNET_NAT_StatusCode result)
Function called to report success or failure for NAT configuration test.
void GNUNET_NAT_AUTO_test_stop(struct GNUNET_NAT_AUTO_Test *tst)
Stop an active NAT test.
void(* GNUNET_NAT_AUTO_AutoResultCallback)(void *cls, const struct GNUNET_CONFIGURATION_Handle *diff, enum GNUNET_NAT_StatusCode result, enum GNUNET_NAT_Type type)
Function called with the result from the autoconfiguration.
GNUNET_NAT_StatusCode
Error Types for the NAT subsystem (which can then later be converted/resolved to a string) ...
static int result
Global testing status.
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
Definition: gnunet-arm.c:104
Handle to auto-configuration in progress.
Definition: nat_auto_api.c:38
static struct GNUNET_NAT_AUTO_AutoHandle * ah
Handle to ongoing autoconfiguration.
configuration data
Definition: configuration.c:83
static char * section_name
Name of section in configuration file to use for additional options.
Definition: gnunet-nat.c:40
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
struct GNUNET_NAT_AUTO_AutoHandle * GNUNET_NAT_AUTO_autoconfig_start(const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_NAT_AUTO_AutoResultCallback cb, void *cb_cls)
Start auto-configuration routine.
Definition: nat_auto_api.c:224
GNUNET_NAT_Type
What the situation of the NAT connectivity.
struct GNUNET_NAT_AUTO_Test * GNUNET_NAT_AUTO_test_start(const struct GNUNET_CONFIGURATION_Handle *cfg, uint8_t proto, const char *section_name, GNUNET_NAT_TestCallback report, void *report_cls)
Start testing if NAT traversal works using the given configuration.