- fix coverity
[oweals/gnunet.git] / src / cadet / gnunet-service-cadet_connection.h
index b7253653399d5bedbe4d77179f74ea22bd960b2b..261dd106708aa3d9b084e563c2d1b3e6afbedd15 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     Copyright (C) 2013 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2013 GNUnet e.V.
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -92,6 +92,12 @@ struct CadetConnectionQueue;
 #include "gnunet-service-cadet_peer.h"
 
 
+/**
+ * Check invariants for all connections using #check_neighbours().
+ */
+void
+GCC_check_connections ();
+
 
 /**
  * Callback called when a queued message is sent.
@@ -102,10 +108,14 @@ struct CadetConnectionQueue;
  * @param fwd Was this a FWD going message?
  * @param size Size of the message.
  */
-typedef void (*GCC_sent) (void *cls,
-                          struct CadetConnection *c,
-                          struct CadetConnectionQueue *q,
-                          uint16_t type, int fwd, size_t size);
+typedef void
+(*GCC_sent) (void *cls,
+             struct CadetConnection *c,
+             struct CadetConnectionQueue *q,
+             uint16_t type,
+             int fwd,
+             size_t size);
+
 
 /**
  * Core handler for connection creation.
@@ -113,37 +123,38 @@ typedef void (*GCC_sent) (void *cls,
  * @param cls Closure (unused).
  * @param peer Sender (neighbor).
  * @param message Message.
- *
- * @return GNUNET_OK to keep the connection open,
- *         GNUNET_SYSERR to close it (signal serious error)
+ * @return #GNUNET_OK to keep the connection open,
+ *         #GNUNET_SYSERR to close it (signal serious error)
  */
 int
-GCC_handle_create (void *cls, const struct GNUNET_PeerIdentity *peer,
+GCC_handle_create (void *cls,
+                   const struct GNUNET_PeerIdentity *peer,
                    const struct GNUNET_MessageHeader *message);
 
+
 /**
  * Core handler for path confirmations.
  *
  * @param cls closure
  * @param message message
  * @param peer peer identity this notification is about
- *
- * @return GNUNET_OK to keep the connection open,
- *         GNUNET_SYSERR to close it (signal serious error)
+ * @return #GNUNET_OK to keep the connection open,
+ *         #GNUNET_SYSERR to close it (signal serious error)
  */
 int
-GCC_handle_confirm (void *cls, const struct GNUNET_PeerIdentity *peer,
+GCC_handle_confirm (void *cls,
+                    const struct GNUNET_PeerIdentity *peer,
                     const struct GNUNET_MessageHeader *message);
 
+
 /**
  * Core handler for notifications of broken paths
  *
  * @param cls Closure (unused).
  * @param id Peer identity of sending neighbor.
  * @param message Message.
- *
- * @return GNUNET_OK to keep the connection open,
- *         GNUNET_SYSERR to close it (signal serious error)
+ * @return #GNUNET_OK to keep the connection open,
+ *         #GNUNET_SYSERR to close it (signal serious error)
  */
 int
 GCC_handle_broken (void* cls,
@@ -449,8 +460,7 @@ GCC_bck_keepalive (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
  * @param peer Peer that disconnected.
  */
 void
-GCC_notify_broken (struct CadetConnection *c,
-                   struct CadetPeer *peer);
+GCC_neighbor_disconnected (struct CadetConnection *c, struct CadetPeer *peer);
 
 /**
  * Is this peer the first one on the connection?