26#if MYNEWT_VAL(BLE_HOST_BASED_PRIVACY)
30struct ble_hs_resolv_entry {
32 uint8_t rl_local_irk[16];
33 uint8_t rl_peer_irk[16];
34 uint8_t rl_identity_addr[BLE_DEV_ADDR_LEN];
35 uint8_t rl_pseudo_id[BLE_DEV_ADDR_LEN];
36 uint8_t rl_local_rpa[BLE_DEV_ADDR_LEN];
37 uint8_t rl_peer_rpa[BLE_DEV_ADDR_LEN];
41#if MYNEWT_VAL(BLE_STORE_CONFIG_PERSIST)
43int ble_store_persist_peer_records(
void);
46struct ble_hs_peer_sec {
49 uint8_t irk_present: 1;
55struct ble_hs_dev_records {
57 uint8_t rand_addr_type;
58 uint8_t pseudo_addr[BLE_DEV_ADDR_LEN];
59 uint8_t rand_addr[BLE_DEV_ADDR_LEN];
60 uint8_t identity_addr[BLE_DEV_ADDR_LEN];
61 struct ble_hs_peer_sec peer_sec;
65int ble_hs_resolv_list_add(uint8_t *cmdbuf);
66int ble_hs_gen_own_private_rnd(
void);
67uint8_t *ble_hs_get_rpa_local(
void);
70int ble_hs_resolv_list_rmv(uint8_t, uint8_t *);
72void ble_hs_resolv_list_clear_all(
void);
75void ble_hs_resolv_enable(
bool);
76void ble_hs_resolv_nrpa_enable(
void);
77void ble_hs_resolv_nrpa_disable(
void);
80struct ble_hs_resolv_entry *
81ble_hs_resolv_list_find(uint8_t *addr);
84struct ble_hs_resolv_entry *
85ble_hs_resolv_rpa_addr(uint8_t *addr, uint8_t addr_type);
88bool ble_host_rpa_enabled(
void);
93ble_rpa_replace_peer_params_with_rl(uint8_t *, uint8_t *,
struct ble_hs_resolv_entry **);
95int ble_rpa_resolv_add_peer_rec(uint8_t *);
97struct ble_hs_dev_records *ble_rpa_get_peer_dev_records(
void);
98int ble_rpa_get_num_peer_dev_records(
void);
99void ble_rpa_set_num_peer_dev_records(
int);
100int ble_rpa_remove_peer_dev_rec(
struct ble_hs_dev_records *);
101struct ble_hs_dev_records *ble_rpa_find_peer_dev_rec(uint8_t *);
104int ble_hs_resolv_set_rpa_tmo(uint16_t);
107int ble_hs_resolv_rpa(uint8_t *rpa, uint8_t *irk);
110void ble_hs_resolv_init(
void);