Type Definition gnunet_sys::GNUNET_ATS_AddressSuggestionCallback[][src]

type GNUNET_ATS_AddressSuggestionCallback = Option<unsafe extern "C" fn(cls: *mut c_void, peer: *const GNUNET_PeerIdentity, address: *const GNUNET_HELLO_Address, session: *mut GNUNET_ATS_Session, bandwidth_out: GNUNET_BANDWIDTH_Value32NBO, bandwidth_in: GNUNET_BANDWIDTH_Value32NBO)>;

Signature of a function called by ATS with the current bandwidth and address preferences as determined by ATS. If our connection to ATS dies and thus all suggestions become invalid, this function is called ONCE with all arguments (except @a cls) being NULL/0.

@param cls closure @param peer for which we suggest an address, NULL if ATS connection died @param address suggested address (including peer identity of the peer), may be NULL to signal disconnect from peer @param session session to use, NULL to establish a new outgoing session @param bandwidth_out assigned outbound bandwidth for the connection, 0 to signal disconnect @param bandwidth_in assigned inbound bandwidth for the connection, 0 to signal disconnect