extend API to enalbe exclusive port ranges to be specified for testing-system objects
[oweals/gnunet.git] / src / include / gnunet_transport_service.h
index 24fa124f05193d9459aeb5d6891b5270c666bda1..564b8da248c00810532205749b5bd398324a5b36 100644 (file)
@@ -109,7 +109,7 @@ typedef void (*GNUNET_TRANSPORT_NotifyDisconnect) (void *cls,
  *        otherwise 0-terminated printable UTF-8 string
  */
 typedef void (*GNUNET_TRANSPORT_AddressToStringCallback) (void *cls,
-                                                        const char *address);
+                                                          const char *address);
 
 
 /**
@@ -120,8 +120,12 @@ typedef void (*GNUNET_TRANSPORT_AddressToStringCallback) (void *cls,
  * @param address address, NULL for disconnect notification in monitor mode
  */
 typedef void (*GNUNET_TRANSPORT_PeerIterateCallback) (void *cls,
-                                                     const struct GNUNET_PeerIdentity *peer,
-                                                     const struct GNUNET_HELLO_Address *address);
+                                                      const struct
+                                                      GNUNET_PeerIdentity *
+                                                      peer,
+                                                      const struct
+                                                      GNUNET_HELLO_Address *
+                                                      address);
 
 
 /**
@@ -281,22 +285,21 @@ struct GNUNET_TRANSPORT_AddressToStringContext;
  *
  * @param cfg configuration to use
  * @param address address to convert (binary format)
- * @param addressLen number of bytes in address
  * @param numeric should (IP) addresses be displayed in numeric form
  *                (otherwise do reverse DNS lookup)
- * @param nameTrans name of the transport to which the address belongs
  * @param timeout how long is the lookup allowed to take at most
  * @param aluc function to call with the results
  * @param aluc_cls closure for aluc
  * @return handle to cancel the operation, NULL on error
  */
 struct GNUNET_TRANSPORT_AddressToStringContext *
-GNUNET_TRANSPORT_address_to_string (const struct GNUNET_CONFIGURATION_Handle *cfg,
-                                 const struct GNUNET_HELLO_Address *address,
-                                 int numeric,
-                                 struct GNUNET_TIME_Relative timeout,
-                                 GNUNET_TRANSPORT_AddressToStringCallback aluc,
-                                 void *aluc_cls);
+GNUNET_TRANSPORT_address_to_string (const struct GNUNET_CONFIGURATION_Handle
+                                    *cfg,
+                                    const struct GNUNET_HELLO_Address *address,
+                                    int numeric,
+                                    struct GNUNET_TIME_Relative timeout,
+                                    GNUNET_TRANSPORT_AddressToStringCallback
+                                    aluc, void *aluc_cls);
 
 
 /**
@@ -306,13 +309,13 @@ GNUNET_TRANSPORT_address_to_string (const struct GNUNET_CONFIGURATION_Handle *cf
  */
 void
 GNUNET_TRANSPORT_address_to_string_cancel (struct
-                                        GNUNET_TRANSPORT_AddressToStringContext
-                                        *alc);
+                                           GNUNET_TRANSPORT_AddressToStringContext
+                                           *alc);
 
 
 /**
  * Return all the known addresses for a specific peer or all peers.
- * Returns continously all address if one_shot is set to GNUNET_NO
+ * Returns continuously all address if one_shot is set to GNUNET_NO
  *
  * CHANGE: Returns the address(es) that we are currently using for this
  * peer.  Upon completion, the 'AddressLookUpCallback' is called one more
@@ -328,12 +331,14 @@ GNUNET_TRANSPORT_address_to_string_cancel (struct
  * @param peer_address_callback_cls closure for peer_address_callback
  */
 struct GNUNET_TRANSPORT_PeerIterateContext *
-GNUNET_TRANSPORT_peer_get_active_addresses (const struct GNUNET_CONFIGURATION_Handle *cfg,
-                                      const struct GNUNET_PeerIdentity *peer,
-                                     int one_shot,
-                                      struct GNUNET_TIME_Relative timeout,
-                                      GNUNET_TRANSPORT_PeerIterateCallback peer_address_callback,
-                                      void *peer_address_callback_cls);
+GNUNET_TRANSPORT_peer_get_active_addresses (const struct
+                                            GNUNET_CONFIGURATION_Handle *cfg,
+                                            const struct GNUNET_PeerIdentity
+                                            *peer, int one_shot,
+                                            struct GNUNET_TIME_Relative timeout,
+                                            GNUNET_TRANSPORT_PeerIterateCallback
+                                            peer_address_callback,
+                                            void *peer_address_callback_cls);
 
 
 /**
@@ -343,8 +348,8 @@ GNUNET_TRANSPORT_peer_get_active_addresses (const struct GNUNET_CONFIGURATION_Ha
  */
 void
 GNUNET_TRANSPORT_peer_get_active_addresses_cancel (struct
-                                             GNUNET_TRANSPORT_PeerIterateContext
-*alc);
+                                                   GNUNET_TRANSPORT_PeerIterateContext
+                                                   *alc);
 
 
 /**
@@ -358,7 +363,7 @@ struct GNUNET_TRANSPORT_Blacklist;
  *
  * @param cls closure
  * @param pid peer to approve or disapproave
- * @return GNUNET_OK if the connection is allowed
+ * @return GNUNET_OK if the connection is allowed, GNUNET_SYSERR if not
  */
 typedef int (*GNUNET_TRANSPORT_BlacklistCallback) (void *cls,
                                                    const struct