/**
* For which peer is this an address?
- */
+ */
struct GNUNET_PeerIdentity peer;
/**
*/
struct GNUNET_HELLO_Address *
GNUNET_HELLO_address_allocate (const struct GNUNET_PeerIdentity *peer,
- const char *transport_name,
- const void *address,
- size_t address_length);
+ const char *transport_name, const void *address,
+ size_t address_length);
/**
*/
int
GNUNET_HELLO_address_cmp (const struct GNUNET_HELLO_Address *a1,
- const struct GNUNET_HELLO_Address *a2);
+ const struct GNUNET_HELLO_Address *a2);
+/**
+ * Get the size of an address struct.
+ *
+ * @param address address
+ * @return the size
+ */
+size_t
+GNUNET_HELLO_address_get_size (const struct GNUNET_HELLO_Address *address);
/**
* Free an address.
- *
+ *
* @param addr address to free
*/
#define GNUNET_HELLO_address_free(addr) GNUNET_free(addr)
*/
size_t
GNUNET_HELLO_add_address (const struct GNUNET_HELLO_Address *address,
- struct GNUNET_TIME_Absolute expiration,
- char *target,
+ struct GNUNET_TIME_Absolute expiration, char *target,
size_t max);
* GNUNET_NO to delete it from the HELLO
* GNUNET_SYSERR to stop iterating (but keep current address)
*/
-typedef int (*GNUNET_HELLO_AddressIterator) (void *cls,
- const struct GNUNET_HELLO_Address *address,
- struct GNUNET_TIME_Absolute expiration);
+typedef int (*GNUNET_HELLO_AddressIterator) (void *cls,
+ const struct GNUNET_HELLO_Address *
+ address,
+ struct GNUNET_TIME_Absolute
+ expiration);
/**