summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-09-02 14:44:08 +0000
committerChristian Grothoff <christian@grothoff.org>2011-09-02 14:44:08 +0000
commit012cb16a93acbfca1119966d5b4679b99e5c9125 (patch)
treed12a4111e7d3211ab2cbaec9c5b2ff05db158e43
parent1fe8e2a61d233d3a30ddc4e0a568ab91ce24c7f9 (diff)
breaking stuff
-rw-r--r--src/include/gnunet_common.h5
-rw-r--r--src/include/gnunet_connection_lib.h4
-rw-r--r--src/include/gnunet_mesh_service_new.h25
-rw-r--r--src/include/gnunet_resolver_service.h2
4 files changed, 29 insertions, 7 deletions
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index b8a667524..f4844821c 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -428,7 +428,7 @@ GNUNET_htonll (unsigned long long n);
* @param length of the string to duplicate
* @return a partial copy of the string including zero-termination
*/
-#define GNUNET_strndup(a,b) GNUNET_xstrndup_(a,b,__FILE__,__LINE__)
+#define GNUNET_strndup(a,length) GNUNET_xstrndup_(a,length,__FILE__,__LINE__)
/**
* Grow a well-typed (!) array. This is a convenience
@@ -577,8 +577,9 @@ GNUNET_xstrdup_ (const char *str, const char *filename, int linenumber);
/**
* Dup partially a string. Don't call GNUNET_xstrndup_ directly. Use the GNUNET_strndup macro.
+ *
* @param str string to duplicate
- * @param len lenght of the string to duplicate
+ * @param len length of the string to duplicate
* @param filename where is this call being made (for debugging)
* @param linenumber line where this call is being made (for debugging)
* @return the duplicated string
diff --git a/src/include/gnunet_connection_lib.h b/src/include/gnunet_connection_lib.h
index 7ee3c109d..3e48d32ea 100644
--- a/src/include/gnunet_connection_lib.h
+++ b/src/include/gnunet_connection_lib.h
@@ -341,12 +341,12 @@ GNUNET_CONNECTION_notify_transmit_ready (struct GNUNET_CONNECTION_Handle *sock,
* Cancel the specified transmission-ready
* notification.
*
- * @param h handle for notification to cancel
+ * @param th handle for notification to cancel
*/
void
GNUNET_CONNECTION_notify_transmit_ready_cancel (struct
GNUNET_CONNECTION_TransmitHandle
- *h);
+ *th);
/**
diff --git a/src/include/gnunet_mesh_service_new.h b/src/include/gnunet_mesh_service_new.h
index b9447fe09..4729ae60d 100644
--- a/src/include/gnunet_mesh_service_new.h
+++ b/src/include/gnunet_mesh_service_new.h
@@ -56,8 +56,7 @@ struct GNUNET_MESH_Tunnel;
/**
* Functions with this signature are called whenever a message is
- * received or transmitted.
- * FIXME: transmitted???
+ * received.
*
* @param cls closure (set from GNUNET_MESH_connect)
* @param tunnel connection to the other end
@@ -127,6 +126,26 @@ typedef uint32_t GNUNET_MESH_ApplicationType;
/**
+ * Method called whenever another peer has added us to a tunnel
+ * the other peer initiated.
+ *
+ * @param cls closure
+ * @param tunnel new handle to the tunnel
+ * @param initiator peer that started the tunnel
+ * @param atsi performance information for the tunnel
+ * @return initial tunnel context for the tunnel (can be NULL -- that's not an error)
+ */
+typedef void* (*GNUNET_MESH_InboundTunnelNotificationHandler) (void *cls,
+ struct GNUNET_MESH_Tunnel * tunnel,
+ const struct
+ GNUNET_PeerIdentity *
+ initiator,
+ const struct
+ GNUNET_TRANSPORT_ATS_Information *
+ atsi);
+
+
+/**
* Connect to the mesh service.
*
* @param cfg configuration to use
@@ -194,12 +213,14 @@ typedef void (*GNUNET_MESH_TunnelConnectHandler) (void *cls,
* and to broadcast).
*
* @param h mesh handle
+ * @param tunnel_ctx client's tunnel context to associate with the tunnel
* @param connect_handler function to call when peers are actually connected
* @param disconnect_handler function to call when peers are disconnected
* @param handler_cls closure for connect/disconnect handlers
*/
struct GNUNET_MESH_Tunnel *
GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle *h,
+ void *tunnel_ctx,
GNUNET_MESH_TunnelConnectHandler connect_handler,
GNUNET_MESH_TunnelDisconnectHandler
disconnect_handler, void *handler_cls);
diff --git a/src/include/gnunet_resolver_service.h b/src/include/gnunet_resolver_service.h
index e55a014e6..ca6544e94 100644
--- a/src/include/gnunet_resolver_service.h
+++ b/src/include/gnunet_resolver_service.h
@@ -64,7 +64,7 @@ struct GNUNET_RESOLVER_RequestHandle;
* @param cfg configuration to use
*/
void
-GNUNET_RESOLVER_connect (const struct GNUNET_CONFIGURATION_Handle *c);
+GNUNET_RESOLVER_connect (const struct GNUNET_CONFIGURATION_Handle *cfg);
/**