Type Definition gnunet_sys::GNUNET_HELLO_GenerateAddressListCallback[][src]

type GNUNET_HELLO_GenerateAddressListCallback = Option<unsafe extern "C" fn(cls: *mut c_void, max: usize, buf: *mut c_void) -> isize>;

Callback function used to fill a buffer of max bytes with a list of addresses in the format used by HELLOs. Should use #GNUNET_HELLO_add_address() as a helper function.

@param cls closure @param max maximum number of bytes that can be written to @a buf @param buf where to write the address information @return number of bytes written or 0, #GNUNET_SYSERR to signal the end of the iteration.