* @brief common internal definitions for transport service
* @author Christian Grothoff
*/
+#ifndef TRANSPORT_H
+#define TRANSPORT_H
+
#include "gnunet_crypto_lib.h"
#include "gnunet_time_lib.h"
#include "gnunet_transport_service.h"
*/
struct GNUNET_TIME_RelativeNBO latency;
+ /*
+ * Transport distance metric (i.e. hops for DV)
+ */
+ uint16_t distance;
+
/**
* Identity of the new neighbour.
*/
*/
struct GNUNET_PeerIdentity peer;
+ /*
+ * Distance metric.
+ */
+ uint16_t distance;
+
};
struct GNUNET_MessageHeader header;
/**
- * Always zero.
+ * Message priority.
*/
- uint32_t reserved GNUNET_PACKED;
+ uint32_t priority GNUNET_PACKED;
/**
* Which peer should receive the message?
};
+/**
+ * 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;
+
+ /**
+ * Should the conversion use numeric IP addresses (otherwise
+ * a reverse DNS lookup is OK -- if applicable).
+ */
+ int32_t numeric_only GNUNET_PACKED;
+
+ /**
+ * timeout to give up.
+ */
+ struct GNUNET_TIME_AbsoluteNBO timeout;
+
+ /**
+ * 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 */
+};
+
+
+
+/**
+ * Change in blacklisting (either request or notification,
+ * depending on which direction it is going).
+ */
+struct BlacklistMessage
+{
+ /**
+ * Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST
+ */
+ struct GNUNET_MessageHeader header;
+ /**
+ * Reserved (for alignment).
+ */
+ uint32_t reserved GNUNET_PACKED;
+
+ /**
+ * Which peer is being blacklisted (or has seen its
+ * blacklisting expire)?
+ */
+ struct GNUNET_PeerIdentity peer;
+
+ /**
+ * Until what time is this peer blacklisted (zero for
+ * no longer blacklisted).
+ */
+ struct GNUNET_TIME_AbsoluteNBO until;
+
+};
/* end of transport.h */
+#endif