1 /** @file
2  * @brief Internal header for Bluetooth address functions
3  */
4 
5 /*
6  * Copyright (c) 2023 Nordic Semiconductor ASA
7  *
8  * SPDX-License-Identifier: Apache-2.0
9  */
10 #include <zephyr/bluetooth/addr.h>
11 
12 void bt_addr_le_copy_resolved(bt_addr_le_t *dst, const bt_addr_le_t *src);
13 
14 /**
15  * @brief Determine whether an HCI LE event address was resolved by the Controller
16  *
17  * This helper inspects an HCI LE event address field and reports whether the
18  * Controller resolved a Resolvable Private Address (RPA) to an identity address
19  * when producing the event.
20  *
21  * @warning The parameter is not a regular application-layer @ref bt_addr_le_t.
22  * It must be the address field taken directly from an HCI LE event structure.
23  * In those events, the address "type" uses the Identity Address values to
24  * indicate that resolution has occurred; this function only checks that bit.
25  * Do not use this with any @ref bt_addr_le_t obtained from Zephyr host APIs.
26  *
27  * The complete (at time of writing) list of events that contain at least one field like this:
28  * - LE Advertising Report event (@ref bt_hci_evt_le_advertising_report)
29  * - LE Enhanced Connection Complete event (@ref bt_hci_evt_le_enh_conn_complete)
30  * - LE Directed Advertising Report event (@ref bt_hci_evt_le_direct_adv_report)
31  * - LE Extended Advertising Report event (@ref bt_hci_evt_le_ext_advertising_report)
32  * - LE Scan Request Received event (@ref bt_hci_evt_le_scan_req_received)
33  * - LE Periodic Advertising Sync Transfer Received event (@ref bt_hci_evt_le_past_received_v2)
34  * - LE Monitored Advertisers Report event
35  *
36  * @note The exact "potentially resolved address field" type is not a distinct
37  * type in the Core Specification; it is inferred from the common layout of the
38  * events above. This function only inspects the address type; it does not perform
39  * address resolution nor consult the resolve list.
40  *
41  * @param hci_addr_field_value Address field taken directly from an HCI LE event
42  * @retval true The Controller resolved the address (the on-air RPA matched an
43  * IRK in the Controller's resolve list)
44  * @retval false The address was not resolved by the Controller (resolution
45  * disabled or no match)
46  *
47  * @see bt_addr_le_copy_resolved() to convert a HCI event address type to a
48  * regular @ref bt_addr_le_t.
49  */
50 bool bt_addr_le_is_resolved(const bt_addr_le_t *hci_addr_field_value);
51