Function gnunet_sys::GNUNET_TRANSPORT_blacklist[][src]

pub unsafe extern "C" fn GNUNET_TRANSPORT_blacklist(
    cfg: *const GNUNET_CONFIGURATION_Handle,
    cb: GNUNET_TRANSPORT_BlacklistCallback,
    cb_cls: *mut c_void
) -> *mut GNUNET_TRANSPORT_Blacklist

Install a blacklist callback. The service will be queried for all existing connections as well as any fresh connections to check if they are permitted. If the blacklisting callback is unregistered, all hosts that were denied in the past will automatically be whitelisted again. Cancelling the blacklist handle is also the only way to re-enable connections from peers that were previously blacklisted.

@param cfg configuration to use @param cb callback to invoke to check if connections are allowed @param cb_cls closure for @a cb @return NULL on error, otherwise handle for cancellation