pub unsafe extern "C" fn gnrc_ipv6_nib_nc_iter(
    iface: c_uint,
    state: *mut *mut c_void,
    nce: *mut gnrc_ipv6_nib_nc_t
) -> bool
Expand description

@brief Iterates over all neighbor cache entries in the NIB

@pre (state != NULL) && (nce != NULL)

@param[in] iface Restrict iteration to entries on this interface. 0 for any interface. @param[in,out] state Iteration state of the neighbor cache. Must point to a NULL pointer to start iteration. @param[out] nce The next neighbor cache entry.

Usage example:

#include "net/gnrc/ipv6/nib/nc.h"

int main(void) {
    void *state = NULL;
    gnrc_ipv6_nib_nc_t nce;

    puts("My neighbors:");
    while (gnrc_ipv6_nib_nc_iter(0, &state, &nce)) {
        gnrc_ipv6_nib_nc_print(&nce);
    }
    return 0;
}

@note The list may change during iteration.

@return true, if iteration can be continued. @return false, if @p nce is the last neighbor cache entry in the NIB.