This file is part of GNUnet.
Copyright (C) 2011, 2016 GNUnet e.V.
- GNUnet is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 3, or (at your
- option) any later version.
+ GNUnet is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License,
+ or (at your option) any later version.
GNUnet is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
+ Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
#include "gnunet_util_lib.h"
+
GNUNET_NETWORK_STRUCT_BEGIN
/**
/**
* This client wants to be informed about changes to our
- * external addresses.
+ * applicable addresses.
*/
GNUNET_NAT_RF_ADDRESSES = 1,
uint8_t proto;
/**
- * Port we would like as we are configured to use this one for
- * advertising (in addition to the one we are binding to).
+ * Number of bytes in the string that follow which
+ * specifies a section name in the configuration.
*/
- uint16_t adv_port GNUNET_PACKED;
+ uint16_t str_len GNUNET_PACKED;
/**
* Number of addresses that this service is bound to that follow.
/* Followed by @e num_addrs addresses of type 'struct
sockaddr' */
+
+ /* Followed by @e str_len section name to use for options */
};
*/
struct GNUNET_MessageHeader header;
- /**
- * Size of the local address where we received the request, in NBO.
- */
- uint16_t local_addr_size;
-
- /**
- * Size of the remote address making the request, in NBO.
- */
- uint16_t remote_addr_size;
-
- /* followed by a `struct sockaddr` of @e local_addr_size bytes */
-
- /* followed by a `struct sockaddr` of @e remote_addr_size bytes */
+ /* followed by a `struct sockaddr_in` */
};
};
-/**
- * Client requesting test of network connectivity.
- */
-struct GNUNET_NAT_RequestTestMessage
-{
- /**
- * Header with type #GNUNET_MESSAGE_TYPE_NAT_REQUEST_TEST
- */
- struct GNUNET_MessageHeader header;
-
- /**
- * Port to bind to, in NBO
- */
- uint16_t bind_port GNUNET_PACKED;
-
- /**
- * Port external verifier should try to connect to, in NBO.
- */
- uint16_t extern_port GNUNET_PACKED;
-
- /**
- * IPv4 to bind to, in NBO.
- */
- struct in_addr bind_ip GNUNET_PACKED;
-
- /**
- * IPv4 external verifier should try to connect to, in NBO.
- */
- struct in_addr extern_ip GNUNET_PACKED;
-
- /**
- * IP protocol to use, i.e. IPPROTO_UDP or IPPROTO_TCP.
- */
- uint8_t proto;
-
-};
-
-
-/**
- * Service responding with network connectivity test result.
- */
-struct GNUNET_NAT_TestResultMessage
-{
- /**
- * Header with type #GNUNET_MESSAGE_TYPE_NAT_TEST_RESULT
- */
- struct GNUNET_MessageHeader header;
-
- /**
- * An `enum GNUNET_NAT_StatusCode` in NBO.
- */
- int32_t status_code GNUNET_PACKED;
-};
-
-
-/**
- * Client requesting automatic configuration.
- */
-struct GNUNET_NAT_AutoconfigRequestMessage
-{
- /**
- * Header with type #GNUNET_MESSAGE_TYPE_NAT_REQUEST_AUTO_CFG
- */
- struct GNUNET_MessageHeader header;
-
- /* Followed by configuration (diff, serialized, compressed) */
-
-};
-
-
-/**
- * Service responding with proposed configuration.
- */
-struct GNUNET_NAT_AutoconfigResultMessage
-{
- /**
- * Header with type #GNUNET_MESSAGE_TYPE_NAT_AUTO_CFG_RESULT
- */
- struct GNUNET_MessageHeader header;
-
- /**
- * An `enum GNUNET_NAT_StatusCode` in NBO.
- */
- int32_t status_code GNUNET_PACKED;
-
- /**
- * An `enum GNUNET_NAT_Type` in NBO.
- */
- int32_t type GNUNET_PACKED;
-
- /* Followed by configuration (diff, serialized, compressed) */
-};
-
-
GNUNET_NETWORK_STRUCT_END
#endif