![]() |
nRF Connect SDK Bare Metal API 2.0.99
|
| uint32_t pm_allow_list_get | ( | ble_gap_addr_t * | addrs, |
| uint32_t * | addr_cnt, | ||
| ble_gap_irk_t * | irks, | ||
| uint32_t * | irk_cnt ) |
#include <peer_manager.h>
Retrieve the previously set allow list.
The function retrieves the allow list of GAP addresses and IRKs that was previously set by pm_allow_list_set.
To retrieve only GAP addresses or only IRKs, provide only one of the buffers. If a buffer is provided, its size must be specified.
| [out] | addrs | The buffer where to store GAP addresses. Pass NULL to retrieve only IRKs (in that case, irks must not be NULL). |
| [in,out] | addr_cnt | In: The size of the addrs buffer. May be NULL if and only if addrs is NULL. Out: The number of GAP addresses copied into the buffer. If addrs is NULL, this parameter remains unchanged. |
| [out] | irks | The buffer where to store IRKs. Pass NULL to retrieve only GAP addresses (in that case, addrs must not NULL). |
| [in,out] | irk_cnt | In: The size of the irks buffer. May be NULL if and only if irks is NULL. Out: The number of IRKs copied into the buffer. If irks is NULL, this parameter remains unchanged. |
| NRF_SUCCESS | If the allow list was successfully retrieved. |
| BLE_ERROR_GAP_INVALID_BLE_ADDR | If a peer has an address that cannot be used for allow listing. |
| NRF_ERROR_NULL | If a required parameter is NULL. |
| NRF_ERROR_NO_MEM | If the provided buffers are too small. |
| NRF_ERROR_NOT_FOUND | If the data for any of the cached allow listed peers cannot be found. It might have been deleted. |
| NRF_ERROR_INVALID_STATE | If the Peer Manager is not initialized. |