-doxygen
[oweals/gnunet.git] / src / transport / transport_api.c
index a1c325e7a5896f721a6b01602ec3e43a38c744ec..327827113d0600166046308525fe27861515e41c 100644 (file)
@@ -481,7 +481,7 @@ neighbour_delete (void *cls,
 /**
  * Function we use for handling incoming messages.
  *
- * @param cls closure (struct GNUNET_TRANSPORT_Handle *)
+ * @param cls closure, a `struct GNUNET_TRANSPORT_Handle *`
  * @param msg message received, NULL on timeout or fatal error
  */
 static void
@@ -714,9 +714,9 @@ timeout_request_due_to_congestion (void *cls,
  * Transmit message(s) to service.
  *
  * @param cls handle to transport
- * @param size number of bytes available in buf
+ * @param size number of bytes available in @a buf
  * @param buf where to copy the message
- * @return number of bytes copied to buf
+ * @return number of bytes copied to @a buf
  */
 static size_t
 transport_notify_ready (void *cls, size_t size, void *buf)
@@ -746,7 +746,8 @@ transport_notify_ready (void *cls, size_t size, void *buf)
   {
     GNUNET_CONTAINER_DLL_remove (h->control_head, h->control_tail, th);
     nret = th->notify (th->notify_cls, size, &cbuf[ret]);
-    LOG (GNUNET_ERROR_TYPE_DEBUG, "Added %u bytes of control message at %u\n",
+    LOG (GNUNET_ERROR_TYPE_DEBUG,
+         "Added %u bytes of control message at %u\n",
          nret, ret);
     GNUNET_free (th);
     ret += nret;
@@ -913,7 +914,7 @@ schedule_transmission (struct GNUNET_TRANSPORT_Handle *h)
  * @param h handle to the transport service
  * @param size number of bytes to be transmitted
  * @param notify function to call to get the content
- * @param notify_cls closure for notify
+ * @param notify_cls closure for @a notify
  * @return a `struct GNUNET_TRANSPORT_TransmitHandle`
  */
 static struct GNUNET_TRANSPORT_TransmitHandle *
@@ -940,9 +941,9 @@ schedule_control_transmit (struct GNUNET_TRANSPORT_Handle *h, size_t size,
  * Transmit START message to service.
  *
  * @param cls unused
- * @param size number of bytes available in buf
+ * @param size number of bytes available in @a buf
  * @param buf where to copy the message
- * @return number of bytes copied to buf
+ * @return number of bytes copied to @a buf
  */
 static size_t
 send_start (void *cls, size_t size, void *buf)
@@ -1031,7 +1032,8 @@ disconnect_and_schedule_reconnect (struct GNUNET_TRANSPORT_Handle *h)
     h->client = NULL;
   }
   /* Forget about all neighbours that we used to be connected to */
-  GNUNET_CONTAINER_multipeermap_iterate (h->neighbours, &neighbour_delete, h);
+  GNUNET_CONTAINER_multipeermap_iterate (h->neighbours,
+                                         &neighbour_delete, h);
   if (h->quota_task != GNUNET_SCHEDULER_NO_TASK)
   {
     GNUNET_SCHEDULER_cancel (h->quota_task);
@@ -1374,9 +1376,16 @@ GNUNET_TRANSPORT_offer_hello_cancel (struct GNUNET_TRANSPORT_OfferHelloHandle *o
 }
 
 
+/**
+ * Checks if a given peer is connected to us
+ *
+ * @param handle connection to transport service
+ * @param peer the peer to check
+ * @return #GNUNET_YES (connected) or #GNUNET_NO (disconnected)
+ */
 int
-GNUNET_TRANSPORT_check_neighbour_connected (struct GNUNET_TRANSPORT_Handle *handle,
-                                           const struct GNUNET_PeerIdentity *peer)
+GNUNET_TRANSPORT_check_peer_connected (struct GNUNET_TRANSPORT_Handle *handle,
+                                       const struct GNUNET_PeerIdentity *peer)
 {
   if (GNUNET_YES ==
       GNUNET_CONTAINER_multipeermap_contains (handle->neighbours,
@@ -1389,7 +1398,7 @@ GNUNET_TRANSPORT_check_neighbour_connected (struct GNUNET_TRANSPORT_Handle *hand
 /**
  * Task to call the HelloUpdateCallback of the GetHelloHandle
  *
- * @param cls the GetHelloHandle
+ * @param cls the `struct GNUNET_TRANSPORT_GetHelloHandle`
  * @param tc the scheduler task context
  */
 static void