Home
last modified time | relevance | path

Searched refs:sub (Results 1 – 25 of 160) sorted by relevance

1234567

/Zephyr-Core-3.5.0/subsys/bluetooth/mesh/
Dsubnet.c69 static void subnet_evt(struct bt_mesh_subnet *sub, enum bt_mesh_key_evt evt) in subnet_evt() argument
72 cb->evt_handler(sub, evt); in subnet_evt()
94 const struct bt_mesh_subnet *sub; in store_subnet() local
99 sub = bt_mesh_subnet_get(net_idx); in store_subnet()
100 if (!sub) { in store_subnet()
109 memcpy(&key.val[0], &sub->keys[0].net, sizeof(struct bt_mesh_key)); in store_subnet()
110 memcpy(&key.val[1], &sub->keys[1].net, sizeof(struct bt_mesh_key)); in store_subnet()
112 key.kr_phase = sub->kr_phase; in store_subnet()
147 uint8_t bt_mesh_net_flags(struct bt_mesh_subnet *sub) in bt_mesh_net_flags() argument
151 if (sub && (sub->kr_phase == BT_MESH_KR_PHASE_2)) { in bt_mesh_net_flags()
[all …]
Dbeacon.c77 static int private_beacon_create(struct bt_mesh_subnet *sub,
79 static int private_beacon_update(struct bt_mesh_subnet *sub);
82 static struct bt_mesh_beacon *subnet_beacon_get_by_type(struct bt_mesh_subnet *sub, bool priv) in subnet_beacon_get_by_type() argument
85 return priv ? &sub->priv_beacon : &sub->secure_beacon; in subnet_beacon_get_by_type()
87 return &sub->secure_beacon; in subnet_beacon_get_by_type()
91 static bool beacon_cache_match(struct bt_mesh_subnet *sub, void *data) in beacon_cache_match() argument
97 beacon = subnet_beacon_get_by_type(sub, params->private); in beacon_cache_match()
107 void bt_mesh_beacon_cache_clear(struct bt_mesh_subnet *sub) in bt_mesh_beacon_cache_clear() argument
109 (void)memset(sub->secure_beacon.cache, 0, sizeof(sub->secure_beacon.cache)); in bt_mesh_beacon_cache_clear()
111 (void)memset(sub->priv_beacon.cache, 0, sizeof(sub->priv_beacon.cache)); in bt_mesh_beacon_cache_clear()
[all …]
Dproxy_srv.c190 .sub = rx->sub, in send_filter_status()
328 struct bt_mesh_subnet *sub) in beacon_send() argument
337 err = bt_mesh_beacon_create(sub, &buf, client->privacy); in beacon_send()
339 err = bt_mesh_beacon_create(sub, &buf, false); in beacon_send()
349 static bool send_beacon_cb(struct bt_mesh_subnet *sub, void *cb_data) in send_beacon_cb() argument
353 return beacon_send(client, sub) != 0; in send_beacon_cb()
365 void bt_mesh_proxy_beacon_send(struct bt_mesh_subnet *sub) in bt_mesh_proxy_beacon_send() argument
369 if (!sub) { in bt_mesh_proxy_beacon_send()
377 beacon_send(&clients[i], sub); in bt_mesh_proxy_beacon_send()
382 static void identity_enabled(struct bt_mesh_subnet *sub) in identity_enabled() argument
[all …]
Dheartbeat.c34 static struct bt_mesh_hb_sub sub; variable
49 if (sub.dst == BT_MESH_ADDR_UNASSIGNED) { in sub_remaining()
76 sub.remaining = sub_remaining(); in notify_recv()
80 cb->recv(&sub, hops, feat); in notify_recv()
87 sub.remaining = 0; in notify_sub_end()
91 cb->sub_end(&sub); in notify_sub_end()
115 .sub = bt_mesh_subnet_get(pub.net_idx), in heartbeat_send()
124 if (!tx.sub || pub.dst == BT_MESH_ADDR_UNASSIGNED) { in heartbeat_send()
205 if (rx->ctx.addr != sub.src || rx->ctx.recv_dst != sub.dst) { in bt_mesh_hb_recv()
215 sub.min_hops = MIN(sub.min_hops, hops); in bt_mesh_hb_recv()
[all …]
Dsolicitation.c58 static int srpl_entry_save(struct bt_mesh_subnet *sub, uint32_t sseq, uint16_t ssrc) in srpl_entry_save() argument
139 static bool sol_pdu_decrypt(struct bt_mesh_subnet *sub, void *data) in sol_pdu_decrypt() argument
147 for (i = 0; i < ARRAY_SIZE(sub->keys); i++) { in sol_pdu_decrypt()
148 if (!sub->keys[i].valid) { in sol_pdu_decrypt()
156 err = bt_mesh_net_obfuscate(out->data, 0, &sub->keys[i].msg.privacy); in sol_pdu_decrypt()
161 err = bt_mesh_net_decrypt(&sub->keys[i].msg.enc, out, in sol_pdu_decrypt()
167 err = srpl_entry_save(sub, in sol_pdu_decrypt()
183 struct bt_mesh_subnet *sub; in bt_mesh_sol_recv() local
253 sub = bt_mesh_subnet_find(sol_pdu_decrypt, (void *)buf); in bt_mesh_sol_recv()
254 if (!sub) { in bt_mesh_sol_recv()
[all …]
Dcdb.c277 struct bt_mesh_cdb_subnet *sub; in cdb_subnet_set() local
289 sub = bt_mesh_cdb_subnet_get(net_idx); in cdb_subnet_set()
293 if (!sub) { in cdb_subnet_set()
299 bt_mesh_cdb_subnet_del(sub, false); in cdb_subnet_set()
315 if (sub) { in cdb_subnet_set()
318 sub->kr_phase = key.kr_phase; in cdb_subnet_set()
319 bt_mesh_key_assign(&sub->keys[0].net_key, &tmp[0]); in cdb_subnet_set()
320 bt_mesh_key_assign(&sub->keys[1].net_key, &tmp[1]); in cdb_subnet_set()
325 sub = bt_mesh_cdb_subnet_alloc(net_idx); in cdb_subnet_set()
326 if (!sub) { in cdb_subnet_set()
[all …]
Dsubnet.h25 #define SUBNET_KEY_TX_IDX(sub) ((sub)->kr_phase == BT_MESH_KR_PHASE_2) argument
120 struct bt_mesh_subnet *bt_mesh_subnet_find(bool (*cb)(struct bt_mesh_subnet *sub, void *cb_data),
129 size_t bt_mesh_subnet_foreach(void (*cb)(struct bt_mesh_subnet *sub));
140 struct bt_mesh_subnet *bt_mesh_subnet_next(struct bt_mesh_subnet *sub);
208 uint8_t bt_mesh_net_flags(struct bt_mesh_subnet *sub);
219 void bt_mesh_kr_update(struct bt_mesh_subnet *sub, bool kr_flag, bool new_key);
228 bt_mesh_subnet_has_new_key(const struct bt_mesh_subnet *sub) in bt_mesh_subnet_has_new_key() argument
230 return sub->kr_phase != BT_MESH_KR_NORMAL; in bt_mesh_subnet_has_new_key()
Dbeacon.h9 void bt_mesh_beacon_cache_clear(struct bt_mesh_subnet *sub);
14 int bt_mesh_beacon_create(struct bt_mesh_subnet *sub, struct net_buf_simple *buf, bool priv);
17 void bt_mesh_beacon_update(struct bt_mesh_subnet *sub);
Dproxy_cli.c165 static bool has_net_id(struct bt_mesh_subnet *sub, void *user_data) in has_net_id() argument
170 srv = find_proxy_srv(sub->net_idx, true, true); in has_net_id()
186 if (!memcmp(sub->keys[0].net_id, res->net_id, 8) || in has_net_id()
187 (bt_mesh_subnet_has_new_key(sub) && in has_net_id()
188 !memcmp(sub->keys[1].net_id, res->net_id, 8))) { in has_net_id()
201 struct bt_mesh_subnet *sub; in bt_mesh_proxy_cli_adv_recv() local
213 sub = bt_mesh_subnet_find(has_net_id, (void *)&res); in bt_mesh_proxy_cli_adv_recv()
214 if (sub && res.srv) { in bt_mesh_proxy_cli_adv_recv()
301 static void subnet_evt(struct bt_mesh_subnet *sub, enum bt_mesh_key_evt evt) in subnet_evt() argument
305 (void)bt_mesh_proxy_disconnect(sub->net_idx); in subnet_evt()
Dproxy.h30 void bt_mesh_proxy_beacon_send(struct bt_mesh_subnet *sub);
34 void bt_mesh_proxy_identity_start(struct bt_mesh_subnet *sub, bool private);
35 void bt_mesh_proxy_identity_stop(struct bt_mesh_subnet *sub);
Dlpn.c213 .net_idx = bt_mesh.lpn.sub->net_idx, in send_friend_clear()
219 .sub = bt_mesh.lpn.sub, in send_friend_clear()
240 uint16_t net_idx = lpn->sub->net_idx; in clear_friendship()
269 if (lpn->sub->keys[i].valid) { in clear_friendship()
283 lpn->sub = NULL; in clear_friendship()
384 lpn->sub = bt_mesh_subnet_next(NULL); in send_friend_req()
385 if (!lpn->sub) { in send_friend_req()
390 ctx.net_idx = lpn->sub->net_idx; in send_friend_req()
391 tx.sub = lpn->sub; in send_friend_req()
438 cb->polled(lpn->sub->net_idx, lpn->frnd, retry); in req_send_end()
[all …]
Dapp_keys.c296 struct bt_mesh_subnet *sub; in bt_mesh_app_key_update() local
309 sub = bt_mesh_subnet_get(app->net_idx); in bt_mesh_app_key_update()
310 if (!sub) { in bt_mesh_app_key_update()
319 if (sub->kr_phase != BT_MESH_KR_PHASE_1) { in bt_mesh_app_key_update()
474 struct bt_mesh_subnet **sub, in bt_mesh_keys_resolve() argument
483 *sub = bt_mesh_subnet_get(ctx->net_idx); in bt_mesh_keys_resolve()
484 if (!*sub) { in bt_mesh_keys_resolve()
519 *sub = bt_mesh_subnet_get(app->net_idx); in bt_mesh_keys_resolve()
520 if (!*sub) { in bt_mesh_keys_resolve()
525 if ((*sub)->kr_phase == BT_MESH_KR_PHASE_2 && app->updated) { in bt_mesh_keys_resolve()
[all …]
Dtransport_legacy.c83 struct bt_mesh_subnet *sub; member
109 struct bt_mesh_subnet *sub; member
154 if (!bt_mesh_friend_queue_has_space(tx->sub->net_idx, in send_unseg()
249 tx->sub = NULL; in seg_tx_reset()
361 .net_idx = tx->sub->net_idx, in seg_tx_send_unacked()
369 .sub = tx->sub, in seg_tx_send_unacked()
489 tx->sub = net_tx->sub; in send_seg()
506 !bt_mesh_friend_queue_has_space(tx->sub->net_idx, net_tx->src, in send_seg()
650 err = bt_mesh_keys_resolve(tx->ctx, &tx->sub, &key, &aid); in bt_mesh_trans_send()
655 LOG_DBG("net_idx 0x%04x app_idx 0x%04x dst 0x%04x", tx->sub->net_idx, tx->ctx->app_idx, in bt_mesh_trans_send()
[all …]
Dtransport.c71 struct bt_mesh_subnet *sub; member
100 struct bt_mesh_subnet *sub; member
147 if (!bt_mesh_friend_queue_has_space(tx->sub->net_idx, in send_unseg()
242 tx->sub = NULL; in seg_tx_reset()
367 .net_idx = tx->sub->net_idx, in seg_tx_send_unacked()
375 .sub = tx->sub, in seg_tx_send_unacked()
528 tx->sub = net_tx->sub; in send_seg()
546 !bt_mesh_friend_queue_has_space(tx->sub->net_idx, net_tx->src, in send_seg()
687 err = bt_mesh_keys_resolve(tx->ctx, &tx->sub, &key, &aid); in bt_mesh_trans_send()
692 LOG_DBG("net_idx 0x%04x app_idx 0x%04x dst 0x%04x", tx->sub->net_idx, tx->ctx->app_idx, in bt_mesh_trans_send()
[all …]
/Zephyr-Core-3.5.0/tests/bsim/bluetooth/mesh/src/
Dtest_heartbeat.c58 static void sub_hb_recv_cb(const struct bt_mesh_hb_sub *sub, uint8_t hops, uint16_t feat) in sub_hb_recv_cb() argument
60 LOG_INF("Heartbeat received from addr: 0x%04x", sub->src); in sub_hb_recv_cb()
62 ASSERT_EQUAL(PUBLISHER_ADDR_START, sub->src); in sub_hb_recv_cb()
63 ASSERT_EQUAL(pub_addr, sub->dst); in sub_hb_recv_cb()
64 ASSERT_EQUAL(SUBSCRIBE_PERIOD_SEC, sub->period); in sub_hb_recv_cb()
65 ASSERT_TRUE(sub->remaining <= SUBSCRIBE_PERIOD_SEC); in sub_hb_recv_cb()
66 ASSERT_EQUAL(sub_ctx.count + 1, sub->count); in sub_hb_recv_cb()
90 sub_ctx.min_hops = MIN(sub_ctx.min_hops, sub->min_hops); in sub_hb_recv_cb()
91 sub_ctx.max_hops = MAX(sub_ctx.max_hops, sub->max_hops); in sub_hb_recv_cb()
94 static void sub_hb_end_cb(const struct bt_mesh_hb_sub *sub) in sub_hb_end_cb() argument
[all …]
/Zephyr-Core-3.5.0/arch/arm/core/cortex_a_r/
Dexc.S51 sub sp, #24
54 sub sp, #___fpu_t_SIZEOF
71 sub sp, #___extra_esf_info_t_SIZEOF
76 sub r1, sp, #___callee_saved_t_SIZEOF
128 sub sp, #24
137 sub sp, #___fpu_t_SIZEOF
158 sub sp, #___extra_esf_info_t_SIZEOF
163 sub r1, sp, #___callee_saved_t_SIZEOF
191 sub lr, #4
217 sub lr, #8
Dexc_exit.S32 sub sp, #8
158 sub r0, r0, #1
244 sub r0, r0, #1
259 sub r0, r0, #1
/Zephyr-Core-3.5.0/scripts/build/
Dprocess_gperf.py102 line = re.sub(r'lengthtable\[key\]', r'sizeof(void *)', line)
105 line = re.sub(r'[{]["]["][}]', r'{}', line)
108 line = re.sub(r'static unsigned char lengthtable',
114 line = re.sub(r'register', r'', line)
117 line = re.sub(r"hash [(]str, len[)]",
127 line = re.sub(r'["].*["]', reformat_str, line)
/Zephyr-Core-3.5.0/include/zephyr/bluetooth/mesh/
Dcdb.h263 void bt_mesh_cdb_subnet_del(struct bt_mesh_cdb_subnet *sub, bool store);
280 void bt_mesh_cdb_subnet_store(const struct bt_mesh_cdb_subnet *sub);
288 uint8_t bt_mesh_cdb_subnet_flags(const struct bt_mesh_cdb_subnet *sub);
304 int bt_mesh_cdb_subnet_key_import(struct bt_mesh_cdb_subnet *sub, int key_idx,
321 int bt_mesh_cdb_subnet_key_export(const struct bt_mesh_cdb_subnet *sub, int key_idx,
Dheartbeat.h94 void (*recv)(const struct bt_mesh_hb_sub *sub, uint8_t hops,
104 void (*sub_end)(const struct bt_mesh_hb_sub *sub);
/Zephyr-Core-3.5.0/subsys/zbus/
Dzbus.c285 int zbus_sub_wait(const struct zbus_observer *sub, const struct zbus_channel **chan, in zbus_sub_wait() argument
289 _ZBUS_ASSERT(sub != NULL, "sub is required"); in zbus_sub_wait()
290 _ZBUS_ASSERT(sub->type == ZBUS_OBSERVER_SUBSCRIBER_TYPE, "sub must be a SUBSCRIBER"); in zbus_sub_wait()
291 _ZBUS_ASSERT(sub->queue != NULL, "sub queue is required"); in zbus_sub_wait()
294 return k_msgq_get(sub->queue, chan, timeout); in zbus_sub_wait()
299 int zbus_sub_wait_msg(const struct zbus_observer *sub, const struct zbus_channel **chan, void *msg, in zbus_sub_wait_msg() argument
303 _ZBUS_ASSERT(sub != NULL, "sub is required"); in zbus_sub_wait_msg()
304 _ZBUS_ASSERT(sub->type == ZBUS_OBSERVER_MSG_SUBSCRIBER_TYPE, in zbus_sub_wait_msg()
306 _ZBUS_ASSERT(sub->message_fifo != NULL, "sub message_fifo is required"); in zbus_sub_wait_msg()
310 struct net_buf *buf = net_buf_get(sub->message_fifo, timeout); in zbus_sub_wait_msg()
/Zephyr-Core-3.5.0/arch/arm64/core/
Dvector_table.S40 sub sp, sp, ___esf_t_SIZEOF
49 sub x0, sp, x0 // x0' = sp' - x0 = sp
264 sub x0, sp, x0 // x0'' = sp' - x0' = x0
265 sub sp, sp, x0 // sp'' = sp' - x0 = sp
291 sub sp, x18, ___esf_t_SIZEOF
321 sub x0, x0, x1
/Zephyr-Core-3.5.0/arch/sparc/core/
Dwindow_trap.S96 sub %sp, 0x10, %sp
117 sub %g2, 1, %g2
125 sub %g2, 1, %g2
/Zephyr-Core-3.5.0/subsys/bluetooth/host/
Dgatt.c3411 static bool gatt_sub_is_empty(struct gatt_sub *sub) in gatt_sub_is_empty() argument
3413 return sys_slist_is_empty(&sub->list); in gatt_sub_is_empty()
3418 static void gatt_sub_free(struct gatt_sub *sub) in gatt_sub_free() argument
3420 __ASSERT_NO_MSG(gatt_sub_is_empty(sub)); in gatt_sub_free()
3421 bt_addr_le_copy(&sub->peer, BT_ADDR_LE_ANY); in gatt_sub_free()
3424 static void gatt_sub_remove(struct bt_conn *conn, struct gatt_sub *sub, in gatt_sub_remove() argument
3430 sys_slist_remove(&sub->list, prev, &params->node); in gatt_sub_remove()
3435 if (gatt_sub_is_empty(sub)) { in gatt_sub_remove()
3436 gatt_sub_free(sub); in gatt_sub_remove()
3444 struct gatt_sub *sub = &subscriptions[i]; in gatt_sub_find() local
[all …]
/Zephyr-Core-3.5.0/tests/net/lib/mqtt_subscriber/src/
Dtest_mqtt_subscribe.c247 struct mqtt_subscription_list sub; in test_subscribe() local
252 sub.list = &topic; in test_subscribe()
253 sub.list_count = 1U; in test_subscribe()
254 sub.message_id = sys_rand32_get(); in test_subscribe()
256 rc = mqtt_subscribe(&client_ctx, &sub); in test_subscribe()

1234567