GNUnet  0.20.0
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 
38 #include "gnunet_util_lib.h"
39 #include "gnunet_nat_service.h"
40 
41 
46 
47 
59 struct GNUNET_NAT_AUTO_Test *
61  uint8_t proto,
62  const char *section_name,
64  void *report_cls);
65 
66 
72 void
74 
75 
80 
81 
88 const char *
90 
91 
101 typedef void
103  const struct
106  enum GNUNET_NAT_Type type);
107 
108 
121  void *cb_cls);
122 
123 
129 void
131 
132 
133 #endif
134  /* end of group */
136 
137 /* end of gnunet_nat_auto_service.h */
static const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration we are using.
Definition: gnunet-abd.c:36
static struct GNUNET_NAT_AUTO_AutoHandle * ah
Handle to ongoing autoconfiguration.
static char * section_name
Name of section in configuration file to use for additional options.
Definition: gnunet-nat.c:40
static uint8_t proto
Protocol to use.
Definition: gnunet-nat.c:60
static int result
Global testing status.
void GNUNET_NAT_AUTO_test_stop(struct GNUNET_NAT_AUTO_Test *tst)
Stop an active NAT test.
GNUNET_NAT_StatusCode
Error Types for the NAT subsystem (which can then later be converted/resolved to a string)
void(* GNUNET_NAT_TestCallback)(void *cls, enum GNUNET_NAT_StatusCode result)
Function called to report success or failure for NAT configuration test.
GNUNET_NAT_Type
What the situation of the NAT connectivity.
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.
const char * GNUNET_NAT_AUTO_status2string(enum GNUNET_NAT_StatusCode err)
Converts enum GNUNET_NAT_StatusCode to string.
Definition: nat_auto_api.c:68
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:225
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.
void GNUNET_NAT_AUTO_autoconfig_cancel(struct GNUNET_NAT_AUTO_AutoHandle *ah)
Abort autoconfiguration.
Definition: nat_auto_api.c:285
Handle to auto-configuration in progress.
Definition: nat_auto_api.c:38
Handle to a NAT test.
GNUNET_NAT_TestCallback report
Function to call with success report.
void * report_cls
Closure for report.
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model