GNUnet 0.21.1
nat-auto.h
Go to the documentation of this file.
1/*
2 This file is part of GNUnet.
3 Copyright (C) 2011, 2016, 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
27#ifndef NAT_AUTO_H
28#define NAT_AUTO_H
29#include "gnunet_util_lib.h"
30
31
33
39{
44
48 uint32_t dst_ipv4;
49
53 uint16_t dport;
54
58 uint16_t data;
59
63 int32_t is_tcp;
64};
65
66
71{
76
77 /* Followed by configuration (diff, serialized, compressed) */
78};
79
80
85{
90
95
100
101 /* Followed by configuration (diff, serialized, compressed) */
102};
103
104
106
107#endif
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32.
#define GNUNET_NETWORK_STRUCT_END
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32;.
#define GNUNET_PACKED
gcc-ism to get packed structs.
Header for all communications.
Client requesting automatic configuration.
Definition: nat-auto.h:71
struct GNUNET_MessageHeader header
Header with type #GNUNET_MESSAGE_TYPE_NAT_REQUEST_AUTO_CFG.
Definition: nat-auto.h:75
Service responding with proposed configuration.
Definition: nat-auto.h:85
struct GNUNET_MessageHeader header
Header with type GNUNET_MESSAGE_TYPE_NAT_AUTO_CFG_RESULT.
Definition: nat-auto.h:89
int32_t type
An enum GNUNET_NAT_Type in NBO.
Definition: nat-auto.h:99
int32_t status_code
An enum GNUNET_NAT_StatusCode in NBO.
Definition: nat-auto.h:94
Request to test NAT traversal, sent to the gnunet-nat-server (not the service!).
Definition: nat-auto.h:39
uint32_t dst_ipv4
IPv4 target IP address.
Definition: nat-auto.h:48
uint16_t dport
Port to use, 0 to send dummy ICMP response.
Definition: nat-auto.h:53
int32_t is_tcp
GNUNET_YES for TCP, GNUNET_NO for UDP.
Definition: nat-auto.h:63
uint16_t data
Data to send OR advertised-port (in NBO) to use for dummy ICMP.
Definition: nat-auto.h:58
struct GNUNET_MessageHeader header
Header with type GNUNET_MESSAGE_TYPE_NAT_TEST.
Definition: nat-auto.h:43