diff options
Diffstat (limited to 'src/include/gnunet_mesh_service.h')
-rw-r--r-- | src/include/gnunet_mesh_service.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/include/gnunet_mesh_service.h b/src/include/gnunet_mesh_service.h index d5d4e39d1..00894506e 100644 --- a/src/include/gnunet_mesh_service.h +++ b/src/include/gnunet_mesh_service.h | |||
@@ -62,6 +62,11 @@ struct GNUNET_MESH_Channel; | |||
62 | enum MeshOption | 62 | enum MeshOption |
63 | { | 63 | { |
64 | /** | 64 | /** |
65 | * Default options: unreliable, default buffering, not out of order. | ||
66 | */ | ||
67 | GNUNET_MESH_OPTION_DEFAULT = 0x0, | ||
68 | |||
69 | /** | ||
65 | * Disable buffering on intermediate nodes (for minimum latency). | 70 | * Disable buffering on intermediate nodes (for minimum latency). |
66 | * Yes/No. | 71 | * Yes/No. |
67 | */ | 72 | */ |
@@ -81,6 +86,7 @@ enum MeshOption | |||
81 | 86 | ||
82 | /** | 87 | /** |
83 | * Who is the peer at the other end of the channel. | 88 | * Who is the peer at the other end of the channel. |
89 | * Only for use in @c GNUNET_MESH_channel_get_info | ||
84 | * struct GNUNET_PeerIdentity *peer | 90 | * struct GNUNET_PeerIdentity *peer |
85 | */ | 91 | */ |
86 | GNUNET_MESH_OPTION_PEER = 0x8 | 92 | GNUNET_MESH_OPTION_PEER = 0x8 |
@@ -146,6 +152,8 @@ struct GNUNET_MESH_MessageHandler | |||
146 | * @param channel new handle to the channel | 152 | * @param channel new handle to the channel |
147 | * @param initiator peer that started the channel | 153 | * @param initiator peer that started the channel |
148 | * @param port Port this channel is for. | 154 | * @param port Port this channel is for. |
155 | * @param options MeshOption flag field, with all active option bits set to 1. | ||
156 | * | ||
149 | * @return initial channel context for the channel | 157 | * @return initial channel context for the channel |
150 | * (can be NULL -- that's not an error) | 158 | * (can be NULL -- that's not an error) |
151 | */ | 159 | */ |
@@ -156,7 +164,9 @@ typedef void *(GNUNET_MESH_InboundChannelNotificationHandler) (void *cls, | |||
156 | const struct | 164 | const struct |
157 | GNUNET_PeerIdentity | 165 | GNUNET_PeerIdentity |
158 | * initiator, | 166 | * initiator, |
159 | uint32_t port); | 167 | uint32_t port, |
168 | enum MeshOption | ||
169 | options); | ||
160 | 170 | ||
161 | 171 | ||
162 | /** | 172 | /** |
@@ -229,8 +239,8 @@ GNUNET_MESH_disconnect (struct GNUNET_MESH_Handle *handle); | |||
229 | * @param channel_ctx client's channel context to associate with the channel | 239 | * @param channel_ctx client's channel context to associate with the channel |
230 | * @param peer peer identity the channel should go to | 240 | * @param peer peer identity the channel should go to |
231 | * @param port Port number. | 241 | * @param port Port number. |
232 | * @param nobuffer Flag for disabling buffering on relay nodes. | 242 | * @param options MeshOption flag field, with all desired option bits set to 1. |
233 | * @param reliable Flag for end-to-end reliability. | 243 | * |
234 | * @return handle to the channel | 244 | * @return handle to the channel |
235 | */ | 245 | */ |
236 | struct GNUNET_MESH_Channel * | 246 | struct GNUNET_MESH_Channel * |
@@ -238,8 +248,7 @@ GNUNET_MESH_channel_create (struct GNUNET_MESH_Handle *h, | |||
238 | void *channel_ctx, | 248 | void *channel_ctx, |
239 | const struct GNUNET_PeerIdentity *peer, | 249 | const struct GNUNET_PeerIdentity *peer, |
240 | uint32_t port, | 250 | uint32_t port, |
241 | int nobuffer, | 251 | enum MeshOption options); |
242 | int reliable); | ||
243 | 252 | ||
244 | 253 | ||
245 | /** | 254 | /** |