aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-12-16 17:13:42 +0100
committerChristian Grothoff <christian@grothoff.org>2018-12-16 17:13:42 +0100
commitd37218d0b13292b78fcfc08d2903d6e415da0236 (patch)
treef9f354e6859b9868859cf421acbf747d8351ee7b /src/include
parent18784b77764c56842ae59428f3ebea95c157ffab (diff)
downloadgnunet-d37218d0b13292b78fcfc08d2903d6e415da0236.tar.gz
gnunet-d37218d0b13292b78fcfc08d2903d6e415da0236.zip
more work on tng
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_bandwidth_lib.h6
-rw-r--r--src/include/gnunet_container_lib.h2
-rw-r--r--src/include/gnunet_protocols.h26
-rw-r--r--src/include/gnunet_signatures.h8
-rw-r--r--src/include/gnunet_transport_communication_service.h39
-rw-r--r--src/include/gnunet_transport_monitor_service.h2
6 files changed, 62 insertions, 21 deletions
diff --git a/src/include/gnunet_bandwidth_lib.h b/src/include/gnunet_bandwidth_lib.h
index 4395b878b..cb30b73e1 100644
--- a/src/include/gnunet_bandwidth_lib.h
+++ b/src/include/gnunet_bandwidth_lib.h
@@ -236,10 +236,10 @@ GNUNET_BANDWIDTH_tracker_init (struct GNUNET_BANDWIDTH_Tracker *av,
236/** 236/**
237 * Initialize bandwidth tracker. Note that in addition to the 237 * Initialize bandwidth tracker. Note that in addition to the
238 * 'max_carry_s' limit, we also always allow at least 238 * 'max_carry_s' limit, we also always allow at least
239 * GNUNET_MAX_MESSAGE_SIZE to accumulate. So if the 239 * #GNUNET_MAX_MESSAGE_SIZE to accumulate. So if the
240 * bytes-per-second limit is so small that within 'max_carry_s' not 240 * bytes-per-second limit is so small that within 'max_carry_s' not
241 * even GNUNET_MAX_MESSAGE_SIZE is allowed to accumulate, it is 241 * even #GNUNET_MAX_MESSAGE_SIZE is allowed to accumulate, it is
242 * ignored and replaced by GNUNET_MAX_MESSAGE_SIZE (which is in 242 * ignored and replaced by #GNUNET_MAX_MESSAGE_SIZE (which is in
243 * bytes). 243 * bytes).
244 * 244 *
245 * @param av tracker to initialize 245 * @param av tracker to initialize
diff --git a/src/include/gnunet_container_lib.h b/src/include/gnunet_container_lib.h
index a06d697f7..1fb460ece 100644
--- a/src/include/gnunet_container_lib.h
+++ b/src/include/gnunet_container_lib.h
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 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/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/ 17*/
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h
index c82b11762..fd5adeef2 100644
--- a/src/include/gnunet_protocols.h
+++ b/src/include/gnunet_protocols.h
@@ -3076,6 +3076,20 @@ extern "C"
3076 */ 3076 */
3077#define GNUNET_MESSAGE_TYPE_TRANSPORT_NEW_COMMUNICATOR 1211 3077#define GNUNET_MESSAGE_TYPE_TRANSPORT_NEW_COMMUNICATOR 1211
3078 3078
3079/**
3080 * Tell transport that it should assist with exchanging a
3081 * message between communicators. Usually used when
3082 * communciators are uni-directional and need an alternative
3083 * back-channel.
3084 */
3085#define GNUNET_MESSAGE_TYPE_TRANSPORT_COMMUNICATOR_BACKCHANNEL 1212
3086
3087/**
3088 * Message type used between transport services when they
3089 * internally forward communicator backchannel messages.
3090 */
3091#define GNUNET_MESSAGE_TYPE_TRANSPORT_BACKCHANNEL_ENCAPSULATION 1213
3092
3079 3093
3080/** 3094/**
3081 * Message sent to indicate to the transport that a monitor 3095 * Message sent to indicate to the transport that a monitor
@@ -3094,6 +3108,18 @@ extern "C"
3094 */ 3108 */
3095#define GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_END 1252 3109#define GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_END 1252
3096 3110
3111/**
3112 * Message exchanged between communicators to confirm
3113 * successful KX (and address validation).
3114 */
3115#define GNUNET_MESSAGE_TYPE_TRANSPORT_COMMUNICATOR_KX_CONFIRMATION 1275
3116
3117/**
3118 * Message exchanged between communicators to exchange
3119 * flow control (FC) limits and acknowledgemets.
3120 */
3121#define GNUNET_MESSAGE_TYPE_TRANSPORT_COMMUNICATOR_FC_LIMITS 1276
3122
3097 3123
3098/* ************** NEW (NG) ATS Messages ************* */ 3124/* ************** NEW (NG) ATS Messages ************* */
3099 3125
diff --git a/src/include/gnunet_signatures.h b/src/include/gnunet_signatures.h
index 03c97f199..109fe7045 100644
--- a/src/include/gnunet_signatures.h
+++ b/src/include/gnunet_signatures.h
@@ -11,7 +11,7 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 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/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/ 17*/
@@ -194,6 +194,12 @@ extern "C"
194 */ 194 */
195#define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_ADDRESS 29 195#define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_ADDRESS 29
196 196
197/**
198 * Signature by a peer affirming that the given ephemeral
199 * key is currently in use by that peer's transport service.
200 */
201#define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_EPHEMERAL 30
202
197#if 0 /* keep Emacsens' auto-indent happy */ 203#if 0 /* keep Emacsens' auto-indent happy */
198{ 204{
199#endif 205#endif
diff --git a/src/include/gnunet_transport_communication_service.h b/src/include/gnunet_transport_communication_service.h
index 2ba1f831a..a5547778e 100644
--- a/src/include/gnunet_transport_communication_service.h
+++ b/src/include/gnunet_transport_communication_service.h
@@ -105,15 +105,23 @@ enum GNUNET_TRANSPORT_CommunicatorCharacteristics {
105/** 105/**
106 * Function called when the transport service has received an 106 * Function called when the transport service has received an
107 * acknowledgement for this communicator (!) via a different return 107 * acknowledgement for this communicator (!) via a different return
108 * path. 108 * path.
109 *
110 * Typically used to receive messages of type
111 * #GNUNET_MESSAGE_TYPE_TRANSPORT_COMMUNICATOR_FC_LIMITS or
112 * #GNUNET_MESSAGE_TYPE_TRANSPORT_COMMUNICATOR_KX_CONFIRMATION
113 * as well as communicator-specific messages to assist with
114 * NAT traversal.
115 *
116 * @param cls closure
117 * @param sender which peer sent the notification
118 * @param msg payload
109 */ 119 */
110typedef void 120typedef void
111(*GNUNET_TRANSPORT_CommunicatorNotify) (void *cls, 121(*GNUNET_TRANSPORT_CommunicatorNotify) (void *cls,
112 const struct GNUNET_PeerIdentity *sender, 122 const struct GNUNET_PeerIdentity *sender,
113 struct GNUNET_TIME_Absolute monotonic_time, 123 const struct GNUNET_MessageHeader *msg);
114 struct GNUNET_TIME_Relative validity, 124
115 const struct GNUNET_HashCode *token
116 );
117 125
118/** 126/**
119 * Connect to the transport service. 127 * Connect to the transport service.
@@ -127,6 +135,8 @@ typedef void
127 * the address of another peer, can be NULL if the 135 * the address of another peer, can be NULL if the
128 * communicator only supports receiving messages 136 * communicator only supports receiving messages
129 * @param mq_init_cls closure for @a mq_init 137 * @param mq_init_cls closure for @a mq_init
138 * @param notify_cb function to pass backchannel messages to communicator
139 * @param notify_cb_cls closure for @a notify_cb
130 * @return NULL on error 140 * @return NULL on error
131 */ 141 */
132struct GNUNET_TRANSPORT_CommunicatorHandle * 142struct GNUNET_TRANSPORT_CommunicatorHandle *
@@ -135,9 +145,9 @@ GNUNET_TRANSPORT_communicator_connect (const struct GNUNET_CONFIGURATION_Handle
135 const char *addr_prefix, 145 const char *addr_prefix,
136 enum GNUNET_TRANSPORT_CommunicatorCharacteristics cc, 146 enum GNUNET_TRANSPORT_CommunicatorCharacteristics cc,
137 GNUNET_TRANSPORT_CommunicatorMqInit mq_init, 147 GNUNET_TRANSPORT_CommunicatorMqInit mq_init,
138 void *mq_init_cls); 148 void *mq_init_cls,
139// GNUNET_TRANSPORT_CommunicatorNotify notify_cb, 149 GNUNET_TRANSPORT_CommunicatorNotify notify_cb,
140// void *notify_cb_cls); 150 void *notify_cb_cls);
141 151
142 152
143/** 153/**
@@ -221,7 +231,7 @@ enum GNUNET_TRANSPORT_ConnectionStatus {
221 231
222 232
223/** 233/**
224 * Notify transport service that an MQ became available due to an 234 * Notify transport service that a MQ became available due to an
225 * "inbound" connection or because the communicator discovered the 235 * "inbound" connection or because the communicator discovered the
226 * presence of another peer. 236 * presence of another peer.
227 * 237 *
@@ -299,17 +309,16 @@ GNUNET_TRANSPORT_communicator_address_remove (struct GNUNET_TRANSPORT_AddressIde
299 * send the message back itself). 309 * send the message back itself).
300 * 310 *
301 * @param ch handle of this communicator 311 * @param ch handle of this communicator
302 * @param target_pid peer to send the message to 312 * @param pid peer to send the message to
303 * @param target_comm name of the communicator to send the message to 313 * @param comm name of the communicator to send the message to
314 * @param header header of the message to transmit and pass via the
315 * notify-API to @a pid's communicator @a comm
304 */ 316 */
305void 317void
306GNUNET_TRANSPORT_communicator_notify (struct GNUNET_TRANSPORT_CommunicatorHandle *ch, 318GNUNET_TRANSPORT_communicator_notify (struct GNUNET_TRANSPORT_CommunicatorHandle *ch,
307 const struct GNUNET_PeerIdentity *pid, 319 const struct GNUNET_PeerIdentity *pid,
308 const char *comm, 320 const char *comm,
309 struct GNUNET_TIME_Absolute monotonic_time, 321 const struct GNUNET_MessageHeader *header);
310 struct GNUNET_TIME_Relative validity,
311 const struct GNUNET_HashCode *token
312 );
313 322
314 323
315#if 0 /* keep Emacsens' auto-indent happy */ 324#if 0 /* keep Emacsens' auto-indent happy */
diff --git a/src/include/gnunet_transport_monitor_service.h b/src/include/gnunet_transport_monitor_service.h
index ef599f902..8357b101f 100644
--- a/src/include/gnunet_transport_monitor_service.h
+++ b/src/include/gnunet_transport_monitor_service.h
@@ -41,7 +41,7 @@ extern "C"
41#endif 41#endif
42 42
43#include "gnunet_util_lib.h" 43#include "gnunet_util_lib.h"
44#include "gnunet_ats_service.h" 44#include "gnunet_ats_transport_service.h"
45#include "gnunet_transport_communication_service.h" 45#include "gnunet_transport_communication_service.h"
46 46
47 47