gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r16737 - in gnunet: . src/include src/testing src/transport


From: gnunet
Subject: [GNUnet-SVN] r16737 - in gnunet: . src/include src/testing src/transport src/util
Date: Fri, 9 Sep 2011 15:21:49 +0200

Author: grothoff
Date: 2011-09-09 15:21:48 +0200 (Fri, 09 Sep 2011)
New Revision: 16737

Modified:
   gnunet/TODO
   gnunet/src/include/gnunet_resolver_service.h
   gnunet/src/testing/testing.c
   gnunet/src/testing/testing_peergroup.c
   gnunet/src/transport/gnunet-service-transport-new.c
   gnunet/src/transport/gnunet-service-transport_blacklist.c
   gnunet/src/transport/gnunet-service-transport_clients.c
   gnunet/src/transport/gnunet-service-transport_neighbours.c
   gnunet/src/transport/gnunet-service-transport_plugins.c
   gnunet/src/transport/gnunet-service-transport_validation.c
   gnunet/src/transport/gnunet-service-transport_validation.h
   gnunet/src/transport/plugin_transport_udp.c
   gnunet/src/util/resolver_api.c
Log:
misc train hacking

Modified: gnunet/TODO
===================================================================
--- gnunet/TODO 2011-09-09 13:21:25 UTC (rev 16736)
+++ gnunet/TODO 2011-09-09 13:21:48 UTC (rev 16737)
@@ -1,14 +1,5 @@
 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]
@@ -23,6 +14,9 @@
     + insert
     + download
     + search
+* transport:
+  - explicit DISCONNECT: add signature, create message...
+  - CONNECT: actually consider switching session...
 
 0.9.0:
 * new webpage:

Modified: gnunet/src/include/gnunet_resolver_service.h
===================================================================
--- gnunet/src/include/gnunet_resolver_service.h        2011-09-09 13:21:25 UTC 
(rev 16736)
+++ gnunet/src/include/gnunet_resolver_service.h        2011-09-09 13:21:48 UTC 
(rev 16737)
@@ -94,7 +94,6 @@
 /**
  * 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
@@ -130,7 +129,6 @@
 /**
  * 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

Modified: gnunet/src/testing/testing.c
===================================================================
--- gnunet/src/testing/testing.c        2011-09-09 13:21:25 UTC (rev 16736)
+++ gnunet/src/testing/testing.c        2011-09-09 13:21:48 UTC (rev 16737)
@@ -1418,8 +1418,6 @@
  * @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,

Modified: gnunet/src/testing/testing_peergroup.c
===================================================================
--- gnunet/src/testing/testing_peergroup.c      2011-09-09 13:21:25 UTC (rev 
16736)
+++ gnunet/src/testing/testing_peergroup.c      2011-09-09 13:21:48 UTC (rev 
16737)
@@ -599,7 +599,6 @@
  * @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

Modified: gnunet/src/transport/gnunet-service-transport-new.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport-new.c 2011-09-09 13:21:25 UTC 
(rev 16736)
+++ gnunet/src/transport/gnunet-service-transport-new.c 2011-09-09 13:21:48 UTC 
(rev 16737)
@@ -201,7 +201,8 @@
     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:

Modified: gnunet/src/transport/gnunet-service-transport_blacklist.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_blacklist.c   2011-09-09 
13:21:25 UTC (rev 16736)
+++ gnunet/src/transport/gnunet-service-transport_blacklist.c   2011-09-09 
13:21:48 UTC (rev 16737)
@@ -547,7 +547,7 @@
  * 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)
  */

Modified: gnunet/src/transport/gnunet-service-transport_clients.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_clients.c     2011-09-09 
13:21:25 UTC (rev 16736)
+++ gnunet/src/transport/gnunet-service-transport_clients.c     2011-09-09 
13:21:48 UTC (rev 16737)
@@ -228,7 +228,7 @@
 /**
  * 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
  */

Modified: gnunet/src/transport/gnunet-service-transport_neighbours.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_neighbours.c  2011-09-09 
13:21:25 UTC (rev 16736)
+++ gnunet/src/transport/gnunet-service-transport_neighbours.c  2011-09-09 
13:21:48 UTC (rev 16737)
@@ -51,7 +51,33 @@
  */
 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
  * that we still want to transmit to the neighbour.
@@ -288,7 +314,7 @@
  * 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)
@@ -520,7 +546,7 @@
                                   *ats, uint32_t ats_count)
 {
   struct NeighbourMapEntry *n;
-  struct GNUNET_MessageHeader connect_msg;
+  struct SessionConnectMessage connect_msg;
 
   GNUNET_assert (neighbours != NULL);
 
@@ -555,8 +581,10 @@
   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);
 }
@@ -570,6 +598,7 @@
  * @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'

Modified: gnunet/src/transport/gnunet-service-transport_plugins.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_plugins.c     2011-09-09 
13:21:25 UTC (rev 16736)
+++ gnunet/src/transport/gnunet-service-transport_plugins.c     2011-09-09 
13:21:48 UTC (rev 16737)
@@ -87,7 +87,6 @@
  *
  * @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

Modified: gnunet/src/transport/gnunet-service-transport_validation.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_validation.c  2011-09-09 
13:21:25 UTC (rev 16736)
+++ gnunet/src/transport/gnunet-service-transport_validation.c  2011-09-09 
13:21:48 UTC (rev 16737)
@@ -335,9 +335,6 @@
  * @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
@@ -425,7 +422,7 @@
  * @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,
@@ -1077,12 +1074,8 @@
  * 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,

Modified: gnunet/src/transport/gnunet-service-transport_validation.h
===================================================================
--- gnunet/src/transport/gnunet-service-transport_validation.h  2011-09-09 
13:21:25 UTC (rev 16736)
+++ gnunet/src/transport/gnunet-service-transport_validation.h  2011-09-09 
13:21:48 UTC (rev 16737)
@@ -122,9 +122,7 @@
  *
  * @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,

Modified: gnunet/src/transport/plugin_transport_udp.c
===================================================================
--- gnunet/src/transport/plugin_transport_udp.c 2011-09-09 13:21:25 UTC (rev 
16736)
+++ gnunet/src/transport/plugin_transport_udp.c 2011-09-09 13:21:48 UTC (rev 
16737)
@@ -335,19 +335,8 @@
  * 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

Modified: gnunet/src/util/resolver_api.c
===================================================================
--- gnunet/src/util/resolver_api.c      2011-09-09 13:21:25 UTC (rev 16736)
+++ gnunet/src/util/resolver_api.c      2011-09-09 13:21:48 UTC (rev 16737)
@@ -582,8 +582,6 @@
 
 /**
  * Process pending requests to the resolver.
- *
- * @param h handle to the resolver
  */
 static void
 process_requests ()




reply via email to

[Prev in Thread] Current Thread [Next in Thread]