20#ifndef H_BLE_LL_RESOLV_
21#define H_BLE_LL_RESOLV_
36struct ble_ll_resolv_entry
42 uint8_t rl_local_irk[16];
43 uint8_t rl_peer_irk[16];
44 uint8_t rl_identity_addr[BLE_DEV_ADDR_LEN];
45 uint8_t rl_local_rpa[BLE_DEV_ADDR_LEN];
46 uint8_t rl_peer_rpa[BLE_DEV_ADDR_LEN];
49extern struct ble_ll_resolv_entry g_ble_ll_resolv_list[];
52int ble_ll_resolv_list_clr(
void);
55int ble_ll_resolv_list_read_size(uint8_t *rspbuf, uint8_t *rsplen);
58int ble_ll_resolv_list_add(
const uint8_t *cmdbuf, uint8_t len);
61int ble_ll_resolv_list_rmv(
const uint8_t *cmdbuf, uint8_t len);
64int ble_ll_resolv_enable_cmd(
const uint8_t *cmdbuf, uint8_t len);
66int ble_ll_resolv_peer_addr_rd(
const uint8_t *cmdbuf, uint8_t len,
67 uint8_t *rspbuf, uint8_t *rsplen);
68int ble_ll_resolv_local_addr_rd(
const uint8_t *cmdbuf, uint8_t len,
69 uint8_t *rspbuf, uint8_t *rsplen);
72struct ble_ll_resolv_entry *
73ble_ll_resolv_list_find(
const uint8_t *addr, uint8_t addr_type);
76ble_ll_resolv_get_idx(
struct ble_ll_resolv_entry *rl)
78 return rl - g_ble_ll_resolv_list;
82uint8_t ble_ll_resolv_enabled(
void);
85void ble_ll_resolv_list_reset(
void);
90void ble_ll_resolv_get_priv_addr(
struct ble_ll_resolv_entry *rl,
int local,
93void ble_ll_resolv_set_peer_rpa(
int index, uint8_t *rpa);
94void ble_ll_resolv_set_local_rpa(
int index, uint8_t *rpa);
97int ble_ll_resolv_gen_rpa(uint8_t *addr, uint8_t addr_type, uint8_t *rpa,
101int ble_ll_resolv_set_rpa_tmo(
const uint8_t *cmdbuf, uint8_t len);
104int ble_ll_resolve_set_priv_mode(
const uint8_t *cmdbuf, uint8_t len);
107uint32_t ble_ll_resolv_get_rpa_tmo(
void);
110int ble_ll_resolv_rpa(
const uint8_t *rpa,
const uint8_t *irk);
113int ble_ll_resolv_peer_rpa_any(
const uint8_t *rpa);
116void ble_ll_resolv_init(
void);