GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 2, or (at your
+ by the Free Software Foundation; either version 3, or (at your
option) any later version.
GNUnet is distributed in the hope that it will be useful, but
GNUNET_HELLO_add_address (const char *tname,
struct GNUNET_TIME_Absolute expiration,
const void *addr,
- size_t addr_len, char *target, size_t max);
+ uint16_t addr_len, char *target, size_t max);
/**
GNUNET_HELLO_Message *h2);
+/**
+ * Test if two HELLO messages contain the same addresses.
+ * If they only differ in expiration time, the lowest
+ * expiration time larger than 'now' where they differ
+ * is returned.
+ *
+ * @param h1 first HELLO message
+ * @param h2 the second HELLO message
+ * @param now time to use for deciding which addresses have
+ * expired and should not be considered at all
+ * @return absolute time forever if the two HELLOs are
+ * totally identical; smallest timestamp >= now if
+ * they only differ in timestamps;
+ * zero if the some addresses with expirations >= now
+ * do not match at all
+ */
+struct GNUNET_TIME_Absolute
+GNUNET_HELLO_equals (const struct
+ GNUNET_HELLO_Message *h1,
+ const struct
+ GNUNET_HELLO_Message *h2,
+ struct GNUNET_TIME_Absolute now);
+
/**
* Iterator callback to go over all addresses.
(*GNUNET_HELLO_AddressIterator) (void *cls,
const char *tname,
struct GNUNET_TIME_Absolute expiration,
- const void *addr, size_t addrlen);
+ const void *addr,
+ uint16_t addrlen);
/**