/Zephyr-latest/tests/bsim/bluetooth/mesh/src/ |
D | test_iv_index.c | 56 bt_mesh.iv_index = TEST_IV_IDX; in test_ivu_recovery() 69 ASSERT_EQUAL(TEST_IV_IDX + 2, bt_mesh.iv_index); in test_ivu_recovery() 76 bt_mesh.iv_index = TEST_IV_IDX; in test_ivu_recovery() 89 ASSERT_EQUAL(TEST_IV_IDX + 1, bt_mesh.iv_index); in test_ivu_recovery() 101 bt_mesh.iv_index = TEST_IV_IDX; in test_ivu_normal() 111 ASSERT_EQUAL(TEST_IV_IDX, bt_mesh.iv_index); in test_ivu_normal() 124 ASSERT_EQUAL(TEST_IV_IDX + 1, bt_mesh.iv_index); in test_ivu_normal() 136 bt_mesh.iv_index = TEST_IV_IDX; in test_ivu_deferring()
|
D | test_beacon.c | 129 LOG_DBG("ivi: %i", bt_mesh.iv_index); in ivu_log() 155 ASSERT_TRUE(bt_mesh.iv_index == 0); in tx_on_iv_update_test() 165 ASSERT_TRUE(bt_mesh.iv_index == 1); in tx_on_iv_update_test() 171 ASSERT_TRUE(bt_mesh.iv_index == 1); in tx_on_iv_update_test() 177 ASSERT_TRUE(bt_mesh.iv_index == 2); in tx_on_iv_update_test() 201 ASSERT_TRUE(bt_mesh.iv_index == 0); in test_rx_on_iv_update() 213 ASSERT_TRUE(bt_mesh.iv_index == 1); in test_rx_on_iv_update() 219 ASSERT_TRUE(bt_mesh.iv_index == 1); in test_rx_on_iv_update() 225 ASSERT_TRUE(bt_mesh.iv_index == 2); in test_rx_on_iv_update() 328 uint32_t iv_index; member [all …]
|
D | test_brg.c | 935 ASSERT_TRUE(bt_mesh.iv_index == test_ividx); in test_tester_ivu() 944 uint32_t iv_index = bt_mesh.iv_index; in test_tester_ivu() local 950 LOG_INF("Starting IV Update procedure, IVI %d -> %d", bt_mesh.iv_index, in test_tester_ivu() 951 bt_mesh.iv_index + 1); in test_tester_ivu() 953 iv_index = bt_mesh.iv_index; in test_tester_ivu() 957 ASSERT_TRUE(bt_mesh.iv_index == iv_index + 1); in test_tester_ivu() 967 ASSERT_TRUE(bt_mesh.iv_index == iv_index + 1); in test_tester_ivu()
|
D | test_transport.c | 400 uint32_t iv_index; in test_tx_seg_ivu() local 409 iv_index = BT_MESH_NET_IVI_TX; in test_tx_seg_ivu() 416 if (iv_index != BT_MESH_NET_IVI_TX) { in test_tx_seg_ivu() 428 if (iv_index != BT_MESH_NET_IVI_TX) { in test_tx_seg_ivu() 434 if (iv_index + 1 != BT_MESH_NET_IVI_TX) { in test_tx_seg_ivu()
|
D | test_persistence.c | 529 if (bt_mesh.iv_index != test_ividx || in test_provisioning_data_load()
|
/Zephyr-latest/subsys/bluetooth/mesh/ |
D | net.c | 78 uint32_t iv_index; member 199 uint32_t iv_index) in bt_mesh_net_create() argument 203 LOG_DBG("idx %u flags 0x%02x iv_index %u", idx, flags, iv_index); in bt_mesh_net_create() 221 bt_mesh.iv_index = iv_index; in bt_mesh_net_create() 264 bt_mesh_net_iv_update(bt_mesh.iv_index, false); in bt_mesh_iv_update() 266 bt_mesh_net_iv_update(bt_mesh.iv_index + 1, true); in bt_mesh_iv_update() 273 bool bt_mesh_net_iv_update(uint32_t iv_index, bool iv_update) in bt_mesh_net_iv_update() argument 276 if (iv_index < bt_mesh.iv_index || in bt_mesh_net_iv_update() 277 iv_index > bt_mesh.iv_index + 42) { in bt_mesh_net_iv_update() 278 LOG_ERR("IV Index out of sync: 0x%08x != 0x%08x", iv_index, bt_mesh.iv_index); in bt_mesh_net_iv_update() [all …]
|
D | crypto.c | 290 uint32_t iv_index) in create_proxy_nonce() argument 307 sys_put_be32(iv_index, &nonce[9]); in create_proxy_nonce() 328 uint32_t iv_index) in create_net_nonce() argument 350 sys_put_be32(iv_index, &nonce[9]); in create_net_nonce() 353 int bt_mesh_net_obfuscate(uint8_t *pdu, uint32_t iv_index, const struct bt_mesh_key *privacy_key) in bt_mesh_net_obfuscate() argument 359 LOG_DBG("IVIndex %u, PrivacyKey %s", iv_index, in bt_mesh_net_obfuscate() 362 sys_put_be32(iv_index, &priv_rand[5]); in bt_mesh_net_obfuscate() 380 uint32_t iv_index, enum bt_mesh_nonce_type type) in bt_mesh_net_encrypt() argument 386 LOG_DBG("IVIndex %u EncKey %s mic_len %u", iv_index, in bt_mesh_net_encrypt() 391 create_proxy_nonce(nonce, buf->data, iv_index); in bt_mesh_net_encrypt() [all …]
|
D | crypto.h | 84 const uint8_t net_id[8], uint32_t iv_index, uint8_t auth[8]); 101 int bt_mesh_net_obfuscate(uint8_t *pdu, uint32_t iv_index, const struct bt_mesh_key *privacy_key); 104 uint32_t iv_index, enum bt_mesh_nonce_type type); 107 uint32_t iv_index, enum bt_mesh_nonce_type type); 115 uint32_t iv_index; member 154 int bt_mesh_beacon_encrypt(const struct bt_mesh_key *pbk, uint8_t flags, uint32_t iv_index,
|
D | net.h | 208 uint32_t iv_index; /* Current IV Index */ member 287 #define BT_MESH_NET_IVI_TX (bt_mesh.iv_index - \ 290 #define BT_MESH_NET_IVI_RX(rx) (bt_mesh.iv_index - (rx)->old_iv) 295 uint32_t iv_index); 297 bool bt_mesh_net_iv_update(uint32_t iv_index, bool iv_update);
|
D | beacon.c | 71 uint32_t iv_index; member 154 net_buf_simple_add_be32(buf, bt_mesh.iv_index); in secure_beacon_create() 160 LOG_DBG("IV Index 0x%08x Auth %s", bt_mesh.iv_index, bt_hex(sub->secure_beacon.auth, 8)); in secure_beacon_create() 203 err = bt_mesh_beacon_encrypt(&keys->priv_beacon, flags, bt_mesh.iv_index, in private_beacon_update() 531 if (bt_mesh_beacon_auth(&keys->beacon, params->flags, keys->net_id, params->iv_index, in auth_match() 557 beacon_info.iv_idx = params->iv_index; in secure_beacon_authenticate() 590 params->iv_index = sys_get_be32(&out[1]); in priv_beacon_decrypt() 597 beacon_info.iv_idx = params->iv_index; in priv_beacon_decrypt() 637 sub->net_idx, params->flags, params->iv_index, bt_mesh.iv_index); in net_beacon_recv() 645 bt_mesh_net_iv_update(params->iv_index, in net_beacon_recv() [all …]
|
D | provisionee.c | 478 uint32_t iv_index) in refresh_is_valid() argument 485 if (iv_index != bt_mesh.iv_index) { in refresh_is_valid() 517 uint32_t iv_index; in prov_data() local 559 iv_index = sys_get_be32(&pdu[19]); in prov_data() 564 !refresh_is_valid(pdu, net_idx, iv_index)) { in prov_data() 570 net_idx, iv_index, bt_mesh_prov_link.addr); in prov_data() 595 err = bt_mesh_provision(pdu, net_idx, flags, iv_index, bt_mesh_prov_link.addr, dev_key); in prov_data()
|
D | main.c | 46 uint8_t flags, uint32_t iv_index, uint16_t addr, in bt_mesh_provision() argument 63 LOG_DBG("net_idx 0x%04x flags 0x%02x iv_index 0x%04x", net_idx, flags, iv_index); in bt_mesh_provision() 116 bt_mesh_cdb_iv_update(iv_index, BT_MESH_IV_UPDATE(flags)); in bt_mesh_provision() 143 err = bt_mesh_net_create(net_idx, flags, &mesh_net_key, iv_index); in bt_mesh_provision() 347 bt_mesh.iv_index = 0U; in bt_mesh_reset()
|
D | friend.c | 60 uint32_t iv_index; member 351 net_buf_add_u8(buf, (info->iv_index & 1) << 7); /* Will be reset in encryption */ in create_friend_pdu() 399 meta->crypto.iv_index = BT_MESH_NET_IVI_TX; in unseg_app_sdu_unpack() 493 uint32_t iv_index; in encrypt_friend_pdu() local 519 iv_index = BT_MESH_NET_IVI_TX; in encrypt_friend_pdu() 523 iv_index = (bt_mesh.iv_index - ((bt_mesh.iv_index & 1) != ivi)); in encrypt_friend_pdu() 526 buf->data[0] = (cred->nid | (iv_index & 1) << 7); in encrypt_friend_pdu() 528 if (bt_mesh_net_encrypt(&cred->enc, &buf->b, iv_index, BT_MESH_NONCE_NETWORK)) { in encrypt_friend_pdu() 533 if (bt_mesh_net_obfuscate(buf->data, iv_index, &cred->privacy)) { in encrypt_friend_pdu() 559 info.iv_index = BT_MESH_NET_IVI_TX; in encode_friend_ctl() [all …]
|
D | cdb.c | 200 bt_mesh_cdb.iv_index = net.iv.index; in cdb_net_set() 752 bt_mesh_cdb.iv_index = 0; in bt_mesh_cdb_create() 793 void bt_mesh_cdb_iv_update(uint32_t iv_index, bool iv_update) in bt_mesh_cdb_iv_update() argument 795 LOG_DBG("Updating IV index to %d\n", iv_index); in bt_mesh_cdb_iv_update() 798 if (!iv_update || iv_index > bt_mesh_cdb.iv_index + 1) { in bt_mesh_cdb_iv_update() 802 bt_mesh_cdb.iv_index = iv_index; in bt_mesh_cdb_iv_update() 1129 net.iv.index = bt_mesh_cdb.iv_index; in store_cdb_pending_net()
|
D | transport.h | 39 uint32_t iv_index; member
|
D | lpn.c | 1051 uint32_t iv_index; in bt_mesh_lpn_friend_update() local 1101 iv_index = sys_be32_to_cpu(msg->iv_index); in bt_mesh_lpn_friend_update() 1103 LOG_DBG("flags 0x%02x iv_index 0x%08x md %u", msg->flags, iv_index, msg->md); in bt_mesh_lpn_friend_update() 1106 bt_mesh_net_iv_update(iv_index, BT_MESH_IV_UPDATE(msg->flags)); in bt_mesh_lpn_friend_update()
|
D | provisioner.c | 545 net_buf_simple_add_be32(&pdu, bt_mesh_cdb.iv_index); in send_prov_data() 550 provisionee.node->net_idx, bt_mesh.iv_index, in send_prov_data() 880 provisionee.node->net_idx, bt_mesh_cdb.iv_index, addr); in reprovision_local_client_server()
|
D | transport.c | 56 #define SEQ_AUTH(iv_index, seq) (((uint64_t)iv_index) << 24 | (uint64_t)seq) argument 263 bt_mesh_net_iv_update(bt_mesh.iv_index, false); in seg_tx_reset() 635 .iv_index = BT_MESH_NET_IVI_TX, in trans_encrypt() 788 .iv_index = BT_MESH_NET_IVI_RX(rx), in sdu_recv()
|
/Zephyr-latest/include/zephyr/bluetooth/mesh/ |
D | cdb.h | 75 uint32_t iv_index; member 118 void bt_mesh_cdb_iv_update(uint32_t iv_index, bool iv_update);
|
D | main.h | 455 uint8_t flags, uint32_t iv_index, uint16_t addr,
|
/Zephyr-latest/samples/bluetooth/mesh_demo/src/ |
D | main.c | 39 static const uint32_t iv_index; variable 188 err = bt_mesh_provision(net_key, net_idx, flags, iv_index, addr, in bt_ready()
|
/Zephyr-latest/subsys/bluetooth/mesh/shell/ |
D | shell.c | 951 uint32_t iv_index; in cmd_provision_local() local 958 iv_index = shell_strtoul(argv[3], 0, &err); in cmd_provision_local() 960 iv_index = 0U; in cmd_provision_local() 985 err = bt_mesh_provision(net_key, net_idx, 0, iv_index, addr, bt_mesh_shell_default_key); in cmd_provision_local() 1039 shell_print(sh, "IV Index is 0x%08x", bt_mesh.iv_index); in cmd_iv_update()
|
/Zephyr-latest/tests/bluetooth/tester/src/btp/ |
D | btp_mesh.h | 63 uint32_t iv_index; member 72 uint32_t iv_index; member
|
/Zephyr-latest/tests/bluetooth/tester/src/ |
D | btp_mesh.c | 44 static uint32_t iv_index; variable 1446 iv_index = sys_le32_to_cpu(cp->iv_index); in provision_node() 1465 err = bt_mesh_provision(net_key, net_key_idx, flags, iv_index, addr, in provision_node() 1528 err = bt_mesh_provision(net_key, net_key_idx, flags, iv_index, in start()
|