* 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;
* @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);
* @param addr one of the addresses of the host
* the specific address format depends on the transport
* @param addrlen length of the address
+ * @param dest_plugin plugin to use this address with
*/
typedef void (*GNUNET_TRANSPORT_AddressNotification) (void *cls, int add_remove,
const void *addr,
- size_t addrlen);
+ size_t addrlen,
+ const char *dest_plugin);
/**
/**
* Function that returns a HELLO message.
*/
-typedef const struct GNUNET_MessageHeader
- *(*GNUNET_TRANSPORT_GetHelloCallback) (void);
+typedef const struct GNUNET_MessageHeader *
+ (*GNUNET_TRANSPORT_GetHelloCallback) (void);
/**
* 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);
/**
*
* @param cls closure ('struct Plugin*')
* @param addr string address
- * @param addrlen length of the address
- * @param buf location to store a buffer pointer
- * If the function returns GNUNET_SYSERR, its contents are undefined.
- * @param max size of the buffer
- * @param buf_len location to store buffer size.
+ * @param addrlen length of the address including \0 termination
+ * @param buf location to store the buffer
* If the function returns GNUNET_SYSERR, its contents are undefined.
+ * @param added length of created address
* @return GNUNET_OK on success, GNUNET_SYSERR on failure
*/
typedef int (*GNUNET_TRANSPORT_StringToAddress) (void *cls,