RPS: Forgot to add header
[oweals/gnunet.git] / src / include / gnunet_transport_monitor_service.h
index c91c6a8c9f1199340b61cf6e9b2ba9ceff9f6ffc..f83fa7e9f739d834ef9e63e60c8abec313ce8dcd 100644 (file)
@@ -3,7 +3,7 @@
      Copyright (C) 2009-2016 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
+     under the terms of the GNU Affero General Public License as published
      by the Free Software Foundation, either version 3 of the License,
      or (at your option) any later version.
 
      WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      Affero General Public License for more details.
+
+     You should have received a copy of the GNU Affero General Public License
+     along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+     SPDX-License-Identifier: AGPL3.0-or-later
 */
 
 /**
@@ -26,7 +31,6 @@
  *
  * @{
  */
-
 #ifndef GNUNET_TRANSPORT_MONITOR_SERVICE_H
 #define GNUNET_TRANSPORT_MONITOR_SERVICE_H
 
@@ -39,6 +43,9 @@ extern "C"
 #endif
 
 #include "gnunet_util_lib.h"
+#include "gnunet_ats_transport_service.h"
+#include "gnunet_transport_communication_service.h"
+
 
 /**
  * Version number of the transport API.
@@ -60,13 +67,12 @@ struct GNUNET_TRANSPORT_MonitorInformation
   /**
    * Network type of the address.
    */
-  enum GNUNET_ATS_Network_Type nt;
+  enum GNUNET_NetworkType nt;
 
   /**
-   * #GNUNET_YES if this is an inbound connection (communicator initiated)
-   * #GNUNET_NO if this is an outbound connection (transport initiated)
+   * Connection status.
    */
-  int is_inbound;
+  enum GNUNET_TRANSPORT_ConnectionStatus cs;
 
   /**
    * Number of messages pending transmission for this @e address.
@@ -118,7 +124,7 @@ struct GNUNET_TRANSPORT_MonitorInformation
  * @param mi monitoring data on the peer
  */
 typedef void
-(*GNUNET_TRANSPORT_MontiorCallback) (void *cls,
+(*GNUNET_TRANSPORT_MonitorCallback) (void *cls,
                                      const struct GNUNET_PeerIdentity *peer,
                                      const struct GNUNET_TRANSPORT_MonitorInformation *mi);
 
@@ -152,24 +158,24 @@ struct GNUNET_TRANSPORT_MonitorContext;
  *      NULL for all peers
  * @param one_shot #GNUNET_YES to return the current state and then end (with NULL+NULL),
  *                 #GNUNET_NO to monitor peers continuously
- * @param mc function to call with the results
- * @param mc_cls closure for @a mc
+ * @param cb function to call with the results
+ * @param cb_cls closure for @a mc
  */
 struct GNUNET_TRANSPORT_MonitorContext *
 GNUNET_TRANSPORT_monitor (const struct GNUNET_CONFIGURATION_Handle *cfg,
                           const struct GNUNET_PeerIdentity *peer,
                           int one_shot,
-                          GNUNET_TRANSPORT_MonitorCallback mc,
-                          void *mc_cls);
+                          GNUNET_TRANSPORT_MonitorCallback cb,
+                          void *cb_cls);
 
 
 /**
  * Cancel request to monitor peers
  *
- * @param pmc handle for the request to cancel
+ * @param mc handle for the request to cancel
  */
 void
-GNUNET_TRANSPORT_monitor_cancel (struct GNUNET_TRANSPORT_MonitorContext *pmc);
+GNUNET_TRANSPORT_monitor_cancel (struct GNUNET_TRANSPORT_MonitorContext *mc);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */