stuff for jilu
authorChristian Grothoff <christian@grothoff.org>
Thu, 3 Dec 2009 13:52:05 +0000 (13:52 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 3 Dec 2009 13:52:05 +0000 (13:52 +0000)
src/include/gnunet_common.h
src/include/gnunet_protocols.h
src/transport/transport.h

index df601ac1976ed7e7efb9e926d89f85616c82bca0..e3e62a143b002a04c0dea4cce2751c46c45784c8 100644 (file)
@@ -71,12 +71,13 @@ struct GNUNET_MessageHeader
 {
 
   /**
-   * The length of the struct (in bytes, including the length field itself)
+   * The length of the struct (in bytes, including the length field itself),
+   * in big-endian format.
    */
   uint16_t size GNUNET_PACKED;
 
   /**
-   * The type of the message (XX_CS_PROTO_XXXX)
+   * The type of the message (GNUNET_MESSAGE_TYPE_XXXX), in big-endian format.
    */
   uint16_t type GNUNET_PACKED;
 
index ff35c6b9766fdd2ff33ce0ae149076958e7609ab..68fd641e342198faca11a2338e4a02955b5a1d0c 100644 (file)
@@ -175,6 +175,16 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_TRANSPORT_ACK 28
 
+/**
+ * FIXME.
+ */
+#define GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_LOOKUP 29
+
+/**
+ * FIXME.
+ */
+#define GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_REPLY 30
+
 
 /**
  * Request addition of a HELLO
index 13dcbb6b8563c7fdac1be6409f9bd2e743fdfa38..5de46b38fb766f5a36901614fe285d2a1057015a 100644 (file)
@@ -233,6 +233,27 @@ struct OutboundMessage
 
 
 
+/**
+ * Message from the library to the transport service
+ * asking for converting a transport address to a
+ * human-readable UTF-8 string.
+ */
+struct AddressLookupMessage
+{
+
+  /**
+   * Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_LOOKUP
+   */
+  struct GNUNET_MessageHeader header;
+
+  /**
+   * Length of the (binary) address in bytes, in big-endian.
+   */
+  uint32_t addrlen GNUNET_PACKED;
+
+  /* followed by 'addrlen' bytes of the actual address, then
+     followed by the 0-terminated name of the transport */
+};
 
 
 /* end of transport.h */