[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r31800 - gnunet/src/include
From: |
gnunet |
Subject: |
[GNUnet-SVN] r31800 - gnunet/src/include |
Date: |
Mon, 6 Jan 2014 06:22:01 +0100 |
Author: bartpolot
Date: 2014-01-06 06:22:01 +0100 (Mon, 06 Jan 2014)
New Revision: 31800
Modified:
gnunet/src/include/gnunet_mesh_service.h
gnunet/src/include/gnunet_protocols.h
Log:
- missing headers, removed message types
Modified: gnunet/src/include/gnunet_mesh_service.h
===================================================================
--- gnunet/src/include/gnunet_mesh_service.h 2014-01-06 05:18:30 UTC (rev
31799)
+++ gnunet/src/include/gnunet_mesh_service.h 2014-01-06 05:22:01 UTC (rev
31800)
@@ -393,13 +393,24 @@
/**
- * Method called to retrieve information about all tunnels in MESH.
+ * Method called to retrieve information about all tunnels in MESH, called
+ * once per tunnel.
*
+ * After last tunnel has been reported, an additional call with NULL is done.
+ *
* @param cls Closure.
- * @param peer Peer in the channel's tree.
+ * @param peer Destination peer, or NULL on "EOF".
+ * @param channels Number of channels.
+ * @param connections Number of connections.
+ * @param estate Encryption state.
+ * @param cstate Connectivity state.
*/
typedef void (*GNUNET_MESH_TunnelsCB) (void *cls,
- const struct GNUNET_PeerIdentity *peer);
+ const struct GNUNET_PeerIdentity *peer,
+ unsigned int channels,
+ unsigned int connections,
+ uint16_t estate,
+ uint16_t cstate);
@@ -408,15 +419,18 @@
* has established, o`r is trying to establish.
*
* @param cls Closure.
- * @param peer Peer in the channel's tree.
+ * @param peer Peer towards whom the tunnel is directed.
+ * @param channels Number of channels.
+ * @param connections Number of connections.
+ * @param estate Encryption state.
+ * @param cstate Connectivity state.
*/
typedef void (*GNUNET_MESH_TunnelCB) (void *cls,
const struct GNUNET_PeerIdentity *peer,
unsigned int channels,
unsigned int connections,
- unsigned int estatus,
- unsigned int cstatus
- );
+ unsigned int estate,
+ unsigned int cstate);
/**
@@ -436,8 +450,8 @@
*/
void
GNUNET_MESH_get_channels (struct GNUNET_MESH_Handle *h,
- GNUNET_MESH_ChannelsCB callback,
- void *callback_cls);
+ GNUNET_MESH_ChannelsCB callback,
+ void *callback_cls);
/**
@@ -446,14 +460,14 @@
* WARNING: unstable API, likely to change in the future!
*
* @param h Handle to the mesh peer.
- * @param initiator ID of the owner of the channel.
+ * @param peer ID of the other end of the channel.
* @param channel_number Channel number.
* @param callback Function to call with the requested data.
* @param callback_cls Closure for @c callback.
*/
void
-GNUNET_MESH_show_channel (struct GNUNET_MESH_Handle *h,
- struct GNUNET_PeerIdentity *initiator,
+GNUNET_MESH_get_channel (struct GNUNET_MESH_Handle *h,
+ struct GNUNET_PeerIdentity *peer,
uint32_t channel_number,
GNUNET_MESH_ChannelCB callback,
void *callback_cls);
@@ -473,6 +487,57 @@
/**
+ * Request information about the running mesh peer.
+ * The callback will be called for every channel known to the service,
+ * listing all active peers that blong to the channel.
+ *
+ * If called again on the same handle, it will overwrite the previous
+ * callback and cls. To retrieve the cls, monitor_cancel must be
+ * called first.
+ *
+ * WARNING: unstable API, likely to change in the future!
+ *
+ * @param h Handle to the mesh peer.
+ * @param callback Function to call with the requested data.
+ * @param callback_cls Closure for @c callback.
+ */
+void
+GNUNET_MESH_get_tunnels (struct GNUNET_MESH_Handle *h,
+ GNUNET_MESH_TunnelsCB callback,
+ void *callback_cls);
+
+/**
+ * Cancel a monitor request. The monitor callback will not be called.
+ *
+ * @param h Mesh handle.
+ *
+ * @return Closure given to GNUNET_MESH_monitor, if any.
+ */
+void *
+GNUNET_MESH_get_tunnels_cancel (struct GNUNET_MESH_Handle *h);
+
+/**
+ * Request information about the running mesh peer.
+ * The callback will be called for every channel known to the service,
+ * listing all active peers that blong to the channel.
+ *
+ * If called again on the same handle, it will overwrite the previous
+ * callback and cls. To retrieve the cls, monitor_cancel must be
+ * called first.
+ *
+ * WARNING: unstable API, likely to change in the future!
+ *
+ * @param h Handle to the mesh peer.
+ * @param callback Function to call with the requested data.
+ * @param callback_cls Closure for @c callback.
+ */
+void
+GNUNET_MESH_get_tunnel (struct GNUNET_MESH_Handle *h,
+ const struct GNUNET_PeerIdentity *id,
+ GNUNET_MESH_TunnelCB callback,
+ void *callback_cls);
+
+/**
* Create a message queue for a mesh channel.
* The message queue can only be used to transmit messages,
* not to receive them.
Modified: gnunet/src/include/gnunet_protocols.h
===================================================================
--- gnunet/src/include/gnunet_protocols.h 2014-01-06 05:18:30 UTC (rev
31799)
+++ gnunet/src/include/gnunet_protocols.h 2014-01-06 05:22:01 UTC (rev
31800)
@@ -894,11 +894,6 @@
#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_ACK 286
/**
- * Local NACK for rejected channels.
- */
-#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_NACK 287
-
-/**
* Local information about all channels of service.
*/
#define GNUNET_MESSAGE_TYPE_MESH_LOCAL_INFO_CHANNELS 290
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r31800 - gnunet/src/include,
gnunet <=