| /subsys/bluetooth/mesh/ |
| A D | subnet.c | 178 store_subnet(net_idx); in update_subnet_settings() 270 if (subnets[i].net_idx == net_idx) { in subnet_alloc() 383 if (sub->net_idx == net_idx) { in bt_mesh_subnet_add() 396 sub->net_idx = net_idx; in bt_mesh_subnet_add() 741 if (sub->net_idx == net_idx) { in bt_mesh_subnet_get() 779 if (sub->net_idx == net_idx) { in bt_mesh_subnet_set() 797 sub->net_idx = net_idx; in bt_mesh_subnet_set() 905 rx->ctx.net_idx = rx->sub->net_idx; in bt_mesh_net_cred_find() 936 rx->ctx.net_idx = rx->sub->net_idx; in bt_mesh_net_cred_find() 957 rx->ctx.net_idx = rx->sub->net_idx; in bt_mesh_net_cred_find() [all …]
|
| A D | app_keys.c | 44 uint16_t net_idx; member 51 uint16_t net_idx; member 109 key.net_idx = app->net_idx, in store_app_key() 256 if (app->net_idx != net_idx) { in bt_mesh_app_key_add() 273 app->net_idx = net_idx; in bt_mesh_app_key_add() 304 if (net_idx != BT_MESH_KEY_UNUSED && app->net_idx != net_idx) { in bt_mesh_app_key_update() 370 if (net_idx != BT_MESH_KEY_UNUSED && net_idx != app->net_idx) { in bt_mesh_app_key_del() 423 app->net_idx = net_idx; in bt_mesh_app_key_set() 453 if (net_idx != BT_MESH_KEY_ANY && app->net_idx != net_idx) { in bt_mesh_app_keys_get() 594 if (app->net_idx != rx->sub->net_idx) { in bt_mesh_app_key_find() [all …]
|
| A D | cfg_cli.c | 177 uint16_t net_idx; member 186 uint16_t net_idx; in krp_status() local 197 if (param->net_idx != net_idx) { in krp_status() 277 uint16_t net_idx; member 285 uint16_t net_idx; in net_key_status() local 298 if (param->net_idx != net_idx) { in net_key_status() 411 uint16_t net_idx; member 433 if (param->net_idx != net_idx || param->app_idx != app_idx) { in app_key_status() 458 uint16_t net_idx; member 471 uint16_t net_idx; in app_key_list() local [all …]
|
| A D | priv_beacon_cli.c | 95 uint16_t net_idx; in handle_node_id_status() local 98 net_idx = net_buf_simple_pull_le16(buf); in handle_node_id_status() 110 rsp->net_idx = net_idx; in handle_node_id_status() 119 .net_idx = net_idx, in handle_node_id_status() 162 struct bt_mesh_msg_ctx ctx = BT_MESH_MSG_CTX_INIT_DEV(net_idx, addr); in bt_mesh_priv_beacon_cli_set() 183 struct bt_mesh_msg_ctx ctx = BT_MESH_MSG_CTX_INIT_DEV(net_idx, addr); in bt_mesh_priv_beacon_cli_get() 200 struct bt_mesh_msg_ctx ctx = BT_MESH_MSG_CTX_INIT_DEV(net_idx, addr); in bt_mesh_priv_beacon_cli_gatt_proxy_set() 223 struct bt_mesh_msg_ctx ctx = BT_MESH_MSG_CTX_INIT_DEV(net_idx, addr); in bt_mesh_priv_beacon_cli_gatt_proxy_get() 241 struct bt_mesh_msg_ctx ctx = BT_MESH_MSG_CTX_INIT_DEV(net_idx, addr); in bt_mesh_priv_beacon_cli_node_id_set() 249 if (val->net_idx > 0xfff || in bt_mesh_priv_beacon_cli_node_id_set() [all …]
|
| A D | proxy_cli.c | 38 uint16_t net_idx; member 41 .net_idx = BT_MESH_KEY_UNUSED, 59 if (servers[i].net_idx == net_idx) { in find_proxy_srv() 305 int bt_mesh_proxy_connect(uint16_t net_idx) in bt_mesh_proxy_connect() argument 309 if (net_idx == BT_MESH_KEY_ANY) { in bt_mesh_proxy_connect() 319 srv = find_proxy_srv(net_idx, true, true); in bt_mesh_proxy_connect() 329 srv->net_idx = net_idx; in bt_mesh_proxy_connect() 339 if (net_idx != BT_MESH_KEY_ANY) { in bt_mesh_proxy_disconnect() 340 srv = find_proxy_srv(net_idx, true, true); in bt_mesh_proxy_disconnect() 345 srv->net_idx = BT_MESH_KEY_UNUSED; in bt_mesh_proxy_disconnect() [all …]
|
| A D | cdb.c | 48 uint16_t net_idx; member 65 uint16_t net_idx; member 92 .net_idx = BT_MESH_KEY_UNUSED, 250 val.net_idx); in cdb_node_set() 281 uint16_t net_idx; in cdb_subnet_set() local 446 val.net_idx = node->net_idx; in store_cdb_node() 529 key.net_idx = app->net_idx; in store_cdb_app_key() 828 sub->net_idx = net_idx; in bt_mesh_cdb_subnet_alloc() 855 if (bt_mesh_cdb.subnets[i].net_idx == net_idx) { in bt_mesh_cdb_subnet_get() 920 node->net_idx = net_idx; in bt_mesh_cdb_node_alloc() [all …]
|
| A D | heartbeat.c | 29 uint16_t net_idx:12, member 109 .net_idx = pub.net_idx, in heartbeat_send() 115 .sub = bt_mesh_subnet_get(pub.net_idx), in heartbeat_send() 177 subnet = bt_mesh_subnet_get(pub.net_idx); in hb_publish() 179 LOG_ERR("No matching subnet for idx 0x%02x", pub.net_idx); in hb_publish() 239 pub.net_idx = 0U; in pub_disable() 262 if (!bt_mesh_subnet_get(new_pub->net_idx)) { in bt_mesh_hb_pub_set() 263 LOG_ERR("Unknown NetKey 0x%04x", new_pub->net_idx); in bt_mesh_hb_pub_set() 383 pub.net_idx = BT_MESH_KEY_UNUSED; in bt_mesh_hb_init() 429 hb_pub.net_idx = hb_val.net_idx; in hb_pub_set() [all …]
|
| A D | priv_beacon_srv.c | 138 uint16_t net_idx, uint8_t node_id) in node_id_status_rsp() argument 144 net_buf_simple_add_le16(&buf, net_idx); in node_id_status_rsp() 155 uint16_t net_idx; in handle_node_id_get() local 157 net_idx = net_buf_simple_pull_le16(buf) & 0xfff; in handle_node_id_get() 159 status = bt_mesh_subnet_priv_node_id_get(net_idx, (enum bt_mesh_feat_state *)&node_id); in handle_node_id_get() 160 node_id_status_rsp(mod, ctx, status, net_idx, node_id); in handle_node_id_get() 170 uint16_t net_idx; in handle_node_id_set() local 172 net_idx = net_buf_simple_pull_le16(buf) & 0xfff; in handle_node_id_set() 180 status = bt_mesh_subnet_priv_node_id_set(net_idx, node_id); in handle_node_id_set() 181 node_id_status_rsp(mod, ctx, status, net_idx, node_id); in handle_node_id_set()
|
| A D | brg_cfg_cli.c | 81 subnets_list.net_idx_filter.net_idx = (net_idx_filter >> 4) & BIT_MASK(12); in subnets_list() 208 struct bt_mesh_msg_ctx ctx = BT_MESH_MSG_CTX_INIT_DEV(net_idx, addr); in bt_mesh_brg_cfg_cli_get() 225 struct bt_mesh_msg_ctx ctx = BT_MESH_MSG_CTX_INIT_DEV(net_idx, addr); in bt_mesh_brg_cfg_cli_set() 242 struct bt_mesh_msg_ctx ctx = BT_MESH_MSG_CTX_INIT_DEV(net_idx, addr); in bt_mesh_brg_cfg_cli_table_size_get() 255 int bt_mesh_brg_cfg_cli_table_add(uint16_t net_idx, uint16_t addr, in bt_mesh_brg_cfg_cli_table_add() argument 260 struct bt_mesh_msg_ctx ctx = BT_MESH_MSG_CTX_INIT_DEV(net_idx, addr); in bt_mesh_brg_cfg_cli_table_add() 298 struct bt_mesh_msg_ctx ctx = BT_MESH_MSG_CTX_INIT_DEV(net_idx, addr); in bt_mesh_brg_cfg_cli_table_remove() 322 int bt_mesh_brg_cfg_cli_subnets_get(uint16_t net_idx, uint16_t addr, in bt_mesh_brg_cfg_cli_subnets_get() argument 327 struct bt_mesh_msg_ctx ctx = BT_MESH_MSG_CTX_INIT_DEV(net_idx, addr); in bt_mesh_brg_cfg_cli_subnets_get() 342 int bt_mesh_brg_cfg_cli_table_get(uint16_t net_idx, uint16_t addr, uint16_t net_idx1, in bt_mesh_brg_cfg_cli_table_get() argument [all …]
|
| A D | main.c | 45 int bt_mesh_provision(const uint8_t net_key[16], uint16_t net_idx, in bt_mesh_provision() argument 80 subnet = bt_mesh_cdb_subnet_get(net_idx); in bt_mesh_provision() 82 LOG_ERR("No subnet with idx %d", net_idx); in bt_mesh_provision() 88 comp->elem_count, net_idx); in bt_mesh_provision() 274 if (bt_mesh_subnet_get(net_idx) == NULL) { in bt_mesh_provision_adv() 280 return bt_mesh_pb_adv_open(uuid, net_idx, addr, in bt_mesh_provision_adv() 294 if (bt_mesh_subnet_get(net_idx) == NULL) { in bt_mesh_provision_gatt() 299 return bt_mesh_pb_gatt_open(uuid, net_idx, addr, in bt_mesh_provision_gatt() 308 const uint8_t uuid[16], uint16_t net_idx, in bt_mesh_provision_remote() argument 315 if (bt_mesh_subnet_get(net_idx) == NULL) { in bt_mesh_provision_remote() [all …]
|
| A D | sar_cfg_cli.c | 55 ctx->net_idx, ctx->app_idx, ctx->addr, buf->len, in receiver_status() 128 int bt_mesh_sar_cfg_cli_transmitter_get(uint16_t net_idx, uint16_t addr, in bt_mesh_sar_cfg_cli_transmitter_get() argument 132 struct bt_mesh_msg_ctx ctx = BT_MESH_MSG_CTX_INIT_DEV(net_idx, addr); in bt_mesh_sar_cfg_cli_transmitter_get() 152 int bt_mesh_sar_cfg_cli_transmitter_set(uint16_t net_idx, uint16_t addr, in bt_mesh_sar_cfg_cli_transmitter_set() argument 157 struct bt_mesh_msg_ctx ctx = BT_MESH_MSG_CTX_INIT_DEV(net_idx, addr); in bt_mesh_sar_cfg_cli_transmitter_set() 178 int bt_mesh_sar_cfg_cli_receiver_get(uint16_t net_idx, uint16_t addr, in bt_mesh_sar_cfg_cli_receiver_get() argument 182 struct bt_mesh_msg_ctx ctx = BT_MESH_MSG_CTX_INIT_DEV(net_idx, addr); in bt_mesh_sar_cfg_cli_receiver_get() 202 int bt_mesh_sar_cfg_cli_receiver_set(uint16_t net_idx, uint16_t addr, in bt_mesh_sar_cfg_cli_receiver_set() argument 207 struct bt_mesh_msg_ctx ctx = BT_MESH_MSG_CTX_INIT_DEV(net_idx, addr); in bt_mesh_sar_cfg_cli_receiver_set()
|
| A D | rpr.h | 27 .addr = (ctx)->addr, .net_idx = (ctx)->net_idx, \ 34 return (a->addr == b->addr) && (a->net_idx == b->net_idx); in rpr_node_equal()
|
| A D | op_agg_cli.c | 52 ctx->net_idx, ctx->app_idx, ctx->addr, buf->len, in handle_status() 124 int bt_mesh_op_agg_cli_seq_start(uint16_t net_idx, uint16_t app_idx, uint16_t dst, in bt_mesh_op_agg_cli_seq_start() argument 137 cli.ctx.net_idx = net_idx; in bt_mesh_op_agg_cli_seq_start() 152 .net_idx = cli.ctx.net_idx, in bt_mesh_op_agg_cli_seq_send() 221 return cli.ctx.initialized && (ctx->net_idx == cli.ctx.net_idx) && in bt_mesh_op_agg_cli_accept()
|
| A D | large_comp_data_cli.c | 47 ctx->net_idx, ctx->app_idx, ctx->addr, buf->len, in data_status() 126 static int data_get(uint16_t net_idx, uint16_t addr, uint32_t op, uint32_t status_op, uint8_t page, in data_get() argument 130 struct bt_mesh_msg_ctx ctx = BT_MESH_MSG_CTX_INIT_DEV(net_idx, addr); in data_get() 145 int bt_mesh_large_comp_data_get(uint16_t net_idx, uint16_t addr, uint8_t page, in bt_mesh_large_comp_data_get() argument 148 return data_get(net_idx, addr, OP_LARGE_COMP_DATA_GET, OP_LARGE_COMP_DATA_STATUS, in bt_mesh_large_comp_data_get() 152 int bt_mesh_models_metadata_get(uint16_t net_idx, uint16_t addr, uint8_t page, in bt_mesh_models_metadata_get() argument 155 return data_get(net_idx, addr, OP_MODELS_METADATA_GET, OP_MODELS_METADATA_STATUS, in bt_mesh_models_metadata_get()
|
| A D | friend.h | 13 bool bt_mesh_friend_match(uint16_t net_idx, uint16_t addr); 15 struct bt_mesh_friend *bt_mesh_friend_find(uint16_t net_idx, uint16_t lpn_addr, 18 bool bt_mesh_friend_queue_has_space(uint16_t net_idx, uint16_t src, uint16_t dst, 33 void bt_mesh_friend_sec_update(uint16_t net_idx);
|
| A D | provisioner.c | 44 uint16_t net_idx; member 286 provisionee.net_idx); in prov_capabilities() 527 sub = bt_mesh_cdb_subnet_get(provisionee.node->net_idx); in send_prov_data() 543 net_buf_simple_add_be16(&pdu, provisionee.node->net_idx); in send_prov_data() 550 provisionee.node->net_idx, bt_mesh.iv_index, in send_prov_data() 577 bt_hex(&provisionee.new_dev_key, 16), node->net_idx, in prov_complete() 798 uint16_t net_idx, uint16_t addr, in link_open() argument 824 provisionee.net_idx = net_idx; in link_open() 857 uint16_t net_idx, uint16_t addr) in bt_mesh_pb_remote_open() argument 878 provisionee.node->net_idx, bt_mesh_cdb.iv_index, addr); in reprovision_local_client_server() [all …]
|
| A D | od_priv_proxy_cli.c | 57 int bt_mesh_od_priv_proxy_cli_get(uint16_t net_idx, uint16_t addr, uint8_t *val_rsp) in bt_mesh_od_priv_proxy_cli_get() argument 59 struct bt_mesh_msg_ctx ctx = BT_MESH_MSG_CTX_INIT_DEV(net_idx, addr); in bt_mesh_od_priv_proxy_cli_get() 73 int bt_mesh_od_priv_proxy_cli_set(uint16_t net_idx, uint16_t addr, uint8_t val, uint8_t *val_rsp) in bt_mesh_od_priv_proxy_cli_set() argument 75 struct bt_mesh_msg_ctx ctx = BT_MESH_MSG_CTX_INIT_DEV(net_idx, addr); in bt_mesh_od_priv_proxy_cli_set()
|
| A D | friend.c | 120 if (net_idx != BT_MESH_KEY_ANY && in bt_mesh_friend_find() 121 (!frnd->subnet || frnd->subnet->net_idx != net_idx)) { in bt_mesh_friend_find() 229 void bt_mesh_friend_sec_update(uint16_t net_idx) in bt_mesh_friend_sec_update() argument 233 LOG_DBG("net_idx 0x%04x", net_idx); in bt_mesh_friend_sec_update() 242 if (net_idx == BT_MESH_KEY_ANY || in bt_mesh_friend_sec_update() 243 frnd->subnet->net_idx == net_idx) { in bt_mesh_friend_sec_update() 385 .net_idx = frnd->subnet->net_idx, in unseg_app_sdu_unpack() 762 cb->polled(frnd->subnet->net_idx, frnd->lpn); in bt_mesh_friend_poll() 812 .net_idx = frnd->subnet->net_idx, in send_friend_clear() 1544 if (net_idx != frnd->subnet->net_idx) { in friend_lpn_matches() [all …]
|
| A D | subnet.h | 54 uint16_t net_idx; /* NetKeyIndex */ member 148 struct bt_mesh_subnet *bt_mesh_subnet_get(uint16_t net_idx); 159 int bt_mesh_subnet_set(uint16_t net_idx, uint8_t kr_phase, 255 void bt_mesh_subnet_store(uint16_t net_idx);
|
| /subsys/bluetooth/mesh/shell/ |
| A D | rpr.c | 86 .net_idx = bt_mesh_shell_target_ctx.net_idx, in cmd_scan() 128 .net_idx = bt_mesh_shell_target_ctx.net_idx, in cmd_scan_ext() 169 .net_idx = bt_mesh_shell_target_ctx.net_idx, in cmd_scan_srv() 203 .net_idx = bt_mesh_shell_target_ctx.net_idx, in cmd_scan_caps() 231 .net_idx = bt_mesh_shell_target_ctx.net_idx, in cmd_scan_get() 259 .net_idx = bt_mesh_shell_target_ctx.net_idx, in cmd_scan_stop() 284 .net_idx = bt_mesh_shell_target_ctx.net_idx, in cmd_link_get() 310 .net_idx = bt_mesh_shell_target_ctx.net_idx, in cmd_link_close() 331 .net_idx = bt_mesh_shell_target_ctx.net_idx, in cmd_provision_remote() 336 uint16_t net_idx; in cmd_provision_remote() local [all …]
|
| A D | shell.c | 339 uint16_t net_idx; in cmd_proxy_connect() local 359 uint16_t net_idx; in cmd_proxy_disconnect() local 381 uint16_t net_idx; in cmd_proxy_solicit() local 454 bt_mesh_shell_target_ctx.net_idx = net_idx; in prov_complete() 473 bt_mesh_shell_target_ctx.net_idx = net_idx; in prov_node_added() 730 uint16_t net_idx; in cmd_provision_gatt() local 901 uint16_t net_idx; in cmd_provision_adv() local 929 uint16_t net_idx, addr; in cmd_provision_local() local 1248 subnet->net_idx); in cdb_print_subnets() 1389 uint16_t net_idx; in cmd_cdb_subnet_add() local [all …]
|
| A D | cfg.c | 26 err = bt_mesh_cfg_cli_node_reset(bt_mesh_shell_target_ctx.net_idx, in cmd_reset() 94 err = bt_mesh_cfg_cli_comp_data_get(bt_mesh_shell_target_ctx.net_idx, in cmd_get_comp() 336 err = bt_mesh_cfg_cli_ttl_get(bt_mesh_shell_target_ctx.net_idx, in cmd_ttl() 346 err = bt_mesh_cfg_cli_ttl_set(bt_mesh_shell_target_ctx.net_idx, in cmd_ttl() 815 uint16_t net_idx; in cmd_app_key_get() local 823 net_idx = shell_strtoul(argv[1], 0, &err); in cmd_app_key_get() 852 uint16_t net_idx; in cmd_node_id() local 856 net_idx = shell_strtoul(argv[1], 0, &err); in cmd_node_id() 864 bt_mesh_shell_target_ctx.dst, net_idx, &status, in cmd_node_id() 879 bt_mesh_shell_target_ctx.dst, net_idx, in cmd_node_id() [all …]
|
| A D | priv_beacon.c | 19 err = bt_mesh_priv_beacon_cli_get(bt_mesh_shell_target_ctx.net_idx, in cmd_priv_beacon_get() 49 err = bt_mesh_priv_beacon_cli_set(bt_mesh_shell_target_ctx.net_idx, in cmd_priv_beacon_set() 65 err = bt_mesh_priv_beacon_cli_gatt_proxy_get(bt_mesh_shell_target_ctx.net_idx, in cmd_priv_gatt_proxy_get() 88 err = bt_mesh_priv_beacon_cli_gatt_proxy_set(bt_mesh_shell_target_ctx.net_idx, in cmd_priv_gatt_proxy_set() 106 err = bt_mesh_priv_beacon_cli_node_id_get(bt_mesh_shell_target_ctx.net_idx, in cmd_priv_node_id_get() 114 val.net_idx, val.state, val.status); in cmd_priv_node_id_get() 124 val.net_idx = shell_strtoul(argv[1], 0, &err); in cmd_priv_node_id_set() 132 err = bt_mesh_priv_beacon_cli_node_id_set(bt_mesh_shell_target_ctx.net_idx, in cmd_priv_node_id_set()
|
| A D | od_priv_proxy.c | 18 uint16_t net_idx = bt_mesh_shell_target_ctx.net_idx; in cmd_od_priv_gatt_proxy_set() local 23 err = bt_mesh_od_priv_proxy_cli_get(net_idx, addr, &val_rsp); in cmd_od_priv_gatt_proxy_set() 32 err = bt_mesh_od_priv_proxy_cli_set(net_idx, addr, val, &val_rsp); in cmd_od_priv_gatt_proxy_set()
|
| A D | brg_cfg.c | 20 err = bt_mesh_brg_cfg_cli_get(bt_mesh_shell_target_ctx.net_idx, in cmd_subnet_bridge_get() 45 err = bt_mesh_brg_cfg_cli_set(bt_mesh_shell_target_ctx.net_idx, in cmd_subnet_bridge_set() 62 err = bt_mesh_brg_cfg_cli_table_size_get(bt_mesh_shell_target_ctx.net_idx, in cmd_bridging_table_size_get() 89 err = bt_mesh_brg_cfg_cli_table_add(bt_mesh_shell_target_ctx.net_idx, in cmd_bridging_table_add() 119 err = bt_mesh_brg_cfg_cli_table_remove(bt_mesh_shell_target_ctx.net_idx, in cmd_bridging_table_remove() 147 filter_net_idx.net_idx = shell_strtoul(argv[2], 0, &err); in cmd_bridged_subnets_get() 154 err = bt_mesh_brg_cfg_cli_subnets_get(bt_mesh_shell_target_ctx.net_idx, in cmd_bridged_subnets_get() 164 shell_print(sh, "\tnet_idx: %04x", rsp.net_idx_filter.net_idx); in cmd_bridged_subnets_get() 198 err = bt_mesh_brg_cfg_cli_table_get(bt_mesh_shell_target_ctx.net_idx, in cmd_bridging_table_get()
|