controller link as operation
[oweals/gnunet.git] / src / include / gnunet_transport_plugin.h
index 1e46c92f8c65648aa88536fd27669eeda6db4e57..fb0271a8ff055553a3aae7342254f7e2d50d4b21 100644 (file)
  * useful since sometimes (i.e. for inbound TCP connections) a
  * connection may not have an address that can be used for meaningful
  * distinction between sessions to the same peer.
+ *
+ * Each 'struct Session' MUST start with the 'struct GNUNET_PeerIdentity'
+ * of the peer the session is for (which will be used for some error
+ * checking by the ATS code).
  */
 struct Session;
 
@@ -136,7 +140,7 @@ typedef struct
  * @param addrlen length of the address
  * @return ATS Information containing the network type
  */
-typedef const struct GNUNET_ATS_Information
+typedef struct GNUNET_ATS_Information
 (*GNUNET_TRANSPORT_AddressToType) (void *cls,
                                    const struct sockaddr *addr,
                                    size_t addrlen);
@@ -313,11 +317,12 @@ typedef void (*GNUNET_TRANSPORT_TransmitContinuation) (void *cls,
  *         and does NOT mean that the message was not transmitted (DV)
  */
 typedef ssize_t (*GNUNET_TRANSPORT_TransmitFunction) (void *cls,
-    struct Session *session,
-    const char *msgbuf, size_t msgbuf_size,
-    unsigned int priority,
-    struct GNUNET_TIME_Relative to,
-    GNUNET_TRANSPORT_TransmitContinuation cont, void *cont_cls);
+                                                     struct Session *session,
+                                                     const char *msgbuf, size_t msgbuf_size,
+                                                     unsigned int priority,
+                                                     struct GNUNET_TIME_Relative to,
+                                                     GNUNET_TRANSPORT_TransmitContinuation cont,
+                                                     void *cont_cls);
 
 
 /**