riot_sys::bindgen

Function gnrc_netreg_lookup

Source
pub unsafe extern "C" fn gnrc_netreg_lookup(
    type_: gnrc_nettype_t,
    demux_ctx: u32,
) -> *mut gnrc_netreg_entry_t
Expand description

@brief Searches for entries with given parameters in the registry and returns the first found.

@pre The caller must hold the lock of @ref gnrc_netreg_acquire_shared from before calling this function, and must stop using any obtained pointers before releasing the lock through @ref gnrc_netreg_release_shared.

@param[in] type Type of the protocol. @param[in] demux_ctx The demultiplexing context for the registered thread. See gnrc_netreg_entry_t::demux_ctx.

@return The first entry fitting the given parameters on success @return NULL if no entry can be found.