- fix disconnect task scheduling
[oweals/gnunet.git] / src / mesh / gnunet-service-mesh_local.h
index 6b126a2f777cec2eb674951c3c69c2bcbe61ba17..c5a0b367c055961eac19d64cbf2b0521828921ca 100644 (file)
@@ -40,13 +40,13 @@ extern "C"
 #include "platform.h"
 #include "gnunet_util_lib.h"
 
-#include "gnunet-service-mesh_channel.h"
-
 /**
  * Struct containing information about a client of the service
  */
 struct MeshClient;
 
+#include "gnunet-service-mesh_channel.h"
+
 /******************************************************************************/
 /********************************    API    ***********************************/
 /******************************************************************************/
@@ -72,15 +72,15 @@ void
 GML_shutdown (void);
 
 /**
- * Get a chennel from a client
+ * Get a channel from a client.
  *
- * @param client the client to check
- * @param chid Channel ID
+ * @param c Client to check.
+ * @param chid Channel ID, must be local (> 0x800...).
  *
- * @return non-NULL if channel exists in the global DLL
+ * @return non-NULL if channel exists in the clients lists
  */
 struct MeshChannel *
-GML_channel_get (struct MeshClient *client, uint32_t chid);
+GML_channel_get (struct MeshClient *c, uint32_t chid);
 
 /**
  * Add a channel to a client
@@ -162,13 +162,26 @@ GML_send_ack (struct MeshClient *c, MESH_ChannelNumber id);
 /**
  * Notify the appropriate client that a new incoming channel was created.
  *
- * @param ch Channel that was created.
+ * @param c Client to notify.
+ * @param id Channel ID.
+ * @param port Channel's destination port.
+ * @param opt Options (bit array).
+ * @param peer Origin peer.
  */
 void
 GML_send_channel_create (struct MeshClient *c,
                          uint32_t id, uint32_t port, uint32_t opt,
                          const struct GNUNET_PeerIdentity *peer);
 
+/**
+ * Build a local channel NACK message and send it to a local client.
+ *
+ * @param c Client to whom send the NACK.
+ * @param id Channel ID to use
+ */
+void
+GML_send_channel_nack (struct MeshClient *c, MESH_ChannelNumber id);
+
 /**
  * Notify a client that a channel is no longer valid.
  *
@@ -210,4 +223,4 @@ GML_2s (const struct MeshClient *c);
 
 /* ifndef GNUNET_MESH_SERVICE_LOCAL_H */
 #endif
-/* end of gnunet-mesh-service_LOCAL.h */
\ No newline at end of file
+/* end of gnunet-mesh-service_LOCAL.h */