From bd012c7a0b67ce43c119fde66139d2709a1043fc Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 3 Dec 2009 13:52:05 +0000 Subject: [PATCH] stuff for jilu --- src/include/gnunet_common.h | 5 +++-- src/include/gnunet_protocols.h | 10 ++++++++++ src/transport/transport.h | 21 +++++++++++++++++++++ 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h index df601ac19..e3e62a143 100644 --- a/src/include/gnunet_common.h +++ b/src/include/gnunet_common.h @@ -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; diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h index ff35c6b97..68fd641e3 100644 --- a/src/include/gnunet_protocols.h +++ b/src/include/gnunet_protocols.h @@ -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 diff --git a/src/transport/transport.h b/src/transport/transport.h index 13dcbb6b8..5de46b38f 100644 --- a/src/transport/transport.h +++ b/src/transport/transport.h @@ -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 */ -- 2.25.1