aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-11-01 15:29:45 +0100
committerChristian Grothoff <christian@grothoff.org>2018-11-01 15:29:51 +0100
commit43de1e4a084b7d9e773b05f173d516dc573de5c1 (patch)
tree656ad22a37f648791f7a003323842cce03fe6ee5 /src/include
parent11916b980c6f022ef4be5e34eea2a0abdce68b10 (diff)
downloadgnunet-43de1e4a084b7d9e773b05f173d516dc573de5c1.tar.gz
gnunet-43de1e4a084b7d9e773b05f173d516dc573de5c1.zip
work on TNG
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_protocols.h51
-rw-r--r--src/include/gnunet_transport_communication_service.h14
2 files changed, 57 insertions, 8 deletions
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h
index 03b13fd48..4831c9215 100644
--- a/src/include/gnunet_protocols.h
+++ b/src/include/gnunet_protocols.h
@@ -3005,9 +3005,58 @@ extern "C"
3005#define GNUNET_MESSAGE_TYPE_RPS_CS_DEBUG_STREAM_CANCEL 1135 3005#define GNUNET_MESSAGE_TYPE_RPS_CS_DEBUG_STREAM_CANCEL 1135
3006 3006
3007 3007
3008/*******************************************************
3009 NEW (TNG) Transport service
3010 ******************************************************* */
3008 3011
3009/** 3012/**
3010 * Next available: 1200 3013 * @brief inform transport to add an address of this peer
3014 */
3015#define GNUNET_MESSAGE_TYPE_TRANSPORT_ADD_ADDRESS 1200
3016
3017/**
3018 * @brief inform transport to delete an address of this peer
3019 */
3020#define GNUNET_MESSAGE_TYPE_TRANSPORT_DEL_ADDRESS 1201
3021
3022/**
3023 * @brief inform transport about an incoming message
3024 */
3025#define GNUNET_MESSAGE_TYPE_TRANSPORT_INCOMING_MSG 1202
3026
3027/**
3028 * @brief transport acknowledges processing an incoming message
3029 */
3030#define GNUNET_MESSAGE_TYPE_TRANSPORT_INCOMING_MSG_ACK 1203
3031
3032/**
3033 * @brief inform transport that a queue was setup to talk to some peer
3034 */
3035#define GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_SETUP 1204
3036
3037/**
3038 * @brief inform transport that a queue was torn down
3039 */
3040#define GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_TEARDOWN 1205
3041
3042/**
3043 * @brief transport tells communicator it wants a queue
3044 */
3045#define GNUNET_MESSAGE_TYPE_TRANSPORT_QUEUE_CREATE 1206
3046
3047/**
3048 * @brief transport tells communicator it wants to transmit
3049 */
3050#define GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_MSG 1207
3051
3052/**
3053 * @brief communicator tells transports that message was sent
3054 */
3055#define GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_MSG_ACK 1208
3056
3057
3058/**
3059 * Next available: 1300
3011 */ 3060 */
3012 3061
3013 3062
diff --git a/src/include/gnunet_transport_communication_service.h b/src/include/gnunet_transport_communication_service.h
index 94d15af22..d93d5134e 100644
--- a/src/include/gnunet_transport_communication_service.h
+++ b/src/include/gnunet_transport_communication_service.h
@@ -137,8 +137,8 @@ typedef void
137 * @return #GNUNET_OK if all is well, #GNUNET_NO if the message was 137 * @return #GNUNET_OK if all is well, #GNUNET_NO if the message was
138 * immediately dropped due to memory limitations (communicator 138 * immediately dropped due to memory limitations (communicator
139 * should try to apply back pressure), 139 * should try to apply back pressure),
140 * #GNUNET_SYSERR if the message is ill formed and communicator 140 * #GNUNET_SYSERR if the message could not be delivered because
141 * should try to reset stream 141 * the tranport service is not yet up
142 */ 142 */
143int 143int
144GNUNET_TRANSPORT_communicator_receive (struct GNUNET_TRANSPORT_CommunicatorHandle *handle, 144GNUNET_TRANSPORT_communicator_receive (struct GNUNET_TRANSPORT_CommunicatorHandle *handle,
@@ -162,7 +162,7 @@ struct GNUNET_TRANSPORT_QueueHandle;
162 * "inbound" connection or because the communicator discovered the 162 * "inbound" connection or because the communicator discovered the
163 * presence of another peer. 163 * presence of another peer.
164 * 164 *
165 * @param handle connection to transport service 165 * @param ch connection to transport service
166 * @param peer peer with which we can now communicate 166 * @param peer peer with which we can now communicate
167 * @param address address in human-readable format, 0-terminated, UTF-8 167 * @param address address in human-readable format, 0-terminated, UTF-8
168 * @param nt which network type does the @a address belong to? 168 * @param nt which network type does the @a address belong to?
@@ -170,7 +170,7 @@ struct GNUNET_TRANSPORT_QueueHandle;
170 * @return API handle identifying the new MQ 170 * @return API handle identifying the new MQ
171 */ 171 */
172struct GNUNET_TRANSPORT_QueueHandle * 172struct GNUNET_TRANSPORT_QueueHandle *
173GNUNET_TRANSPORT_communicator_mq_add (struct GNUNET_TRANSPORT_CommunicatorHandle *handle, 173GNUNET_TRANSPORT_communicator_mq_add (struct GNUNET_TRANSPORT_CommunicatorHandle *ch,
174 const struct GNUNET_PeerIdentity *peer, 174 const struct GNUNET_PeerIdentity *peer,
175 const char *address, 175 const char *address,
176 enum GNUNET_ATS_Network_Type nt, 176 enum GNUNET_ATS_Network_Type nt,
@@ -198,16 +198,16 @@ struct GNUNET_TRANSPORT_AddressIdentifier;
198 * Notify transport service about an address that this communicator 198 * Notify transport service about an address that this communicator
199 * provides for this peer. 199 * provides for this peer.
200 * 200 *
201 * @param handle connection to transport service 201 * @param ch connection to transport service
202 * @param address our address in human-readable format, 0-terminated, UTF-8 202 * @param address our address in human-readable format, 0-terminated, UTF-8
203 * @param nt which network type does the address belong to? 203 * @param nt which network type does the address belong to?
204 * @param expiration when does the communicator forsee this address expiring? 204 * @param expiration when does the communicator forsee this address expiring?
205 */ 205 */
206struct GNUNET_TRANSPORT_AddressIdentifier * 206struct GNUNET_TRANSPORT_AddressIdentifier *
207GNUNET_TRANSPORT_communicator_address_add (struct GNUNET_TRANSPORT_CommunicatorHandle *handle, 207GNUNET_TRANSPORT_communicator_address_add (struct GNUNET_TRANSPORT_CommunicatorHandle *ch,
208 const char *address, 208 const char *address,
209 enum GNUNET_ATS_Network_Type nt, 209 enum GNUNET_ATS_Network_Type nt,
210 struct GNUNET_TIME_Absolute expiration); 210 struct GNUNET_TIME_Relative expiration);
211 211
212 212
213/** 213/**