Home
last modified time | relevance | path

Searched refs:network_key (Results 1 – 18 of 18) sorted by relevance

/btstack/src/mesh/
H A Dmesh.c204 if (provisioning_data->network_key){ in mesh_setup_from_provisioning_data()
207 mesh_network_key_add(provisioning_data->network_key); in mesh_setup_from_provisioning_data()
210 mesh_subnet_setup_for_netkey_index(provisioning_data->network_key->netkey_index); in mesh_setup_from_provisioning_data()
213 …provisioned_subnet = mesh_subnet_get_by_netkey_index(provisioning_data->network_key->netkey_index); in mesh_setup_from_provisioning_data()
283 …mesh_proxy_set_advertising_with_node_id(provisioning_data.network_key->netkey_index, MESH_NODE_IDE… in mesh_provisioning_message_handler()
602 void mesh_store_network_key(mesh_network_key_t * network_key){ in mesh_store_network_key() argument
604 …ex 0x%x, NetKey Index 0x%06x, NID %02x: ", network_key->internal_index, network_key->netkey_index,… in mesh_store_network_key()
605 printf_hexdump(network_key->net_key, 16); in mesh_store_network_key()
606 uint32_t tag = mesh_network_key_tag_for_internal_index(network_key->internal_index); in mesh_store_network_key()
607 data.netkey_index = network_key->netkey_index; in mesh_store_network_key()
[all …]
H A Dmesh_keys.c67 void mesh_network_key_add(mesh_network_key_t * network_key){ in mesh_network_key_add() argument
68 mesh_network_key_used[network_key->internal_index] = 1; in mesh_network_key_add()
69 btstack_linked_list_add_tail(&network_keys, (btstack_linked_item_t *) network_key); in mesh_network_key_add()
72 bool mesh_network_key_remove(mesh_network_key_t * network_key){ in mesh_network_key_remove() argument
73 mesh_network_key_used[network_key->internal_index] = 0; in mesh_network_key_remove()
74 return btstack_linked_list_remove(&network_keys, (btstack_linked_item_t *) network_key); in mesh_network_key_remove()
H A Dbeacon.c159 mesh_network_key_t * network_key = mesh_subnet_get_outgoing_network_key(mesh_subnet); in mesh_secure_network_beacon_setup() local
160 …btstack_crypto_aes128_cmac_message(&mesh_secure_network_beacon_cmac_request, network_key->beacon_k… in mesh_secure_network_beacon_setup()
302 mesh_network_key_t * network_key = NULL; in beacon_handle_secure_beacon() local
307 network_key = item->old_key; in beacon_handle_secure_beacon()
311 network_key = item->new_key; in beacon_handle_secure_beacon()
333 …btstack_crypto_aes128_cmac_message(&mesh_secure_network_beacon_cmac_request, network_key->beacon_k… in beacon_handle_secure_beacon()
H A Dmesh_proxy.c306 mesh_network_key_t * network_key = mesh_subnet_get_outgoing_network_key(subnet); in mesh_proxy_start_advertising_with_network_id() local
307 …vertising_with_network_id(subnet->advertisement_with_network_id.adv_data, network_key->network_id); in mesh_proxy_start_advertising_with_network_id()
317 mesh_subnet_t * network_key = mesh_subnet_iterator_get_next(&it); in mesh_proxy_stop_advertising_with_network_id() local
318 … log_info("Proxy stop advertising with network id, netkey index %04x", network_key->netkey_index); in mesh_proxy_stop_advertising_with_network_id()
319 adv_bearer_advertisements_remove_item(&network_key->advertisement_with_network_id); in mesh_proxy_stop_advertising_with_network_id()
H A Dprovisioning_device.c125 static mesh_network_key_t * network_key; variable
712 …mesh_network_key_derive(&prov_cmac_request, network_key, &provisioning_handle_network_dervived, NU… in provisioning_handle_data_device_key()
726 network_key = btstack_memory_mesh_network_key_get(); in provisioning_handle_data_ccm()
729 (void)memcpy(network_key->net_key, provisioning_data, 16); in provisioning_handle_data_ccm()
730 network_key->netkey_index = big_endian_read_16(provisioning_data, 16); in provisioning_handle_data_ccm()
732 network_key->internal_index = mesh_network_key_get_free_index(); in provisioning_handle_data_ccm()
925 the_provisioning_data->network_key = network_key; in provisioning_device_data_get()
H A Dmesh.h83 void mesh_store_network_key(mesh_network_key_t * network_key);
110 void mesh_access_netkey_finalize(mesh_network_key_t * network_key);
H A Dmesh_keys.h148 void mesh_network_key_add(mesh_network_key_t * network_key);
156 bool mesh_network_key_remove(mesh_network_key_t * network_key);
H A Dmesh_upper_transport.c1184 const mesh_network_key_t * network_key = mesh_network_key_list_get(netkey_index); in mesh_upper_transport_setup_unsegmented_control_pdu() local
1185 if (!network_key) return 1; in mesh_upper_transport_setup_unsegmented_control_pdu()
1194 …mesh_network_setup_pdu(network_pdu, netkey_index, network_key->nid, 1, ttl, 0, src, dest, transpor… in mesh_upper_transport_setup_unsegmented_control_pdu()
1201 const mesh_network_key_t * network_key = mesh_network_key_list_get(netkey_index); in mesh_upper_transport_setup_segmented_control_pdu_header() local
1202 if (!network_key) return 1; in mesh_upper_transport_setup_segmented_control_pdu_header()
1204 upper_pdu->ivi_nid = network_key->nid | ((mesh_get_iv_index_for_tx() & 1) << 7); in mesh_upper_transport_setup_segmented_control_pdu_header()
1226 const mesh_network_key_t *network_key = mesh_network_key_list_get(netkey_index); in mesh_upper_transport_setup_upper_access_pdu_header() local
1227 if (!network_key) return 1; in mesh_upper_transport_setup_upper_access_pdu_header()
1228 if (network_key == NULL) { in mesh_upper_transport_setup_upper_access_pdu_header()
1234 upper_pdu->ivi_nid = network_key->nid | ((mesh_get_iv_index_for_tx() & 1) << 7); in mesh_upper_transport_setup_upper_access_pdu_header()
H A Dmesh_configuration_server.c576 mesh_network_key_t * network_key = mesh_network_key_iterator_get_next(&it); in config_netkey_list() local
577 mesh_access_message_add_uint16(&builder, network_key->netkey_index); in config_netkey_list()
812 mesh_network_key_t * network_key = mesh_network_key_list_get(netkey_index_of_list); in config_appkey_list() local
814 if (network_key == NULL){ in config_appkey_list()
870 mesh_network_key_t * network_key = mesh_network_key_list_get(netkey_index); in config_appkey_add_handler() local
871 if (network_key == NULL){ in config_appkey_add_handler()
940 mesh_network_key_t * network_key = mesh_network_key_list_get(netkey_index); in config_appkey_update_handler() local
941 if (network_key == NULL){ in config_appkey_update_handler()
1007 mesh_network_key_t * network_key = mesh_network_key_list_get(netkey_index); in config_appkey_delete_handler() local
1008 if (network_key == NULL){ in config_appkey_delete_handler()
[all …]
H A Dmesh_network.c1343 mesh_network_key_t * network_key = mesh_network_key_iterator_get_next(&it); in mesh_subnet_setup_for_netkey_index() local
1344 if (network_key->netkey_index != netkey_index) continue; in mesh_subnet_setup_for_netkey_index()
1346 old_key = network_key; in mesh_subnet_setup_for_netkey_index()
1350 if (((int8_t) (network_key->version - new_key->version)) > 0) { in mesh_subnet_setup_for_netkey_index()
1351 new_key = network_key; in mesh_subnet_setup_for_netkey_index()
1354 old_key = network_key; in mesh_subnet_setup_for_netkey_index()
H A Dprovisioning.h144 mesh_network_key_t * network_key; member
H A Dmesh_crypto.h96 …ey_derive(btstack_crypto_aes128_cmac_t * request, mesh_network_key_t * network_key, void (* callba…
H A Dmesh_crypto.c262 …ey_derive(btstack_crypto_aes128_cmac_t * request, mesh_network_key_t * network_key, void (* callba… in mesh_network_key_derive() argument
265 mesh_network_key_derive_key = network_key; in mesh_network_key_derive()
H A Dmesh_lower_transport.c168 const mesh_network_key_t * network_key = mesh_network_key_list_get(netkey_index); in mesh_lower_transport_incoming_send_ack() local
169 if (!network_key) return; in mesh_lower_transport_incoming_send_ack()
177 …mesh_network_setup_pdu(network_pdu, netkey_index, network_key->nid, 1, ttl, mesh_sequence_number_n… in mesh_lower_transport_incoming_send_ack()
/btstack/test/mesh/
H A Dmesh_message_test.cpp200 mesh_network_key_t * network_key = btstack_memory_mesh_network_key_get(); in load_network_key_nid_68() local
201 network_key->nid = 0x68; in load_network_key_nid_68()
202 btstack_parse_hex("0953fa93e7caac9638f58820220a398e", 16, network_key->encryption_key); in load_network_key_nid_68()
203 btstack_parse_hex("8b84eedec100067d670971dd2aa700cf", 16, network_key->privacy_key); in load_network_key_nid_68()
204 mesh_network_key_add(network_key); in load_network_key_nid_68()
205 mesh_subnet_setup_for_netkey_index(network_key->netkey_index); in load_network_key_nid_68()
209 mesh_network_key_t * network_key = btstack_memory_mesh_network_key_get(); in load_network_key_nid_5e() local
210 network_key->nid = 0x5e; in load_network_key_nid_5e()
211 btstack_parse_hex("be635105434859f484fc798e043ce40e", 16, network_key->encryption_key); in load_network_key_nid_5e()
212 btstack_parse_hex("5d396d4b54d3cbafe943e051fe9a4eb8", 16, network_key->privacy_key); in load_network_key_nid_5e()
[all …]
H A Dmesh_pts.c102 mesh_network_key_t * key = data->network_key; in mesh_provisioning_dump()
271 mesh_network_key_t * network_key = mesh_network_key_list_get(0); in mesh_pts_dump_mesh_options() local
272 if (network_key){ in mesh_pts_dump_mesh_options()
274 printf_hex(network_key->net_key, 16); in mesh_pts_dump_mesh_options()
H A Dprovisioning_device_test.cpp128 static mesh_network_key_t network_key; variable
130 return &network_key; in btstack_memory_mesh_network_key_get()
H A Ddump_mesh_pklg.py190 class network_key(object): class
412 key = network_key(index, netkey)