0.9.0pre3:
-* connections fail if transport-plugin/nat produces
- some addresses that don't work (enable 'use_localaddr' with bindto for example,
- so that some of the 'local' IPs do not work due to the bindto); the result
- seems to be that the plugin tries some of the broken addresses, fails and the
- transport-level connection never comes up.
- [still an issue?]
-* transport:
- - explicit CONNECT: add timestamp
- - explicit DISCONNECT: add signature
-* clean buildbots
+* clean buildbots (with new transport)
0.9.0pre4:
* GNUNET-GTK: [CG]
+ insert
+ download
+ search
+* transport:
+ - explicit DISCONNECT: add signature, create message...
+ - CONNECT: actually consider switching session...
0.9.0:
* new webpage:
/**
* Resolve our hostname to an IP address.
*
- * @param cfg configuration to use
* @param domain AF_INET or AF_INET6; use AF_UNSPEC for "any"
* @param callback function to call with addresses
* @param cls closure for callback
/**
* Perform a reverse DNS lookup.
*
- * @param cfg configuration to use
* @param sa host address
* @param salen length of host address
* @param do_resolve use GNUNET_NO to return numeric hostname
* @param timeout how long to wait for process for shutdown to complete
* @param cb function called once the daemon was stopped
* @param cb_cls closure for cb
- * @param allow_restart GNUNET_YES to restart peer later (using this API)
- * GNUNET_NO to kill off and clean up for good
*/
void
GNUNET_TESTING_daemon_stop_service (struct GNUNET_TESTING_Daemon *d,
* @param cls closure
* @param first peer id for first daemon
* @param second peer id for the second daemon
- * @param distance distance between the connected peers
* @param emsg error message (NULL on success)
*/
void
case GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_CONNECT:
(void) GST_blacklist_test_allowed (peer, NULL, &try_connect_if_allowed,
NULL);
- /* TODO: if 'session != NULL', maybe notify ATS that this is now the preferred
+ /* TODO: if 'session != NULL', and timestamp more recent than the
+ previous one, maybe notify ATS that this is now the preferred
* way to communicate with this peer (other peer switched transport) */
break;
case GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_DISCONNECT:
* blacklisting client.
*
* @param cls the 'struct TestConnectionContest'
- * @param pid neighbour's identity
+ * @param neighbour neighbour's identity
* @param ats performance data
* @param ats_count number of entries in ats (excluding 0-termination)
*/
/**
* Queue the given message for transmission to the given client
*
- * @param client target of the message
+ * @param tc target of the message
* @param msg message to transmit
* @param may_drop GNUNET_YES if the message can be dropped
*/
*/
struct NeighbourMapEntry;
+/**
+ * Message a peer sends to another to indicate its
+ * preference for communicating via a particular
+ * session (and the desire to establish a real
+ * connection).
+ */
+struct SessionConnectMessage
+{
+ /**
+ * Header of type 'GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_CONNECT'
+ */
+ struct GNUNET_MessageHeader header;
+
+ /**
+ * Always zero.
+ */
+ uint32_t reserved GNUNET_PACKED;
+
+ /**
+ * Absolute time at the sender. Only the most recent connect
+ * message implies which session is preferred by the sender.
+ */
+ struct GNUNET_TIME_AbsoluteNBO timestamp;
+
+};
+
/**
* For each neighbour we keep a list of messages
* Check the ready list for the given neighbour and if a plugin is
* ready for transmission (and if we have a message), do so!
*
- * @param neighbour target peer for which to transmit
+ * @param n target peer for which to transmit
*/
static void
try_transmission_to_peer (struct NeighbourMapEntry *n)
*ats, uint32_t ats_count)
{
struct NeighbourMapEntry *n;
- struct GNUNET_MessageHeader connect_msg;
+ struct SessionConnectMessage connect_msg;
GNUNET_assert (neighbours != NULL);
n->timeout_task =
GNUNET_SCHEDULER_add_delayed (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT,
&neighbour_timeout_task, n);
- connect_msg.size = htons (sizeof (struct GNUNET_MessageHeader));
- connect_msg.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_CONNECT);
+ connect_msg.header.size = htons (sizeof (struct SessionConnectMessage));
+ connect_msg.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_CONNECT);
+ connect_msg.reserved = htonl (0);
+ connect_msg.timestamp = GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ());
GST_neighbours_send (peer, &connect_msg, sizeof (connect_msg),
GNUNET_TIME_UNIT_FOREVER_REL, NULL, NULL);
}
* @param plugin_name name of the plugin
* @param plugin_address binary address
* @param plugin_address_len length of address
+ * @param session session to use
* @param bandwidth available bandwidth
* @param ats performance data for the address (as far as known)
* @param ats_count number of performance records in 'ats'
*
* @param recv_cb function to call when data is received
* @param address_cb function to call when our public addresses changed
- * @param traffic_cb function to call for flow control
* @param session_end_cb function to call when a session was terminated
*/
void
* @param public_key public key of the peer, NULL for unknown
* @param neighbour which peer we care about
* @param tname name of the transport plugin
- * @param session session to look for, NULL for 'any'; otherwise
- * can be used for the service to "learn" this session ID
- * if 'addr' matches
* @param addr binary address
* @param addrlen length of addr
* @return validation entry matching the given specifications, NULL
* @param cls unused
* @param peer id of the peer, NULL for last call
* @param hello hello message for the peer (can be NULL)
- * @param error message
+ * @param err_msg error message
*/
static void
process_peerinfo_hello (void *cls, const struct GNUNET_PeerIdentity *peer,
* Can either give a snapshot (synchronous API) or be continuous.
*
* @param target peer information is requested for
- * @param snapshot_only GNUNET_YES to iterate over addresses once, GNUNET_NO to
- * continue to give information about addresses as it evolves
* @param cb function to call; will not be called after this function returns
- * if snapshot_only is GNUNET_YES
* @param cb_cls closure for 'cb'
- * @return context to cancel, NULL if 'snapshot_only' is GNUNET_YES
*/
void
GST_validation_get_addresses (const struct GNUNET_PeerIdentity *target,
*
* @param target peer information is requested for
* @param cb function to call; will not be called after this function returns
- * if snapshot_only is GNUNET_YES
* @param cb_cls closure for 'cb'
- * @return context to cancel, NULL if 'snapshot_only' is GNUNET_YES
*/
void
GST_validation_get_addresses (const struct GNUNET_PeerIdentity *target,
* Actually send out the message.
*
* @param plugin the plugin
- * @param send_handle which handle to send message on
- * @param target who should receive this message (ignored by UDP)
- * @param msgbuf one or more GNUNET_MessageHeader(s) strung together
- * @param msgbuf_size the size of the msgbuf to send
- * @param priority how important is the message (ignored by UDP)
- * @param timeout when should we time out (give up) if we can not transmit?
- * @param addr the addr to send the message to, needs to be a sockaddr for us
- * @param addrlen the len of addr
- * @param cont continuation to call once the message has
- * been transmitted (or if the transport is ready
- * for the next transmission call; or if the
- * peer disconnected...)
- * @param cont_cls closure for cont
+ * @param sa the address to send the message to
+ * @param msg message to transmit
* @return the number of bytes written
*/
static ssize_t
/**
* Process pending requests to the resolver.
- *
- * @param h handle to the resolver
*/
static void
process_requests ()