From: Archie Pusaka <[email protected]>
Hi BlueZ maintainers,
This series of patches promotes the usage of the more inclusive terms
such as central/peripheral, accept list/reject list, or their
equivalent where appropriate.
This is also reflected on the changes to Core spec v5.3 and the
appropriate language mapping table by Bluetooth SIG
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf
As you suggested, I dropped the Android changes and merge patches
which belong to the same directory into one patch.
Note that the following terms are not replaced:
(1) those involving storage format (i.e. storing LTK)
(2) those which belong to the libbluetooth API
Thanks,
Archie
Changes in v4:
* Fix line over 80 columns
Changes in v3:
* Not replacing some terms which belong to libluetooth API
Changes in v2:
* Merging several patches from the same directory into one
Archie Pusaka (12):
lib: Inclusive language changes
btio: Inclusive language changes
monitor: Inclusive language changes
emulator: Inclusive language changes
tools: Inclusive language changes
plugins/sixaxis: Inclusive language changes
profiles: Inclusive language changes
src: Inclusive language changes
client: Inclusive language changes
mesh: Inclusive language changes
unit/mesh: Inclusive language changes
doc: Inclusive language update
android/a2dp.c | 2 +-
android/bluetooth.c | 4 +-
android/handsfree-client.c | 2 +-
android/tester-main.c | 2 +-
btio/btio.c | 42 ++--
btio/btio.h | 2 +-
client/main.c | 6 +-
doc/mesh-api.txt | 2 +-
doc/mgmt-api.txt | 6 +-
emulator/btdev.c | 204 +++++++++---------
emulator/hciemu.c | 21 +-
emulator/hciemu.h | 12 +-
emulator/le.c | 116 +++++------
emulator/serial.c | 6 +-
emulator/smp.c | 8 +-
lib/hci.c | 22 +-
lib/mgmt.h | 2 +-
mesh/net-keys.c | 38 ++--
mesh/net-keys.h | 8 +-
mesh/net.h | 4 +-
monitor/broadcom.c | 8 +-
monitor/bt.h | 150 +++++++-------
monitor/control.c | 14 +-
monitor/l2cap.c | 10 +-
monitor/ll.c | 60 +++---
monitor/lmp.c | 2 +-
monitor/packet.c | 411 +++++++++++++++++++------------------
plugins/sixaxis.c | 44 ++--
profiles/audio/a2dp.c | 2 +-
profiles/audio/avctp.c | 10 +-
profiles/audio/avctp.h | 2 +-
profiles/health/mcap.c | 20 +-
profiles/health/mcap.h | 2 +-
profiles/sap/server.c | 2 +-
src/adapter.c | 113 +++++-----
src/adapter.h | 4 +-
src/device.c | 6 +-
src/sdpd-server.c | 8 +-
src/sdpd.h | 2 +-
src/shared/ad.c | 8 +-
src/shared/ad.h | 2 +-
src/shared/hfp.c | 4 +-
src/shared/hfp.h | 2 +-
tools/3dsp.c | 62 +++---
tools/bdaddr.rst | 2 +-
tools/btiotest.c | 22 +-
tools/btpclientctl.c | 2 +-
tools/hci-tester.c | 16 +-
tools/hciconfig.c | 148 ++++++++-----
tools/hciconfig.rst | 24 +--
tools/hcitool.c | 102 ++++-----
tools/hcitool.rst | 30 +--
tools/l2cap-tester.c | 36 ++--
tools/l2test.c | 18 +-
tools/mesh-cfgclient.c | 4 +-
tools/mesh-gatt/mesh-net.h | 4 +-
tools/mesh-gatt/net.c | 60 +++---
tools/mesh/mesh-db.c | 28 ++-
tools/mesh/mesh-db.h | 4 +-
tools/mesh/remote.c | 53 +++--
tools/mesh/remote.h | 5 +-
tools/meshctl.c | 6 +-
tools/mgmt-tester.c | 138 +++++++------
tools/oobtest.c | 12 +-
tools/parser/avdtp.c | 11 +-
tools/parser/csr.c | 17 +-
tools/parser/ericsson.c | 2 +-
tools/parser/hci.c | 38 ++--
tools/parser/lmp.c | 112 +++++-----
tools/parser/parser.h | 2 +-
tools/parser/smp.c | 12 +-
tools/rctest.c | 19 +-
tools/rctest.rst | 4 +-
tools/rfcomm-tester.c | 14 +-
tools/rfcomm.c | 15 +-
tools/rfcomm.rst | 2 +-
tools/sco-tester.c | 10 +-
tools/smp-tester.c | 16 +-
unit/test-mesh-crypto.c | 4 +-
79 files changed, 1256 insertions(+), 1193 deletions(-)
--
2.33.0.153.gba50c8fa24-goog
From: Archie Pusaka <[email protected]>
According to
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf
"flooding", "accept list", and "reject list" are the preferred terms.
---
(no changes since v1)
mesh/net-keys.c | 38 +++++++++++++++++++-------------------
mesh/net-keys.h | 8 ++++----
mesh/net.h | 4 ++--
3 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/mesh/net-keys.c b/mesh/net-keys.c
index e0060df746..ee7bbf0c05 100644
--- a/mesh/net-keys.c
+++ b/mesh/net-keys.c
@@ -45,7 +45,7 @@ struct net_key {
uint16_t beacon_enables;
uint8_t friend_key;
uint8_t nid;
- uint8_t master[16];
+ uint8_t flooding[16];
uint8_t encrypt[16];
uint8_t privacy[16];
uint8_t beacon[16];
@@ -53,7 +53,7 @@ struct net_key {
};
static struct l_queue *keys = NULL;
-static uint32_t last_master_id = 0;
+static uint32_t last_flooding_id = 0;
/* To avoid re-decrypting same packet for multiple nodes, cache and check */
static uint8_t cache_pkt[29];
@@ -63,11 +63,11 @@ static size_t cache_plainlen;
static uint32_t cache_id;
static uint32_t cache_iv_index;
-static bool match_master(const void *a, const void *b)
+static bool match_flooding(const void *a, const void *b)
{
const struct net_key *key = a;
- return (memcmp(key->master, b, sizeof(key->master)) == 0);
+ return (memcmp(key->flooding, b, sizeof(key->flooding)) == 0);
}
static bool match_id(const void *a, const void *b)
@@ -87,9 +87,9 @@ static bool match_network(const void *a, const void *b)
}
/* Key added from Provisioning, NetKey Add or NetKey update */
-uint32_t net_key_add(const uint8_t master[16])
+uint32_t net_key_add(const uint8_t flooding[16])
{
- struct net_key *key = l_queue_find(keys, match_master, master);
+ struct net_key *key = l_queue_find(keys, match_flooding, flooding);
uint8_t p[] = {0};
bool result;
@@ -102,22 +102,22 @@ uint32_t net_key_add(const uint8_t master[16])
keys = l_queue_new();
key = l_new(struct net_key, 1);
- memcpy(key->master, master, 16);
+ memcpy(key->flooding, flooding, 16);
key->ref_cnt++;
- result = mesh_crypto_k2(master, p, sizeof(p), &key->nid, key->encrypt,
+ result = mesh_crypto_k2(flooding, p, sizeof(p), &key->nid, key->encrypt,
key->privacy);
if (!result)
goto fail;
- result = mesh_crypto_k3(master, key->network);
+ result = mesh_crypto_k3(flooding, key->network);
if (!result)
goto fail;
- result = mesh_crypto_nkbk(master, key->beacon);
+ result = mesh_crypto_nkbk(flooding, key->beacon);
if (!result)
goto fail;
- key->id = ++last_master_id;
+ key->id = ++last_flooding_id;
l_queue_push_tail(keys, key);
return key->id;
@@ -126,11 +126,11 @@ fail:
return 0;
}
-uint32_t net_key_frnd_add(uint32_t master_id, uint16_t lpn, uint16_t frnd,
+uint32_t net_key_frnd_add(uint32_t flooding_id, uint16_t lpn, uint16_t frnd,
uint16_t lp_cnt, uint16_t fn_cnt)
{
const struct net_key *key = l_queue_find(keys, match_id,
- L_UINT_TO_PTR(master_id));
+ L_UINT_TO_PTR(flooding_id));
struct net_key *frnd_key;
uint8_t p[9] = {0x01};
bool result;
@@ -145,7 +145,7 @@ uint32_t net_key_frnd_add(uint32_t master_id, uint16_t lpn, uint16_t frnd,
l_put_be16(lp_cnt, p + 5);
l_put_be16(fn_cnt, p + 7);
- result = mesh_crypto_k2(key->master, p, sizeof(p), &frnd_key->nid,
+ result = mesh_crypto_k2(key->flooding, p, sizeof(p), &frnd_key->nid,
frnd_key->encrypt, frnd_key->privacy);
if (!result) {
@@ -155,7 +155,7 @@ uint32_t net_key_frnd_add(uint32_t master_id, uint16_t lpn, uint16_t frnd,
frnd_key->friend_key = true;
frnd_key->ref_cnt++;
- frnd_key->id = ++last_master_id;
+ frnd_key->id = ++last_flooding_id;
l_queue_push_head(keys, frnd_key);
return frnd_key->id;
@@ -174,22 +174,22 @@ void net_key_unref(uint32_t id)
}
}
-bool net_key_confirm(uint32_t id, const uint8_t master[16])
+bool net_key_confirm(uint32_t id, const uint8_t flooding[16])
{
struct net_key *key = l_queue_find(keys, match_id, L_UINT_TO_PTR(id));
if (key)
- return memcmp(key->master, master, sizeof(key->master)) == 0;
+ return !memcmp(key->flooding, flooding, sizeof(key->flooding));
return false;
}
-bool net_key_retrieve(uint32_t id, uint8_t *master)
+bool net_key_retrieve(uint32_t id, uint8_t *flooding)
{
struct net_key *key = l_queue_find(keys, match_id, L_UINT_TO_PTR(id));
if (key) {
- memcpy(master, key->master, sizeof(key->master));
+ memcpy(flooding, key->flooding, sizeof(key->flooding));
return true;
}
diff --git a/mesh/net-keys.h b/mesh/net-keys.h
index 70b3d22c3a..420618f710 100644
--- a/mesh/net-keys.h
+++ b/mesh/net-keys.h
@@ -13,10 +13,10 @@
#define IV_INDEX_UPDATE 0x02
void net_key_cleanup(void);
-bool net_key_confirm(uint32_t id, const uint8_t master[16]);
-bool net_key_retrieve(uint32_t id, uint8_t *master);
-uint32_t net_key_add(const uint8_t master[16]);
-uint32_t net_key_frnd_add(uint32_t master_id, uint16_t lpn, uint16_t frnd,
+bool net_key_confirm(uint32_t id, const uint8_t flooding[16]);
+bool net_key_retrieve(uint32_t id, uint8_t *flooding);
+uint32_t net_key_add(const uint8_t flooding[16]);
+uint32_t net_key_frnd_add(uint32_t flooding_id, uint16_t lpn, uint16_t frnd,
uint16_t lp_cnt, uint16_t fn_cnt);
void net_key_unref(uint32_t id);
uint32_t net_key_decrypt(uint32_t iv_index, const uint8_t *pkt, size_t len,
diff --git a/mesh/net.h b/mesh/net.h
index 4dbc94b8b3..465d889090 100644
--- a/mesh/net.h
+++ b/mesh/net.h
@@ -86,8 +86,8 @@ struct mesh_node;
#define PROXY_OP_FILTER_STATUS 0x03
/* Proxy Filter Defines */
-#define PROXY_FILTER_WHITELIST 0x00
-#define PROXY_FILTER_BLACKLIST 0x01
+#define PROXY_FILTER_ACCEPT_LIST 0x00
+#define PROXY_FILTER_REJECT_LIST 0x01
/* Network Tranport Opcodes */
#define NET_OP_SEG_ACKNOWLEDGE 0x00
--
2.33.0.153.gba50c8fa24-goog
From: Archie Pusaka <[email protected]>
Update the docs to reflect the changes for the other inclusive
language updates.
---
(no changes since v2)
Changes in v2:
* Merging several patches from the same directory into one
doc/mesh-api.txt | 2 +-
doc/mgmt-api.txt | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/doc/mesh-api.txt b/doc/mesh-api.txt
index f2c6b9e5c2..ce651c8017 100644
--- a/doc/mesh-api.txt
+++ b/doc/mesh-api.txt
@@ -585,7 +585,7 @@ Methods:
org.bluez.mesh.Error.InvalidArguments
void SetKeyPhase(uint16 net_index, uint8 phase)
- This method is used to set the master key update phase of the
+ This method is used to set the flooding key update phase of the
given subnet. When finalizing the procedure, it is important
to CompleteAppKeyUpdate() on all app keys that have been
updated during the procedure prior to setting phase 3.
diff --git a/doc/mgmt-api.txt b/doc/mgmt-api.txt
index 5355fedb00..97d33e30a1 100644
--- a/doc/mgmt-api.txt
+++ b/doc/mgmt-api.txt
@@ -855,7 +855,7 @@ Load Long Term Keys Command
Address (6 Octets)
Address_Type (1 Octet)
Key_Type (1 Octet)
- Master (1 Octet)
+ Central (1 Octet)
Encryption_Size (1 Octet)
Encryption_Diversifier (2 Octets)
Random_Number (8 Octets)
@@ -4019,7 +4019,7 @@ New Long Term Key Event
Address (6 Octets)
Address_Type (1 Octet)
Key_Type (1 Octet)
- Master (1 Octet)
+ Central (1 Octet)
Encryption Size (1 Octet)
Enc. Diversifier (2 Octets)
Random Number (8 Octets)
@@ -4459,7 +4459,7 @@ New Signature Resolving Key Event
}
This event indicates that a new signature resolving key has been
- generated for either the master or slave device.
+ generated for either the central or peripheral device.
The Store_Hint parameter indicates whether the host is expected
to store the key persistently or not.
--
2.33.0.153.gba50c8fa24-goog
From: Archie Pusaka <[email protected]>
Use "parent" to describe dbus hierarchy.
---
(no changes since v1)
client/main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/client/main.c b/client/main.c
index 506602bbdb..b70cf1a186 100644
--- a/client/main.c
+++ b/client/main.c
@@ -365,19 +365,19 @@ static void print_uuids(GDBusProxy *proxy)
}
}
-static gboolean device_is_child(GDBusProxy *device, GDBusProxy *master)
+static gboolean device_is_child(GDBusProxy *device, GDBusProxy *parent)
{
DBusMessageIter iter;
const char *adapter, *path;
- if (!master)
+ if (!parent)
return FALSE;
if (g_dbus_proxy_get_property(device, "Adapter", &iter) == FALSE)
return FALSE;
dbus_message_iter_get_basic(&iter, &adapter);
- path = g_dbus_proxy_get_path(master);
+ path = g_dbus_proxy_get_path(parent);
if (!strcmp(path, adapter))
return TRUE;
--
2.33.0.153.gba50c8fa24-goog
From: Archie Pusaka <[email protected]>
BT core spec 5.3 promotes the usage of inclusive languages.
This CL replaces some terms with the more appropriate counterparts,
such as "central" and "peripheral".
---
Changes in v4:
* Fix line over 80 columns
Changes in v2:
* Merging several patches from the same directory into one
profiles/audio/avctp.c | 10 +++++-----
profiles/audio/avctp.h | 2 +-
profiles/health/mcap.c | 20 ++++++++++----------
profiles/health/mcap.h | 2 +-
4 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c
index 9f717f35bb..702ded1366 100644
--- a/profiles/audio/avctp.c
+++ b/profiles/audio/avctp.c
@@ -1614,7 +1614,7 @@ static void avctp_confirm_cb(GIOChannel *chan, gpointer data)
return;
}
-static GIOChannel *avctp_server_socket(const bdaddr_t *src, gboolean master,
+static GIOChannel *avctp_server_socket(const bdaddr_t *src, gboolean central,
uint8_t mode, uint16_t psm)
{
GError *err = NULL;
@@ -1625,7 +1625,7 @@ static GIOChannel *avctp_server_socket(const bdaddr_t *src, gboolean master,
BT_IO_OPT_SOURCE_BDADDR, src,
BT_IO_OPT_PSM, psm,
BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_MEDIUM,
- BT_IO_OPT_CENTRAL, master,
+ BT_IO_OPT_CENTRAL, central,
BT_IO_OPT_MODE, mode,
BT_IO_OPT_INVALID);
if (!io) {
@@ -1636,20 +1636,20 @@ static GIOChannel *avctp_server_socket(const bdaddr_t *src, gboolean master,
return io;
}
-int avctp_register(struct btd_adapter *adapter, gboolean master)
+int avctp_register(struct btd_adapter *adapter, gboolean central)
{
struct avctp_server *server;
const bdaddr_t *src = btd_adapter_get_address(adapter);
server = g_new0(struct avctp_server, 1);
- server->control_io = avctp_server_socket(src, master, BT_IO_MODE_BASIC,
+ server->control_io = avctp_server_socket(src, central, BT_IO_MODE_BASIC,
AVCTP_CONTROL_PSM);
if (!server->control_io) {
g_free(server);
return -1;
}
- server->browsing_io = avctp_server_socket(src, master, BT_IO_MODE_ERTM,
+ server->browsing_io = avctp_server_socket(src, central, BT_IO_MODE_ERTM,
AVCTP_BROWSING_PSM);
if (!server->browsing_io) {
if (server->control_io) {
diff --git a/profiles/audio/avctp.h b/profiles/audio/avctp.h
index 23e3732cde..ca5ff9126d 100644
--- a/profiles/audio/avctp.h
+++ b/profiles/audio/avctp.h
@@ -145,7 +145,7 @@ unsigned int avctp_add_state_cb(struct btd_device *dev, avctp_state_cb cb,
void *user_data);
gboolean avctp_remove_state_cb(unsigned int id);
-int avctp_register(struct btd_adapter *adapter, gboolean master);
+int avctp_register(struct btd_adapter *adapter, gboolean central);
void avctp_unregister(struct btd_adapter *adapter);
struct avctp *avctp_connect(struct btd_device *device);
diff --git a/profiles/health/mcap.c b/profiles/health/mcap.c
index be13af37a0..5161ef77c8 100644
--- a/profiles/health/mcap.c
+++ b/profiles/health/mcap.c
@@ -52,15 +52,15 @@
struct mcap_csp {
uint64_t base_tmstamp; /* CSP base timestamp */
struct timespec base_time; /* CSP base time when timestamp set */
- guint local_caps; /* CSP-Master: have got remote caps */
- guint remote_caps; /* CSP-Slave: remote master got caps */
- guint rem_req_acc; /* CSP-Slave: accuracy required by master */
- guint ind_expected; /* CSP-Master: indication expected */
- uint8_t csp_req; /* CSP-Master: Request control flag */
- guint ind_timer; /* CSP-Slave: indication timer */
- guint set_timer; /* CSP-Slave: delayed set timer */
- void *set_data; /* CSP-Slave: delayed set data */
- void *csp_priv_data; /* CSP-Master: In-flight request data */
+ guint local_caps; /* CSP-Cent.: have got remote caps */
+ guint remote_caps; /* CSP-Perip: remote central got caps */
+ guint rem_req_acc; /* CSP-Perip: accuracy req by central */
+ guint ind_expected; /* CSP-Cent.: indication expected */
+ uint8_t csp_req; /* CSP-Cent.: Request control flag */
+ guint ind_timer; /* CSP-Perip: indication timer */
+ guint set_timer; /* CSP-Perip: delayed set timer */
+ void *set_data; /* CSP-Perip: delayed set data */
+ void *csp_priv_data; /* CSP-Cent.: In-flight request data */
};
struct mcap_sync_cap_cbdata {
@@ -3139,7 +3139,7 @@ void mcap_sync_set_req(struct mcap_mcl *mcl, uint8_t update, uint32_t btclock,
g_set_error(err,
MCAP_CSP_ERROR,
MCAP_ERROR_RESOURCE_UNAVAILABLE,
- "Did not get CSP caps from slave yet");
+ "Did not get CSP caps from peripheral yet");
return;
}
diff --git a/profiles/health/mcap.h b/profiles/health/mcap.h
index 5a94c8b63b..00f3fa8510 100644
--- a/profiles/health/mcap.h
+++ b/profiles/health/mcap.h
@@ -270,7 +270,7 @@ struct mcap_instance {
mcap_mcl_event_cb mcl_reconnected_cb; /* Old MCL has been reconnected */
mcap_mcl_event_cb mcl_disconnected_cb; /* MCL disconnected */
mcap_mcl_event_cb mcl_uncached_cb; /* MCL has been removed from MCAP cache */
- mcap_info_ind_event_cb mcl_sync_infoind_cb; /* (CSP Master) Received info indication */
+ mcap_info_ind_event_cb mcl_sync_infoind_cb; /* (CSP Central) Received info indication */
gpointer user_data; /* Data to be provided in callbacks */
int ref; /* Reference counter */
--
2.33.0.153.gba50c8fa24-goog
From: Archie Pusaka <[email protected]>
BT core spec 5.3 promotes the usage of inclusive languages.
This CL replaces some terms with the more appropriate counterparts,
such as "central", "peripheral", "accept list", "reject list", and
"temporary link key". Note that some suggestions come from
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf
---
Changes in v4:
* Aggresively fix line over 80 columns
Changes in v2:
* Merging several patches from the same directory into one
tools/3dsp.c | 33 +++++----
tools/bdaddr.rst | 2 +-
tools/btiotest.c | 22 +++---
tools/btpclientctl.c | 2 +-
tools/hci-tester.c | 12 +--
tools/hciconfig.c | 148 ++++++++++++++++++++++++-------------
tools/hciconfig.rst | 24 +++---
tools/hcitool.c | 102 ++++++++++++-------------
tools/hcitool.rst | 30 ++++----
tools/l2cap-tester.c | 24 +++---
tools/l2test.c | 18 ++---
tools/mesh-cfgclient.c | 4 +-
tools/mesh-gatt/mesh-net.h | 4 +-
tools/mesh-gatt/net.c | 60 +++++++--------
tools/mesh/mesh-db.c | 28 ++++---
tools/mesh/mesh-db.h | 4 +-
tools/mesh/remote.c | 53 +++++++------
tools/mesh/remote.h | 5 +-
tools/meshctl.c | 6 +-
tools/mgmt-tester.c | 120 +++++++++++++++---------------
tools/oobtest.c | 8 +-
tools/parser/avdtp.c | 11 ++-
tools/parser/csr.c | 17 +++--
tools/parser/ericsson.c | 2 +-
tools/parser/hci.c | 38 +++++-----
tools/parser/lmp.c | 112 ++++++++++++++--------------
tools/parser/parser.h | 2 +-
tools/parser/smp.c | 12 +--
tools/rctest.c | 19 ++---
tools/rctest.rst | 4 +-
tools/rfcomm-tester.c | 14 ++--
tools/rfcomm.c | 15 ++--
tools/rfcomm.rst | 2 +-
tools/sco-tester.c | 10 +--
tools/smp-tester.c | 12 +--
35 files changed, 514 insertions(+), 465 deletions(-)
diff --git a/tools/3dsp.c b/tools/3dsp.c
index 5227c30b63..267a39e904 100644
--- a/tools/3dsp.c
+++ b/tools/3dsp.c
@@ -112,10 +112,10 @@ static void start_inquiry(void)
inquiry_started, NULL, NULL);
}
-static void set_slave_broadcast_receive(const void *data, uint8_t size,
+static void set_peripheral_broadcast_receive(const void *data, uint8_t size,
void *user_data)
{
- printf("Slave broadcast receiption enabled\n");
+ printf("Peripheral broadcast reception enabled\n");
}
static void sync_train_received(const void *data, uint8_t size,
@@ -149,7 +149,7 @@ static void sync_train_received(const void *data, uint8_t size,
bt_hci_send(hci_dev, BT_HCI_CMD_SET_PERIPHERAL_BROADCAST_RECEIVE,
&cmd, sizeof(cmd),
- set_slave_broadcast_receive, NULL, NULL);
+ set_peripheral_broadcast_receive, NULL, NULL);
}
static void brcm_sync_train_received(const void *data, uint8_t size,
@@ -183,7 +183,7 @@ static void brcm_sync_train_received(const void *data, uint8_t size,
bt_hci_send(hci_dev, BT_HCI_CMD_SET_PERIPHERAL_BROADCAST_RECEIVE,
&cmd, sizeof(cmd),
- set_slave_broadcast_receive, NULL, NULL);
+ set_peripheral_broadcast_receive, NULL, NULL);
}
static void truncated_page_complete(const void *data, uint8_t size,
@@ -209,7 +209,7 @@ static void truncated_page_complete(const void *data, uint8_t size,
NULL, NULL, NULL);
}
-static void slave_broadcast_timeout(const void *data, uint8_t size,
+static void peripheral_broadcast_timeout(const void *data, uint8_t size,
void *user_data)
{
const struct bt_hci_evt_peripheral_broadcast_timeout *evt = data;
@@ -226,7 +226,7 @@ static void slave_broadcast_timeout(const void *data, uint8_t size,
NULL, NULL, NULL);
}
-static void slave_broadcast_receive(const void *data, uint8_t size,
+static void peripheral_broadcast_receive(const void *data, uint8_t size,
void *user_data)
{
const struct bt_hci_evt_peripheral_broadcast_receive *evt = data;
@@ -327,9 +327,9 @@ static void start_glasses(void)
bt_hci_register(hci_dev, BT_HCI_EVT_TRUNCATED_PAGE_COMPLETE,
truncated_page_complete, NULL, NULL);
bt_hci_register(hci_dev, BT_HCI_EVT_PERIPHERAL_BROADCAST_TIMEOUT,
- slave_broadcast_timeout, NULL, NULL);
+ peripheral_broadcast_timeout, NULL, NULL);
bt_hci_register(hci_dev, BT_HCI_EVT_PERIPHERAL_BROADCAST_RECEIVE,
- slave_broadcast_receive, NULL, NULL);
+ peripheral_broadcast_receive, NULL, NULL);
start_inquiry();
}
@@ -381,7 +381,7 @@ static void conn_request(const void *data, uint8_t size, void *user_data)
start_sync_train();
}
-static void slave_page_response_timeout(const void *data, uint8_t size,
+static void peripheral_page_response_timeout(const void *data, uint8_t size,
void *user_data)
{
printf("Incoming truncated page received\n");
@@ -389,8 +389,8 @@ static void slave_page_response_timeout(const void *data, uint8_t size,
start_sync_train();
}
-static void slave_broadcast_channel_map_change(const void *data, uint8_t size,
- void *user_data)
+static void peripheral_broadcast_channel_map_change(const void *data,
+ uint8_t size, void *user_data)
{
printf("Broadcast channel map changed\n");
@@ -447,13 +447,14 @@ static void read_clock(const void *data, uint8_t size, void *user_data)
bcastdata, sizeof(bcastdata), NULL, NULL, NULL);
}
-static void set_slave_broadcast(const void *data, uint8_t size, void *user_data)
+static void set_peripheral_broadcast(const void *data, uint8_t size,
+ void *user_data)
{
const struct bt_hci_rsp_set_peripheral_broadcast *rsp = data;
struct bt_hci_cmd_read_clock cmd;
if (rsp->status) {
- printf("Failed to set slave broadcast transmission\n");
+ printf("Failed to set peripheral broadcast transmission\n");
shutdown_device();
return;
}
@@ -493,10 +494,10 @@ static void start_display(void)
conn_request, NULL, NULL);
bt_hci_register(hci_dev, BT_HCI_EVT_PERIPHERAL_PAGE_RESPONSE_TIMEOUT,
- slave_page_response_timeout, NULL, NULL);
+ peripheral_page_response_timeout, NULL, NULL);
bt_hci_register(hci_dev,
BT_HCI_EVT_PERIPHERAL_BROADCAST_CHANNEL_MAP_CHANGE,
- slave_broadcast_channel_map_change, NULL, NULL);
+ peripheral_broadcast_channel_map_change, NULL, NULL);
bt_hci_register(hci_dev, BT_HCI_EVT_SYNC_TRAIN_COMPLETE,
sync_train_complete, NULL, NULL);
@@ -512,7 +513,7 @@ static void start_display(void)
cmd.timeout = cpu_to_le16(0xfffe);
bt_hci_send(hci_dev, BT_HCI_CMD_SET_PERIPHERAL_BROADCAST, &cmd,
- sizeof(cmd), set_slave_broadcast, NULL, NULL);
+ sizeof(cmd), set_peripheral_broadcast, NULL, NULL);
}
static void signal_callback(int signum, void *user_data)
diff --git a/tools/bdaddr.rst b/tools/bdaddr.rst
index 1d21e2ca39..a84950bc35 100644
--- a/tools/bdaddr.rst
+++ b/tools/bdaddr.rst
@@ -61,7 +61,7 @@ FILES
=====
/usr/share/misc/oui.txt
- IEEE Organizationally Unique Identifier master file.
+ IEEE Organizationally Unique Identifier consolidated file.
Manually update from: http://standards.ieee.org/regauth/oui/oui.txt
diff --git a/tools/btiotest.c b/tools/btiotest.c
index 3f4900a5a5..1da8c20caf 100644
--- a/tools/btiotest.c
+++ b/tools/btiotest.c
@@ -310,7 +310,7 @@ static void l2cap_connect(const char *src, const char *dst, uint8_t addr_type,
static void l2cap_listen(const char *src, uint8_t addr_type, uint16_t psm,
uint16_t cid, int defer, int reject,
int disconn, int accept, int sec,
- gboolean master)
+ gboolean central)
{
struct io_data *data;
BtIOConnect conn;
@@ -343,7 +343,7 @@ static void l2cap_listen(const char *src, uint8_t addr_type, uint16_t psm,
BT_IO_OPT_PSM, psm,
BT_IO_OPT_CID, cid,
BT_IO_OPT_SEC_LEVEL, sec,
- BT_IO_OPT_CENTRAL, master,
+ BT_IO_OPT_CENTRAL, central,
BT_IO_OPT_INVALID);
else
l2_srv = bt_io_listen(conn, cfm, data,
@@ -353,7 +353,7 @@ static void l2cap_listen(const char *src, uint8_t addr_type, uint16_t psm,
BT_IO_OPT_PSM, psm,
BT_IO_OPT_CID, cid,
BT_IO_OPT_SEC_LEVEL, sec,
- BT_IO_OPT_CENTRAL, master,
+ BT_IO_OPT_CENTRAL, central,
BT_IO_OPT_INVALID);
if (!l2_srv) {
@@ -402,7 +402,7 @@ static void rfcomm_connect(const char *src, const char *dst, uint8_t ch,
static void rfcomm_listen(const char *src, uint8_t ch, gboolean defer,
int reject, int disconn, int accept,
- int sec, gboolean master)
+ int sec, gboolean central)
{
struct io_data *data;
BtIOConnect conn;
@@ -427,7 +427,7 @@ static void rfcomm_listen(const char *src, uint8_t ch, gboolean defer,
BT_IO_OPT_SOURCE, src,
BT_IO_OPT_CHANNEL, ch,
BT_IO_OPT_SEC_LEVEL, sec,
- BT_IO_OPT_CENTRAL, master,
+ BT_IO_OPT_CENTRAL, central,
BT_IO_OPT_INVALID);
else
rc_srv = bt_io_listen(conn, cfm,
@@ -435,7 +435,7 @@ static void rfcomm_listen(const char *src, uint8_t ch, gboolean defer,
&err,
BT_IO_OPT_CHANNEL, ch,
BT_IO_OPT_SEC_LEVEL, sec,
- BT_IO_OPT_CENTRAL, master,
+ BT_IO_OPT_CENTRAL, central,
BT_IO_OPT_INVALID);
if (!rc_srv) {
@@ -540,7 +540,7 @@ static int opt_reject = -1;
static int opt_disconn = -1;
static int opt_accept = DEFAULT_ACCEPT_TIMEOUT;
static int opt_sec = 0;
-static gboolean opt_master = FALSE;
+static gboolean opt_central = FALSE;
static int opt_priority = 0;
static int opt_cid = 0;
static guint8 opt_addr_type = 0;
@@ -576,8 +576,8 @@ static GOptionEntry options[] = {
"Disconnect connection after N seconds" },
{ "accept", 'a', 0, G_OPTION_ARG_INT, &opt_accept,
"Accept connection after N seconds" },
- { "master", 'm', 0, G_OPTION_ARG_NONE, &opt_master,
- "Master role switch (incoming connections)" },
+ { "central", 'C', 0, G_OPTION_ARG_NONE, &opt_central,
+ "Central role switch (incoming connections)" },
{ "priority", 'P', 0, G_OPTION_ARG_INT, &opt_priority,
"Transmission priority: Setting a priority "
"outside the range 0 to 6 requires the"
@@ -614,7 +614,7 @@ int main(int argc, char *argv[])
else
l2cap_listen(opt_dev, opt_addr_type, opt_psm, opt_cid,
opt_defer, opt_reject, opt_disconn,
- opt_accept, opt_sec, opt_master);
+ opt_accept, opt_sec, opt_central);
}
if (opt_channel != -1) {
@@ -624,7 +624,7 @@ int main(int argc, char *argv[])
else
rfcomm_listen(opt_dev, opt_channel, opt_defer,
opt_reject, opt_disconn, opt_accept,
- opt_sec, opt_master);
+ opt_sec, opt_central);
}
if (opt_sco) {
diff --git a/tools/btpclientctl.c b/tools/btpclientctl.c
index 6553f2f3a7..c30d5bd4e7 100644
--- a/tools/btpclientctl.c
+++ b/tools/btpclientctl.c
@@ -676,7 +676,7 @@ const struct indexstr_data ad_type_table[] = {
{ 0x10, "BT_AD_DEVICE_ID" },
{ 0x10, "BT_AD_SMP_TK" },
{ 0x11, "BT_AD_SMP_OOB_FLAGS" },
- { 0x12, "BT_AD_SLAVE_CONN_INTERVAL" },
+ { 0x12, "BT_AD_PERIPHERAL_CONN_INTERVAL" },
{ 0x14, "BT_AD_SOLICIT16" },
{ 0x15, "BT_AD_SOLICIT128" },
{ 0x16, "BT_AD_SERVICE_DATA16" },
diff --git a/tools/hci-tester.c b/tools/hci-tester.c
index 645d89e721..79193220fe 100644
--- a/tools/hci-tester.c
+++ b/tools/hci-tester.c
@@ -335,12 +335,12 @@ static void test_read_local_supported_codecs(const void *test_data)
test_command(BT_HCI_CMD_READ_LOCAL_CODECS);
}
-static void test_le_read_white_list_size(const void *test_data)
+static void test_le_read_accept_list_size(const void *test_data)
{
test_command(BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE);
}
-static void test_le_clear_white_list(const void *test_data)
+static void test_le_clear_accept_list(const void *test_data)
{
test_command(BT_HCI_CMD_LE_CLEAR_ACCEPT_LIST);
}
@@ -944,10 +944,10 @@ int main(int argc, char *argv[])
test_hci_local("Read Local Supported Codecs", NULL, NULL,
test_read_local_supported_codecs);
- test_hci_local("LE Read White List Size", NULL, NULL,
- test_le_read_white_list_size);
- test_hci_local("LE Clear White List", NULL, NULL,
- test_le_clear_white_list);
+ test_hci_local("LE Read Accept List Size", NULL, NULL,
+ test_le_read_accept_list_size);
+ test_hci_local("LE Clear Accept List", NULL, NULL,
+ test_le_clear_accept_list);
test_hci_local("LE Encrypt", NULL, NULL,
test_le_encrypt);
test_hci_local("LE Rand", NULL, NULL,
diff --git a/tools/hciconfig.c b/tools/hciconfig.c
index 491f216135..e4d5215833 100644
--- a/tools/hciconfig.c
+++ b/tools/hciconfig.c
@@ -116,8 +116,8 @@ static void print_le_states(uint64_t states)
"Directed Advertising State",
"Passive Scanning State",
"Active Scanning State",
- "Initiating State/Connection State in Master Role",
- "Connection State in the Slave Role",
+ "Initiating State/Connection State in Central Role",
+ "Connection State in the Peripheral Role",
"Non-connectable Advertising State and Passive Scanning State combination",
"Scannable Advertising State and Passive Scanning State combination",
"Connectable Advertising State and Passive Scanning State combination",
@@ -128,17 +128,17 @@ static void print_le_states(uint64_t states)
"Directed Advertising State and Active Scanning State combination",
"Non-connectable Advertising State and Initiating State combination",
"Scannable Advertising State and Initiating State combination",
- "Non-connectable Advertising State and Master Role combination",
- "Scannable Advertising State and Master Role combination",
- "Non-connectable Advertising State and Slave Role combination",
- "Scannable Advertising State and Slave Role combination",
+ "Non-connectable Advertising State and Central Role combination",
+ "Scannable Advertising State and Central Role combination",
+ "Non-connectable Advertising State and Peripheral Role combination",
+ "Scannable Advertising State and Peripheral Role combination",
"Passive Scanning State and Initiating State combination",
"Active Scanning State and Initiating State combination",
- "Passive Scanning State and Master Role combination",
- "Active Scanning State and Master Role combination",
- "Passive Scanning State and Slave Role combination",
- "Active Scanning State and Slave Role combination",
- "Initiating State and Master Role combination/Master Role and Master Role combination",
+ "Passive Scanning State and Central Role combination",
+ "Active Scanning State and Central Role combination",
+ "Passive Scanning State and Peripheral Role combination",
+ "Active Scanning State and Peripheral Role combination",
+ "Initiating State and Central Role combination/Central Role and Central Role combination",
NULL
};
@@ -1886,50 +1886,92 @@ static struct {
char *opt;
char *doc;
} command[] = {
- { "up", cmd_up, 0, "Open and initialize HCI device" },
- { "down", cmd_down, 0, "Close HCI device" },
- { "reset", cmd_reset, 0, "Reset HCI device" },
- { "rstat", cmd_rstat, 0, "Reset statistic counters" },
- { "auth", cmd_auth, 0, "Enable Authentication" },
- { "noauth", cmd_auth, 0, "Disable Authentication" },
- { "encrypt", cmd_encrypt, 0, "Enable Encryption" },
- { "noencrypt", cmd_encrypt, 0, "Disable Encryption" },
- { "piscan", cmd_scan, 0, "Enable Page and Inquiry scan" },
- { "noscan", cmd_scan, 0, "Disable scan" },
- { "iscan", cmd_scan, 0, "Enable Inquiry scan" },
- { "pscan", cmd_scan, 0, "Enable Page scan" },
- { "ptype", cmd_ptype, "[type]", "Get/Set default packet type" },
- { "lm", cmd_lm, "[mode]", "Get/Set default link mode" },
- { "lp", cmd_lp, "[policy]", "Get/Set default link policy" },
- { "name", cmd_name, "[name]", "Get/Set local name" },
- { "class", cmd_class, "[class]", "Get/Set class of device" },
- { "voice", cmd_voice, "[voice]", "Get/Set voice setting" },
- { "iac", cmd_iac, "[iac]", "Get/Set inquiry access code" },
- { "inqtpl", cmd_inq_tpl, "[level]", "Get/Set inquiry transmit power level" },
- { "inqmode", cmd_inq_mode, "[mode]", "Get/Set inquiry mode" },
- { "inqdata", cmd_inq_data, "[data]", "Get/Set inquiry data" },
- { "inqtype", cmd_inq_type, "[type]", "Get/Set inquiry scan type" },
- { "inqparms", cmd_inq_parms, "[win:int]", "Get/Set inquiry scan window and interval" },
- { "pageparms", cmd_page_parms, "[win:int]", "Get/Set page scan window and interval" },
- { "pageto", cmd_page_to, "[to]", "Get/Set page timeout" },
- { "afhmode", cmd_afh_mode, "[mode]", "Get/Set AFH mode" },
- { "sspmode", cmd_ssp_mode, "[mode]", "Get/Set Simple Pairing Mode" },
- { "aclmtu", cmd_aclmtu, "<mtu:pkt>", "Set ACL MTU and number of packets" },
- { "scomtu", cmd_scomtu, "<mtu:pkt>", "Set SCO MTU and number of packets" },
- { "delkey", cmd_delkey, "<bdaddr>", "Delete link key from the device" },
- { "oobdata", cmd_oob_data, 0, "Get local OOB data" },
- { "commands", cmd_commands, 0, "Display supported commands" },
- { "features", cmd_features, 0, "Display device features" },
- { "version", cmd_version, 0, "Display version information" },
- { "revision", cmd_revision, 0, "Display revision information" },
- { "block", cmd_block, "<bdaddr>", "Add a device to the blacklist" },
- { "unblock", cmd_unblock, "<bdaddr>", "Remove a device from the blacklist" },
- { "lerandaddr", cmd_le_addr, "<bdaddr>", "Set LE Random Address" },
- { "leadv", cmd_le_adv, "[type]", "Enable LE advertising"
+ { "up", cmd_up, 0,
+ "Open and initialize HCI device" },
+ { "down", cmd_down, 0,
+ "Close HCI device" },
+ { "reset", cmd_reset, 0,
+ "Reset HCI device" },
+ { "rstat", cmd_rstat, 0,
+ "Reset statistic counters" },
+ { "auth", cmd_auth, 0,
+ "Enable Authentication" },
+ { "noauth", cmd_auth, 0,
+ "Disable Authentication" },
+ { "encrypt", cmd_encrypt, 0,
+ "Enable Encryption" },
+ { "noencrypt", cmd_encrypt, 0,
+ "Disable Encryption" },
+ { "piscan", cmd_scan, 0,
+ "Enable Page and Inquiry scan" },
+ { "noscan", cmd_scan, 0,
+ "Disable scan" },
+ { "iscan", cmd_scan, 0,
+ "Enable Inquiry scan" },
+ { "pscan", cmd_scan, 0,
+ "Enable Page scan" },
+ { "ptype", cmd_ptype, "[type]",
+ "Get/Set default packet type" },
+ { "lm", cmd_lm, "[mode]",
+ "Get/Set default link mode" },
+ { "lp", cmd_lp, "[policy]",
+ "Get/Set default link policy" },
+ { "name", cmd_name, "[name]",
+ "Get/Set local name" },
+ { "class", cmd_class, "[class]",
+ "Get/Set class of device" },
+ { "voice", cmd_voice, "[voice]",
+ "Get/Set voice setting" },
+ { "iac", cmd_iac, "[iac]",
+ "Get/Set inquiry access code" },
+ { "inqtpl", cmd_inq_tpl, "[level]",
+ "Get/Set inquiry transmit power level" },
+ { "inqmode", cmd_inq_mode, "[mode]",
+ "Get/Set inquiry mode" },
+ { "inqdata", cmd_inq_data, "[data]",
+ "Get/Set inquiry data" },
+ { "inqtype", cmd_inq_type, "[type]",
+ "Get/Set inquiry scan type" },
+ { "inqparms", cmd_inq_parms, "[win:int]",
+ "Get/Set inquiry scan window and interval" },
+ { "pageparms", cmd_page_parms, "[win:int]",
+ "Get/Set page scan window and interval" },
+ { "pageto", cmd_page_to, "[to]",
+ "Get/Set page timeout" },
+ { "afhmode", cmd_afh_mode, "[mode]",
+ "Get/Set AFH mode" },
+ { "sspmode", cmd_ssp_mode, "[mode]",
+ "Get/Set Simple Pairing Mode" },
+ { "aclmtu", cmd_aclmtu, "<mtu:pkt>",
+ "Set ACL MTU and number of packets" },
+ { "scomtu", cmd_scomtu, "<mtu:pkt>",
+ "Set SCO MTU and number of packets" },
+ { "delkey", cmd_delkey, "<bdaddr>",
+ "Delete link key from the device" },
+ { "oobdata", cmd_oob_data, 0,
+ "Get local OOB data" },
+ { "commands", cmd_commands, 0,
+ "Display supported commands" },
+ { "features", cmd_features, 0,
+ "Display device features" },
+ { "version", cmd_version, 0,
+ "Display version information" },
+ { "revision", cmd_revision, 0,
+ "Display revision information" },
+ { "block", cmd_block, "<bdaddr>",
+ "Add a device to the reject list" },
+ { "unblock", cmd_unblock, "<bdaddr>",
+ "Remove a device from the reject list" },
+ { "lerandaddr", cmd_le_addr, "<bdaddr>",
+ "Set LE Random Address" },
+ { "leadv", cmd_le_adv, "[type]",
+ "Enable LE advertising"
"\n\t\t\t0 - Connectable undirected advertising (default)"
"\n\t\t\t3 - Non connectable undirected advertising"},
- { "noleadv", cmd_no_le_adv, 0, "Disable LE advertising" },
- { "lestates", cmd_le_states, 0, "Display the supported LE states" },
+ { "noleadv", cmd_no_le_adv, 0,
+ "Disable LE advertising" },
+ { "lestates", cmd_le_states, 0,
+ "Display the supported LE states" },
{ NULL, NULL, 0 }
};
diff --git a/tools/hciconfig.rst b/tools/hciconfig.rst
index 7d59b4046e..2d56eeb413 100644
--- a/tools/hciconfig.rst
+++ b/tools/hciconfig.rst
@@ -216,24 +216,24 @@ revision
Display revision information.
lm [*mode*]
- With no *mode*, prints link mode. **MASTER** or **SLAVE** mean,
- respectively, to ask to become master or to remain slave when a connection
- request comes in. The additional keyword **ACCEPT** means that baseband
- connections will be accepted even if there are no listening *AF_BLUETOOTH*
- sockets. *mode* is **NONE** or a comma-separated list of keywords, where
- possible keywords are **MASTER** and **ACCEPT**. **NONE** sets link policy
- to the default behaviour of remaining slave and not accepting baseband
- connections when there are no listening *AF_BLUETOOTH* sockets. If
- **MASTER** is present, the device will ask to become master if a
- connection request comes in. If **ACCEPT** is present, the device will
+ With no *mode*, prints link mode. **CENTRAL** or **PERIPHERAL** mean,
+ respectively, to ask to become central or to remain peripheral when a
+ connection request comes in. The additional keyword **ACCEPT** means that
+ baseband connections will be accepted even if there are no listening
+ *AF_BLUETOOTH* sockets. *mode* is **NONE** or a comma-separated list of
+ keywords, where possible keywords are **CENTRAL** and **ACCEPT**. **NONE**
+ sets link policy to the default behaviour of remaining peripheral and not
+ accepting baseband connections when there are no listening *AF_BLUETOOTH*
+ sockets. If **CENTRAL** is present, the device will ask to become central
+ if a connection request comes in. If **ACCEPT** is present, the device will
accept baseband connections even when there are no listening *AF_BLUETOOTH*
sockets.
block <*bdaddr*>
- Add a device to the blacklist
+ Add a device to the reject list
unblock <*bdaddr*>
- Remove a device from the blacklist
+ Remove a device from the reject list
lerandaddr <*bdaddr*>
Set LE Random Address
diff --git a/tools/hcitool.c b/tools/hcitool.c
index c6a9093733..6e6a39ed2f 100644
--- a/tools/hcitool.c
+++ b/tools/hcitool.c
@@ -1210,10 +1210,10 @@ static struct option cc_options[] = {
static const char *cc_help =
"Usage:\n"
- "\tcc [--role=m|s] [--ptype=pkt_types] <bdaddr>\n"
+ "\tcc [--role=c|p] [--ptype=pkt_types] <bdaddr>\n"
"Example:\n"
"\tcc --ptype=dm1,dh3,dh5 01:02:03:04:05:06\n"
- "\tcc --role=m 01:02:03:04:05:06\n";
+ "\tcc --role=c 01:02:03:04:05:06\n";
static void cmd_cc(int dev_id, int argc, char **argv)
{
@@ -1360,10 +1360,10 @@ static void cmd_sr(int dev_id, int argc, char **argv)
str2ba(argv[0], &bdaddr);
switch (argv[1][0]) {
- case 'm':
+ case 'c':
role = 0;
break;
- case 's':
+ case 'p':
role = 1;
break;
default:
@@ -2474,7 +2474,7 @@ static struct option lescan_options[] = {
{ "static", 0, 0, 's' },
{ "privacy", 0, 0, 'p' },
{ "passive", 0, 0, 'P' },
- { "whitelist", 0, 0, 'w' },
+ { "acceptlist", 0, 0, 'a' },
{ "discovery", 1, 0, 'd' },
{ "duplicates", 0, 0, 'D' },
{ 0, 0, 0, 0 }
@@ -2484,7 +2484,7 @@ static const char *lescan_help =
"Usage:\n"
"\tlescan [--privacy] enable privacy\n"
"\tlescan [--passive] set scan type passive (default active)\n"
- "\tlescan [--whitelist] scan for address in the whitelist only\n"
+ "\tlescan [--acceptlist] scan for address in the accept list only\n"
"\tlescan [--discovery=g|l] enable general or limited discovery"
"procedure\n"
"\tlescan [--duplicates] don't filter duplicates\n";
@@ -2511,8 +2511,8 @@ static void cmd_lescan(int dev_id, int argc, char **argv)
case 'P':
scan_type = 0x00; /* Passive */
break;
- case 'w':
- filter_policy = 0x01; /* Whitelist */
+ case 'a':
+ filter_policy = 0x01; /* Accept list */
break;
case 'd':
filter_type = optarg[0];
@@ -2678,14 +2678,14 @@ static struct option lecc_options[] = {
{ "help", 0, 0, 'h' },
{ "static", 0, 0, 's' },
{ "random", 0, 0, 'r' },
- { "whitelist", 0, 0, 'w' },
+ { "acceptlist", 0, 0, 'a' },
{ 0, 0, 0, 0 }
};
static const char *lecc_help =
"Usage:\n"
"\tlecc [--static] [--random] <bdaddr>\n"
- "\tlecc --whitelist\n";
+ "\tlecc --acceptlist\n";
static void cmd_lecc(int dev_id, int argc, char **argv)
{
@@ -2707,8 +2707,8 @@ static void cmd_lecc(int dev_id, int argc, char **argv)
case 'r':
peer_bdaddr_type = LE_RANDOM_ADDRESS;
break;
- case 'w':
- initiator_filter = 0x01; /* Use white list */
+ case 'a':
+ initiator_filter = 0x01; /* Use accept list */
break;
default:
printf("%s", lecc_help);
@@ -2753,34 +2753,34 @@ static void cmd_lecc(int dev_id, int argc, char **argv)
hci_close_dev(dd);
}
-static struct option lewladd_options[] = {
+static struct option lealall_options[] = {
{ "help", 0, 0, 'h' },
{ "random", 0, 0, 'r' },
{ 0, 0, 0, 0 }
};
-static const char *lewladd_help =
+static const char *lealall_help =
"Usage:\n"
- "\tlewladd [--random] <bdaddr>\n";
+ "\tlealall [--random] <bdaddr>\n";
-static void cmd_lewladd(int dev_id, int argc, char **argv)
+static void cmd_lealall(int dev_id, int argc, char **argv)
{
int err, opt, dd;
bdaddr_t bdaddr;
uint8_t bdaddr_type = LE_PUBLIC_ADDRESS;
- for_each_opt(opt, lewladd_options, NULL) {
+ for_each_opt(opt, lealall_options, NULL) {
switch (opt) {
case 'r':
bdaddr_type = LE_RANDOM_ADDRESS;
break;
default:
- printf("%s", lewladd_help);
+ printf("%s", lealall_help);
return;
}
}
- helper_arg(1, 1, &argc, &argv, lewladd_help);
+ helper_arg(1, 1, &argc, &argv, lealall_help);
if (dev_id < 0)
dev_id = hci_get_route(NULL);
@@ -2798,35 +2798,35 @@ static void cmd_lewladd(int dev_id, int argc, char **argv)
if (err < 0) {
err = -errno;
- fprintf(stderr, "Can't add to white list: %s(%d)\n",
+ fprintf(stderr, "Can't add to accept list: %s(%d)\n",
strerror(-err), -err);
exit(1);
}
}
-static struct option lewlrm_options[] = {
+static struct option lealrm_options[] = {
{ "help", 0, 0, 'h' },
{ 0, 0, 0, 0 }
};
-static const char *lewlrm_help =
+static const char *lealrm_help =
"Usage:\n"
- "\tlewlrm <bdaddr>\n";
+ "\tlealrm <bdaddr>\n";
-static void cmd_lewlrm(int dev_id, int argc, char **argv)
+static void cmd_lealrm(int dev_id, int argc, char **argv)
{
int err, opt, dd;
bdaddr_t bdaddr;
- for_each_opt(opt, lewlrm_options, NULL) {
+ for_each_opt(opt, lealrm_options, NULL) {
switch (opt) {
default:
- printf("%s", lewlrm_help);
+ printf("%s", lealrm_help);
return;
}
}
- helper_arg(1, 1, &argc, &argv, lewlrm_help);
+ helper_arg(1, 1, &argc, &argv, lealrm_help);
if (dev_id < 0)
dev_id = hci_get_route(NULL);
@@ -2844,35 +2844,35 @@ static void cmd_lewlrm(int dev_id, int argc, char **argv)
if (err < 0) {
err = errno;
- fprintf(stderr, "Can't remove from white list: %s(%d)\n",
+ fprintf(stderr, "Can't remove from accept list: %s(%d)\n",
strerror(err), err);
exit(1);
}
}
-static struct option lewlsz_options[] = {
+static struct option lealsz_options[] = {
{ "help", 0, 0, 'h' },
{ 0, 0, 0, 0 }
};
-static const char *lewlsz_help =
+static const char *lealsz_help =
"Usage:\n"
- "\tlewlsz\n";
+ "\tlealsz\n";
-static void cmd_lewlsz(int dev_id, int argc, char **argv)
+static void cmd_lealsz(int dev_id, int argc, char **argv)
{
int err, dd, opt;
uint8_t size;
- for_each_opt(opt, lewlsz_options, NULL) {
+ for_each_opt(opt, lealsz_options, NULL) {
switch (opt) {
default:
- printf("%s", lewlsz_help);
+ printf("%s", lealsz_help);
return;
}
}
- helper_arg(0, 0, &argc, &argv, lewlsz_help);
+ helper_arg(0, 0, &argc, &argv, lealsz_help);
if (dev_id < 0)
dev_id = hci_get_route(NULL);
@@ -2888,36 +2888,36 @@ static void cmd_lewlsz(int dev_id, int argc, char **argv)
if (err < 0) {
err = -errno;
- fprintf(stderr, "Can't read white list size: %s(%d)\n",
+ fprintf(stderr, "Can't read accept list size: %s(%d)\n",
strerror(-err), -err);
exit(1);
}
- printf("White list size: %d\n", size);
+ printf("Accept list size: %d\n", size);
}
-static struct option lewlclr_options[] = {
+static struct option lealclr_options[] = {
{ "help", 0, 0, 'h' },
{ 0, 0, 0, 0 }
};
-static const char *lewlclr_help =
+static const char *lealclr_help =
"Usage:\n"
- "\tlewlclr\n";
+ "\tlealclr\n";
-static void cmd_lewlclr(int dev_id, int argc, char **argv)
+static void cmd_lealclr(int dev_id, int argc, char **argv)
{
int err, dd, opt;
- for_each_opt(opt, lewlclr_options, NULL) {
+ for_each_opt(opt, lealclr_options, NULL) {
switch (opt) {
default:
- printf("%s", lewlclr_help);
+ printf("%s", lealclr_help);
return;
}
}
- helper_arg(0, 0, &argc, &argv, lewlclr_help);
+ helper_arg(0, 0, &argc, &argv, lealclr_help);
if (dev_id < 0)
dev_id = hci_get_route(NULL);
@@ -2933,7 +2933,7 @@ static void cmd_lewlclr(int dev_id, int argc, char **argv)
if (err < 0) {
err = -errno;
- fprintf(stderr, "Can't clear white list: %s(%d)\n",
+ fprintf(stderr, "Can't clear accept list: %s(%d)\n",
strerror(-err), -err);
exit(1);
}
@@ -3287,7 +3287,7 @@ static const char *lecup_help =
"\t --handle=<0xXXXX> LE connection handle\n"
"\t --min=<interval> Range: 0x0006 to 0x0C80\n"
"\t --max=<interval> Range: 0x0006 to 0x0C80\n"
- "\t --latency=<range> Slave latency. Range: 0x0000 to 0x03E8\n"
+ "\t --latency=<range> Peripheral latency. Range: 0x0000 to 0x03E8\n"
"\t --timeout=<time> N * 10ms. Range: 0x000A to 0x0C80\n"
"\n\t min/max range: 7.5ms to 4s. Multiply factor: 1.25ms"
"\n\t timeout range: 100ms to 32.0s. Larger than max interval\n";
@@ -3379,7 +3379,7 @@ static struct {
{ "con", cmd_con, "Display active connections" },
{ "cc", cmd_cc, "Create connection to remote device" },
{ "dc", cmd_dc, "Disconnect from remote device" },
- { "sr", cmd_sr, "Switch master/slave role" },
+ { "sr", cmd_sr, "Switch central/peripheral role" },
{ "cpt", cmd_cpt, "Change connection packet type" },
{ "rssi", cmd_rssi, "Display connection RSSI" },
{ "lq", cmd_lq, "Display link quality" },
@@ -3394,10 +3394,10 @@ static struct {
{ "clock", cmd_clock, "Read local or remote clock" },
{ "lescan", cmd_lescan, "Start LE scan" },
{ "leinfo", cmd_leinfo, "Get LE remote information" },
- { "lewladd", cmd_lewladd, "Add device to LE White List" },
- { "lewlrm", cmd_lewlrm, "Remove device from LE White List" },
- { "lewlsz", cmd_lewlsz, "Read size of LE White List" },
- { "lewlclr", cmd_lewlclr, "Clear LE White List" },
+ { "lealall", cmd_lealall, "Add device to LE Accept List" },
+ { "lealrm", cmd_lealrm, "Remove device from LE Accept List" },
+ { "lealsz", cmd_lealsz, "Read size of LE Accept List" },
+ { "lealclr", cmd_lealclr, "Clear LE Accept List" },
{ "lerladd", cmd_lerladd, "Add device to LE Resolving List" },
{ "lerlrm", cmd_lerlrm, "Remove device from LE Resolving List" },
{ "lerlclr", cmd_lerlclr, "Clear LE Resolving List" },
diff --git a/tools/hcitool.rst b/tools/hcitool.rst
index f59d694078..36cf4fd66b 100644
--- a/tools/hcitool.rst
+++ b/tools/hcitool.rst
@@ -74,7 +74,7 @@ cmd <*ogf*> <*ocf*> [*parameters*]
con
Display active baseband connections
-cc [--*role*\=m|s] [--*pkt-type*\=<*ptype*>] <*bdaddr*>
+cc [--*role*\=c|p] [--*pkt-type*\=<*ptype*>] <*bdaddr*>
Create baseband connection to remote device with Bluetooth address *bdaddr*.
Option **--pkt-type** specifies a list of allowed packet types.
@@ -82,9 +82,9 @@ cc [--*role*\=m|s] [--*pkt-type*\=<*ptype*>] <*bdaddr*>
packet types are **DM1**, **DM3**, **DM5**, **DH1**, **DH3**, **DH5**,
**HV1**, **HV2**, **HV3**. Default is to allow all packet types.
- Option **--role** can have value **m** (do not allow role switch, stay
- master) or **s** (allow role switch, become slave if the peer asks to become
- master). Default is **m**.
+ Option **--role** can have value **c** (do not allow role switch, stay
+ central) or **p** (allow role switch, become peripheral if the peer asks to
+ become central). Default is **c**.
dc <*bdaddr*> [*reason*]
Delete baseband connection from remote device with Bluetooth address
@@ -96,7 +96,7 @@ dc <*bdaddr*> [*reason*]
sr <*bdaddr*> <*role*>
Switch role for the baseband connection from the remote device to
- **master** or **slave**.
+ **central** or **peripheral**.
cpt <*bdaddr*> <*ptypes*>
Change packet types for baseband connection to device with Bluetooth
@@ -157,23 +157,23 @@ clock [*bdaddr*] [*clock*]
The *clock* can be **0** for the local clock or **1** for the piconet
clock (which is default).
-lescan [--*privacy*] [--*passive*] [--*whitelist*] [--*discovery*\=g|l] [--*duplicates*]
+lescan [--*privacy*] [--*passive*] [--*acceptlist*] [--*discovery*\=g|l] [--*duplicates*]
Start LE scan
leinfo [--*static*] [--*random*] <*bdaddr*>
Get LE remote information
-lewladd [--*random*] <*bdaddr*>
- Add device to LE White List
+lealall [--*random*] <*bdaddr*>
+ Add device to LE Accept List
-lewlrm <*bdaddr*>
- Remove device from LE White List
+lealrm <*bdaddr*>
+ Remove device from LE Accept List
-lewlsz
- Read size of LE White List
+lealsz
+ Read size of LE Accept List
-lewlclr
- Clear LE White List
+lealclr
+ Clear LE Accept List
lerladd [--*local_irk*] [--*peer_irk*] [--*random*] <*bdaddr*>
Add device to LE Resolving List
@@ -193,7 +193,7 @@ lerlon
lerloff
Disable LE Address Resolution
-lecc [--*static*] [--*random*] <*bdaddr*> | [--*whitelist*]
+lecc [--*static*] [--*random*] <*bdaddr*> | [--*acceptlist*]
Create a LE Connection
ledc <*handle*> [*reason*]
diff --git a/tools/l2cap-tester.c b/tools/l2cap-tester.c
index 169a989f54..d78b1e29cc 100644
--- a/tools/l2cap-tester.c
+++ b/tools/l2cap-tester.c
@@ -1103,7 +1103,7 @@ static int create_l2cap_sock(struct test_data *data, uint16_t psm,
uint16_t cid, int sec_level, uint8_t mode)
{
const struct l2cap_data *l2data = data->test_data;
- const uint8_t *master_bdaddr;
+ const uint8_t *central_bdaddr;
struct sockaddr_l2 addr;
int sk, err;
@@ -1116,9 +1116,9 @@ static int create_l2cap_sock(struct test_data *data, uint16_t psm,
return err;
}
- master_bdaddr = hciemu_get_central_bdaddr(data->hciemu);
- if (!master_bdaddr) {
- tester_warn("No master bdaddr");
+ central_bdaddr = hciemu_get_central_bdaddr(data->hciemu);
+ if (!central_bdaddr) {
+ tester_warn("No central bdaddr");
close(sk);
return -ENODEV;
}
@@ -1127,7 +1127,7 @@ static int create_l2cap_sock(struct test_data *data, uint16_t psm,
addr.l2_family = AF_BLUETOOTH;
addr.l2_psm = htobs(psm);
addr.l2_cid = htobs(cid);
- bacpy(&addr.l2_bdaddr, (void *) master_bdaddr);
+ bacpy(&addr.l2_bdaddr, (void *) central_bdaddr);
if (l2data && l2data->addr_type_avail)
addr.l2_bdaddr_type = l2data->addr_type;
@@ -1437,7 +1437,7 @@ static gboolean test_close_socket_1_part_2(gpointer args)
tester_print("Will close socket during scan phase...");
/* We tried to conect to LE device that is not advertising. It
- * was added to kernel whitelist, and scan was started. We
+ * was added to kernel accept list, and scan was started. We
* should be still scanning.
*/
if (!hciemu_get_central_le_scan_enable(data->hciemu)) {
@@ -1446,7 +1446,7 @@ static gboolean test_close_socket_1_part_2(gpointer args)
return FALSE;
}
- /* Calling close() should remove device from whitelist, and stop
+ /* Calling close() should remove device from accept list, and stop
* the scan.
*/
if (close(sk) < 0) {
@@ -1836,7 +1836,7 @@ static void test_server(const void *test_data)
{
struct test_data *data = tester_get_data();
const struct l2cap_data *l2data = data->test_data;
- const uint8_t *master_bdaddr;
+ const uint8_t *central_bdaddr;
uint8_t addr_type;
struct bthost *bthost;
GIOChannel *io;
@@ -1869,9 +1869,9 @@ static void test_server(const void *test_data)
tester_print("Listening for connections");
}
- master_bdaddr = hciemu_get_central_bdaddr(data->hciemu);
- if (!master_bdaddr) {
- tester_warn("No master bdaddr");
+ central_bdaddr = hciemu_get_central_bdaddr(data->hciemu);
+ if (!central_bdaddr) {
+ tester_warn("No central bdaddr");
tester_test_failed();
return;
}
@@ -1884,7 +1884,7 @@ static void test_server(const void *test_data)
else
addr_type = BDADDR_LE_PUBLIC;
- bthost_hci_connect(bthost, master_bdaddr, addr_type);
+ bthost_hci_connect(bthost, central_bdaddr, addr_type);
}
static void test_getpeername_not_connected(const void *test_data)
diff --git a/tools/l2test.c b/tools/l2test.c
index 6e07f7b842..a611185b66 100644
--- a/tools/l2test.c
+++ b/tools/l2test.c
@@ -110,7 +110,7 @@ static int seq_start = 0;
static const char *filename = NULL;
static int rfcmode = 0;
-static int master = 0;
+static int central = 0;
static int auth = 0;
static int encr = 0;
static int secure = 0;
@@ -483,7 +483,7 @@ static int do_connect(char *svr)
opt = 0;
if (reliable)
opt |= L2CAP_LM_RELIABLE;
- if (master)
+ if (central)
opt |= L2CAP_LM_MASTER;
if (auth)
opt |= L2CAP_LM_AUTH;
@@ -586,7 +586,7 @@ static void do_listen(void (*handler)(int sk))
opt = 0;
if (reliable)
opt |= L2CAP_LM_RELIABLE;
- if (master)
+ if (central)
opt |= L2CAP_LM_MASTER;
if (auth)
opt |= L2CAP_LM_AUTH;
@@ -1306,7 +1306,7 @@ static void usage(void)
"\t[-W seconds] enable deferred setup\n"
"\t[-B filename] use data packets from file\n"
"\t[-N num] send num frames (default = infinite)\n"
- "\t[-C num] send num frames before delay (default = 1)\n"
+ "\t[-M num] send num frames before delay (default = 1)\n"
"\t[-D milliseconds] delay after sending num frames (default = 0)\n"
"\t[-K milliseconds] delay before receiving (default = 0)\n"
"\t[-g milliseconds] delay before disconnecting (default = 0)\n"
@@ -1323,7 +1323,7 @@ static void usage(void)
"\t[-A] request authentication\n"
"\t[-E] request encryption\n"
"\t[-S] secure connection\n"
- "\t[-M] become master\n"
+ "\t[-C] become central\n"
"\t[-T] enable timestamps\n"
"\t[-V type] address type (help for list, default = bredr)\n"
"\t[-e seq] initial sequence value (default = 0)\n");
@@ -1337,7 +1337,7 @@ int main(int argc, char *argv[])
bacpy(&bdaddr, BDADDR_ANY);
while ((opt = getopt(argc, argv, "a:b:cde:g:i:mnpqrstuwxyz"
- "AB:C:D:EF:GH:I:J:K:L:MN:O:P:Q:RSTUV:W:X:Y:Z:")) != EOF) {
+ "AB:CD:EF:GH:I:J:K:L:M:N:O:P:Q:RSTUV:W:X:Y:Z:")) != EOF) {
switch (opt) {
case 'r':
mode = RECV;
@@ -1442,7 +1442,7 @@ int main(int argc, char *argv[])
num_frames = atoi(optarg);
break;
- case 'C':
+ case 'M':
count = atoi(optarg);
break;
@@ -1488,8 +1488,8 @@ int main(int argc, char *argv[])
reliable = 1;
break;
- case 'M':
- master = 1;
+ case 'C':
+ central = 1;
break;
case 'A':
diff --git a/tools/mesh-cfgclient.c b/tools/mesh-cfgclient.c
index a4a6f21ab8..70553c95c8 100644
--- a/tools/mesh-cfgclient.c
+++ b/tools/mesh-cfgclient.c
@@ -720,7 +720,7 @@ static void attach_node_reply(struct l_dbus_proxy *proxy,
ivi != iv_index) {
iv_index = ivi;
mesh_db_set_iv_index(ivi);
- remote_clear_blacklisted_addresses(ivi);
+ remote_clear_rejected_addresses(ivi);
}
return;
@@ -1858,7 +1858,7 @@ static void property_changed(struct l_dbus_proxy *proxy, const char *name,
iv_index = ivi;
mesh_db_set_iv_index(ivi);
- remote_clear_blacklisted_addresses(ivi);
+ remote_clear_rejected_addresses(ivi);
}
}
}
diff --git a/tools/mesh-gatt/mesh-net.h b/tools/mesh-gatt/mesh-net.h
index 29c8de06cf..95a1346e75 100644
--- a/tools/mesh-gatt/mesh-net.h
+++ b/tools/mesh-gatt/mesh-net.h
@@ -97,8 +97,8 @@
#define PROXY_OP_FILTER_STATUS 0x03
/* Proxy Filter Defines */
-#define PROXY_FILTER_WHITELIST 0x00
-#define PROXY_FILTER_BLACKLIST 0x01
+#define PROXY_FILTER_ACCEPT_LIST 0x00
+#define PROXY_FILTER_REJECT_LIST 0x01
/* Network Tranport Opcodes */
#define NET_OP_SEG_ACKNOWLEDGE 0x00
diff --git a/tools/mesh-gatt/net.c b/tools/mesh-gatt/net.c
index 2fdd0d4bef..e165c65ce6 100644
--- a/tools/mesh-gatt/net.c
+++ b/tools/mesh-gatt/net.c
@@ -47,11 +47,11 @@ struct mesh_net {
uint8_t default_ttl;
bool iv_update;
bool provisioner;
- bool blacklist;
+ bool reject_list;
guint iv_update_timeout;
GDBusProxy *proxy_in;
GList *address_pool;
- GList *dest; /* List of valid local destinations for Whitelist */
+ GList *dest; /* List of valid local destinations for Accept List */
GList *sar_in; /* Incoming segmented messages in progress */
GList *msg_out; /* Pre-Network encoded, might be multi-segment */
GList *pkt_out; /* Fully encoded packets awaiting Tx in order */
@@ -200,8 +200,8 @@ struct mesh_destination {
#define FILTER_STATUS 0x03
/* Proxy Filter Types */
-#define WHITELIST_FILTER 0x00
-#define BLACKLIST_FILTER 0x01
+#define ACCEPT_LIST_FILTER 0x00
+#define REJECT_LIST_FILTER 0x01
/* IV Updating states for timing enforcement */
#define IV_UPD_INIT 0
@@ -919,45 +919,45 @@ void net_dest_unref(uint16_t dst)
}
}
-struct build_whitelist {
+struct build_accept_list {
uint8_t len;
uint8_t data[12];
};
-static void whitefilter_add(gpointer data, gpointer user_data)
+static void accept_filter_add(gpointer data, gpointer user_data)
{
struct mesh_destination *dest = data;
- struct build_whitelist *white = user_data;
+ struct build_accept_list *accept = user_data;
- if (white->len == 0)
- white->data[white->len++] = FILTER_ADD;
+ if (accept->len == 0)
+ accept->data[accept->len++] = FILTER_ADD;
- put_be16(dest->dst, white->data + white->len);
- white->len += 2;
+ put_be16(dest->dst, accept->data + accept->len);
+ accept->len += 2;
- if (white->len > (sizeof(white->data) - sizeof(uint16_t))) {
- net_ctl_msg_send(0, 0, 0, white->data, white->len);
- white->len = 0;
+ if (accept->len > (sizeof(accept->data) - sizeof(uint16_t))) {
+ net_ctl_msg_send(0, 0, 0, accept->data, accept->len);
+ accept->len = 0;
}
}
-static void setup_whitelist()
+static void setup_accept_list(void)
{
- struct build_whitelist white;
+ struct build_accept_list accept;
- white.len = 0;
+ accept.len = 0;
- /* Enable (and Clear) Proxy Whitelist */
- white.data[white.len++] = FILTER_SETUP;
- white.data[white.len++] = WHITELIST_FILTER;
+ /* Enable (and Clear) Proxy Accept List */
+ accept.data[accept.len++] = FILTER_SETUP;
+ accept.data[accept.len++] = ACCEPT_LIST_FILTER;
- net_ctl_msg_send(0, 0, 0, white.data, white.len);
+ net_ctl_msg_send(0, 0, 0, accept.data, accept.len);
- white.len = 0;
- g_list_foreach(net.dest, whitefilter_add, &white);
+ accept.len = 0;
+ g_list_foreach(net.dest, accept_filter_add, &accept);
- if (white.len)
- net_ctl_msg_send(0, 0, 0, white.data, white.len);
+ if (accept.len)
+ net_ctl_msg_send(0, 0, 0, accept.data, accept.len);
}
static void beacon_update(bool first, bool iv_update, uint32_t iv_index)
@@ -1009,7 +1009,7 @@ static void beacon_update(bool first, bool iv_update, uint32_t iv_index)
if (first) {
/* Must be done once per Proxy Connection after Beacon RXed */
- setup_whitelist();
+ setup_accept_list();
if (net.open_cb)
net.open_cb(0);
}
@@ -1388,9 +1388,9 @@ static bool proxy_ctl_rxed(uint16_t net_idx, uint32_t iv_index,
if (len != 4)
return false;
- net.blacklist = !!(trans[1] == BLACKLIST_FILTER);
- bt_shell_printf("Proxy %slist filter length: %d\n",
- net.blacklist ? "Black" : "White",
+ net.reject_list = !!(trans[1] == REJECT_LIST_FILTER);
+ bt_shell_printf("Proxy %s list filter length: %d\n",
+ net.reject_list ? "Reject" : "Accept",
get_be16(trans + 2));
return true;
@@ -1950,7 +1950,7 @@ bool net_session_open(GDBusProxy *data_in, bool provisioner,
net.proxy_in = data_in;
net.iv_upd_state = IV_UPD_INIT;
- net.blacklist = false;
+ net.reject_list = false;
net.provisioner = provisioner;
net.open_cb = cb;
flush_pkt_list(&net.pkt_out);
diff --git a/tools/mesh/mesh-db.c b/tools/mesh/mesh-db.c
index 46f0c60751..6779bb8403 100644
--- a/tools/mesh/mesh-db.c
+++ b/tools/mesh/mesh-db.c
@@ -1246,7 +1246,7 @@ bool mesh_db_set_iv_index(uint32_t ivi)
return save_config();
}
-static int get_blacklisted_by_iv_index(json_object *jarray, uint32_t iv_index)
+static int get_rejected_by_iv_index(json_object *jarray, uint32_t iv_index)
{
int i, cnt;
@@ -1268,12 +1268,12 @@ static int get_blacklisted_by_iv_index(json_object *jarray, uint32_t iv_index)
return -1;
}
-static bool load_blacklisted(json_object *jobj)
+static bool load_rejected_addresses(json_object *jobj)
{
json_object *jarray;
int i, cnt;
- json_object_object_get_ex(jobj, "blacklistedAddresses", &jarray);
+ json_object_object_get_ex(jobj, "rejectedAddresses", &jarray);
if (!jarray || json_object_get_type(jarray) != json_type_array)
return true;
@@ -1304,15 +1304,14 @@ static bool load_blacklisted(json_object *jobj)
if (sscanf(str, "%04hx", &unicast) != 1)
return false;
- remote_add_blacklisted_address(unicast, iv_index,
- false);
+ remote_add_rejected_address(unicast, iv_index, false);
}
}
return true;
}
-bool mesh_db_add_blacklisted_addr(uint16_t unicast, uint32_t iv_index)
+bool mesh_db_add_rejected_addr(uint16_t unicast, uint32_t iv_index)
{
json_object *jarray, *jobj, *jaddrs, *jstring;
int idx;
@@ -1321,14 +1320,13 @@ bool mesh_db_add_blacklisted_addr(uint16_t unicast, uint32_t iv_index)
if (!cfg || !cfg->jcfg)
return false;
- json_object_object_get_ex(cfg->jcfg, "blacklistedAddresses", &jarray);
+ json_object_object_get_ex(cfg->jcfg, "rejectedAddresses", &jarray);
if (!jarray) {
jarray = json_object_new_array();
- json_object_object_add(cfg->jcfg, "blacklistedAddresses",
- jarray);
+ json_object_object_add(cfg->jcfg, "rejectedAddresses", jarray);
}
- idx = get_blacklisted_by_iv_index(jarray, iv_index);
+ idx = get_rejected_by_iv_index(jarray, iv_index);
if (idx < 0) {
jobj = json_object_new_object();
@@ -1362,7 +1360,7 @@ fail:
return false;
}
-bool mesh_db_clear_blacklisted(uint32_t iv_index)
+bool mesh_db_clear_rejected(uint32_t iv_index)
{
json_object *jarray;
int idx;
@@ -1370,11 +1368,11 @@ bool mesh_db_clear_blacklisted(uint32_t iv_index)
if (!cfg || !cfg->jcfg)
return false;
- json_object_object_get_ex(cfg->jcfg, "blacklistedAddresses", &jarray);
+ json_object_object_get_ex(cfg->jcfg, "rejectedAddresses", &jarray);
if (!jarray || json_object_get_type(jarray) != json_type_array)
return false;
- idx = get_blacklisted_by_iv_index(jarray, iv_index);
+ idx = get_rejected_by_iv_index(jarray, iv_index);
if (idx < 0)
return true;
@@ -1437,7 +1435,7 @@ bool mesh_db_create(const char *fname, const uint8_t token[8],
if (!jarray)
goto fail;
- json_object_object_add(jcfg, "blacklistedAddresses", jarray);
+ json_object_object_add(jcfg, "rejectedAddresses", jarray);
write_int(jcfg, "ivIndex", 0);
@@ -1504,7 +1502,7 @@ bool mesh_db_load(const char *fname)
load_remotes(jcfg);
- load_blacklisted(jcfg);
+ load_rejected_addresses(jcfg);
return true;
fail:
diff --git a/tools/mesh/mesh-db.h b/tools/mesh/mesh-db.h
index d1d734bf3e..22518c6189 100644
--- a/tools/mesh/mesh-db.h
+++ b/tools/mesh/mesh-db.h
@@ -49,5 +49,5 @@ bool mesh_db_node_model_binding_del(uint16_t unicast, uint8_t ele, bool vendor,
uint32_t mod_id, uint16_t app_idx);
struct l_queue *mesh_db_load_groups(void);
bool mesh_db_add_group(struct mesh_group *grp);
-bool mesh_db_add_blacklisted_addr(uint16_t unicast, uint32_t iv_index);
-bool mesh_db_clear_blacklisted(uint32_t iv_index);
+bool mesh_db_add_rejected_addr(uint16_t unicast, uint32_t iv_index);
+bool mesh_db_clear_rejected(uint32_t iv_index);
diff --git a/tools/mesh/remote.c b/tools/mesh/remote.c
index 9b265bee49..e60a3681d0 100644
--- a/tools/mesh/remote.c
+++ b/tools/mesh/remote.c
@@ -34,13 +34,13 @@ struct remote_node {
uint8_t num_ele;
};
-struct blacklisted_addr {
+struct rejected_addr {
uint32_t iv_index;
uint16_t unicast;
};
static struct l_queue *nodes;
-static struct l_queue *blacklisted;
+static struct l_queue *reject_list;
static bool key_present(struct l_queue *keys, uint16_t app_idx)
{
@@ -124,7 +124,7 @@ uint8_t remote_del_node(uint16_t unicast)
for (i = 0; i < num_ele; ++i) {
l_queue_destroy(rmt->els[i], NULL);
- remote_add_blacklisted_address(unicast + i, iv_index, true);
+ remote_add_rejected_address(unicast + i, iv_index, true);
}
l_free(rmt->els);
@@ -333,9 +333,9 @@ static void print_node(void *rmt, void *user_data)
print_element(node->els[i], i);
}
-static bool match_black_addr(const void *a, const void *b)
+static bool match_rejected_addr(const void *a, const void *b)
{
- const struct blacklisted_addr *addr = a;
+ const struct rejected_addr *addr = a;
uint16_t unicast = L_PTR_TO_UINT(b);
return addr->unicast == unicast;
@@ -348,11 +348,11 @@ static uint16_t get_next_addr(uint16_t high, uint16_t addr,
int i = 0;
for (i = 0; i < ele_cnt; i++) {
- struct blacklisted_addr *black;
+ struct rejected_addr *reject;
- black = l_queue_find(blacklisted, match_black_addr,
+ reject = l_queue_find(reject_list, match_rejected_addr,
L_UINT_TO_PTR(addr + i));
- if (!black)
+ if (!reject)
break;
}
@@ -367,10 +367,10 @@ static uint16_t get_next_addr(uint16_t high, uint16_t addr,
static bool check_iv_index(const void *a, const void *b)
{
- const struct blacklisted_addr *black_addr = a;
+ const struct rejected_addr *reject = a;
uint32_t iv_index = L_PTR_TO_UINT(b);
- return (abs_diff(iv_index, black_addr->iv_index) > 2);
+ return (abs_diff(iv_index, reject->iv_index) > 2);
}
void remote_print_node(uint16_t addr)
@@ -435,36 +435,35 @@ uint16_t remote_get_next_unicast(uint16_t low, uint16_t high, uint8_t ele_cnt)
return addr;
}
-void remote_add_blacklisted_address(uint16_t addr, uint32_t iv_index,
- bool save)
+void remote_add_rejected_address(uint16_t addr, uint32_t iv_index, bool save)
{
- struct blacklisted_addr *black_addr;
+ struct rejected_addr *reject;
- if (!blacklisted)
- blacklisted = l_queue_new();
+ if (!reject_list)
+ reject_list = l_queue_new();
- black_addr = l_new(struct blacklisted_addr, 1);
- black_addr->unicast = addr;
- black_addr->iv_index = iv_index;
+ reject = l_new(struct rejected_addr, 1);
+ reject->unicast = addr;
+ reject->iv_index = iv_index;
- l_queue_push_tail(blacklisted, black_addr);
+ l_queue_push_tail(reject_list, reject);
if (save)
- mesh_db_add_blacklisted_addr(addr, iv_index);
+ mesh_db_add_rejected_addr(addr, iv_index);
}
-void remote_clear_blacklisted_addresses(uint32_t iv_index)
+void remote_clear_rejected_addresses(uint32_t iv_index)
{
- struct blacklisted_addr *black_addr;
+ struct rejected_addr *reject;
- black_addr = l_queue_remove_if(blacklisted, check_iv_index,
+ reject = l_queue_remove_if(reject_list, check_iv_index,
L_UINT_TO_PTR(iv_index));
- while (black_addr) {
- l_free(black_addr);
- black_addr = l_queue_remove_if(blacklisted, check_iv_index,
+ while (reject) {
+ l_free(reject);
+ reject = l_queue_remove_if(reject_list, check_iv_index,
L_UINT_TO_PTR(iv_index));
}
- mesh_db_clear_blacklisted(iv_index);
+ mesh_db_clear_rejected(iv_index);
}
diff --git a/tools/mesh/remote.h b/tools/mesh/remote.h
index bb4fb11917..8ecb097ae4 100644
--- a/tools/mesh/remote.h
+++ b/tools/mesh/remote.h
@@ -13,9 +13,8 @@ bool remote_add_node(const uint8_t uuid[16], uint16_t unicast,
uint8_t remote_del_node(uint16_t unicast);
bool remote_set_model(uint16_t unicast, uint8_t ele_idx, uint32_t mod_id,
bool vendor);
-void remote_add_blacklisted_address(uint16_t addr, uint32_t iv_index,
- bool save);
-void remote_clear_blacklisted_addresses(uint32_t iv_index);
+void remote_add_rejected_address(uint16_t addr, uint32_t iv_index, bool save);
+void remote_clear_rejected_addresses(uint32_t iv_index);
uint16_t remote_get_next_unicast(uint16_t low, uint16_t high, uint8_t ele_cnt);
bool remote_add_net_key(uint16_t addr, uint16_t net_idx);
bool remote_del_net_key(uint16_t addr, uint16_t net_idx);
diff --git a/tools/meshctl.c b/tools/meshctl.c
index 9d7df2ccdc..18e20c40d2 100644
--- a/tools/meshctl.c
+++ b/tools/meshctl.c
@@ -541,19 +541,19 @@ static void print_uuids(GDBusProxy *proxy)
}
}
-static gboolean device_is_child(GDBusProxy *device, GDBusProxy *master)
+static gboolean device_is_child(GDBusProxy *device, GDBusProxy *parent)
{
DBusMessageIter iter;
const char *adapter, *path;
- if (!master)
+ if (!parent)
return FALSE;
if (g_dbus_proxy_get_property(device, "Adapter", &iter) == FALSE)
return FALSE;
dbus_message_iter_get_basic(&iter, &adapter);
- path = g_dbus_proxy_get_path(master);
+ path = g_dbus_proxy_get_path(parent);
if (!strcmp(path, adapter))
return TRUE;
diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index dc53faf3af..8afd58344c 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -2698,20 +2698,20 @@ static const char load_ltks_invalid_param_2[] = {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, /* bdaddr */
0x00, /* addr type */
0x00, /* authenticated */
- 0x00, /* master */
+ 0x00, /* central */
0x00, /* encryption size */
0x00, 0x00, /* diversifier */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* rand */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* value (1/2) */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* value (2/2) */
};
-/* Invalid master value */
+/* Invalid central value */
static const char load_ltks_invalid_param_3[] = {
0x01, 0x00, /* count */
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, /* bdaddr */
0x01, /* addr type */
0x00, /* authenticated */
- 0x02, /* master */
+ 0x02, /* central */
0x00, /* encryption size */
0x00, 0x00, /* diversifier */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* rand */
@@ -4233,7 +4233,7 @@ static const uint8_t add_device_success_param_6[] = {
0x02,
};
-static const uint8_t le_add_to_white_list_param[] = {
+static const uint8_t le_add_to_accept_list_param[] = {
0x00, /* Type */
0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, /* Address */
};
@@ -4249,8 +4249,8 @@ static const struct generic_data add_device_success_6 = {
.expect_alt_ev_param = add_device_success_param_6,
.expect_alt_ev_len = sizeof(add_device_success_param_6),
.expect_hci_command = BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST,
- .expect_hci_param = le_add_to_white_list_param,
- .expect_hci_len = sizeof(le_add_to_white_list_param),
+ .expect_hci_param = le_add_to_accept_list_param,
+ .expect_hci_len = sizeof(le_add_to_accept_list_param),
};
static const uint8_t le_add_to_resolv_list_param[] = {
@@ -4419,8 +4419,8 @@ static const struct generic_data remove_device_success_7 = {
.expect_len = sizeof(remove_device_param_2),
.expect_status = MGMT_STATUS_SUCCESS,
.expect_hci_command = BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST,
- .expect_hci_param = le_add_to_white_list_param,
- .expect_hci_len = sizeof(le_add_to_white_list_param),
+ .expect_hci_param = le_add_to_accept_list_param,
+ .expect_hci_len = sizeof(le_add_to_accept_list_param),
.expect_alt_ev = MGMT_EV_DEVICE_REMOVED,
.expect_alt_ev_param = remove_device_param_2,
.expect_alt_ev_len = sizeof(remove_device_param_2),
@@ -4434,8 +4434,8 @@ static const struct generic_data remove_device_success_8 = {
.expect_len = sizeof(remove_device_param_2),
.expect_status = MGMT_STATUS_SUCCESS,
.expect_hci_command = BT_HCI_CMD_LE_REMOVE_FROM_RESOLV_LIST,
- .expect_hci_param = le_add_to_white_list_param,
- .expect_hci_len = sizeof(le_add_to_white_list_param),
+ .expect_hci_param = le_add_to_accept_list_param,
+ .expect_hci_len = sizeof(le_add_to_accept_list_param),
.expect_alt_ev = MGMT_EV_DEVICE_REMOVED,
.expect_alt_ev_param = remove_device_param_2,
.expect_alt_ev_len = sizeof(remove_device_param_2),
@@ -5374,40 +5374,40 @@ static const struct generic_data read_local_oob_ext_success_sc_test = {
.expect_hci_command = BT_HCI_CMD_READ_LOCAL_OOB_EXT_DATA,
};
-static const uint8_t le_states_conn_slave_adv_connectable[] = {
+static const uint8_t le_states_conn_peripheral_adv_connectable[] = {
0x00, 0x00, 0x20, 0x00, 0x40, 0x00, 0x00, 0x00};
-static const uint8_t le_states_conn_slave_adv_non_connectable[] = {
+static const uint8_t le_states_conn_peripheral_adv_non_connectable[] = {
0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00};
-static const uint8_t le_states_conn_master_adv_connectable[] = {
+static const uint8_t le_states_conn_central_adv_connectable[] = {
0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00};
-static const uint8_t le_states_conn_master_adv_non_connectable[] = {
+static const uint8_t le_states_conn_central_adv_non_connectable[] = {
0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00};
-static const struct generic_data conn_slave_adv_conneactable_test = {
+static const struct generic_data conn_peripheral_adv_connectable_test = {
.setup_le_states = true,
- .le_states = le_states_conn_slave_adv_connectable,
+ .le_states = le_states_conn_peripheral_adv_connectable,
.setup_settings = settings_powered_le,
.client_enable_le = true
};
-static const struct generic_data conn_slave_adv_non_conneactable_test = {
+static const struct generic_data conn_peripheral_adv_non_connectable_test = {
.setup_le_states = true,
- .le_states = le_states_conn_slave_adv_non_connectable,
+ .le_states = le_states_conn_peripheral_adv_non_connectable,
.setup_settings = settings_powered_le,
.client_enable_le = true
};
-static const struct generic_data conn_master_adv_conneactable_test = {
+static const struct generic_data conn_central_adv_connectable_test = {
.setup_le_states = true,
- .le_states = le_states_conn_master_adv_connectable,
+ .le_states = le_states_conn_central_adv_connectable,
.setup_settings = settings_powered_le,
.client_enable_le = true,
.client_enable_adv = 1
};
-static const struct generic_data conn_master_adv_non_conneactable_test = {
+static const struct generic_data conn_central_adv_non_connectable_test = {
.setup_le_states = true,
- .le_states = le_states_conn_master_adv_non_connectable,
+ .le_states = le_states_conn_central_adv_non_connectable,
.setup_settings = settings_powered_le,
.client_enable_le = true,
.client_enable_adv = 1
@@ -9801,7 +9801,7 @@ static void test_pairing_acceptor(const void *test_data)
{
struct test_data *data = tester_get_data();
const struct generic_data *test = data->test_data;
- const uint8_t *master_bdaddr;
+ const uint8_t *central_bdaddr;
struct bthost *bthost;
uint8_t addr_type;
@@ -9817,9 +9817,9 @@ static void test_pairing_acceptor(const void *test_data)
test_add_condition(data);
}
- master_bdaddr = hciemu_get_central_bdaddr(data->hciemu);
- if (!master_bdaddr) {
- tester_warn("No master bdaddr");
+ central_bdaddr = hciemu_get_central_bdaddr(data->hciemu);
+ if (!central_bdaddr) {
+ tester_warn("No central bdaddr");
tester_test_failed();
return;
}
@@ -9832,7 +9832,7 @@ static void test_pairing_acceptor(const void *test_data)
else
addr_type = BDADDR_LE_PUBLIC;
- bthost_hci_connect(bthost, master_bdaddr, addr_type);
+ bthost_hci_connect(bthost, central_bdaddr, addr_type);
}
static void connected_event(uint16_t index, uint16_t length, const void *param,
@@ -9870,7 +9870,7 @@ static void test_command_generic_connect(const void *test_data)
{
struct test_data *data = tester_get_data();
unsigned int id;
- const uint8_t *master_bdaddr;
+ const uint8_t *central_bdaddr;
uint8_t addr_type;
struct bthost *bthost;
@@ -9882,9 +9882,9 @@ static void test_command_generic_connect(const void *test_data)
data->mgmt_alt_ev_id = id;
test_add_condition(data);
- master_bdaddr = hciemu_get_central_bdaddr(data->hciemu);
- if (!master_bdaddr) {
- tester_warn("No master bdaddr");
+ central_bdaddr = hciemu_get_central_bdaddr(data->hciemu);
+ if (!central_bdaddr) {
+ tester_warn("No central bdaddr");
tester_test_failed();
return;
}
@@ -9893,7 +9893,7 @@ static void test_command_generic_connect(const void *test_data)
BDADDR_LE_PUBLIC;
tester_print("ADDR TYPE: %d", addr_type);
bthost = hciemu_client_get_host(data->hciemu);
- bthost_hci_connect(bthost, master_bdaddr, addr_type);
+ bthost_hci_connect(bthost, central_bdaddr, addr_type);
}
static bool test_adv_enable_hook(const void *data, uint16_t len,
@@ -9946,7 +9946,7 @@ static void add_device_callback(uint8_t status, uint16_t len, const void *param,
struct test_data *data = user_data;
const struct generic_data *test = data->test_data;
struct bthost *bthost;
- const uint8_t *master_bdaddr;
+ const uint8_t *central_bdaddr;
if (status != 0) {
tester_test_failed();
@@ -9961,18 +9961,19 @@ static void add_device_callback(uint8_t status, uint16_t len, const void *param,
if (test->client_enable_adv)
return;
- master_bdaddr = hciemu_get_central_bdaddr(data->hciemu);
- if (!master_bdaddr) {
- tester_warn("No master bdaddr");
+ central_bdaddr = hciemu_get_central_bdaddr(data->hciemu);
+ if (!central_bdaddr) {
+ tester_warn("No central bdaddr");
tester_test_failed();
return;
}
bthost = hciemu_client_get_host(data->hciemu);
if (data->hciemu_type >= HCIEMU_TYPE_BREDRLE50)
- bthost_hci_ext_connect(bthost, master_bdaddr, BDADDR_LE_PUBLIC);
+ bthost_hci_ext_connect(bthost, central_bdaddr,
+ BDADDR_LE_PUBLIC);
else
- bthost_hci_connect(bthost, master_bdaddr, BDADDR_LE_PUBLIC);
+ bthost_hci_connect(bthost, central_bdaddr, BDADDR_LE_PUBLIC);
}
static void test_connected_and_advertising(const void *test_data)
@@ -10915,9 +10916,9 @@ int main(int argc, char *argv[])
&add_device_success_5,
NULL, test_command_generic);
/* MGMT_OP_ADD_DEVICE
- * Add device and check the device is added to the whitelist
+ * Add device and check the device is added to the accept list
*/
- test_bredrle50("Add Device - Success 6 - Add to whitelist",
+ test_bredrle50("Add Device - Success 6 - Add to accept list",
&add_device_success_6,
NULL, test_command_generic);
/* MGMT_OP_ADD_DEVICE
@@ -10969,7 +10970,7 @@ int main(int argc, char *argv[])
* Remove the device and check the device is removed from the whilte
* list as well.
*/
- test_bredrle50("Remove Device - Success 7 - Remove from whitelist",
+ test_bredrle50("Remove Device - Success 7 - Remove from accept list",
&remove_device_success_7,
setup_ll_privacy_device2, test_command_generic);
/* MGMT_OP_REMOVE_DEVICE
@@ -11176,23 +11177,24 @@ int main(int argc, char *argv[])
&add_advertising_name_data_appear,
setup_command_generic,
test_command_generic);
- test_le_full("Adv. connectable & connected (slave) - Success",
- &conn_slave_adv_conneactable_test,
- setup_advertise_while_connected,
- test_connected_and_advertising, 10);
- test_le_full("Adv. non-connectable & connected (slave) - Success",
- &conn_slave_adv_non_conneactable_test,
+ test_le_full("Adv. connectable & connected (peripheral) - Success",
+ &conn_peripheral_adv_connectable_test,
setup_advertise_while_connected,
test_connected_and_advertising, 10);
- test_le_full("Adv. connectable & connected (master) - Success",
- &conn_master_adv_conneactable_test,
+ test_le_full("Adv. non-connectable & connected (peripheral) - Success",
+ &conn_peripheral_adv_non_connectable_test,
+ setup_advertise_while_connected,
+ test_connected_and_advertising, 10);
+
+ test_le_full("Adv. connectable & connected (central) - Success",
+ &conn_central_adv_connectable_test,
setup_advertise_while_connected,
test_connected_and_advertising, 10);
- test_le_full("Adv. non-connectable & connected (master) - Success",
- &conn_master_adv_non_conneactable_test,
+ test_le_full("Adv. non-connectable & connected (central) - Success",
+ &conn_central_adv_non_connectable_test,
setup_advertise_while_connected,
test_connected_and_advertising, 10);
@@ -11600,23 +11602,23 @@ int main(int argc, char *argv[])
&device_found_invalid_field,
NULL, test_device_found);
- test_bredrle50_full("Ext Adv. connectable & connected (slave) - Success",
- &conn_slave_adv_conneactable_test,
+ test_bredrle50_full("Ext Adv. connectable & connected (peripheral)",
+ &conn_peripheral_adv_connectable_test,
setup_advertise_while_connected,
test_connected_and_advertising, 10);
- test_bredrle50_full("Ext Adv. non-connectable & connected (slave) - Success",
- &conn_slave_adv_non_conneactable_test,
+ test_bredrle50_full("Ext Adv. non-connectable & connected (peripheral)",
+ &conn_peripheral_adv_non_connectable_test,
setup_advertise_while_connected,
test_connected_and_advertising, 10);
- test_bredrle50_full("Ext Adv. connectable & connected (master) - Success",
- &conn_master_adv_conneactable_test,
+ test_bredrle50_full("Ext Adv. connectable & connected (central)",
+ &conn_central_adv_connectable_test,
setup_advertise_while_connected,
test_connected_and_advertising, 10);
- test_bredrle50_full("Ext Adv. non-connectable & connected (master) - Success",
- &conn_master_adv_non_conneactable_test,
+ test_bredrle50_full("Ext Adv. non-connectable & connected (central)",
+ &conn_central_adv_non_connectable_test,
setup_advertise_while_connected,
test_connected_and_advertising, 10);
diff --git a/tools/oobtest.c b/tools/oobtest.c
index 0368bc3865..eed765af02 100644
--- a/tools/oobtest.c
+++ b/tools/oobtest.c
@@ -134,15 +134,15 @@ static void new_long_term_key_event(uint16_t index, uint16_t len,
switch (ev->key.type) {
case 0x00:
if (ev->key.central)
- type = "Unauthenticated, Master";
+ type = "Unauthenticated, Central";
else
- type = "Unauthenticated, Slave";
+ type = "Unauthenticated, Peripheral";
break;
case 0x01:
if (ev->key.central)
- type = "Authenticated, Master";
+ type = "Authenticated, Central";
else
- type = "Authenticated, Slave";
+ type = "Authenticated, Peripheral";
break;
case 0x02:
type = "Unauthenticated, P-256";
diff --git a/tools/parser/avdtp.c b/tools/parser/avdtp.c
index bb7bbadaba..e78cbd75ba 100644
--- a/tools/parser/avdtp.c
+++ b/tools/parser/avdtp.c
@@ -605,7 +605,7 @@ void avdtp_dump(int level, struct frame *frm)
nsp = (hdr & 0x0c) == 0x04 ? p_get_u8(frm) : 0;
sid = hdr & 0x08 ? 0x00 : p_get_u8(frm);
- printf("AVDTP(s): %s %s: transaction %d nsp 0x%02x\n",
+ printf("AVDTP(p): %s %s: transaction %d nsp 0x%02x\n",
hdr & 0x08 ? pt2str(hdr) : si2str(sid),
mt2str(hdr), hdr >> 4, nsp);
@@ -659,9 +659,12 @@ void avdtp_dump(int level, struct frame *frm)
time = p_get_u32(frm);
ssrc = p_get_u32(frm);
- printf("AVDTP(m): ver %d %s%scc %d %spt %d seqn %d time %d ssrc %d\n",
- hdr >> 6, hdr & 0x20 ? "pad " : "", hdr & 0x10 ? "ext " : "",
- hdr & 0xf, type & 0x80 ? "mark " : "", type & 0x7f, seqn, time, ssrc);
+ printf("AVDTP(c): ver %d %s%scc"
+ " %d %spt %d seqn %d time %d ssrc %d\n",
+ hdr >> 6, hdr & 0x20 ? "pad " : "",
+ hdr & 0x10 ? "ext " : "", hdr & 0xf,
+ type & 0x80 ? "mark " : "", type & 0x7f,
+ seqn, time, ssrc);
break;
}
diff --git a/tools/parser/csr.c b/tools/parser/csr.c
index c112e138b1..bd50b1c760 100644
--- a/tools/parser/csr.c
+++ b/tools/parser/csr.c
@@ -257,7 +257,7 @@ static inline void pskey_dump(int level, struct frame *frm)
uint16_dump(level + 1, "MAX_SCOS", frm);
break;
case 0x000f:
- uint16_dump(level + 1, "MAX_REMOTE_MASTERS", frm);
+ uint16_dump(level + 1, "MAX_REMOTE_CENTRALS", frm);
break;
case 0x00da:
uint16_dump(level + 1, "ENC_KEY_LMIN", frm);
@@ -546,7 +546,7 @@ static char *frag2str(uint8_t frag)
void csr_dump(int level, struct frame *frm)
{
uint8_t desc, cid, type;
- uint16_t handle, master, addr;
+ uint16_t handle, central, addr;
desc = CSR_U8(frm);
@@ -564,24 +564,25 @@ void csr_dump(int level, struct frame *frm)
switch (type) {
case 0x0f:
frm->handle = ((uint8_t *) frm->ptr)[17];
- frm->master = 0;
+ frm->central = 0;
frm->len--;
lmp_dump(level, frm);
return;
case 0x10:
frm->handle = ((uint8_t *) frm->ptr)[17];
- frm->master = 1;
+ frm->central = 1;
frm->len--;
lmp_dump(level, frm);
return;
case 0x12:
handle = CSR_U16(frm);
- master = CSR_U16(frm);
+ central = CSR_U16(frm);
addr = CSR_U16(frm);
p_indent(level, frm);
- printf("FHS: handle %d addr %d (%s)\n", handle,
- addr, master ? "master" : "slave");
- if (!master) {
+ printf("FHS: handle %d addr %d (%s)\n",
+ handle, addr,
+ central ? "central" : "peripheral");
+ if (!central) {
char addr[18];
p_ba2str((bdaddr_t *) frm->ptr, addr);
p_indent(level + 1, frm);
diff --git a/tools/parser/ericsson.c b/tools/parser/ericsson.c
index 09b7cec68f..b2807eca59 100644
--- a/tools/parser/ericsson.c
+++ b/tools/parser/ericsson.c
@@ -29,7 +29,7 @@ void ericsson_dump(int level, struct frame *frm)
raw_dump(level, frm);
}
- frm->master = !(buf[0] & 0x01);
+ frm->central = !(buf[0] & 0x01);
frm->handle = buf[1] | (buf[2] << 8);
buf[5] = (buf[5] << 1) | (buf[3] & 0x01);
diff --git a/tools/parser/hci.c b/tools/parser/hci.c
index d395e37f54..db7d32c011 100644
--- a/tools/parser/hci.c
+++ b/tools/parser/hci.c
@@ -45,7 +45,7 @@ static char *event_str[EVENT_NUM + 1] = {
"Remote Name Req Complete",
"Encrypt Change",
"Change Connection Link Key Complete",
- "Master Link Key Complete",
+ "Temporary Link Key Complete",
"Read Remote Supported Features",
"Read Remote Ver Info Complete",
"QoS Setup Complete",
@@ -150,7 +150,7 @@ static char *cmd_linkctl_str[CMD_LINKCTL_NUM + 1] = {
"Unknown",
"Change Connection Link Key",
"Unknown",
- "Master Link Key",
+ "Temporary Link Key",
"Unknown",
"Remote Name Request",
"Remote Name Request Cancel",
@@ -383,10 +383,10 @@ static char *cmd_le_str[CMD_LE_NUM + 1] = {
"LE Set Scan Enable",
"LE Create Connection",
"LE Create Connection Cancel",
- "LE Read White List Size",
- "LE Clear White List",
- "LE Add Device To White List",
- "LE Remove Device From White List",
+ "LE Read Accept List Size",
+ "LE Clear Accept List",
+ "LE Add Device To Accept List",
+ "LE Remove Device From Accept List",
"LE Connection Update",
"LE Set Host Channel Classification",
"LE Read Channel Map",
@@ -568,9 +568,9 @@ static char *role2str(uint8_t role)
{
switch (role) {
case 0x00:
- return "Master";
+ return "Central";
case 0x01:
- return "Slave";
+ return "Peripheral";
default:
return "Unknown";
}
@@ -739,11 +739,11 @@ static char *filterpolicy2str(uint8_t policy)
case 0x00:
return "Allow scan from any, connection from any";
case 0x01:
- return "Allow scan from white list, connection from any";
+ return "Allow scan from accept list, connection from any";
case 0x02:
- return "Allow scan from any, connection from white list";
+ return "Allow scan from any, connection from accept list";
case 0x03:
- return "Allow scan and connection from white list";
+ return "Allow scan and connection from accept list";
default:
return "Reserved";
}
@@ -1082,7 +1082,7 @@ static inline void remote_name_req_dump(int level, struct frame *frm)
clkoffset & 0x7fff, clkoffset & 0x8000 ? " (valid)" : "");
}
-static inline void master_link_key_dump(int level, struct frame *frm)
+static inline void temporary_link_key_dump(int level, struct frame *frm)
{
master_link_key_cp *cp = frm->ptr;
@@ -1638,9 +1638,10 @@ static inline void le_set_scan_parameters_dump(int level, struct frame *frm)
p_indent(level, frm);
printf("own address: 0x%02x (%s) policy: %s\n", cp->own_bdaddr_type,
- bdaddrtype2str(cp->own_bdaddr_type),
+ bdaddrtype2str(cp->own_bdaddr_type),
(cp->filter == 0x00 ? "All" :
- (cp->filter == 0x01 ? "white list only" : "reserved")));
+ (cp->filter == 0x01 ? "accept list only" :
+ "reserved")));
}
static inline void le_set_scan_enable_dump(int level, struct frame *frm)
@@ -1772,7 +1773,7 @@ static inline void command_dump(int level, struct frame *frm)
generic_command_dump(level + 1, frm);
return;
case OCF_MASTER_LINK_KEY:
- master_link_key_dump(level + 1, frm);
+ temporary_link_key_dump(level + 1, frm);
return;
case OCF_READ_REMOTE_EXT_FEATURES:
read_remote_ext_features_dump(level + 1, frm);
@@ -3114,7 +3115,8 @@ static inline void remote_name_req_complete_dump(int level, struct frame *frm)
}
}
-static inline void master_link_key_complete_dump(int level, struct frame *frm)
+static inline void temporary_link_key_complete_dump(int level,
+ struct frame *frm)
{
evt_master_link_key_complete *evt = frm->ptr;
@@ -3565,7 +3567,7 @@ static inline void evt_le_conn_complete_dump(int level, struct frame *frm)
p_indent(level, frm);
printf("status 0x%2.2x handle %d, role %s\n",
evt->status, btohs(evt->handle),
- evt->role ? "slave" : "master");
+ evt->role ? "peripheral" : "central");
p_indent(level, frm);
p_ba2str(&evt->peer_bdaddr, addr);
@@ -3875,7 +3877,7 @@ static inline void event_dump(int level, struct frame *frm)
generic_response_dump(level + 1, frm);
break;
case EVT_MASTER_LINK_KEY_COMPLETE:
- master_link_key_complete_dump(level + 1, frm);
+ temporary_link_key_complete_dump(level + 1, frm);
break;
case EVT_REMOTE_NAME_REQ_COMPLETE:
remote_name_req_complete_dump(level + 1, frm);
diff --git a/tools/parser/lmp.c b/tools/parser/lmp.c
index e99902b0e6..94b6428967 100644
--- a/tools/parser/lmp.c
+++ b/tools/parser/lmp.c
@@ -28,22 +28,22 @@
static enum {
IN_RAND,
- COMB_KEY_M,
- COMB_KEY_S,
- AU_RAND_M,
- AU_RAND_S,
- SRES_M,
- SRES_S,
+ COMB_KEY_C,
+ COMB_KEY_P,
+ AU_RAND_C,
+ AU_RAND_P,
+ SRES_C,
+ SRES_P,
} pairing_state = IN_RAND;
static struct {
uint8_t in_rand[16];
- uint8_t comb_key_m[16];
- uint8_t comb_key_s[16];
- uint8_t au_rand_m[16];
- uint8_t au_rand_s[16];
- uint8_t sres_m[4];
- uint8_t sres_s[4];
+ uint8_t comb_key_c[16];
+ uint8_t comb_key_p[16];
+ uint8_t au_rand_c[16];
+ uint8_t au_rand_p[16];
+ uint8_t sres_c[4];
+ uint8_t sres_p[4];
} pairing_data;
static inline void pairing_data_dump(void)
@@ -59,31 +59,31 @@ static inline void pairing_data_dump(void)
p_indent(6, NULL);
printf("COMB_KEY ");
for (i = 0; i < 16; i++)
- printf("%2.2x", pairing_data.comb_key_m[i]);
+ printf("%2.2x", pairing_data.comb_key_c[i]);
printf(" (M)\n");
p_indent(6, NULL);
printf("COMB_KEY ");
for (i = 0; i < 16; i++)
- printf("%2.2x", pairing_data.comb_key_s[i]);
+ printf("%2.2x", pairing_data.comb_key_p[i]);
printf(" (S)\n");
p_indent(6, NULL);
printf("AU_RAND ");
for (i = 0; i < 16; i++)
- printf("%2.2x", pairing_data.au_rand_m[i]);
+ printf("%2.2x", pairing_data.au_rand_c[i]);
printf(" SRES ");
for (i = 0; i < 4; i++)
- printf("%2.2x", pairing_data.sres_m[i]);
+ printf("%2.2x", pairing_data.sres_c[i]);
printf(" (M)\n");
p_indent(6, NULL);
printf("AU_RAND ");
for (i = 0; i < 16; i++)
- printf("%2.2x", pairing_data.au_rand_s[i]);
+ printf("%2.2x", pairing_data.au_rand_p[i]);
printf(" SRES ");
for (i = 0; i < 4; i++)
- printf("%2.2x", pairing_data.sres_s[i]);
+ printf("%2.2x", pairing_data.sres_p[i]);
printf(" (S)\n");
}
@@ -92,7 +92,7 @@ static inline void in_rand(struct frame *frm)
uint8_t *val = frm->ptr;
memcpy(pairing_data.in_rand, val, 16);
- pairing_state = COMB_KEY_M;
+ pairing_state = COMB_KEY_C;
}
static inline void comb_key(struct frame *frm)
@@ -100,19 +100,19 @@ static inline void comb_key(struct frame *frm)
uint8_t *val = frm->ptr;
switch (pairing_state) {
- case COMB_KEY_M:
- memcpy(pairing_data.comb_key_m, val, 16);
- pairing_state = COMB_KEY_S;
+ case COMB_KEY_C:
+ memcpy(pairing_data.comb_key_c, val, 16);
+ pairing_state = COMB_KEY_P;
break;
- case COMB_KEY_S:
- memcpy(pairing_data.comb_key_s, val, 16);
- pairing_state = AU_RAND_M;
+ case COMB_KEY_P:
+ memcpy(pairing_data.comb_key_p, val, 16);
+ pairing_state = AU_RAND_C;
break;
case IN_RAND:
- case AU_RAND_M:
- case AU_RAND_S:
- case SRES_M:
- case SRES_S:
+ case AU_RAND_C:
+ case AU_RAND_P:
+ case SRES_C:
+ case SRES_P:
default:
pairing_state = IN_RAND;
break;
@@ -124,19 +124,19 @@ static inline void au_rand(struct frame *frm)
uint8_t *val = frm->ptr;
switch (pairing_state) {
- case AU_RAND_M:
- memcpy(pairing_data.au_rand_m, val, 16);
- pairing_state = SRES_M;
+ case AU_RAND_C:
+ memcpy(pairing_data.au_rand_c, val, 16);
+ pairing_state = SRES_C;
break;
- case AU_RAND_S:
- memcpy(pairing_data.au_rand_s, val, 16);
- pairing_state = SRES_S;
+ case AU_RAND_P:
+ memcpy(pairing_data.au_rand_p, val, 16);
+ pairing_state = SRES_P;
break;
- case COMB_KEY_M:
- case COMB_KEY_S:
+ case COMB_KEY_C:
+ case COMB_KEY_P:
case IN_RAND:
- case SRES_M:
- case SRES_S:
+ case SRES_C:
+ case SRES_P:
default:
pairing_state = IN_RAND;
break;
@@ -148,20 +148,20 @@ static inline void sres(struct frame *frm)
uint8_t *val = frm->ptr;
switch (pairing_state) {
- case SRES_M:
- memcpy(pairing_data.sres_m, val, 4);
- pairing_state = AU_RAND_S;
+ case SRES_C:
+ memcpy(pairing_data.sres_c, val, 4);
+ pairing_state = AU_RAND_P;
break;
- case SRES_S:
- memcpy(pairing_data.sres_s, val, 4);
+ case SRES_P:
+ memcpy(pairing_data.sres_p, val, 4);
pairing_state = IN_RAND;
pairing_data_dump();
break;
- case COMB_KEY_M:
- case COMB_KEY_S:
+ case COMB_KEY_C:
+ case COMB_KEY_P:
case IN_RAND:
- case AU_RAND_M:
- case AU_RAND_S:
+ case AU_RAND_C:
+ case AU_RAND_P:
default:
pairing_state = IN_RAND;
break;
@@ -1016,10 +1016,10 @@ static inline void esco_link_req_dump(int level, struct frame *frm)
uint8_t desco = LMP_U8(frm);
uint8_t tesco = LMP_U8(frm);
uint8_t wesco = LMP_U8(frm);
- uint8_t mspkt = LMP_U8(frm);
- uint8_t smpkt = LMP_U8(frm);
- uint16_t mslen = LMP_U16(frm);
- uint16_t smlen = LMP_U16(frm);
+ uint8_t cppkt = LMP_U8(frm);
+ uint8_t pcpkt = LMP_U8(frm);
+ uint16_t cplen = LMP_U16(frm);
+ uint16_t pclen = LMP_U16(frm);
uint8_t airmode = LMP_U8(frm);
uint8_t negstate = LMP_U8(frm);
@@ -1036,10 +1036,10 @@ static inline void esco_link_req_dump(int level, struct frame *frm)
printf("D_eSCO %d T_eSCO %d W_eSCO %d\n", desco, tesco, wesco);
p_indent(level, frm);
- printf("eSCO M->S packet type 0x%2.2x length %d\n", mspkt, mslen);
+ printf("eSCO C->P packet type 0x%2.2x length %d\n", cppkt, cplen);
p_indent(level, frm);
- printf("eSCO S->M packet type 0x%2.2x length %d\n", smpkt, smlen);
+ printf("eSCO P->C packet type 0x%2.2x length %d\n", pcpkt, pclen);
p_indent(level, frm);
printf("air mode 0x%2.2x\n", airmode);
@@ -1141,8 +1141,8 @@ void lmp_dump(int level, struct frame *frm)
opcode += tmp << 7;
}
- printf("LMP(%c): %s(%c): ", frm->master ? 's' : 'r',
- opcode2str(opcode), tid ? 's' : 'm');
+ printf("LMP(%c): %s(%c): ", frm->central ? 's' : 'r',
+ opcode2str(opcode), tid ? 'p' : 'c');
if (opcode > 123)
printf("op code %d/%d", opcode & 0x7f, opcode >> 7);
diff --git a/tools/parser/parser.h b/tools/parser/parser.h
index c5d9cf9a6d..5f65f16894 100644
--- a/tools/parser/parser.h
+++ b/tools/parser/parser.h
@@ -26,7 +26,7 @@ struct frame {
uint32_t len;
uint16_t dev_id;
uint8_t in;
- uint8_t master;
+ uint8_t central;
uint16_t handle;
uint16_t cid;
uint16_t num;
diff --git a/tools/parser/smp.c b/tools/parser/smp.c
index a372e5e5ff..733795ac68 100644
--- a/tools/parser/smp.c
+++ b/tools/parser/smp.c
@@ -28,7 +28,7 @@
#define SMP_CMD_PAIRING_RANDOM 0x04
#define SMP_CMD_PAIRING_FAILED 0x05
#define SMP_CMD_ENCRYPT_INFO 0x06
-#define SMP_CMD_MASTER_IDENT 0x07
+#define SMP_CMD_CENTRAL_IDENT 0x07
#define SMP_CMD_IDENT_INFO 0X08
#define SMP_CMD_IDENT_ADDR_INFO 0x09
#define SMP_CMD_SIGN_INFO 0x0a
@@ -78,8 +78,8 @@ static const char *smpcmd2str(uint8_t cmd)
return "Pairing Failed";
case SMP_CMD_ENCRYPT_INFO:
return "Encryption Information";
- case SMP_CMD_MASTER_IDENT:
- return "Master Identification";
+ case SMP_CMD_CENTRAL_IDENT:
+ return "Central Identification";
case SMP_CMD_IDENT_INFO:
return "Identity Information";
case SMP_CMD_IDENT_ADDR_INFO:
@@ -221,7 +221,7 @@ static void smp_cmd_encrypt_info_dump(int level, struct frame *frm)
printf("\n");
}
-static void smp_cmd_master_ident_dump(int level, struct frame *frm)
+static void smp_cmd_central_ident_dump(int level, struct frame *frm)
{
uint16_t ediv = btohs(htons(p_get_u16(frm)));
int i;
@@ -303,8 +303,8 @@ void smp_dump(int level, struct frame *frm)
case SMP_CMD_ENCRYPT_INFO:
smp_cmd_encrypt_info_dump(level + 1, frm);
break;
- case SMP_CMD_MASTER_IDENT:
- smp_cmd_master_ident_dump(level + 1, frm);
+ case SMP_CMD_CENTRAL_IDENT:
+ smp_cmd_central_ident_dump(level + 1, frm);
break;
case SMP_CMD_IDENT_INFO:
smp_cmd_ident_info_dump(level + 1, frm);
diff --git a/tools/rctest.c b/tools/rctest.c
index 7d688691c4..d598ab9e62 100644
--- a/tools/rctest.c
+++ b/tools/rctest.c
@@ -76,7 +76,7 @@ static const char *filename = NULL;
static const char *savefile = NULL;
static int save_fd = -1;
-static int master = 0;
+static int central = 0;
static int auth = 0;
static int encr = 0;
static int secure = 0;
@@ -202,7 +202,7 @@ static int do_connect(const char *svr)
/* Set link mode */
opt = 0;
- if (master)
+ if (central)
opt |= RFCOMM_LM_MASTER;
if (auth)
opt |= RFCOMM_LM_AUTH;
@@ -293,7 +293,7 @@ static void do_listen(void (*handler)(int sk))
/* Set link mode */
opt = 0;
- if (master)
+ if (central)
opt |= RFCOMM_LM_MASTER;
if (auth)
opt |= RFCOMM_LM_AUTH;
@@ -679,13 +679,13 @@ static void usage(void)
"\t[-B filename] use data packets from file\n"
"\t[-O filename] save received data to file\n"
"\t[-N num] number of frames to send\n"
- "\t[-C num] send num frames before delay (default = 1)\n"
+ "\t[-M num] send num frames before delay (default = 1)\n"
"\t[-D milliseconds] delay after sending num frames (default = 0)\n"
"\t[-Y priority] socket priority\n"
"\t[-A] request authentication\n"
"\t[-E] request encryption\n"
"\t[-S] secure connection\n"
- "\t[-M] become master\n"
+ "\t[-C] become central\n"
"\t[-T] enable timestamps\n");
}
@@ -697,7 +697,8 @@ int main(int argc, char *argv[])
bacpy(&bdaddr, BDADDR_ANY);
bacpy(&auto_bdaddr, BDADDR_ANY);
- while ((opt=getopt(argc,argv,"rdscuwmna:b:i:P:U:B:O:N:MAESL:W:C:D:Y:T")) != EOF) {
+ while ((opt = getopt(argc, argv,
+ "rdscuwmna:b:i:P:U:B:O:N:CAESL:W:M:D:Y:T")) != EOF) {
switch (opt) {
case 'r':
mode = RECV;
@@ -769,8 +770,8 @@ int main(int argc, char *argv[])
uuid = atoi(optarg);
break;
- case 'M':
- master = 1;
+ case 'C':
+ central = 1;
break;
case 'A':
@@ -805,7 +806,7 @@ int main(int argc, char *argv[])
num_frames = atoi(optarg);
break;
- case 'C':
+ case 'M':
count = atoi(optarg);
break;
diff --git a/tools/rctest.rst b/tools/rctest.rst
index 23595112d7..e0982adc3f 100644
--- a/tools/rctest.rst
+++ b/tools/rctest.rst
@@ -56,7 +56,7 @@ OPTIONS
-N num send num frames
--C num send num frames before delay (default: 1)
+-M num send num frames before delay (default: 1)
-D milliseconds delay milliseconds after sending num frames (default: 0)
@@ -66,7 +66,7 @@ OPTIONS
-S secure connection
--M become master
+-C become central
-T enable timestamps
diff --git a/tools/rfcomm-tester.c b/tools/rfcomm-tester.c
index 78b08663bd..ef47904de0 100644
--- a/tools/rfcomm-tester.c
+++ b/tools/rfcomm-tester.c
@@ -534,7 +534,7 @@ static void test_connect(const void *test_data)
struct test_data *data = tester_get_data();
struct bthost *bthost = hciemu_client_get_host(data->hciemu);
const struct rfcomm_client_data *cli = data->test_data;
- const uint8_t *client_addr, *master_addr;
+ const uint8_t *client_addr, *central_addr;
GIOChannel *io;
int sk;
@@ -542,10 +542,10 @@ static void test_connect(const void *test_data)
bthost_add_rfcomm_server(bthost, cli->server_channel,
rfcomm_connect_cb, NULL);
- master_addr = hciemu_get_central_bdaddr(data->hciemu);
+ central_addr = hciemu_get_central_bdaddr(data->hciemu);
client_addr = hciemu_get_client_bdaddr(data->hciemu);
- sk = create_rfcomm_sock((bdaddr_t *) master_addr, 0);
+ sk = create_rfcomm_sock((bdaddr_t *) central_addr, 0);
if (connect_rfcomm_sock(sk, (const bdaddr_t *) client_addr,
cli->client_channel) < 0) {
@@ -675,14 +675,14 @@ static void test_server(const void *test_data)
{
struct test_data *data = tester_get_data();
const struct rfcomm_server_data *srv = data->test_data;
- const uint8_t *master_addr;
+ const uint8_t *central_addr;
struct bthost *bthost;
GIOChannel *io;
int sk;
- master_addr = hciemu_get_central_bdaddr(data->hciemu);
+ central_addr = hciemu_get_central_bdaddr(data->hciemu);
- sk = create_rfcomm_sock((bdaddr_t *) master_addr, srv->server_channel);
+ sk = create_rfcomm_sock((bdaddr_t *) central_addr, srv->server_channel);
if (sk < 0) {
tester_test_failed();
return;
@@ -707,7 +707,7 @@ static void test_server(const void *test_data)
bthost = hciemu_client_get_host(data->hciemu);
bthost_set_connect_cb(bthost, client_new_conn, data);
- bthost_hci_connect(bthost, master_addr, BDADDR_BREDR);
+ bthost_hci_connect(bthost, central_addr, BDADDR_BREDR);
}
#define test_rfcomm(name, data, setup, func) \
diff --git a/tools/rfcomm.c b/tools/rfcomm.c
index 8e1db8ebaa..cb6dd224dc 100644
--- a/tools/rfcomm.c
+++ b/tools/rfcomm.c
@@ -37,7 +37,7 @@ static int rfcomm_raw_tty = 0;
static int auth = 0;
static int encryption = 0;
static int secure = 0;
-static int master = 0;
+static int central = 0;
static int linger = 0;
static char *rfcomm_state[] = {
@@ -434,7 +434,7 @@ static void cmd_listen(int ctl, int dev, bdaddr_t *bdaddr, int argc, char **argv
}
lm = 0;
- if (master)
+ if (central)
lm |= RFCOMM_LM_MASTER;
if (auth)
lm |= RFCOMM_LM_AUTH;
@@ -646,7 +646,7 @@ static void usage(void)
"\t-A, --auth Enable authentication\n"
"\t-E, --encrypt Enable encryption\n"
"\t-S, --secure Secure connection\n"
- "\t-M, --master Become the master of a piconet\n"
+ "\t-C, --central Become the central of a piconet\n"
"\t-L, --linger [seconds] Set linger timeout\n"
"\t-a Show all devices (default)\n"
"\n");
@@ -668,7 +668,7 @@ static struct option main_options[] = {
{ "auth", 0, 0, 'A' },
{ "encrypt", 0, 0, 'E' },
{ "secure", 0, 0, 'S' },
- { "master", 0, 0, 'M' },
+ { "central", 0, 0, 'C' },
{ "linger", 1, 0, 'L' },
{ 0, 0, 0, 0 }
};
@@ -680,7 +680,8 @@ int main(int argc, char *argv[])
bacpy(&bdaddr, BDADDR_ANY);
- while ((opt = getopt_long(argc, argv, "+i:rahAESML:", main_options, NULL)) != -1) {
+ while ((opt = getopt_long(argc, argv, "+i:rahAESCL:", main_options,
+ NULL)) != -1) {
switch(opt) {
case 'i':
if (strncmp(optarg, "hci", 3) == 0)
@@ -713,8 +714,8 @@ int main(int argc, char *argv[])
secure = 1;
break;
- case 'M':
- master = 1;
+ case 'C':
+ central = 1;
break;
case 'L':
diff --git a/tools/rfcomm.rst b/tools/rfcomm.rst
index 3c1b8cd682..cd5daa674d 100644
--- a/tools/rfcomm.rst
+++ b/tools/rfcomm.rst
@@ -47,7 +47,7 @@ OPTIONS
-S Secure connection
--M Become the master of a piconet
+-C Become the central of a piconet
-L <seconds> Set linger timeout
diff --git a/tools/sco-tester.c b/tools/sco-tester.c
index 7c83aee195..3e7bfc5e3a 100644
--- a/tools/sco-tester.c
+++ b/tools/sco-tester.c
@@ -413,7 +413,7 @@ end:
static int create_sco_sock(struct test_data *data)
{
- const uint8_t *master_bdaddr;
+ const uint8_t *central_bdaddr;
struct sockaddr_sco addr;
int sk, err;
@@ -426,15 +426,15 @@ static int create_sco_sock(struct test_data *data)
return err;
}
- master_bdaddr = hciemu_get_central_bdaddr(data->hciemu);
- if (!master_bdaddr) {
- tester_warn("No master bdaddr");
+ central_bdaddr = hciemu_get_central_bdaddr(data->hciemu);
+ if (!central_bdaddr) {
+ tester_warn("No central bdaddr");
return -ENODEV;
}
memset(&addr, 0, sizeof(addr));
addr.sco_family = AF_BLUETOOTH;
- bacpy(&addr.sco_bdaddr, (void *) master_bdaddr);
+ bacpy(&addr.sco_bdaddr, (void *) central_bdaddr);
if (bind(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
err = -errno;
diff --git a/tools/smp-tester.c b/tools/smp-tester.c
index b075c5df8a..16fe0dfd7a 100644
--- a/tools/smp-tester.c
+++ b/tools/smp-tester.c
@@ -765,11 +765,11 @@ static void smp_new_conn(uint16_t handle, void *user_data)
static void init_bdaddr(struct test_data *data)
{
- const uint8_t *master_bdaddr, *client_bdaddr;
+ const uint8_t *central_bdaddr, *client_bdaddr;
- master_bdaddr = hciemu_get_central_bdaddr(data->hciemu);
- if (!master_bdaddr) {
- tester_warn("No master bdaddr");
+ central_bdaddr = hciemu_get_central_bdaddr(data->hciemu);
+ if (!central_bdaddr) {
+ tester_warn("No central bdaddr");
tester_test_failed();
return;
}
@@ -786,9 +786,9 @@ static void init_bdaddr(struct test_data *data)
if (data->out) {
memcpy(data->ia, client_bdaddr, sizeof(data->ia));
- memcpy(data->ra, master_bdaddr, sizeof(data->ra));
+ memcpy(data->ra, central_bdaddr, sizeof(data->ra));
} else {
- memcpy(data->ia, master_bdaddr, sizeof(data->ia));
+ memcpy(data->ia, central_bdaddr, sizeof(data->ia));
memcpy(data->ra, client_bdaddr, sizeof(data->ra));
}
}
--
2.33.0.153.gba50c8fa24-goog
From: Archie Pusaka <[email protected]>
According to
https://specificationrefs.bluetooth.com/language-mapping/Appropriate_Language_Mapping_Table.pdf
"flooding" is the preferred term.
---
(no changes since v1)
unit/test-mesh-crypto.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/unit/test-mesh-crypto.c b/unit/test-mesh-crypto.c
index 12709dace0..f9b7d81da7 100644
--- a/unit/test-mesh-crypto.c
+++ b/unit/test-mesh-crypto.c
@@ -111,7 +111,7 @@ static const struct mesh_crypto_test s8_1_2 = {
};
static const struct mesh_crypto_test s8_1_3 = {
- .name = "8.1.3 k2 function (master)",
+ .name = "8.1.3 k2 function (flooding)",
.net_key = "f7a2a44f8e8a8029064f173ddc1e2b00",
.p = "00",
.nid = "7f",
@@ -159,7 +159,7 @@ static const struct mesh_crypto_test s8_2_1 = {
};
static const struct mesh_crypto_test s8_2_2 = {
- .name = "8.2.2 Encryption and privacy keys (Master)",
+ .name = "8.2.2 Encryption and privacy keys (flooding)",
.net_key = "7dd7364cd842ad18c17c2b820c84c3d6",
.p = "00",
.nid = "68",
--
2.33.0.153.gba50c8fa24-goog
From: Archie Pusaka <[email protected]>
BT core spec 5.3 promotes the usage of inclusive languages.
This CL uses "central" as it is deemed to be more appropriate.
---
(no changes since v1)
android/a2dp.c | 2 +-
btio/btio.c | 42 +++++++++++++++++++++---------------------
btio/btio.h | 2 +-
profiles/audio/a2dp.c | 2 +-
profiles/audio/avctp.c | 2 +-
profiles/sap/server.c | 2 +-
tools/btiotest.c | 8 ++++----
7 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/android/a2dp.c b/android/a2dp.c
index e24f79348d..029107cf5c 100644
--- a/android/a2dp.c
+++ b/android/a2dp.c
@@ -1692,7 +1692,7 @@ bool bt_a2dp_register(struct ipc *ipc, const bdaddr_t *addr, uint8_t mode)
BT_IO_OPT_SOURCE_BDADDR, &adapter_addr,
BT_IO_OPT_PSM, AVDTP_PSM,
BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_MEDIUM,
- BT_IO_OPT_MASTER, true,
+ BT_IO_OPT_CENTRAL, true,
BT_IO_OPT_INVALID);
if (!server) {
error("Failed to listen on AVDTP channel: %s", err->message);
diff --git a/btio/btio.c b/btio/btio.c
index 1f1c374bca..f4f53574c8 100644
--- a/btio/btio.c
+++ b/btio/btio.c
@@ -61,7 +61,7 @@ struct set_opts {
uint16_t mtu;
uint16_t imtu;
uint16_t omtu;
- int master;
+ int central;
uint8_t mode;
int flushable;
uint32_t priority;
@@ -359,7 +359,7 @@ static int l2cap_connect(int sock, const bdaddr_t *dst, uint8_t dst_type,
return 0;
}
-static int l2cap_set_master(int sock, int master)
+static int l2cap_set_central(int sock, int central)
{
int flags;
socklen_t len;
@@ -368,7 +368,7 @@ static int l2cap_set_master(int sock, int master)
if (getsockopt(sock, SOL_L2CAP, L2CAP_LM, &flags, &len) < 0)
return -errno;
- if (master) {
+ if (central) {
if (flags & L2CAP_LM_MASTER)
return 0;
flags |= L2CAP_LM_MASTER;
@@ -384,7 +384,7 @@ static int l2cap_set_master(int sock, int master)
return 0;
}
-static int rfcomm_set_master(int sock, int master)
+static int rfcomm_set_central(int sock, int central)
{
int flags;
socklen_t len;
@@ -393,7 +393,7 @@ static int rfcomm_set_master(int sock, int master)
if (getsockopt(sock, SOL_RFCOMM, RFCOMM_LM, &flags, &len) < 0)
return -errno;
- if (master) {
+ if (central) {
if (flags & RFCOMM_LM_MASTER)
return 0;
flags |= RFCOMM_LM_MASTER;
@@ -656,7 +656,7 @@ static gboolean set_le_mode(int sock, uint8_t mode, GError **err)
static gboolean l2cap_set(int sock, uint8_t src_type, int sec_level,
uint16_t imtu, uint16_t omtu, uint8_t mode,
- int master, int flushable, uint32_t priority,
+ int central, int flushable, uint32_t priority,
GError **err)
{
if (imtu || omtu || mode) {
@@ -676,8 +676,8 @@ static gboolean l2cap_set(int sock, uint8_t src_type, int sec_level,
return ret;
}
- if (master >= 0 && l2cap_set_master(sock, master) < 0) {
- ERROR_FAILED(err, "l2cap_set_master", errno);
+ if (central >= 0 && l2cap_set_central(sock, central) < 0) {
+ ERROR_FAILED(err, "l2cap_set_central", errno);
return FALSE;
}
@@ -733,13 +733,13 @@ static int rfcomm_connect(int sock, const bdaddr_t *dst, uint8_t channel)
return 0;
}
-static gboolean rfcomm_set(int sock, int sec_level, int master, GError **err)
+static gboolean rfcomm_set(int sock, int sec_level, int central, GError **err)
{
if (sec_level && !set_sec_level(sock, BT_IO_RFCOMM, sec_level, err))
return FALSE;
- if (master >= 0 && rfcomm_set_master(sock, master) < 0) {
- ERROR_FAILED(err, "rfcomm_set_master", errno);
+ if (central >= 0 && rfcomm_set_central(sock, central) < 0) {
+ ERROR_FAILED(err, "rfcomm_set_central", errno);
return FALSE;
}
@@ -828,7 +828,7 @@ static gboolean parse_set_opts(struct set_opts *opts, GError **err,
/* Set defaults */
opts->type = BT_IO_SCO;
opts->defer = DEFAULT_DEFER_TIMEOUT;
- opts->master = -1;
+ opts->central = -1;
opts->mode = L2CAP_MODE_BASIC;
opts->flushable = -1;
opts->priority = 0;
@@ -889,8 +889,8 @@ static gboolean parse_set_opts(struct set_opts *opts, GError **err,
if (!opts->mtu)
opts->mtu = opts->imtu;
break;
- case BT_IO_OPT_MASTER:
- opts->master = va_arg(args, gboolean);
+ case BT_IO_OPT_CENTRAL:
+ opts->central = va_arg(args, gboolean);
break;
case BT_IO_OPT_MODE:
opts->mode = va_arg(args, int);
@@ -1171,7 +1171,7 @@ parse_opts:
case BT_IO_OPT_IMTU:
*(va_arg(args, uint16_t *)) = l2o.imtu;
break;
- case BT_IO_OPT_MASTER:
+ case BT_IO_OPT_CENTRAL:
len = sizeof(flags);
if (getsockopt(sock, SOL_L2CAP, L2CAP_LM, &flags,
&len) < 0) {
@@ -1336,7 +1336,7 @@ static gboolean rfcomm_get(int sock, GError **err, BtIOOption opt1,
*(va_arg(args, uint8_t *)) = dst.rc_channel;
break;
- case BT_IO_OPT_MASTER:
+ case BT_IO_OPT_CENTRAL:
len = sizeof(flags);
if (getsockopt(sock, SOL_RFCOMM, RFCOMM_LM, &flags,
&len) < 0) {
@@ -1484,7 +1484,7 @@ static gboolean sco_get(int sock, GError **err, BtIOOption opt1, va_list args)
case BT_IO_OPT_DEST_CHANNEL:
case BT_IO_OPT_PSM:
case BT_IO_OPT_CID:
- case BT_IO_OPT_MASTER:
+ case BT_IO_OPT_CENTRAL:
case BT_IO_OPT_MODE:
case BT_IO_OPT_FLUSHABLE:
case BT_IO_OPT_PRIORITY:
@@ -1578,10 +1578,10 @@ gboolean bt_io_set(GIOChannel *io, GError **err, BtIOOption opt1, ...)
switch (type) {
case BT_IO_L2CAP:
return l2cap_set(sock, opts.src_type, opts.sec_level, opts.imtu,
- opts.omtu, opts.mode, opts.master,
+ opts.omtu, opts.mode, opts.central,
opts.flushable, opts.priority, err);
case BT_IO_RFCOMM:
- return rfcomm_set(sock, opts.sec_level, opts.master, err);
+ return rfcomm_set(sock, opts.sec_level, opts.central, err);
case BT_IO_SCO:
return sco_set(sock, opts.mtu, opts.voice, err);
case BT_IO_INVALID:
@@ -1628,7 +1628,7 @@ static GIOChannel *create_io(gboolean server, struct set_opts *opts,
goto failed;
if (!l2cap_set(sock, opts->src_type, opts->sec_level,
opts->imtu, opts->omtu, opts->mode,
- opts->master, opts->flushable, opts->priority,
+ opts->central, opts->flushable, opts->priority,
err))
goto failed;
break;
@@ -1641,7 +1641,7 @@ static GIOChannel *create_io(gboolean server, struct set_opts *opts,
if (rfcomm_bind(sock, &opts->src,
server ? opts->channel : 0, err) < 0)
goto failed;
- if (!rfcomm_set(sock, opts->sec_level, opts->master, err))
+ if (!rfcomm_set(sock, opts->sec_level, opts->central, err))
goto failed;
break;
case BT_IO_SCO:
diff --git a/btio/btio.h b/btio/btio.h
index f0259cf1db..50a2a4dc02 100644
--- a/btio/btio.h
+++ b/btio/btio.h
@@ -36,7 +36,7 @@ typedef enum {
BT_IO_OPT_MTU,
BT_IO_OPT_OMTU,
BT_IO_OPT_IMTU,
- BT_IO_OPT_MASTER,
+ BT_IO_OPT_CENTRAL,
BT_IO_OPT_HANDLE,
BT_IO_OPT_CLASS,
BT_IO_OPT_MODE,
diff --git a/profiles/audio/a2dp.c b/profiles/audio/a2dp.c
index 02caa83e1c..38a46c077a 100644
--- a/profiles/audio/a2dp.c
+++ b/profiles/audio/a2dp.c
@@ -2518,7 +2518,7 @@ static bool a2dp_server_listen(struct a2dp_server *server)
BT_IO_OPT_PSM, AVDTP_PSM,
BT_IO_OPT_MODE, mode,
BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_MEDIUM,
- BT_IO_OPT_MASTER, true,
+ BT_IO_OPT_CENTRAL, true,
BT_IO_OPT_INVALID);
if (server->io)
return true;
diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c
index 50de336181..9f717f35bb 100644
--- a/profiles/audio/avctp.c
+++ b/profiles/audio/avctp.c
@@ -1625,7 +1625,7 @@ static GIOChannel *avctp_server_socket(const bdaddr_t *src, gboolean master,
BT_IO_OPT_SOURCE_BDADDR, src,
BT_IO_OPT_PSM, psm,
BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_MEDIUM,
- BT_IO_OPT_MASTER, master,
+ BT_IO_OPT_CENTRAL, master,
BT_IO_OPT_MODE, mode,
BT_IO_OPT_INVALID);
if (!io) {
diff --git a/profiles/sap/server.c b/profiles/sap/server.c
index 82365fca90..e6f3024ea6 100644
--- a/profiles/sap/server.c
+++ b/profiles/sap/server.c
@@ -1369,7 +1369,7 @@ int sap_server_register(struct btd_adapter *adapter)
btd_adapter_get_address(adapter),
BT_IO_OPT_CHANNEL, SAP_SERVER_CHANNEL,
BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_HIGH,
- BT_IO_OPT_MASTER, TRUE,
+ BT_IO_OPT_CENTRAL, TRUE,
BT_IO_OPT_INVALID);
if (!io) {
error("Can't listen at channel %d.", SAP_SERVER_CHANNEL);
diff --git a/tools/btiotest.c b/tools/btiotest.c
index cb8cc35348..3f4900a5a5 100644
--- a/tools/btiotest.c
+++ b/tools/btiotest.c
@@ -343,7 +343,7 @@ static void l2cap_listen(const char *src, uint8_t addr_type, uint16_t psm,
BT_IO_OPT_PSM, psm,
BT_IO_OPT_CID, cid,
BT_IO_OPT_SEC_LEVEL, sec,
- BT_IO_OPT_MASTER, master,
+ BT_IO_OPT_CENTRAL, master,
BT_IO_OPT_INVALID);
else
l2_srv = bt_io_listen(conn, cfm, data,
@@ -353,7 +353,7 @@ static void l2cap_listen(const char *src, uint8_t addr_type, uint16_t psm,
BT_IO_OPT_PSM, psm,
BT_IO_OPT_CID, cid,
BT_IO_OPT_SEC_LEVEL, sec,
- BT_IO_OPT_MASTER, master,
+ BT_IO_OPT_CENTRAL, master,
BT_IO_OPT_INVALID);
if (!l2_srv) {
@@ -427,7 +427,7 @@ static void rfcomm_listen(const char *src, uint8_t ch, gboolean defer,
BT_IO_OPT_SOURCE, src,
BT_IO_OPT_CHANNEL, ch,
BT_IO_OPT_SEC_LEVEL, sec,
- BT_IO_OPT_MASTER, master,
+ BT_IO_OPT_CENTRAL, master,
BT_IO_OPT_INVALID);
else
rc_srv = bt_io_listen(conn, cfm,
@@ -435,7 +435,7 @@ static void rfcomm_listen(const char *src, uint8_t ch, gboolean defer,
&err,
BT_IO_OPT_CHANNEL, ch,
BT_IO_OPT_SEC_LEVEL, sec,
- BT_IO_OPT_MASTER, master,
+ BT_IO_OPT_CENTRAL, master,
BT_IO_OPT_INVALID);
if (!rc_srv) {
--
2.33.0.153.gba50c8fa24-goog
From: Archie Pusaka <[email protected]>
BT core spec 5.3 promotes the usage of inclusive languages.
This CL replaces some terms with the more appropriate counterparts,
such as "central", "peripheral", "link key", and "accept list"
---
Changes in v4:
* Fix line over 80 columns
Changes in v2:
* Merging several patches from the same directory into one
emulator/btdev.c | 58 +++----
emulator/le.c | 32 ++--
emulator/smp.c | 8 +-
monitor/broadcom.c | 8 +-
monitor/bt.h | 150 ++++++++--------
monitor/control.c | 10 +-
monitor/l2cap.c | 10 +-
monitor/ll.c | 60 ++++---
monitor/lmp.c | 2 +-
monitor/packet.c | 411 ++++++++++++++++++++++----------------------
tools/3dsp.c | 33 ++--
tools/hci-tester.c | 4 +-
tools/mgmt-tester.c | 4 +-
13 files changed, 400 insertions(+), 390 deletions(-)
diff --git a/emulator/btdev.c b/emulator/btdev.c
index 52c2b576d2..343c065760 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -3568,11 +3568,11 @@ static int cmd_le_create_conn_complete(struct btdev *dev, const void *data,
static int cmd_read_wl_size(struct btdev *dev, const void *data, uint8_t len)
{
- struct bt_hci_rsp_le_read_white_list_size rsp;
+ struct bt_hci_rsp_le_read_accept_list_size rsp;
rsp.status = BT_HCI_ERR_SUCCESS;
rsp.size = WL_SIZE;
- cmd_complete(dev, BT_HCI_CMD_LE_READ_WHITE_LIST_SIZE, &rsp,
+ cmd_complete(dev, BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE, &rsp,
sizeof(rsp));
return 0;
@@ -3620,7 +3620,7 @@ static int cmd_wl_clear(struct btdev *dev, const void *data, uint8_t len)
wl_clear(dev);
status = BT_HCI_ERR_SUCCESS;
- cmd_complete(dev, BT_HCI_CMD_LE_CLEAR_WHITE_LIST, &status,
+ cmd_complete(dev, BT_HCI_CMD_LE_CLEAR_ACCEPT_LIST, &status,
sizeof(status));
return 0;
@@ -3637,7 +3637,7 @@ static void wl_add(struct btdev_wl *wl, uint8_t type, bdaddr_t *addr)
static int cmd_add_wl(struct btdev *dev, const void *data, uint8_t len)
{
- const struct bt_hci_cmd_le_add_to_white_list *cmd = data;
+ const struct bt_hci_cmd_le_add_to_accept_list *cmd = data;
uint8_t status;
bool exists = false;
int i, pos = -1;
@@ -3673,14 +3673,14 @@ static int cmd_add_wl(struct btdev *dev, const void *data, uint8_t len)
if (pos < 0) {
cmd_status(dev, BT_HCI_ERR_MEM_CAPACITY_EXCEEDED,
- BT_HCI_CMD_LE_ADD_TO_WHITE_LIST);
+ BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST);
return 0;
}
wl_add(&dev->le_wl[pos], cmd->addr_type, (bdaddr_t *)&cmd->addr);
status = BT_HCI_ERR_SUCCESS;
- cmd_complete(dev, BT_HCI_CMD_LE_ADD_TO_WHITE_LIST,
+ cmd_complete(dev, BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST,
&status, sizeof(status));
return 0;
@@ -3688,7 +3688,7 @@ static int cmd_add_wl(struct btdev *dev, const void *data, uint8_t len)
static int cmd_remove_wl(struct btdev *dev, const void *data, uint8_t len)
{
- const struct bt_hci_cmd_le_remove_from_white_list *cmd = data;
+ const struct bt_hci_cmd_le_remove_from_accept_list *cmd = data;
uint8_t status;
int i;
char addr[18];
@@ -3728,7 +3728,7 @@ static int cmd_remove_wl(struct btdev *dev, const void *data, uint8_t len)
return -EINVAL;
status = BT_HCI_ERR_SUCCESS;
- cmd_complete(dev, BT_HCI_CMD_LE_REMOVE_FROM_WHITE_LIST,
+ cmd_complete(dev, BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST,
&status, sizeof(status));
return 0;
@@ -4313,10 +4313,10 @@ static int cmd_gen_dhkey(struct btdev *dev, const void *data, uint8_t len)
cmd_set_scan_enable_complete), \
CMD(BT_HCI_CMD_LE_CREATE_CONN, cmd_le_create_conn, \
cmd_le_create_conn_complete), \
- CMD(BT_HCI_CMD_LE_READ_WHITE_LIST_SIZE, cmd_read_wl_size, NULL), \
- CMD(BT_HCI_CMD_LE_CLEAR_WHITE_LIST, cmd_wl_clear, NULL), \
- CMD(BT_HCI_CMD_LE_ADD_TO_WHITE_LIST, cmd_add_wl, NULL), \
- CMD(BT_HCI_CMD_LE_REMOVE_FROM_WHITE_LIST, cmd_remove_wl, NULL), \
+ CMD(BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE, cmd_read_wl_size, NULL), \
+ CMD(BT_HCI_CMD_LE_CLEAR_ACCEPT_LIST, cmd_wl_clear, NULL), \
+ CMD(BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST, cmd_add_wl, NULL), \
+ CMD(BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST, cmd_remove_wl, NULL), \
CMD(BT_HCI_CMD_LE_CONN_UPDATE, cmd_conn_update, \
cmd_conn_update_complete), \
CMD(BT_HCI_CMD_LE_READ_REMOTE_FEATURES, cmd_le_read_remote_features, \
@@ -5408,24 +5408,24 @@ static void le_cis_estabilished(struct btdev *dev, struct btdev_conn *conn,
struct btdev *remote = conn->link->dev;
/* TODO: Figure out if these values makes sense */
- memcpy(evt.cig_sync_delay, remote->le_cig.params.m_interval,
- sizeof(remote->le_cig.params.m_interval));
- memcpy(evt.cis_sync_delay, remote->le_cig.params.s_interval,
- sizeof(remote->le_cig.params.s_interval));
- memcpy(evt.m_latency, &remote->le_cig.params.m_latency,
- sizeof(remote->le_cig.params.m_latency));
- memcpy(evt.s_latency, &remote->le_cig.params.s_latency,
- sizeof(remote->le_cig.params.s_latency));
- evt.m_phy = remote->le_cig.cis[0].m_phy;
- evt.s_phy = remote->le_cig.cis[0].s_phy;
+ memcpy(evt.cig_sync_delay, remote->le_cig.params.c_interval,
+ sizeof(remote->le_cig.params.c_interval));
+ memcpy(evt.cis_sync_delay, remote->le_cig.params.p_interval,
+ sizeof(remote->le_cig.params.p_interval));
+ memcpy(evt.c_latency, &remote->le_cig.params.c_latency,
+ sizeof(remote->le_cig.params.c_latency));
+ memcpy(evt.p_latency, &remote->le_cig.params.p_latency,
+ sizeof(remote->le_cig.params.p_latency));
+ evt.c_phy = remote->le_cig.cis[0].c_phy;
+ evt.p_phy = remote->le_cig.cis[0].p_phy;
evt.nse = 0x01;
- evt.m_bn = 0x01;
- evt.s_bn = 0x01;
- evt.m_ft = 0x01;
- evt.s_ft = 0x01;
- evt.m_mtu = remote->le_cig.cis[0].m_sdu;
- evt.s_mtu = remote->le_cig.cis[0].s_sdu;
- evt.interval = remote->le_cig.params.m_latency;
+ evt.c_bn = 0x01;
+ evt.p_bn = 0x01;
+ evt.c_ft = 0x01;
+ evt.p_ft = 0x01;
+ evt.c_mtu = remote->le_cig.cis[0].c_sdu;
+ evt.p_mtu = remote->le_cig.cis[0].p_sdu;
+ evt.interval = remote->le_cig.params.c_latency;
}
le_meta_event(dev, BT_HCI_EVT_LE_CIS_ESTABLISHED, &evt, sizeof(evt));
diff --git a/emulator/le.c b/emulator/le.c
index 4ffe3b16db..23f2579426 100644
--- a/emulator/le.c
+++ b/emulator/le.c
@@ -1211,12 +1211,12 @@ static void cmd_le_create_conn_cancel(struct bt_le *hci,
static void cmd_le_read_white_list_size(struct bt_le *hci,
const void *data, uint8_t size)
{
- struct bt_hci_rsp_le_read_white_list_size rsp;
+ struct bt_hci_rsp_le_read_accept_list_size rsp;
rsp.status = BT_HCI_ERR_SUCCESS;
rsp.size = hci->le_white_list_size;
- cmd_complete(hci, BT_HCI_CMD_LE_READ_WHITE_LIST_SIZE,
+ cmd_complete(hci, BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE,
&rsp, sizeof(rsp));
}
@@ -1228,14 +1228,14 @@ static void cmd_le_clear_white_list(struct bt_le *hci,
clear_white_list(hci);
status = BT_HCI_ERR_SUCCESS;
- cmd_complete(hci, BT_HCI_CMD_LE_CLEAR_WHITE_LIST,
+ cmd_complete(hci, BT_HCI_CMD_LE_CLEAR_ACCEPT_LIST,
&status, sizeof(status));
}
static void cmd_le_add_to_white_list(struct bt_le *hci,
const void *data, uint8_t size)
{
- const struct bt_hci_cmd_le_add_to_white_list *cmd = data;
+ const struct bt_hci_cmd_le_add_to_accept_list *cmd = data;
uint8_t status;
bool exists = false;
int i, pos = -1;
@@ -1243,7 +1243,7 @@ static void cmd_le_add_to_white_list(struct bt_le *hci,
/* Valid range for address type is 0x00 to 0x01 */
if (cmd->addr_type > 0x01) {
cmd_status(hci, BT_HCI_ERR_INVALID_PARAMETERS,
- BT_HCI_CMD_LE_ADD_TO_WHITE_LIST);
+ BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST);
return;
}
@@ -1259,13 +1259,13 @@ static void cmd_le_add_to_white_list(struct bt_le *hci,
if (exists) {
cmd_status(hci, BT_HCI_ERR_UNSPECIFIED_ERROR,
- BT_HCI_CMD_LE_ADD_TO_WHITE_LIST);
+ BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST);
return;
}
if (pos < 0) {
cmd_status(hci, BT_HCI_ERR_MEM_CAPACITY_EXCEEDED,
- BT_HCI_CMD_LE_ADD_TO_WHITE_LIST);
+ BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST);
return;
}
@@ -1273,21 +1273,21 @@ static void cmd_le_add_to_white_list(struct bt_le *hci,
memcpy(&hci->le_white_list[pos][1], cmd->addr, 6);
status = BT_HCI_ERR_SUCCESS;
- cmd_complete(hci, BT_HCI_CMD_LE_ADD_TO_WHITE_LIST,
+ cmd_complete(hci, BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST,
&status, sizeof(status));
}
static void cmd_le_remove_from_white_list(struct bt_le *hci,
const void *data, uint8_t size)
{
- const struct bt_hci_cmd_le_remove_from_white_list *cmd = data;
+ const struct bt_hci_cmd_le_remove_from_accept_list *cmd = data;
uint8_t status;
int i, pos = -1;
/* Valid range for address type is 0x00 to 0x01 */
if (cmd->addr_type > 0x01) {
cmd_status(hci, BT_HCI_ERR_INVALID_PARAMETERS,
- BT_HCI_CMD_LE_REMOVE_FROM_WHITE_LIST);
+ BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST);
return;
}
@@ -1302,7 +1302,7 @@ static void cmd_le_remove_from_white_list(struct bt_le *hci,
if (pos < 0) {
cmd_status(hci, BT_HCI_ERR_INVALID_PARAMETERS,
- BT_HCI_CMD_LE_REMOVE_FROM_WHITE_LIST);
+ BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST);
return;
}
@@ -1310,7 +1310,7 @@ static void cmd_le_remove_from_white_list(struct bt_le *hci,
memset(&hci->le_white_list[pos][1], 0, 6);
status = BT_HCI_ERR_SUCCESS;
- cmd_complete(hci, BT_HCI_CMD_LE_REMOVE_FROM_WHITE_LIST,
+ cmd_complete(hci, BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST,
&status, sizeof(status));
}
@@ -1830,13 +1830,13 @@ static const struct {
cmd_le_create_conn, 25, true },
{ BT_HCI_CMD_LE_CREATE_CONN_CANCEL,
cmd_le_create_conn_cancel, 0, true },
- { BT_HCI_CMD_LE_READ_WHITE_LIST_SIZE,
+ { BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE,
cmd_le_read_white_list_size, 0, true },
- { BT_HCI_CMD_LE_CLEAR_WHITE_LIST,
+ { BT_HCI_CMD_LE_CLEAR_ACCEPT_LIST,
cmd_le_clear_white_list, 0, true },
- { BT_HCI_CMD_LE_ADD_TO_WHITE_LIST,
+ { BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST,
cmd_le_add_to_white_list, 7, true },
- { BT_HCI_CMD_LE_REMOVE_FROM_WHITE_LIST,
+ { BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST,
cmd_le_remove_from_white_list, 7, true },
{ BT_HCI_CMD_LE_ENCRYPT, cmd_le_encrypt, 32, true },
diff --git a/emulator/smp.c b/emulator/smp.c
index 21a34dde61..2a36437a00 100644
--- a/emulator/smp.c
+++ b/emulator/smp.c
@@ -383,7 +383,7 @@ static void distribute_keys(struct smp_conn *conn)
if (conn->local_key_dist & DIST_ENC_KEY) {
memset(buf, 0, sizeof(buf));
smp_send(conn, BT_L2CAP_SMP_ENCRYPT_INFO, buf, sizeof(buf));
- smp_send(conn, BT_L2CAP_SMP_MASTER_IDENT, buf, 10);
+ smp_send(conn, BT_L2CAP_SMP_CENTRAL_IDENT, buf, 10);
}
if (conn->local_key_dist & DIST_ID_KEY) {
@@ -571,7 +571,7 @@ static void encrypt_info(struct smp_conn *conn, const void *data, uint16_t len)
{
}
-static void master_ident(struct smp_conn *conn, const void *data, uint16_t len)
+static void central_ident(struct smp_conn *conn, const void *data, uint16_t len)
{
conn->remote_key_dist &= ~DIST_ENC_KEY;
@@ -727,8 +727,8 @@ void smp_data(void *conn_data, const void *data, uint16_t len)
case BT_L2CAP_SMP_ENCRYPT_INFO:
encrypt_info(conn, data, len);
break;
- case BT_L2CAP_SMP_MASTER_IDENT:
- master_ident(conn, data, len);
+ case BT_L2CAP_SMP_CENTRAL_IDENT:
+ central_ident(conn, data, len);
break;
case BT_L2CAP_SMP_IDENT_ADDR_INFO:
ident_addr_info(conn, data, len);
diff --git a/monitor/broadcom.c b/monitor/broadcom.c
index 5ee4ba04a4..21a86461ba 100644
--- a/monitor/broadcom.c
+++ b/monitor/broadcom.c
@@ -120,10 +120,10 @@ static void print_sync_mode(uint8_t mode)
switch (mode) {
case 0x00:
- str = "Slave";
+ str = "Peripheral";
break;
case 0x01:
- str = "Master";
+ str = "Central";
break;
default:
str = "Reserved";
@@ -139,10 +139,10 @@ static void print_clock_mode(uint8_t mode)
switch (mode) {
case 0x00:
- str = "Slave";
+ str = "Peripheral";
break;
case 0x01:
- str = "Master";
+ str = "Central";
break;
default:
str = "Reserved";
diff --git a/monitor/bt.h b/monitor/bt.h
index 0bc5718a0e..dc4e11c3ce 100644
--- a/monitor/bt.h
+++ b/monitor/bt.h
@@ -88,8 +88,8 @@ struct bt_ll_reject_ind {
uint8_t error;
} __attribute__ ((packed));
-#define BT_LL_SLAVE_FEATURE_REQ 0x0e
-struct bt_ll_slave_feature_req {
+#define BT_LL_PERIPHERAL_FEATURE_REQ 0x0e
+struct bt_ll_peripheral_feature_req {
uint8_t features[8];
} __attribute__ ((packed));
@@ -127,8 +127,8 @@ struct bt_ll_phy {
#define BT_LL_PHY_UPDATE_IND 0x18
struct bt_ll_phy_update_ind {
- uint8_t m_phy;
- uint8_t s_phy;
+ uint8_t c_phy;
+ uint8_t p_phy;
uint16_t instant;
} __attribute__ ((packed));
@@ -168,19 +168,19 @@ struct bt_ll_clock_acc {
struct bt_ll_cis_req {
uint8_t cig;
uint8_t cis;
- uint8_t m_phy;
- uint8_t s_phy;
- uint16_t m_sdu;
- uint16_t s_sdu;
- uint8_t m_interval[3];
- uint8_t s_interval[3];
- uint8_t m_pdu;
- uint8_t s_pdu;
+ uint8_t c_phy;
+ uint8_t p_phy;
+ uint16_t c_sdu;
+ uint16_t p_sdu;
+ uint8_t c_interval[3];
+ uint8_t p_interval[3];
+ uint8_t c_pdu;
+ uint8_t p_pdu;
uint8_t nse;
uint8_t sub_interval[3];
uint8_t bn;
- uint8_t m_ft;
- uint8_t s_ft;
+ uint8_t c_ft;
+ uint8_t p_ft;
uint16_t iso_interval;
uint8_t offset_min[3];
uint8_t offset_max[3];
@@ -628,8 +628,8 @@ struct bt_hci_cmd_change_conn_link_key {
uint16_t handle;
} __attribute__ ((packed));
-#define BT_HCI_CMD_MASTER_LINK_KEY 0x0417
-struct bt_hci_cmd_master_link_key {
+#define BT_HCI_CMD_LINK_KEY_SELECTION 0x0417
+struct bt_hci_cmd_link_key_selection {
uint8_t key_flag;
} __attribute__ ((packed));
@@ -898,8 +898,8 @@ struct bt_hci_cmd_truncated_page_cancel {
uint8_t bdaddr[6];
} __attribute__ ((packed));
-#define BT_HCI_CMD_SET_SLAVE_BROADCAST 0x0441
-struct bt_hci_cmd_set_slave_broadcast {
+#define BT_HCI_CMD_SET_PERIPHERAL_BROADCAST 0x0441
+struct bt_hci_cmd_set_peripheral_broadcast {
uint8_t enable;
uint8_t lt_addr;
uint8_t lpo_allowed;
@@ -908,14 +908,14 @@ struct bt_hci_cmd_set_slave_broadcast {
uint16_t max_interval;
uint16_t timeout;
} __attribute__ ((packed));
-struct bt_hci_rsp_set_slave_broadcast {
+struct bt_hci_rsp_set_peripheral_broadcast {
uint8_t status;
uint8_t lt_addr;
uint16_t interval;
} __attribute__ ((packed));
-#define BT_HCI_CMD_SET_SLAVE_BROADCAST_RECEIVE 0x0442
-struct bt_hci_cmd_set_slave_broadcast_receive {
+#define BT_HCI_CMD_SET_PERIPHERAL_BROADCAST_RECEIVE 0x0442
+struct bt_hci_cmd_set_peripheral_broadcast_receive {
uint8_t enable;
uint8_t bdaddr[6];
uint8_t lt_addr;
@@ -928,7 +928,7 @@ struct bt_hci_cmd_set_slave_broadcast_receive {
uint16_t pkt_type;
uint8_t map[10];
} __attribute__ ((packed));
-struct bt_hci_rsp_set_slave_broadcast_receive {
+struct bt_hci_rsp_set_peripheral_broadcast_receive {
uint8_t status;
uint8_t bdaddr[6];
uint8_t lt_addr;
@@ -1599,13 +1599,13 @@ struct bt_hci_rsp_delete_reserved_lt_addr {
uint8_t lt_addr;
} __attribute__ ((packed));
-#define BT_HCI_CMD_SET_SLAVE_BROADCAST_DATA 0x0c76
-struct bt_hci_cmd_set_slave_broadcast_data {
+#define BT_HCI_CMD_SET_PERIPHERAL_BROADCAST_DATA 0x0c76
+struct bt_hci_cmd_set_peripheral_broadcast_data {
uint8_t lt_addr;
uint8_t fragment;
uint8_t length;
} __attribute__ ((packed));
-struct bt_hci_rsp_set_slave_broadcast_data {
+struct bt_hci_rsp_set_peripheral_broadcast_data {
uint8_t status;
uint8_t lt_addr;
} __attribute__ ((packed));
@@ -2072,22 +2072,22 @@ struct bt_hci_cmd_le_create_conn {
#define BT_HCI_CMD_LE_CREATE_CONN_CANCEL 0x200e
-#define BT_HCI_CMD_LE_READ_WHITE_LIST_SIZE 0x200f
-struct bt_hci_rsp_le_read_white_list_size {
+#define BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE 0x200f
+struct bt_hci_rsp_le_read_accept_list_size {
uint8_t status;
uint8_t size;
} __attribute__ ((packed));
-#define BT_HCI_CMD_LE_CLEAR_WHITE_LIST 0x2010
+#define BT_HCI_CMD_LE_CLEAR_ACCEPT_LIST 0x2010
-#define BT_HCI_CMD_LE_ADD_TO_WHITE_LIST 0x2011
-struct bt_hci_cmd_le_add_to_white_list {
+#define BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST 0x2011
+struct bt_hci_cmd_le_add_to_accept_list {
uint8_t addr_type;
uint8_t addr[6];
} __attribute__ ((packed));
-#define BT_HCI_CMD_LE_REMOVE_FROM_WHITE_LIST 0x2012
-struct bt_hci_cmd_le_remove_from_white_list {
+#define BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST 0x2012
+struct bt_hci_cmd_le_remove_from_accept_list {
uint8_t addr_type;
uint8_t addr[6];
} __attribute__ ((packed));
@@ -2646,23 +2646,23 @@ struct bt_hci_rsp_le_read_iso_tx_sync {
#define BT_HCI_BIT_LE_SET_CIG_PARAMS BT_HCI_CMD_BIT(41, 7)
struct bt_hci_cis_params {
uint8_t cis_id;
- uint16_t m_sdu;
- uint16_t s_sdu;
- uint8_t m_phy;
- uint8_t s_phy;
- uint8_t m_rtn;
- uint8_t s_rtn;
+ uint16_t c_sdu;
+ uint16_t p_sdu;
+ uint8_t c_phy;
+ uint8_t p_phy;
+ uint8_t c_rtn;
+ uint8_t p_rtn;
} __attribute__ ((packed));
struct bt_hci_cmd_le_set_cig_params {
uint8_t cig_id;
- uint8_t m_interval[3];
- uint8_t s_interval[3];
+ uint8_t c_interval[3];
+ uint8_t p_interval[3];
uint8_t sca;
uint8_t packing;
uint8_t framing;
- uint16_t m_latency;
- uint16_t s_latency;
+ uint16_t c_latency;
+ uint16_t p_latency;
uint8_t num_cis;
struct bt_hci_cis_params cis[0];
} __attribute__ ((packed));
@@ -2679,22 +2679,22 @@ struct bt_hci_rsp_le_set_cig_params {
struct bt_hci_cis_params_test {
uint8_t cis_id;
uint8_t nse;
- uint16_t m_sdu;
- uint16_t s_sdu;
- uint16_t m_pdu;
- uint16_t s_pdu;
- uint8_t m_phy;
- uint8_t s_phy;
- uint8_t m_bn;
- uint8_t s_bn;
+ uint16_t c_sdu;
+ uint16_t p_sdu;
+ uint16_t c_pdu;
+ uint16_t p_pdu;
+ uint8_t c_phy;
+ uint8_t p_phy;
+ uint8_t c_bn;
+ uint8_t p_bn;
} __attribute__ ((packed));
struct bt_hci_cmd_le_set_cig_params_test {
uint8_t cig_id;
- uint8_t m_interval[3];
- uint8_t s_interval[3];
- uint8_t m_ft;
- uint8_t s_ft;
+ uint8_t c_interval[3];
+ uint8_t p_interval[3];
+ uint8_t c_ft;
+ uint8_t p_ft;
uint16_t iso_interval;
uint8_t sca;
uint8_t packing;
@@ -2931,8 +2931,8 @@ struct bt_hci_evt_change_conn_link_key_complete {
uint16_t handle;
} __attribute__ ((packed));
-#define BT_HCI_EVT_MASTER_LINK_KEY_COMPLETE 0x0a
-struct bt_hci_evt_master_link_key_complete {
+#define BT_HCI_EVT_LINK_KEY_TYPE_CHANGED 0x0a
+struct bt_hci_evt_link_key_type_changed {
uint8_t status;
uint16_t handle;
uint8_t key_flag;
@@ -3325,8 +3325,8 @@ struct bt_hci_evt_sync_train_received {
uint8_t service_data;
} __attribute__ ((packed));
-#define BT_HCI_EVT_SLAVE_BROADCAST_RECEIVE 0x51
-struct bt_hci_evt_slave_broadcast_receive {
+#define BT_HCI_EVT_PERIPHERAL_BROADCAST_RECEIVE 0x51
+struct bt_hci_evt_peripheral_broadcast_receive {
uint8_t bdaddr[6];
uint8_t lt_addr;
uint32_t clock;
@@ -3336,8 +3336,8 @@ struct bt_hci_evt_slave_broadcast_receive {
uint8_t length;
} __attribute__ ((packed));
-#define BT_HCI_EVT_SLAVE_BROADCAST_TIMEOUT 0x52
-struct bt_hci_evt_slave_broadcast_timeout {
+#define BT_HCI_EVT_PERIPHERAL_BROADCAST_TIMEOUT 0x52
+struct bt_hci_evt_peripheral_broadcast_timeout {
uint8_t bdaddr[6];
uint8_t lt_addr;
} __attribute__ ((packed));
@@ -3348,10 +3348,10 @@ struct bt_hci_evt_truncated_page_complete {
uint8_t bdaddr[6];
} __attribute__ ((packed));
-#define BT_HCI_EVT_SLAVE_PAGE_RESPONSE_TIMEOUT 0x54
+#define BT_HCI_EVT_PERIPHERAL_PAGE_RESPONSE_TIMEOUT 0x54
-#define BT_HCI_EVT_SLAVE_BROADCAST_CHANNEL_MAP_CHANGE 0x55
-struct bt_hci_evt_slave_broadcast_channel_map_change {
+#define BT_HCI_EVT_PERIPHERAL_BROADCAST_CHANNEL_MAP_CHANGE 0x55
+struct bt_hci_evt_channel_map_change {
uint8_t map[10];
} __attribute__ ((packed));
@@ -3571,17 +3571,17 @@ struct bt_hci_evt_le_cis_established {
uint16_t conn_handle;
uint8_t cig_sync_delay[3];
uint8_t cis_sync_delay[3];
- uint8_t m_latency[3];
- uint8_t s_latency[3];
- uint8_t m_phy;
- uint8_t s_phy;
+ uint8_t c_latency[3];
+ uint8_t p_latency[3];
+ uint8_t c_phy;
+ uint8_t p_phy;
uint8_t nse;
- uint8_t m_bn;
- uint8_t s_bn;
- uint8_t m_ft;
- uint8_t s_ft;
- uint16_t m_mtu;
- uint16_t s_mtu;
+ uint8_t c_bn;
+ uint8_t p_bn;
+ uint8_t c_ft;
+ uint8_t p_ft;
+ uint16_t c_mtu;
+ uint16_t p_mtu;
uint16_t interval;
} __attribute__ ((packed));
@@ -4026,8 +4026,8 @@ struct bt_l2cap_smp_encrypt_info {
uint8_t ltk[16];
} __attribute__ ((packed));
-#define BT_L2CAP_SMP_MASTER_IDENT 0x07
-struct bt_l2cap_smp_master_ident {
+#define BT_L2CAP_SMP_CENTRAL_IDENT 0x07
+struct bt_l2cap_smp_central_ident {
uint16_t ediv;
uint64_t rand;
} __attribute__ ((packed));
diff --git a/monitor/control.c b/monitor/control.c
index dad23a0e62..009cf15209 100644
--- a/monitor/control.c
+++ b/monitor/control.c
@@ -305,19 +305,19 @@ static void mgmt_new_long_term_key(uint16_t len, const void *buf)
return;
}
- /* LE SC keys are both for master and slave */
+ /* LE SC keys are both for central and peripheral */
switch (ev->key.type) {
case 0x00:
if (ev->key.central)
- type = "Master (Unauthenticated)";
+ type = "Central (Unauthenticated)";
else
- type = "Slave (Unauthenticated)";
+ type = "Peripheral (Unauthenticated)";
break;
case 0x01:
if (ev->key.central)
- type = "Master (Authenticated)";
+ type = "Central (Authenticated)";
else
- type = "Slave (Authenticated)";
+ type = "Peripheral (Authenticated)";
break;
case 0x02:
type = "SC (Unauthenticated)";
diff --git a/monitor/l2cap.c b/monitor/l2cap.c
index 083e535613..4e449854ae 100644
--- a/monitor/l2cap.c
+++ b/monitor/l2cap.c
@@ -1280,7 +1280,7 @@ static void sig_conn_param_req(const struct l2cap_frame *frame)
print_field("Min interval: %d", le16_to_cpu(pdu->min_interval));
print_field("Max interval: %d", le16_to_cpu(pdu->max_interval));
- print_field("Slave latency: %d", le16_to_cpu(pdu->latency));
+ print_field("Peripheral latency: %d", le16_to_cpu(pdu->latency));
print_field("Timeout multiplier: %d", le16_to_cpu(pdu->timeout));
}
@@ -2960,9 +2960,9 @@ static void smp_encrypt_info(const struct l2cap_frame *frame)
print_hex_field("Long term key", pdu->ltk, 16);
}
-static void smp_master_ident(const struct l2cap_frame *frame)
+static void smp_central_ident(const struct l2cap_frame *frame)
{
- const struct bt_l2cap_smp_master_ident *pdu = frame->data;
+ const struct bt_l2cap_smp_central_ident *pdu = frame->data;
print_field("EDIV: 0x%4.4x", le16_to_cpu(pdu->ediv));
print_field("Rand: 0x%16.16" PRIx64, le64_to_cpu(pdu->rand));
@@ -3065,8 +3065,8 @@ static const struct smp_opcode_data smp_opcode_table[] = {
smp_pairing_failed, 1, true },
{ 0x06, "Encryption Information",
smp_encrypt_info, 16, true },
- { 0x07, "Master Identification",
- smp_master_ident, 10, true },
+ { 0x07, "Central Identification",
+ smp_central_ident, 10, true },
{ 0x08, "Identity Information",
smp_ident_info, 16, true },
{ 0x09, "Identity Address Information",
diff --git a/monitor/ll.c b/monitor/ll.c
index cf93647e03..f588d5e992 100644
--- a/monitor/ll.c
+++ b/monitor/ll.c
@@ -186,7 +186,7 @@ static void advertising_packet(const void *data, uint8_t size)
print_field("Transmit window size: %u", win_size);
print_field("Transmit window offset: %u", win_offset);
print_field("Connection interval: %u", interval);
- print_field("Connection slave latency: %u", latency);
+ print_field("Connection peripheral latency: %u", latency);
print_field("Connection supervision timeout: %u", timeout);
packet_print_channel_map_ll(ptr + 30);
@@ -371,8 +371,10 @@ static void conn_update_req(const void *data, uint8_t size)
print_field("Transmit window size: %u", pdu->win_size);
print_field("Transmit window offset: %u", le16_to_cpu(pdu->win_offset));
print_field("Connection interval: %u", le16_to_cpu(pdu->interval));
- print_field("Connection slave latency: %u", le16_to_cpu(pdu->latency));
- print_field("Connection supervision timeout: %u", le16_to_cpu(pdu->timeout));
+ print_field("Connection peripheral latency: %u",
+ le16_to_cpu(pdu->latency));
+ print_field("Connection supervision timeout: %u",
+ le16_to_cpu(pdu->timeout));
print_field("Connection instant: %u", le16_to_cpu(pdu->instant));
}
@@ -397,16 +399,16 @@ static void enc_req(const void *data, uint8_t size)
print_field("Rand: 0x%16.16" PRIx64, le64_to_cpu(pdu->rand));
print_field("EDIV: 0x%4.4x", le16_to_cpu(pdu->ediv));
- print_field("SKD (master): 0x%16.16" PRIx64, le64_to_cpu(pdu->skd));
- print_field("IV (master): 0x%8.8x", le32_to_cpu(pdu->iv));
+ print_field("SKD (central): 0x%16.16" PRIx64, le64_to_cpu(pdu->skd));
+ print_field("IV (central): 0x%8.8x", le32_to_cpu(pdu->iv));
}
static void enc_rsp(const void *data, uint8_t size)
{
const struct bt_ll_enc_rsp *pdu = data;
- print_field("SKD (slave): 0x%16.16" PRIx64, le64_to_cpu(pdu->skd));
- print_field("IV (slave): 0x%8.8x", le32_to_cpu(pdu->iv));
+ print_field("SKD (peripheral): 0x%16.16" PRIx64, le64_to_cpu(pdu->skd));
+ print_field("IV (peripheral): 0x%8.8x", le32_to_cpu(pdu->iv));
}
static const char *opcode_to_string(uint8_t opcode);
@@ -449,9 +451,9 @@ static void reject_ind(const void *data, uint8_t size)
packet_print_error("Error code", pdu->error);
}
-static void slave_feature_req(const void *data, uint8_t size)
+static void peripheral_feature_req(const void *data, uint8_t size)
{
- const struct bt_ll_slave_feature_req *pdu = data;
+ const struct bt_ll_peripheral_feature_req *pdu = data;
packet_print_features_ll(pdu->features);
}
@@ -505,16 +507,16 @@ static void phy_update_ind(const void *data, uint8_t size)
const struct bt_ll_phy_update_ind *pdu = data;
uint8_t mask;
- print_field("M_TO_S_PHY: 0x%2.2x", pdu->m_phy);
+ print_field("C_TO_P_PHY: 0x%2.2x", pdu->c_phy);
- mask = print_bitfield(2, pdu->m_phy, le_phys);
+ mask = print_bitfield(2, pdu->c_phy, le_phys);
if (mask)
print_text(COLOR_UNKNOWN_OPTIONS_BIT, " Reserved"
" (0x%2.2x)", mask);
- print_field("S_TO_M_PHY: 0x%2.2x", pdu->s_phy);
+ print_field("P_TO_C_PHY: 0x%2.2x", pdu->p_phy);
- mask = print_bitfield(2, pdu->s_phy, le_phys);
+ mask = print_bitfield(2, pdu->p_phy, le_phys);
if (mask)
print_text(COLOR_UNKNOWN_OPTIONS_BIT, " Reserved"
" (0x%2.2x)", mask);
@@ -596,38 +598,40 @@ static void cis_req(const void *data, uint8_t size)
print_field("CIG ID: 0x%2.2x", cmd->cig);
print_field("CIS ID: 0x%2.2x", cmd->cis);
- print_field("Master to Slave PHY: 0x%2.2x", cmd->m_phy);
+ print_field("Central to Peripheral PHY: 0x%2.2x", cmd->c_phy);
- mask = print_bitfield(2, cmd->m_phy, le_phys);
+ mask = print_bitfield(2, cmd->c_phy, le_phys);
if (mask)
print_text(COLOR_UNKNOWN_OPTIONS_BIT, " Reserved"
" (0x%2.2x)", mask);
- print_field("Slave To Master PHY: 0x%2.2x", cmd->s_phy);
+ print_field("Peripheral To Central PHY: 0x%2.2x", cmd->p_phy);
- mask = print_bitfield(2, cmd->s_phy, le_phys);
+ mask = print_bitfield(2, cmd->p_phy, le_phys);
if (mask)
print_text(COLOR_UNKNOWN_OPTIONS_BIT, " Reserved"
" (0x%2.2x)", mask);
- print_field("Master to Slave Maximum SDU: %u", cmd->m_sdu);
- print_field("Slave to Master Maximum SDU: %u", cmd->s_sdu);
+ print_field("Central to Peripheral Maximum SDU: %u", cmd->c_sdu);
+ print_field("Peripheral to Central Maximum SDU: %u", cmd->p_sdu);
- memcpy(&interval, cmd->m_interval, sizeof(cmd->m_interval));
- print_field("Master to Slave Interval: 0x%6.6x", le32_to_cpu(interval));
- memcpy(&interval, cmd->s_interval, sizeof(cmd->s_interval));
- print_field("Slave to Master Interval: 0x%6.6x", le32_to_cpu(interval));
+ memcpy(&interval, cmd->c_interval, sizeof(cmd->c_interval));
+ print_field("Central to Peripheral Interval: 0x%6.6x",
+ le32_to_cpu(interval));
+ memcpy(&interval, cmd->p_interval, sizeof(cmd->p_interval));
+ print_field("Peripheral to Central Interval: 0x%6.6x",
+ le32_to_cpu(interval));
- print_field("Master to Slave Maximum PDU: %u", cmd->m_pdu);
- print_field("Slave to Master Maximum PDU: %u", cmd->s_pdu);
+ print_field("Central to Peripheral Maximum PDU: %u", cmd->c_pdu);
+ print_field("Peripheral to Central Maximum PDU: %u", cmd->p_pdu);
print_field("Burst Number: %u us", cmd->bn);
memcpy(&interval, cmd->sub_interval, sizeof(cmd->sub_interval));
print_field("Sub-Interval: 0x%6.6x", le32_to_cpu(interval));
- print_field("Master to Slave Flush Timeout: %u", cmd->m_ft);
- print_field("Slave to Master Flush Timeout: %u", cmd->s_ft);
+ print_field("Central to Peripheral Flush Timeout: %u", cmd->c_ft);
+ print_field("Peripheral to Central Flush Timeout: %u", cmd->p_ft);
print_field("ISO Interval: 0x%4.4x", le16_to_cpu(cmd->iso_interval));
@@ -702,7 +706,7 @@ static const struct llcp_data llcp_table[] = {
{ 0x0b, "LL_PAUSE_ENC_RSP", null_pdu, 0, true },
{ 0x0c, "LL_VERSION_IND", version_ind, 5, true },
{ 0x0d, "LL_REJECT_IND", reject_ind, 1, true },
- { 0x0e, "LL_SLAVE_FEATURE_REQ", slave_feature_req, 8, true },
+ { 0x0e, "LL_PERIPHERAL_FEATURE_REQ", peripheral_feature_req, 8, true },
{ 0x0f, "LL_CONNECTION_PARAM_REQ", NULL, 23, true },
{ 0x10, "LL_CONNECTION_PARAM_RSP", NULL, 23, true },
{ 0x11, "LL_REJECT_IND_EXT", reject_ind_ext, 2, true },
diff --git a/monitor/lmp.c b/monitor/lmp.c
index 037adf2e25..d415699e46 100644
--- a/monitor/lmp.c
+++ b/monitor/lmp.c
@@ -839,7 +839,7 @@ void lmp_packet(const void *data, uint8_t size, bool padded)
tid = ((const uint8_t *) data)[0] & 0x01;
opcode = (((const uint8_t *) data)[0] & 0xfe) >> 1;
- tid_str = tid == 0x00 ? "Master" : "Slave";
+ tid_str = tid == 0x00 ? "Central" : "Peripheral";
switch (opcode) {
case 127:
diff --git a/monitor/packet.c b/monitor/packet.c
index c4273484ec..9b81cfc894 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -2171,16 +2171,16 @@ static void print_adv_filter_policy(const char *label, uint8_t value)
"Allow Connect Request from Any";
break;
case 0x01:
- str = "Allow Scan Request from White List Only, "
+ str = "Allow Scan Request from Accept List Only, "
"Allow Connect Request from Any";
break;
case 0x02:
str = "Allow Scan Request from Any, "
- "Allow Connect Request from White List Only";
+ "Allow Connect Request from Accept List Only";
break;
case 0x03:
- str = "Allow Scan Request from White List Only, "
- "Allow Connect Request from White List Only";
+ str = "Allow Scan Request from Accept List Only, "
+ "Allow Connect Request from Accept List Only";
break;
default:
str = "Reserved";
@@ -2234,10 +2234,10 @@ static void print_role(uint8_t role)
switch (role) {
case 0x00:
- str = "Master";
+ str = "Central";
break;
case 0x01:
- str = "Slave";
+ str = "Peripheral";
break;
default:
str = "Reserved";
@@ -2556,16 +2556,16 @@ static const struct bitfield_data features_page0[] = {
{ 31, "Extended SCO link (EV3 packets)" },
{ 32, "EV4 packets" },
{ 33, "EV5 packets" },
- { 35, "AFH capable slave" },
- { 36, "AFH classification slave" },
+ { 35, "AFH capable peripheral" },
+ { 36, "AFH classification peripheral" },
{ 37, "BR/EDR Not Supported" },
{ 38, "LE Supported (Controller)" },
{ 39, "3-slot Enhanced Data Rate ACL packets" },
{ 40, "5-slot Enhanced Data Rate ACL packets" },
{ 41, "Sniff subrating" },
{ 42, "Pause encryption" },
- { 43, "AFH capable master" },
- { 44, "AFH classification master" },
+ { 43, "AFH capable central" },
+ { 44, "AFH classification central" },
{ 45, "Enhanced Data Rate eSCO 2 Mbps mode" },
{ 46, "Enhanced Data Rate eSCO 3 Mbps mode" },
{ 47, "3-slot Enhanced Data Rate eSCO packets" },
@@ -2591,17 +2591,17 @@ static const struct bitfield_data features_page1[] = {
};
static const struct bitfield_data features_page2[] = {
- { 0, "Connectionless Slave Broadcast - Master" },
- { 1, "Connectionless Slave Broadcast - Slave" },
- { 2, "Synchronization Train" },
- { 3, "Synchronization Scan" },
- { 4, "Inquiry Response Notification Event" },
- { 5, "Generalized interlaced scan" },
- { 6, "Coarse Clock Adjustment" },
- { 8, "Secure Connections (Controller Support)" },
- { 9, "Ping" },
- { 10, "Slot Availability Mask" },
- { 11, "Train nudging" },
+ { 0, "Connectionless Peripheral Broadcast - Central" },
+ { 1, "Connectionless Peripheral Broadcast - Peripheral"},
+ { 2, "Synchronization Train" },
+ { 3, "Synchronization Scan" },
+ { 4, "Inquiry Response Notification Event" },
+ { 5, "Generalized interlaced scan" },
+ { 6, "Coarse Clock Adjustment" },
+ { 8, "Secure Connections (Controller Support)" },
+ { 9, "Ping" },
+ { 10, "Slot Availability Mask" },
+ { 11, "Train nudging" },
{ }
};
@@ -2609,7 +2609,7 @@ static const struct bitfield_data features_le[] = {
{ 0, "LE Encryption" },
{ 1, "Connection Parameter Request Procedure" },
{ 2, "Extended Reject Indication" },
- { 3, "Slave-initiated Features Exchange" },
+ { 3, "Peripheral-initiated Features Exchange" },
{ 4, "LE Ping" },
{ 5, "LE Data Packet Length Extension" },
{ 6, "LL Privacy" },
@@ -2634,8 +2634,8 @@ static const struct bitfield_data features_le[] = {
{ 25, "Periodic Advertising Sync Transfer - Recipient" },
{ 26, "Sleep Clock Accuracy Updates" },
{ 27, "Remote Public Key Validation" },
- { 28, "Connected Isochronous Stream - Master" },
- { 29, "Connected Isochronous Stream - Slave" },
+ { 28, "Connected Isochronous Stream - Central" },
+ { 29, "Connected Isochronous Stream - Peripheral" },
{ 30, "Isochronous Broadcaster" },
{ 31, "Synchronized Receiver" },
{ 32, "Isochronous Channels (Host Support)" },
@@ -2729,11 +2729,11 @@ void packet_print_features_msft(const uint8_t *features)
#define LE_STATE_ACTIVE_SCAN 0x0020
#define LE_STATE_PASSIVE_SCAN 0x0040
#define LE_STATE_INITIATING 0x0080
-#define LE_STATE_CONN_MASTER 0x0100
-#define LE_STATE_CONN_SLAVE 0x0200
-#define LE_STATE_MASTER_MASTER 0x0400
-#define LE_STATE_SLAVE_SLAVE 0x0800
-#define LE_STATE_MASTER_SLAVE 0x1000
+#define LE_STATE_CONN_CENTRAL 0x0100
+#define LE_STATE_CONN_PERIPHERAL 0x0200
+#define LE_STATE_CENTRAL_CENTRAL 0x0400
+#define LE_STATE_PERIPHERAL_PERIPHERAL 0x0800
+#define LE_STATE_CENTRAL_PERIPHERAL 0x1000
static const struct bitfield_data le_states_desc_table[] = {
{ 0, "Scannable Advertising State" },
@@ -2744,11 +2744,11 @@ static const struct bitfield_data le_states_desc_table[] = {
{ 5, "Active Scanning State" },
{ 6, "Passive Scanning State" },
{ 7, "Initiating State" },
- { 8, "Connection State (Master Role)" },
- { 9, "Connection State (Slave Role)" },
- { 10, "Master Role & Master Role" },
- { 11, "Slave Role & Slave Role" },
- { 12, "Master Role & Slave Role" },
+ { 8, "Connection State (Central Role)" },
+ { 9, "Connection State (Peripheral Role)" },
+ { 10, "Central Role & Central Role" },
+ { 11, "Peripheral Role & Peripheral Role" },
+ { 12, "Central Role & Peripheral Role" },
{ }
};
@@ -2756,59 +2756,59 @@ static const struct {
uint8_t bit;
uint16_t states;
} le_states_comb_table[] = {
- { 0, LE_STATE_NONCONN_ADV },
- { 1, LE_STATE_SCAN_ADV },
- { 2, LE_STATE_CONN_ADV },
- { 3, LE_STATE_HIGH_DIRECT_ADV },
- { 4, LE_STATE_PASSIVE_SCAN },
- { 5, LE_STATE_ACTIVE_SCAN },
- { 6, LE_STATE_INITIATING | LE_STATE_CONN_MASTER },
- { 7, LE_STATE_CONN_SLAVE },
- { 8, LE_STATE_PASSIVE_SCAN | LE_STATE_NONCONN_ADV },
- { 9, LE_STATE_PASSIVE_SCAN | LE_STATE_SCAN_ADV },
- { 10, LE_STATE_PASSIVE_SCAN | LE_STATE_CONN_ADV },
- { 11, LE_STATE_PASSIVE_SCAN | LE_STATE_HIGH_DIRECT_ADV },
- { 12, LE_STATE_ACTIVE_SCAN | LE_STATE_NONCONN_ADV },
- { 13, LE_STATE_ACTIVE_SCAN | LE_STATE_SCAN_ADV },
- { 14, LE_STATE_ACTIVE_SCAN | LE_STATE_CONN_ADV },
- { 15, LE_STATE_ACTIVE_SCAN | LE_STATE_HIGH_DIRECT_ADV },
- { 16, LE_STATE_INITIATING | LE_STATE_NONCONN_ADV },
- { 17, LE_STATE_INITIATING | LE_STATE_SCAN_ADV },
- { 18, LE_STATE_CONN_MASTER | LE_STATE_NONCONN_ADV },
- { 19, LE_STATE_CONN_MASTER | LE_STATE_SCAN_ADV },
- { 20, LE_STATE_CONN_SLAVE | LE_STATE_NONCONN_ADV },
- { 21, LE_STATE_CONN_SLAVE | LE_STATE_SCAN_ADV },
- { 22, LE_STATE_INITIATING | LE_STATE_PASSIVE_SCAN },
- { 23, LE_STATE_INITIATING | LE_STATE_ACTIVE_SCAN },
- { 24, LE_STATE_CONN_MASTER | LE_STATE_PASSIVE_SCAN },
- { 25, LE_STATE_CONN_MASTER | LE_STATE_ACTIVE_SCAN },
- { 26, LE_STATE_CONN_SLAVE | LE_STATE_PASSIVE_SCAN },
- { 27, LE_STATE_CONN_SLAVE | LE_STATE_ACTIVE_SCAN },
- { 28, LE_STATE_INITIATING | LE_STATE_CONN_MASTER |
- LE_STATE_MASTER_MASTER },
- { 29, LE_STATE_LOW_DIRECT_ADV },
- { 30, LE_STATE_LOW_DIRECT_ADV | LE_STATE_PASSIVE_SCAN },
- { 31, LE_STATE_LOW_DIRECT_ADV | LE_STATE_ACTIVE_SCAN },
+ { 0, LE_STATE_NONCONN_ADV },
+ { 1, LE_STATE_SCAN_ADV },
+ { 2, LE_STATE_CONN_ADV },
+ { 3, LE_STATE_HIGH_DIRECT_ADV },
+ { 4, LE_STATE_PASSIVE_SCAN },
+ { 5, LE_STATE_ACTIVE_SCAN },
+ { 6, LE_STATE_INITIATING | LE_STATE_CONN_CENTRAL },
+ { 7, LE_STATE_CONN_PERIPHERAL },
+ { 8, LE_STATE_PASSIVE_SCAN | LE_STATE_NONCONN_ADV },
+ { 9, LE_STATE_PASSIVE_SCAN | LE_STATE_SCAN_ADV },
+ { 10, LE_STATE_PASSIVE_SCAN | LE_STATE_CONN_ADV },
+ { 11, LE_STATE_PASSIVE_SCAN | LE_STATE_HIGH_DIRECT_ADV },
+ { 12, LE_STATE_ACTIVE_SCAN | LE_STATE_NONCONN_ADV },
+ { 13, LE_STATE_ACTIVE_SCAN | LE_STATE_SCAN_ADV },
+ { 14, LE_STATE_ACTIVE_SCAN | LE_STATE_CONN_ADV },
+ { 15, LE_STATE_ACTIVE_SCAN | LE_STATE_HIGH_DIRECT_ADV },
+ { 16, LE_STATE_INITIATING | LE_STATE_NONCONN_ADV },
+ { 17, LE_STATE_INITIATING | LE_STATE_SCAN_ADV },
+ { 18, LE_STATE_CONN_CENTRAL | LE_STATE_NONCONN_ADV },
+ { 19, LE_STATE_CONN_CENTRAL | LE_STATE_SCAN_ADV },
+ { 20, LE_STATE_CONN_PERIPHERAL | LE_STATE_NONCONN_ADV },
+ { 21, LE_STATE_CONN_PERIPHERAL | LE_STATE_SCAN_ADV },
+ { 22, LE_STATE_INITIATING | LE_STATE_PASSIVE_SCAN },
+ { 23, LE_STATE_INITIATING | LE_STATE_ACTIVE_SCAN },
+ { 24, LE_STATE_CONN_CENTRAL | LE_STATE_PASSIVE_SCAN },
+ { 25, LE_STATE_CONN_CENTRAL | LE_STATE_ACTIVE_SCAN },
+ { 26, LE_STATE_CONN_PERIPHERAL | LE_STATE_PASSIVE_SCAN },
+ { 27, LE_STATE_CONN_PERIPHERAL | LE_STATE_ACTIVE_SCAN },
+ { 28, LE_STATE_INITIATING | LE_STATE_CONN_CENTRAL |
+ LE_STATE_CENTRAL_CENTRAL },
+ { 29, LE_STATE_LOW_DIRECT_ADV },
+ { 30, LE_STATE_LOW_DIRECT_ADV | LE_STATE_PASSIVE_SCAN },
+ { 31, LE_STATE_LOW_DIRECT_ADV | LE_STATE_ACTIVE_SCAN },
{ 32, LE_STATE_INITIATING | LE_STATE_CONN_ADV |
- LE_STATE_MASTER_SLAVE },
+ LE_STATE_CENTRAL_PERIPHERAL },
{ 33, LE_STATE_INITIATING | LE_STATE_HIGH_DIRECT_ADV |
- LE_STATE_MASTER_SLAVE },
+ LE_STATE_CENTRAL_PERIPHERAL },
{ 34, LE_STATE_INITIATING | LE_STATE_LOW_DIRECT_ADV |
- LE_STATE_MASTER_SLAVE },
- { 35, LE_STATE_CONN_MASTER | LE_STATE_CONN_ADV |
- LE_STATE_MASTER_SLAVE },
- { 36, LE_STATE_CONN_MASTER | LE_STATE_HIGH_DIRECT_ADV |
- LE_STATE_MASTER_SLAVE },
- { 37, LE_STATE_CONN_MASTER | LE_STATE_LOW_DIRECT_ADV |
- LE_STATE_MASTER_SLAVE },
- { 38, LE_STATE_CONN_SLAVE | LE_STATE_CONN_ADV |
- LE_STATE_MASTER_SLAVE },
- { 39, LE_STATE_CONN_SLAVE | LE_STATE_HIGH_DIRECT_ADV |
- LE_STATE_SLAVE_SLAVE },
- { 40, LE_STATE_CONN_SLAVE | LE_STATE_LOW_DIRECT_ADV |
- LE_STATE_SLAVE_SLAVE },
- { 41, LE_STATE_INITIATING | LE_STATE_CONN_SLAVE |
- LE_STATE_MASTER_SLAVE },
+ LE_STATE_CENTRAL_PERIPHERAL },
+ { 35, LE_STATE_CONN_CENTRAL | LE_STATE_CONN_ADV |
+ LE_STATE_CENTRAL_PERIPHERAL },
+ { 36, LE_STATE_CONN_CENTRAL | LE_STATE_HIGH_DIRECT_ADV |
+ LE_STATE_CENTRAL_PERIPHERAL },
+ { 37, LE_STATE_CONN_CENTRAL | LE_STATE_LOW_DIRECT_ADV |
+ LE_STATE_CENTRAL_PERIPHERAL },
+ { 38, LE_STATE_CONN_PERIPHERAL | LE_STATE_CONN_ADV |
+ LE_STATE_CENTRAL_PERIPHERAL },
+ { 39, LE_STATE_CONN_PERIPHERAL | LE_STATE_HIGH_DIRECT_ADV |
+ LE_STATE_PERIPHERAL_PERIPHERAL },
+ { 40, LE_STATE_CONN_PERIPHERAL | LE_STATE_LOW_DIRECT_ADV |
+ LE_STATE_PERIPHERAL_PERIPHERAL },
+ { 41, LE_STATE_INITIATING | LE_STATE_CONN_PERIPHERAL |
+ LE_STATE_CENTRAL_PERIPHERAL },
{ }
};
@@ -2908,7 +2908,7 @@ static const struct bitfield_data events_table[] = {
{ 6, "Remote Name Request Complete" },
{ 7, "Encryption Change" },
{ 8, "Change Connection Link Key Complete" },
- { 9, "Master Link Key Complete" },
+ { 9, "Link Key Type Changed" },
{ 10, "Read Remote Supported Features Complete" },
{ 11, "Read Remote Version Information Complete" },
{ 12, "QoS Setup Complete" },
@@ -2989,11 +2989,11 @@ static const struct bitfield_data events_page2_table[] = {
{ 14, "Triggered Clock Capture" },
{ 15, "Synchronization Train Complete" },
{ 16, "Synchronization Train Received" },
- { 17, "Connectionless Slave Broadcast Receive" },
- { 18, "Connectionless Slave Broadcast Timeout" },
+ { 17, "Connectionless Peripheral Broadcast Receive" },
+ { 18, "Connectionless Peripheral Broadcast Timeout" },
{ 19, "Truncated Page Complete" },
- { 20, "Slave Page Response Timeout" },
- { 21, "Connectionless Slave Broadcast Channel Map Change" },
+ { 20, "Peripheral Page Response Timeout" },
+ { 21, "Connectionless Peripheral Broadcast Channel Map Change" },
{ 22, "Inquiry Response Notification" },
{ 23, "Authenticated Payload Timeout Expired" },
{ 24, "SAM Status Change" },
@@ -3065,7 +3065,7 @@ static void print_fec(uint8_t fec)
#define BT_EIR_DEVICE_ID 0x10
#define BT_EIR_SMP_TK 0x10
#define BT_EIR_SMP_OOB_FLAGS 0x11
-#define BT_EIR_SLAVE_CONN_INTERVAL 0x12
+#define BT_EIR_PERIPHERAL_CONN_INTERVAL 0x12
#define BT_EIR_SERVICE_UUID16 0x14
#define BT_EIR_SERVICE_UUID128 0x15
#define BT_EIR_SERVICE_DATA 0x16
@@ -3675,10 +3675,11 @@ static void print_eir(const uint8_t *eir, uint8_t eir_len, bool le)
print_field("SMP OOB Flags: 0x%2.2x", *data);
break;
- case BT_EIR_SLAVE_CONN_INTERVAL:
+ case BT_EIR_PERIPHERAL_CONN_INTERVAL:
if (data_len < 4)
break;
- print_field("Slave Conn. Interval: 0x%4.4x - 0x%4.4x",
+ print_field("Peripheral Conn. Interval: "
+ "0x%4.4x - 0x%4.4x",
get_le16(&data[0]),
get_le16(&data[2]));
break;
@@ -4147,10 +4148,10 @@ static void create_conn_cmd(const void *data, uint8_t size)
switch (cmd->role_switch) {
case 0x00:
- str = "Stay master";
+ str = "Stay central";
break;
case 0x01:
- str = "Allow slave";
+ str = "Allow peripheral";
break;
default:
str = "Reserved";
@@ -4260,9 +4261,9 @@ static void change_conn_link_key_cmd(const void *data, uint8_t size)
print_handle(cmd->handle);
}
-static void master_link_key_cmd(const void *data, uint8_t size)
+static void link_key_selection_cmd(const void *data, uint8_t size)
{
- const struct bt_hci_cmd_master_link_key *cmd = data;
+ const struct bt_hci_cmd_link_key_selection *cmd = data;
print_key_flag(cmd->key_flag);
}
@@ -4554,9 +4555,9 @@ static void truncated_page_cancel_cmd(const void *data, uint8_t size)
print_bdaddr(cmd->bdaddr);
}
-static void set_slave_broadcast_cmd(const void *data, uint8_t size)
+static void set_peripheral_broadcast_cmd(const void *data, uint8_t size)
{
- const struct bt_hci_cmd_set_slave_broadcast *cmd = data;
+ const struct bt_hci_cmd_set_peripheral_broadcast *cmd = data;
print_field("Enable: 0x%2.2x", cmd->enable);
print_lt_addr(cmd->lt_addr);
@@ -4567,18 +4568,18 @@ static void set_slave_broadcast_cmd(const void *data, uint8_t size)
print_slot_625("Supervision timeout", cmd->timeout);
}
-static void set_slave_broadcast_rsp(const void *data, uint8_t size)
+static void set_peripheral_broadcast_rsp(const void *data, uint8_t size)
{
- const struct bt_hci_rsp_set_slave_broadcast *rsp = data;
+ const struct bt_hci_rsp_set_peripheral_broadcast *rsp = data;
print_status(rsp->status);
print_lt_addr(rsp->lt_addr);
print_interval(rsp->interval);
}
-static void set_slave_broadcast_receive_cmd(const void *data, uint8_t size)
+static void set_peripheral_broadcast_receive_cmd(const void *data, uint8_t size)
{
- const struct bt_hci_cmd_set_slave_broadcast_receive *cmd = data;
+ const struct bt_hci_cmd_set_peripheral_broadcast_receive *cmd = data;
print_field("Enable: 0x%2.2x", cmd->enable);
print_bdaddr(cmd->bdaddr);
@@ -4594,9 +4595,9 @@ static void set_slave_broadcast_receive_cmd(const void *data, uint8_t size)
print_channel_map(cmd->map);
}
-static void set_slave_broadcast_receive_rsp(const void *data, uint8_t size)
+static void set_peripheral_broadcast_receive_rsp(const void *data, uint8_t size)
{
- const struct bt_hci_rsp_set_slave_broadcast_receive *rsp = data;
+ const struct bt_hci_rsp_set_peripheral_broadcast_receive *rsp = data;
print_status(rsp->status);
print_bdaddr(rsp->bdaddr);
@@ -5665,9 +5666,9 @@ static void delete_reserved_lt_addr_rsp(const void *data, uint8_t size)
print_lt_addr(rsp->lt_addr);
}
-static void set_slave_broadcast_data_cmd(const void *data, uint8_t size)
+static void set_peripheral_broadcast_data_cmd(const void *data, uint8_t size)
{
- const struct bt_hci_cmd_set_slave_broadcast_data *cmd = data;
+ const struct bt_hci_cmd_set_peripheral_broadcast_data *cmd = data;
print_lt_addr(cmd->lt_addr);
print_broadcast_fragment(cmd->fragment);
@@ -5680,9 +5681,9 @@ static void set_slave_broadcast_data_cmd(const void *data, uint8_t size)
packet_hexdump(data + 3, size - 3);
}
-static void set_slave_broadcast_data_rsp(const void *data, uint8_t size)
+static void set_peripheral_broadcast_data_rsp(const void *data, uint8_t size)
{
- const struct bt_hci_rsp_set_slave_broadcast_data *rsp = data;
+ const struct bt_hci_rsp_set_peripheral_broadcast_data *rsp = data;
print_status(rsp->status);
print_lt_addr(rsp->lt_addr);
@@ -6541,13 +6542,13 @@ static void print_scan_filter_policy(uint8_t policy)
str = "Accept all advertisement";
break;
case 0x01:
- str = "Ignore not in white list";
+ str = "Ignore not in accept list";
break;
case 0x02:
str = "Accept all advertisement, inc. directed unresolved RPA";
break;
case 0x03:
- str = "Ignore not in white list, exc. directed unresolved RPA";
+ str = "Ignore not in accept list, exc. directed unresolved RPA";
break;
default:
str = "Reserved";
@@ -6586,10 +6587,10 @@ static void le_create_conn_cmd(const void *data, uint8_t size)
switch (cmd->filter_policy) {
case 0x00:
- str = "White list is not used";
+ str = "Accept list is not used";
break;
case 0x01:
- str = "White list is used";
+ str = "Accept list is used";
break;
default:
str = "Reserved";
@@ -6612,25 +6613,25 @@ static void le_create_conn_cmd(const void *data, uint8_t size)
print_slot_625("Max connection length", cmd->max_length);
}
-static void le_read_white_list_size_rsp(const void *data, uint8_t size)
+static void le_read_accept_list_size_rsp(const void *data, uint8_t size)
{
- const struct bt_hci_rsp_le_read_white_list_size *rsp = data;
+ const struct bt_hci_rsp_le_read_accept_list_size *rsp = data;
print_status(rsp->status);
print_field("Size: %u", rsp->size);
}
-static void le_add_to_white_list_cmd(const void *data, uint8_t size)
+static void le_add_to_accept_list_cmd(const void *data, uint8_t size)
{
- const struct bt_hci_cmd_le_add_to_white_list *cmd = data;
+ const struct bt_hci_cmd_le_add_to_accept_list *cmd = data;
print_addr_type("Address type", cmd->addr_type);
print_addr("Address", cmd->addr, cmd->addr_type);
}
-static void le_remove_from_white_list_cmd(const void *data, uint8_t size)
+static void le_remove_from_accept_list_cmd(const void *data, uint8_t size)
{
- const struct bt_hci_cmd_le_remove_from_white_list *cmd = data;
+ const struct bt_hci_cmd_le_remove_from_accept_list *cmd = data;
print_addr_type("Address type", cmd->addr_type);
print_addr("Address", cmd->addr, cmd->addr_type);
@@ -7569,10 +7570,10 @@ static void le_ext_create_conn_cmd(const void *data, uint8_t size)
switch (cmd->filter_policy) {
case 0x00:
- str = "White list is not used";
+ str = "Accept list is not used";
break;
case 0x01:
- str = "White list is used";
+ str = "Accept list is used";
break;
default:
str = "Reserved";
@@ -8030,16 +8031,16 @@ static void print_cis_params(const void *data, int i)
const struct bt_hci_cis_params *cis = data;
print_field("CIS ID: 0x%2.2x", cis->cis_id);
- print_field("Master to Slave Maximum SDU Size: %u",
- le16_to_cpu(cis->m_sdu));
- print_field("Slave to Master Maximum SDU Size: %u",
- le16_to_cpu(cis->s_sdu));
- print_le_phy("Master to Slave PHY", cis->m_phy);
- print_le_phy("Slave to Master PHY", cis->s_phy);
- print_field("Master to Slave Retransmission attempts: 0x%2.2x",
- cis->m_rtn);
- print_field("Slave to Master Retransmission attempts: 0x%2.2x",
- cis->s_rtn);
+ print_field("Central to Peripheral Maximum SDU Size: %u",
+ le16_to_cpu(cis->c_sdu));
+ print_field("Peripheral to Central Maximum SDU Size: %u",
+ le16_to_cpu(cis->p_sdu));
+ print_le_phy("Central to Peripheral PHY", cis->c_phy);
+ print_le_phy("Peripheral to Central PHY", cis->p_phy);
+ print_field("Central to Peripheral Retransmission attempts: 0x%2.2x",
+ cis->c_rtn);
+ print_field("Peripheral to Central Retransmission attempts: 0x%2.2x",
+ cis->p_rtn);
}
static void le_set_cig_params_cmd(const void *data, uint8_t size)
@@ -8047,15 +8048,17 @@ static void le_set_cig_params_cmd(const void *data, uint8_t size)
const struct bt_hci_cmd_le_set_cig_params *cmd = data;
print_field("CIG ID: 0x%2.2x", cmd->cig_id);
- print_usec_interval("Master to Slave SDU Interval", cmd->m_interval);
- print_usec_interval("Slave to Master SDU Interval", cmd->s_interval);
+ print_usec_interval("Central to Peripheral SDU Interval",
+ cmd->c_interval);
+ print_usec_interval("Peripheral to Central SDU Interval",
+ cmd->p_interval);
print_sca(cmd->sca);
print_packing(cmd->packing);
print_framing(cmd->framing);
- print_field("Master to Slave Maximum Latency: %d ms (0x%4.4x)",
- le16_to_cpu(cmd->m_latency), le16_to_cpu(cmd->m_latency));
- print_field("Slave to Master Maximum Latency: %d ms (0x%4.4x)",
- le16_to_cpu(cmd->s_latency), le16_to_cpu(cmd->s_latency));
+ print_field("Central to Peripheral Maximum Latency: %d ms (0x%4.4x)",
+ le16_to_cpu(cmd->c_latency), le16_to_cpu(cmd->c_latency));
+ print_field("Peripheral to Central Maximum Latency: %d ms (0x%4.4x)",
+ le16_to_cpu(cmd->p_latency), le16_to_cpu(cmd->p_latency));
print_field("Number of CIS: %u", cmd->num_cis);
size -= sizeof(*cmd);
@@ -8070,18 +8073,18 @@ static void print_cis_params_test(const void *data, int i)
print_field("CIS ID: 0x%2.2x", cis->cis_id);
print_field("NSE: 0x%2.2x", cis->nse);
- print_field("Master to Slave Maximum SDU: 0x%4.4x",
- le16_to_cpu(cis->m_sdu));
- print_field("Slave to Master Maximum SDU: 0x%4.4x",
- le16_to_cpu(cis->s_sdu));
- print_field("Master to Slave Maximum PDU: 0x%4.4x",
- le16_to_cpu(cis->m_pdu));
- print_field("Slave to Master Maximum PDU: 0x%4.4x",
- le16_to_cpu(cis->s_pdu));
- print_le_phy("Master to Slave PHY", cis->m_phy);
- print_le_phy("Slave to Master PHY", cis->s_phy);
- print_field("Master to Slave Burst Number: 0x%2.2x", cis->m_bn);
- print_field("Slave to Master Burst Number: 0x%2.2x", cis->s_bn);
+ print_field("Central to Peripheral Maximum SDU: 0x%4.4x",
+ le16_to_cpu(cis->c_sdu));
+ print_field("Peripheral to Central Maximum SDU: 0x%4.4x",
+ le16_to_cpu(cis->p_sdu));
+ print_field("Central to Peripheral Maximum PDU: 0x%4.4x",
+ le16_to_cpu(cis->c_pdu));
+ print_field("Peripheral to Central Maximum PDU: 0x%4.4x",
+ le16_to_cpu(cis->p_pdu));
+ print_le_phy("Central to Peripheral PHY", cis->c_phy);
+ print_le_phy("Peripheral to Central PHY", cis->p_phy);
+ print_field("Central to Peripheral Burst Number: 0x%2.2x", cis->c_bn);
+ print_field("Peripheral to Central Burst Number: 0x%2.2x", cis->p_bn);
}
static void le_set_cig_params_test_cmd(const void *data, uint8_t size)
@@ -8089,10 +8092,12 @@ static void le_set_cig_params_test_cmd(const void *data, uint8_t size)
const struct bt_hci_cmd_le_set_cig_params_test *cmd = data;
print_field("CIG ID: 0x%2.2x", cmd->cig_id);
- print_usec_interval("Master to Slave SDU Interval", cmd->m_interval);
- print_usec_interval("Slave to Master SDU Interval", cmd->s_interval);
- print_field("Master to Slave Flush Timeout: 0x%2.2x", cmd->m_ft);
- print_field("Slave to Master Flush Timeout: 0x%2.2x", cmd->s_ft);
+ print_usec_interval("Central to Peripheral SDU Interval",
+ cmd->c_interval);
+ print_usec_interval("Peripheral to Central SDU Interval",
+ cmd->p_interval);
+ print_field("Central to Peripheral Flush Timeout: 0x%2.2x", cmd->c_ft);
+ print_field("Peripheral to Central Flush Timeout: 0x%2.2x", cmd->p_ft);
print_field("ISO Interval: %.2f ms (0x%4.4x)",
le16_to_cpu(cmd->iso_interval) * 1.25,
le16_to_cpu(cmd->iso_interval));
@@ -8425,8 +8430,8 @@ static const struct opcode_data opcode_table[] = {
set_conn_encrypt_cmd, 3, true },
{ 0x0415, 17, "Change Connection Link Key",
change_conn_link_key_cmd, 2, true },
- { 0x0417, 18, "Master Link Key",
- master_link_key_cmd, 1, true },
+ { 0x0417, 18, "Temporary Link Key",
+ link_key_selection_cmd, 1, true },
{ 0x0419, 19, "Remote Name Request",
remote_name_request_cmd, 10, true },
{ 0x041a, 20, "Remote Name Request Cancel",
@@ -8499,12 +8504,12 @@ static const struct opcode_data opcode_table[] = {
{ 0x0440, 247, "Truncated Page Cancel",
truncated_page_cancel_cmd, 6, true,
status_bdaddr_rsp, 7, true },
- { 0x0441, 248, "Set Connectionless Slave Broadcast",
- set_slave_broadcast_cmd, 11, true,
- set_slave_broadcast_rsp, 4, true },
- { 0x0442, 249, "Set Connectionless Slave Broadcast Receive",
- set_slave_broadcast_receive_cmd, 34, true,
- set_slave_broadcast_receive_rsp, 8, true },
+ { 0x0441, 248, "Set Connectionless Peripheral Broadcast",
+ set_peripheral_broadcast_cmd, 11, true,
+ set_peripheral_broadcast_rsp, 4, true },
+ { 0x0442, 249, "Set Connectionless Peripheral Broadcast Receive",
+ set_peripheral_broadcast_receive_cmd, 34, true,
+ set_peripheral_broadcast_receive_rsp, 8, true },
{ 0x0443, 250, "Start Synchronization Train",
null_cmd, 0, true },
{ 0x0444, 251, "Receive Synchronization Train",
@@ -8805,9 +8810,9 @@ static const struct opcode_data opcode_table[] = {
{ 0x0c75, 253, "Delete Reserved LT_ADDR",
delete_reserved_lt_addr_cmd, 1, true,
delete_reserved_lt_addr_rsp, 2, true },
- { 0x0c76, 254, "Set Connectionless Slave Broadcast Data",
- set_slave_broadcast_data_cmd, 3, false,
- set_slave_broadcast_data_rsp, 2, true },
+ { 0x0c76, 254, "Set Connectionless Peripheral Broadcast Data",
+ set_peripheral_broadcast_data_cmd, 3, false,
+ set_peripheral_broadcast_data_rsp, 2, true },
{ 0x0c77, 255, "Read Synchronization Train Parameters",
null_cmd, 0, true,
read_sync_train_params_rsp, 8, true },
@@ -8995,17 +9000,17 @@ static const struct opcode_data opcode_table[] = {
{ 0x200e, 213, "LE Create Connection Cancel",
null_cmd, 0, true,
status_rsp, 1, true },
- { 0x200f, 214, "LE Read White List Size",
+ { 0x200f, 214, "LE Read Accept List Size",
null_cmd, 0, true,
- le_read_white_list_size_rsp, 2, true },
- { 0x2010, 215, "LE Clear White List",
+ le_read_accept_list_size_rsp, 2, true },
+ { 0x2010, 215, "LE Clear Accept List",
null_cmd, 0, true,
status_rsp, 1, true },
- { 0x2011, 216, "LE Add Device To White List",
- le_add_to_white_list_cmd, 7, true,
+ { 0x2011, 216, "LE Add Device To Accept List",
+ le_add_to_accept_list_cmd, 7, true,
status_rsp, 1, true },
- { 0x2012, 217, "LE Remove Device From White List",
- le_remove_from_white_list_cmd, 7, true,
+ { 0x2012, 217, "LE Remove Device From Accept List",
+ le_remove_from_accept_list_cmd, 7, true,
status_rsp, 1, true },
{ 0x2013, 218, "LE Connection Update",
le_conn_update_cmd, 14, true },
@@ -9502,9 +9507,9 @@ static void change_conn_link_key_complete_evt(const void *data, uint8_t size)
print_handle(evt->handle);
}
-static void master_link_key_complete_evt(const void *data, uint8_t size)
+static void link_key_type_changed_evt(const void *data, uint8_t size)
{
- const struct bt_hci_evt_master_link_key_complete *evt = data;
+ const struct bt_hci_evt_link_key_type_changed *evt = data;
print_status(evt->status);
print_handle(evt->handle);
@@ -10209,9 +10214,9 @@ static void sync_train_received_evt(const void *data, uint8_t size)
print_field("Service Data: 0x%2.2x", evt->service_data);
}
-static void slave_broadcast_receive_evt(const void *data, uint8_t size)
+static void peripheral_broadcast_receive_evt(const void *data, uint8_t size)
{
- const struct bt_hci_evt_slave_broadcast_receive *evt = data;
+ const struct bt_hci_evt_peripheral_broadcast_receive *evt = data;
print_bdaddr(evt->bdaddr);
print_lt_addr(evt->lt_addr);
@@ -10231,9 +10236,9 @@ static void slave_broadcast_receive_evt(const void *data, uint8_t size)
packet_hexdump(data + 18, size - 18);
}
-static void slave_broadcast_timeout_evt(const void *data, uint8_t size)
+static void peripheral_broadcast_timeout_evt(const void *data, uint8_t size)
{
- const struct bt_hci_evt_slave_broadcast_timeout *evt = data;
+ const struct bt_hci_evt_peripheral_broadcast_timeout *evt = data;
print_bdaddr(evt->bdaddr);
print_lt_addr(evt->lt_addr);
@@ -10247,13 +10252,13 @@ static void truncated_page_complete_evt(const void *data, uint8_t size)
print_bdaddr(evt->bdaddr);
}
-static void slave_page_response_timeout_evt(const void *data, uint8_t size)
+static void peripheral_page_response_timeout_evt(const void *data, uint8_t size)
{
}
-static void slave_broadcast_channel_map_change_evt(const void *data, uint8_t size)
+static void channel_map_change_evt(const void *data, uint8_t size)
{
- const struct bt_hci_evt_slave_broadcast_channel_map_change *evt = data;
+ const struct bt_hci_evt_channel_map_change *evt = data;
print_channel_map(evt->map);
}
@@ -10287,7 +10292,7 @@ static void le_conn_complete_evt(const void *data, uint8_t size)
print_field("Supervision timeout: %d msec (0x%4.4x)",
le16_to_cpu(evt->supv_timeout) * 10,
le16_to_cpu(evt->supv_timeout));
- print_field("Master clock accuracy: 0x%2.2x", evt->clock_accuracy);
+ print_field("Central clock accuracy: 0x%2.2x", evt->clock_accuracy);
if (evt->status == 0x00)
assign_handle(le16_to_cpu(evt->handle), 0x01);
@@ -10408,7 +10413,7 @@ static void le_enhanced_conn_complete_evt(const void *data, uint8_t size)
print_field("Supervision timeout: %d msec (0x%4.4x)",
le16_to_cpu(evt->supv_timeout) * 10,
le16_to_cpu(evt->supv_timeout));
- print_field("Master clock accuracy: 0x%2.2x", evt->clock_accuracy);
+ print_field("Central clock accuracy: 0x%2.2x", evt->clock_accuracy);
if (evt->status == 0x00)
assign_handle(le16_to_cpu(evt->handle), 0x01);
@@ -10784,17 +10789,17 @@ static void le_cis_established_evt(const void *data, uint8_t size)
print_field("Connection Handle: %d", le16_to_cpu(evt->conn_handle));
print_usec_interval("CIG Synchronization Delay", evt->cig_sync_delay);
print_usec_interval("CIS Synchronization Delay", evt->cis_sync_delay);
- print_usec_interval("Master to Slave Latency", evt->m_latency);
- print_usec_interval("Slave to Master Latency", evt->s_latency);
- print_le_phy("Master to Slave PHY", evt->m_phy);
- print_le_phy("Slave to Master PHY", evt->s_phy);
+ print_usec_interval("Central to Peripheral Latency", evt->c_latency);
+ print_usec_interval("Peripheral to Central Latency", evt->p_latency);
+ print_le_phy("Central to Peripheral PHY", evt->c_phy);
+ print_le_phy("Peripheral to Central PHY", evt->p_phy);
print_field("Number of Subevents: %u", evt->nse);
- print_field("Master to Slave Burst Number: %u", evt->m_bn);
- print_field("Slave to Master Burst Number: %u", evt->s_bn);
- print_field("Master to Slave Flush Timeout: %u", evt->m_ft);
- print_field("Slave to Master Flush Timeout: %u", evt->s_ft);
- print_field("Master to Slave MTU: %u", le16_to_cpu(evt->m_mtu));
- print_field("Slave to Master MTU: %u", le16_to_cpu(evt->s_mtu));
+ print_field("Central to Peripheral Burst Number: %u", evt->c_bn);
+ print_field("Peripheral to Central Burst Number: %u", evt->p_bn);
+ print_field("Central to Peripheral Flush Timeout: %u", evt->c_ft);
+ print_field("Peripheral to Central Flush Timeout: %u", evt->p_ft);
+ print_field("Central to Peripheral MTU: %u", le16_to_cpu(evt->c_mtu));
+ print_field("Peripheral to Central MTU: %u", le16_to_cpu(evt->p_mtu));
print_field("ISO Interval: %u", le16_to_cpu(evt->interval));
}
@@ -11082,8 +11087,8 @@ static const struct event_data event_table[] = {
encrypt_change_evt, 4, true },
{ 0x09, "Change Connection Link Key Complete",
change_conn_link_key_complete_evt, 3, true },
- { 0x0a, "Master Link Key Complete",
- master_link_key_complete_evt, 4, true },
+ { 0x0a, "Link Key Type Changed",
+ link_key_type_changed_evt, 4, true },
{ 0x0b, "Read Remote Supported Features",
remote_features_complete_evt, 11, true },
{ 0x0c, "Read Remote Version Complete",
@@ -11199,16 +11204,16 @@ static const struct event_data event_table[] = {
sync_train_complete_evt, 1, true },
{ 0x50, "Synchronization Train Received",
sync_train_received_evt, 29, true },
- { 0x51, "Connectionless Slave Broadcast Receive",
- slave_broadcast_receive_evt, 18, false },
- { 0x52, "Connectionless Slave Broadcast Timeout",
- slave_broadcast_timeout_evt, 7, true },
+ { 0x51, "Connectionless Peripheral Broadcast Receive",
+ peripheral_broadcast_receive_evt, 18, false },
+ { 0x52, "Connectionless Peripheral Broadcast Timeout",
+ peripheral_broadcast_timeout_evt, 7, true },
{ 0x53, "Truncated Page Complete",
truncated_page_complete_evt, 7, true },
- { 0x54, "Slave Page Response Timeout",
- slave_page_response_timeout_evt, 0, true },
- { 0x55, "Connectionless Slave Broadcast Channel Map Change",
- slave_broadcast_channel_map_change_evt, 10, true },
+ { 0x54, "Peripheral Page Response Timeout",
+ peripheral_page_response_timeout_evt, 0, true },
+ { 0x55, "Connectionless Peripheral Broadcast Channel Map Change",
+ channel_map_change_evt, 10, true },
{ 0x56, "Inquiry Response Notification",
inquiry_response_notify_evt, 4, true },
{ 0x57, "Authenticated Payload Timeout Expired",
@@ -12171,7 +12176,7 @@ static void mgmt_print_long_term_key(const void *data)
{
uint8_t address_type = get_u8(data + 6);
uint8_t key_type = get_u8(data + 7);
- uint8_t master = get_u8(data + 8);
+ uint8_t central = get_u8(data + 8);
uint8_t enc_size = get_u8(data + 9);
const char *str;
@@ -12199,7 +12204,7 @@ static void mgmt_print_long_term_key(const void *data)
}
print_field("Key type: %s (0x%2.2x)", str, key_type);
- print_field("Master: 0x%2.2x", master);
+ print_field("Central: 0x%2.2x", central);
print_field("Encryption size: %u", enc_size);
print_hex_field("Diversifier", data + 10, 2);
print_hex_field("Randomizer", data + 12, 8);
diff --git a/tools/3dsp.c b/tools/3dsp.c
index 99c1ac82bc..5227c30b63 100644
--- a/tools/3dsp.c
+++ b/tools/3dsp.c
@@ -122,7 +122,7 @@ static void sync_train_received(const void *data, uint8_t size,
void *user_data)
{
const struct bt_hci_evt_sync_train_received *evt = data;
- struct bt_hci_cmd_set_slave_broadcast_receive cmd;
+ struct bt_hci_cmd_set_peripheral_broadcast_receive cmd;
if (evt->status) {
printf("Failed to synchronize with 3D display\n");
@@ -147,7 +147,7 @@ static void sync_train_received(const void *data, uint8_t size,
cmd.pkt_type = cpu_to_le16(PKT_TYPE);
memcpy(cmd.map, evt->map, 10);
- bt_hci_send(hci_dev, BT_HCI_CMD_SET_SLAVE_BROADCAST_RECEIVE,
+ bt_hci_send(hci_dev, BT_HCI_CMD_SET_PERIPHERAL_BROADCAST_RECEIVE,
&cmd, sizeof(cmd),
set_slave_broadcast_receive, NULL, NULL);
}
@@ -156,7 +156,7 @@ static void brcm_sync_train_received(const void *data, uint8_t size,
void *user_data)
{
const struct brcm_evt_sync_train_received *evt = data;
- struct bt_hci_cmd_set_slave_broadcast_receive cmd;
+ struct bt_hci_cmd_set_peripheral_broadcast_receive cmd;
if (evt->status) {
printf("Failed to synchronize with 3D display\n");
@@ -181,7 +181,7 @@ static void brcm_sync_train_received(const void *data, uint8_t size,
cmd.pkt_type = cpu_to_le16(PKT_TYPE);
memcpy(cmd.map, evt->map, 10);
- bt_hci_send(hci_dev, BT_HCI_CMD_SET_SLAVE_BROADCAST_RECEIVE,
+ bt_hci_send(hci_dev, BT_HCI_CMD_SET_PERIPHERAL_BROADCAST_RECEIVE,
&cmd, sizeof(cmd),
set_slave_broadcast_receive, NULL, NULL);
}
@@ -212,7 +212,7 @@ static void truncated_page_complete(const void *data, uint8_t size,
static void slave_broadcast_timeout(const void *data, uint8_t size,
void *user_data)
{
- const struct bt_hci_evt_slave_broadcast_timeout *evt = data;
+ const struct bt_hci_evt_peripheral_broadcast_timeout *evt = data;
struct bt_hci_cmd_receive_sync_train cmd;
printf("Re-synchronizing with 3D display\n");
@@ -229,7 +229,7 @@ static void slave_broadcast_timeout(const void *data, uint8_t size,
static void slave_broadcast_receive(const void *data, uint8_t size,
void *user_data)
{
- const struct bt_hci_evt_slave_broadcast_receive *evt = data;
+ const struct bt_hci_evt_peripheral_broadcast_receive *evt = data;
struct bt_hci_cmd_read_clock cmd;
if (evt->status != 0x00)
@@ -326,9 +326,9 @@ static void start_glasses(void)
bt_hci_register(hci_dev, BT_HCI_EVT_TRUNCATED_PAGE_COMPLETE,
truncated_page_complete, NULL, NULL);
- bt_hci_register(hci_dev, BT_HCI_EVT_SLAVE_BROADCAST_TIMEOUT,
+ bt_hci_register(hci_dev, BT_HCI_EVT_PERIPHERAL_BROADCAST_TIMEOUT,
slave_broadcast_timeout, NULL, NULL);
- bt_hci_register(hci_dev, BT_HCI_EVT_SLAVE_BROADCAST_RECEIVE,
+ bt_hci_register(hci_dev, BT_HCI_EVT_PERIPHERAL_BROADCAST_RECEIVE,
slave_broadcast_receive, NULL, NULL);
start_inquiry();
@@ -443,13 +443,13 @@ static void read_clock(const void *data, uint8_t size, void *user_data)
msg.frame_sync_period_fraction = 0;
memcpy(bcastdata + 3, &msg, sizeof(msg));
- bt_hci_send(hci_dev, BT_HCI_CMD_SET_SLAVE_BROADCAST_DATA,
+ bt_hci_send(hci_dev, BT_HCI_CMD_SET_PERIPHERAL_BROADCAST_DATA,
bcastdata, sizeof(bcastdata), NULL, NULL, NULL);
}
static void set_slave_broadcast(const void *data, uint8_t size, void *user_data)
{
- const struct bt_hci_rsp_set_slave_broadcast *rsp = data;
+ const struct bt_hci_rsp_set_peripheral_broadcast *rsp = data;
struct bt_hci_cmd_read_clock cmd;
if (rsp->status) {
@@ -467,7 +467,7 @@ static void set_slave_broadcast(const void *data, uint8_t size, void *user_data)
static void start_display(void)
{
- struct bt_hci_cmd_set_slave_broadcast cmd;
+ struct bt_hci_cmd_set_peripheral_broadcast cmd;
uint8_t evtmask1[] = { 0x1c, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
uint8_t evtmask2[] = { 0x00, 0xc0, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00 };
uint8_t sspmode = 0x01;
@@ -492,10 +492,11 @@ static void start_display(void)
bt_hci_register(hci_dev, BT_HCI_EVT_CONN_REQUEST,
conn_request, NULL, NULL);
- bt_hci_register(hci_dev, BT_HCI_EVT_SLAVE_PAGE_RESPONSE_TIMEOUT,
+ bt_hci_register(hci_dev, BT_HCI_EVT_PERIPHERAL_PAGE_RESPONSE_TIMEOUT,
slave_page_response_timeout, NULL, NULL);
- bt_hci_register(hci_dev, BT_HCI_EVT_SLAVE_BROADCAST_CHANNEL_MAP_CHANGE,
- slave_broadcast_channel_map_change, NULL, NULL);
+ bt_hci_register(hci_dev,
+ BT_HCI_EVT_PERIPHERAL_BROADCAST_CHANNEL_MAP_CHANGE,
+ slave_broadcast_channel_map_change, NULL, NULL);
bt_hci_register(hci_dev, BT_HCI_EVT_SYNC_TRAIN_COMPLETE,
sync_train_complete, NULL, NULL);
@@ -510,8 +511,8 @@ static void start_display(void)
cmd.max_interval = cpu_to_le16(0x00a0); /* 100 ms */
cmd.timeout = cpu_to_le16(0xfffe);
- bt_hci_send(hci_dev, BT_HCI_CMD_SET_SLAVE_BROADCAST, &cmd, sizeof(cmd),
- set_slave_broadcast, NULL, NULL);
+ bt_hci_send(hci_dev, BT_HCI_CMD_SET_PERIPHERAL_BROADCAST, &cmd,
+ sizeof(cmd), set_slave_broadcast, NULL, NULL);
}
static void signal_callback(int signum, void *user_data)
diff --git a/tools/hci-tester.c b/tools/hci-tester.c
index 0fb74e69c7..645d89e721 100644
--- a/tools/hci-tester.c
+++ b/tools/hci-tester.c
@@ -337,12 +337,12 @@ static void test_read_local_supported_codecs(const void *test_data)
static void test_le_read_white_list_size(const void *test_data)
{
- test_command(BT_HCI_CMD_LE_READ_WHITE_LIST_SIZE);
+ test_command(BT_HCI_CMD_LE_READ_ACCEPT_LIST_SIZE);
}
static void test_le_clear_white_list(const void *test_data)
{
- test_command(BT_HCI_CMD_LE_CLEAR_WHITE_LIST);
+ test_command(BT_HCI_CMD_LE_CLEAR_ACCEPT_LIST);
}
static void test_le_encrypt_complete(const void *data, uint8_t size,
diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index da53e4484d..ccc082a488 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -4248,7 +4248,7 @@ static const struct generic_data add_device_success_6 = {
.expect_alt_ev = MGMT_EV_DEVICE_ADDED,
.expect_alt_ev_param = add_device_success_param_6,
.expect_alt_ev_len = sizeof(add_device_success_param_6),
- .expect_hci_command = BT_HCI_CMD_LE_ADD_TO_WHITE_LIST,
+ .expect_hci_command = BT_HCI_CMD_LE_ADD_TO_ACCEPT_LIST,
.expect_hci_param = le_add_to_white_list_param,
.expect_hci_len = sizeof(le_add_to_white_list_param),
};
@@ -4418,7 +4418,7 @@ static const struct generic_data remove_device_success_7 = {
.expect_param = remove_device_param_2,
.expect_len = sizeof(remove_device_param_2),
.expect_status = MGMT_STATUS_SUCCESS,
- .expect_hci_command = BT_HCI_CMD_LE_REMOVE_FROM_WHITE_LIST,
+ .expect_hci_command = BT_HCI_CMD_LE_REMOVE_FROM_ACCEPT_LIST,
.expect_hci_param = le_add_to_white_list_param,
.expect_hci_len = sizeof(le_add_to_white_list_param),
.expect_alt_ev = MGMT_EV_DEVICE_REMOVED,
--
2.33.0.153.gba50c8fa24-goog