* @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"
-#define DEBUG_TRANSPORT GNUNET_NO
+#define DEBUG_TRANSPORT GNUNET_YES
/**
* For how long do we allow unused bandwidth
*/
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;
+
};
};
-
-
/**
* Message from the library to the transport service
* asking for converting a transport address to a
*/
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_AbosluteNBO tiemout;
+ struct GNUNET_TIME_AbsoluteNBO timeout;
/**
* Length of the (binary) address in bytes, in big-endian.
};
+
+/**
+ * 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