-makefile for new test_stream_local (commented)
[oweals/gnunet.git] / src / transport / transport.h
index 66f40cd06a6199453f1754b35690fadbcbe447f5..0277202717729ce2c00f365ffc90f58081b1c68b 100644 (file)
@@ -61,6 +61,8 @@
  */
 #define CONNECTED_LATENCY_EVALUATION_MAX_DELAY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 1)
 
+GNUNET_NETWORK_STRUCT_BEGIN
+
 /**
  * Message from the transport service to the library
  * asking to check if both processes agree about this
@@ -287,7 +289,7 @@ struct AddressLookupMessage
 {
 
   /**
-   * Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_LOOKUP
+   * Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_TO_STRING
    */
   struct GNUNET_MessageHeader header;
 
@@ -295,17 +297,17 @@ struct AddressLookupMessage
    * Should the conversion use numeric IP addresses (otherwise
    * a reverse DNS lookup is OK -- if applicable).
    */
-  int32_t numeric_only GNUNET_PACKED;
+  int16_t numeric_only GNUNET_PACKED;
 
   /**
-   * timeout to give up.
+   * Length of the (binary) address in bytes, in big-endian.
    */
-  struct GNUNET_TIME_RelativeNBO timeout;
+  uint16_t addrlen GNUNET_PACKED;
 
   /**
-   * Length of the (binary) address in bytes, in big-endian.
+   * timeout to give up.
    */
-  uint32_t addrlen GNUNET_PACKED;
+  struct GNUNET_TIME_RelativeNBO timeout;
 
   /* followed by 'addrlen' bytes of the actual address, then
    * followed by the 0-terminated name of the transport */
@@ -352,24 +354,33 @@ struct AddressIterateMessage
   struct GNUNET_MessageHeader header;
 
   /**
-   * For alignment.
+   * One shot call or continous replies?
    */
-  uint32_t reserved;
+  uint32_t one_shot;
 
   /**
    * timeout to give up.  FIXME: remove in the future
    */
   struct GNUNET_TIME_AbsoluteNBO timeout;
+
+  /**
+   * The identity of the peer to look up.
+   */
+  struct GNUNET_PeerIdentity peer;
+
 };
 
+
 /**
- * Message from the library to the transport service
- * asking for human readable addresses known for a peer.
+ * Message from the transport service to the library
+ * containing binary addresses known for a peer.
+ * Memory layout:
+ * [AddressIterateResponseMessage][address[addrlen]][transportname[pluginlen]]
  */
 struct AddressIterateResponseMessage
 {
   /**
-   * Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_REPLY
+   * Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_ITERATE_RESPONSE
    */
   struct GNUNET_MessageHeader header;
 
@@ -378,7 +389,7 @@ struct AddressIterateResponseMessage
    */
   uint32_t reserved;
 
-  /**
+    /**
    * Peer identity
    */
   struct GNUNET_PeerIdentity peer;
@@ -392,6 +403,7 @@ struct AddressIterateResponseMessage
    * length of the plugin name
    */
   uint32_t pluginlen GNUNET_PACKED;
+
 };
 
 
@@ -420,7 +432,7 @@ struct BlacklistMessage
   struct GNUNET_PeerIdentity peer;
 
 };
-
+GNUNET_NETWORK_STRUCT_END
 
 /* end of transport.h */
 #endif