zephyr/tests/bluetooth/host/id/mocks
Emil Gydesen b67d291207 Bluetooth: Host: Add type check for bt_conn API
Added a new function, bt_conn_is_type, that returns whether
the provided conn object is of the provided type.

This check is then used to ensure that the conn objects
supplied to other bt_conn function are of the right type.
The right type has also been documented for these functions.

This is an initial commit for a larger change in the BT Host,
as similar checks should be added to the L2CAP, GATT, ISO,
Audio and possibly Mesh APIs.

The type check could have been implemented by using the
bt_conn_get_info function, but that requires additional
function calls as well as memory allocation and copy.
Since bt_conn_is_type is designed to be widely used, it
was suited for its own function.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-02-11 22:04:51 +01:00
..
zephyr zephyr: bulk update to DT_NODE_HAS_STATUS_OKAY 2024-10-03 17:06:52 +01:00
addr_expects.c
addr_expects.h
addr.c
addr.h
adv_expects.c
adv_expects.h
adv.c
adv.h
CMakeLists.txt
conn_expects.c
conn_expects.h
conn.c Bluetooth: Host: Add type check for bt_conn API 2025-02-11 22:04:51 +01:00
conn.h Bluetooth: Host: Add type check for bt_conn API 2025-02-11 22:04:51 +01:00
crypto_expects.c
crypto_expects.h
crypto.c
crypto.h
hci_core_expects.c
hci_core_expects.h
hci_core.c
hci_core.h
kernel_expects.c
kernel_expects.h
kernel.c
kernel.h
keys_expects.c
keys_expects.h
keys.c
keys.h
net_buf_expects.c
net_buf_expects.h
net_buf.c
net_buf.h
rpa_expects.c
rpa_expects.h
rpa.c
rpa.h
scan_expects.c
scan_expects.h
scan.c
scan.h
settings_expects.c
settings_expects.h
settings.c
settings.h
smp_expects.c
smp_expects.h
smp.c
smp.h