Home
last modified time | relevance | path

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

12345678

/Zephyr-latest/subsys/bluetooth/mesh/
Dsubnet.c68 static void subnet_evt(struct bt_mesh_subnet *sub, enum bt_mesh_key_evt evt) in subnet_evt() argument
71 cb->evt_handler(sub, evt); in subnet_evt()
93 const struct bt_mesh_subnet *sub; in store_subnet() local
98 sub = bt_mesh_subnet_get(net_idx); in store_subnet()
99 if (!sub) { in store_subnet()
108 memcpy(&key.val[0], &sub->keys[0].net, sizeof(struct bt_mesh_key)); in store_subnet()
109 memcpy(&key.val[1], &sub->keys[1].net, sizeof(struct bt_mesh_key)); in store_subnet()
111 key.kr_phase = sub->kr_phase; in store_subnet()
146 uint8_t bt_mesh_net_flags(struct bt_mesh_subnet *sub) in bt_mesh_net_flags() argument
150 if (sub && (sub->kr_phase == BT_MESH_KR_PHASE_2)) { in bt_mesh_net_flags()
[all …]
Dbeacon.c78 static int private_beacon_create(struct bt_mesh_subnet *sub,
80 static int private_beacon_update(struct bt_mesh_subnet *sub);
83 static struct bt_mesh_beacon *subnet_beacon_get_by_type(struct bt_mesh_subnet *sub, bool priv) in subnet_beacon_get_by_type() argument
86 return priv ? &sub->priv_beacon : &sub->secure_beacon; in subnet_beacon_get_by_type()
88 return &sub->secure_beacon; in subnet_beacon_get_by_type()
92 static bool beacon_cache_match(struct bt_mesh_subnet *sub, void *data) in beacon_cache_match() argument
98 beacon = subnet_beacon_get_by_type(sub, params->private); in beacon_cache_match()
108 void bt_mesh_beacon_cache_clear(struct bt_mesh_subnet *sub) in bt_mesh_beacon_cache_clear() argument
110 (void)memset(sub->secure_beacon.cache, 0, sizeof(sub->secure_beacon.cache)); in bt_mesh_beacon_cache_clear()
112 (void)memset(sub->priv_beacon.cache, 0, sizeof(sub->priv_beacon.cache)); in bt_mesh_beacon_cache_clear()
[all …]
Dproxy_srv.c183 .sub = rx->sub, in send_filter_status()
321 struct bt_mesh_subnet *sub) in beacon_send() argument
330 err = bt_mesh_beacon_create(sub, &buf, client->privacy); in beacon_send()
332 err = bt_mesh_beacon_create(sub, &buf, false); in beacon_send()
342 static bool send_beacon_cb(struct bt_mesh_subnet *sub, void *cb_data) in send_beacon_cb() argument
346 return beacon_send(client, sub) != 0; in send_beacon_cb()
358 void bt_mesh_proxy_beacon_send(struct bt_mesh_subnet *sub) in bt_mesh_proxy_beacon_send() argument
362 if (!sub) { in bt_mesh_proxy_beacon_send()
370 beacon_send(&clients[i], sub); in bt_mesh_proxy_beacon_send()
375 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.c57 static int srpl_entry_save(struct bt_mesh_subnet *sub, uint32_t sseq, uint16_t ssrc) in srpl_entry_save() argument
138 static bool sol_pdu_decrypt(struct bt_mesh_subnet *sub, void *data) in sol_pdu_decrypt() argument
146 for (i = 0; i < ARRAY_SIZE(sub->keys); i++) { in sol_pdu_decrypt()
147 if (!sub->keys[i].valid) { in sol_pdu_decrypt()
155 err = bt_mesh_net_obfuscate(out->data, 0, &sub->keys[i].msg.privacy); in sol_pdu_decrypt()
160 err = bt_mesh_net_decrypt(&sub->keys[i].msg.enc, out, in sol_pdu_decrypt()
166 err = srpl_entry_save(sub, in sol_pdu_decrypt()
182 struct bt_mesh_subnet *sub; in bt_mesh_sol_recv() local
252 sub = bt_mesh_subnet_find(sol_pdu_decrypt, (void *)buf); in bt_mesh_sol_recv()
253 if (!sub) { in bt_mesh_sol_recv()
[all …]
Dcdb.c278 struct bt_mesh_cdb_subnet *sub; in cdb_subnet_set() local
290 sub = bt_mesh_cdb_subnet_get(net_idx); in cdb_subnet_set()
294 if (!sub) { in cdb_subnet_set()
300 bt_mesh_cdb_subnet_del(sub, false); in cdb_subnet_set()
316 if (sub) { in cdb_subnet_set()
319 sub->kr_phase = key.kr_phase; in cdb_subnet_set()
320 bt_mesh_key_assign(&sub->keys[0].net_key, &tmp[0]); in cdb_subnet_set()
321 bt_mesh_key_assign(&sub->keys[1].net_key, &tmp[1]); in cdb_subnet_set()
326 sub = bt_mesh_cdb_subnet_alloc(net_idx); in cdb_subnet_set()
327 if (!sub) { in cdb_subnet_set()
[all …]
Dsubnet.h27 #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()
Dproxy_cli.c160 static bool proxy_srv_check_and_get(struct bt_mesh_subnet *sub, const uint8_t *net_id, in proxy_srv_check_and_get() argument
165 srv = find_proxy_srv(sub->net_idx, true, true); in proxy_srv_check_and_get()
182 if (!net_id || !memcmp(sub->keys[0].net_id, net_id, 8) || in proxy_srv_check_and_get()
183 (bt_mesh_subnet_has_new_key(sub) && !memcmp(sub->keys[1].net_id, net_id, 8))) { in proxy_srv_check_and_get()
206 static bool is_hash_equal(struct bt_mesh_subnet *sub, struct find_net_id *res, uint8_t idx) in is_hash_equal() argument
211 memcpy(&in[0], sub->keys[idx].net_id, 8); in is_hash_equal()
213 err = bt_mesh_encrypt(&sub->keys[idx].identity, in, out); in is_hash_equal()
226 static bool has_net_id(struct bt_mesh_subnet *sub, void *user_data) in has_net_id() argument
237 if (!(is_hash_equal(sub, res, 0) || in has_net_id()
238 (bt_mesh_subnet_has_new_key(sub) && is_hash_equal(sub, res, 1)))) { in has_net_id()
[all …]
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.h22 void bt_mesh_proxy_beacon_send(struct bt_mesh_subnet *sub);
26 void bt_mesh_proxy_identity_start(struct bt_mesh_subnet *sub, bool private);
27 void bt_mesh_proxy_identity_stop(struct bt_mesh_subnet *sub);
Dlpn.c212 .net_idx = bt_mesh.lpn.sub->net_idx, in send_friend_clear()
218 .sub = bt_mesh.lpn.sub, in send_friend_clear()
239 uint16_t net_idx = lpn->sub->net_idx; in clear_friendship()
268 if (lpn->sub->keys[i].valid) { in clear_friendship()
282 lpn->sub = NULL; in clear_friendship()
383 lpn->sub = bt_mesh_subnet_next(NULL); in send_friend_req()
384 if (!lpn->sub) { in send_friend_req()
389 ctx.net_idx = lpn->sub->net_idx; in send_friend_req()
390 tx.sub = lpn->sub; in send_friend_req()
437 cb->polled(lpn->sub->net_idx, lpn->frnd, retry); in req_send_end()
[all …]
Dapp_keys.c295 struct bt_mesh_subnet *sub; in bt_mesh_app_key_update() local
308 sub = bt_mesh_subnet_get(app->net_idx); in bt_mesh_app_key_update()
309 if (!sub) { in bt_mesh_app_key_update()
318 if (sub->kr_phase != BT_MESH_KR_PHASE_1) { in bt_mesh_app_key_update()
473 struct bt_mesh_subnet **sub, in bt_mesh_keys_resolve() argument
482 *sub = bt_mesh_subnet_get(ctx->net_idx); in bt_mesh_keys_resolve()
483 if (!*sub) { in bt_mesh_keys_resolve()
518 *sub = bt_mesh_subnet_get(app->net_idx); in bt_mesh_keys_resolve()
519 if (!*sub) { in bt_mesh_keys_resolve()
524 if ((*sub)->kr_phase == BT_MESH_KR_PHASE_2 && app->updated) { in bt_mesh_keys_resolve()
[all …]
/Zephyr-latest/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 …]
Dtest_proxy_sol.c157 static void sol_fixed_pdu_create(struct bt_mesh_subnet *sub, struct net_buf_simple *pdu) in sol_fixed_pdu_create() argument
161 net_buf_simple_add_u8(pdu, sub->keys[SUBNET_KEY_TX_IDX(sub)].msg.nid); in sol_fixed_pdu_create()
167 ASSERT_OK(bt_mesh_net_encrypt(&sub->keys[SUBNET_KEY_TX_IDX(sub)].msg.enc, pdu, 0, in sol_fixed_pdu_create()
171 &sub->keys[SUBNET_KEY_TX_IDX(sub)].msg.privacy)); in sol_fixed_pdu_create()
182 struct bt_mesh_subnet *sub = bt_mesh_subnet_find(NULL, NULL); in sol_fixed_pdu_send() local
186 sol_fixed_pdu_create(sub, &pdu); in sol_fixed_pdu_send()
/Zephyr-latest/arch/arm/core/cortex_a_r/
Dexc.S54 sub sp, #24
57 sub sp, #___fpu_t_SIZEOF
74 sub sp, #___extra_esf_info_t_SIZEOF
79 sub r1, sp, #___callee_saved_t_SIZEOF
131 sub sp, #24
140 sub sp, #___fpu_t_SIZEOF
161 sub sp, #___extra_esf_info_t_SIZEOF
166 sub r1, sp, #___callee_saved_t_SIZEOF
194 sub lr, #4
220 sub lr, #8
[all …]
Disr_wrapper.S84 sub lr, lr, #4
90 sub sp, sp, #___fpu_t_SIZEOF
140 sub sp, sp, r3
246 sub lr, #4
338 sub r0, r0, #1
Dexc_exit.S33 sub sp, #8
160 sub r0, r0, #1
246 sub r0, r0, #1
261 sub r0, r0, #1
/Zephyr-latest/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)
130 line = re.sub(r'char asso_values', r'short asso_values', line)
/Zephyr-latest/include/zephyr/bluetooth/mesh/
Dcdb.h264 void bt_mesh_cdb_subnet_del(struct bt_mesh_cdb_subnet *sub, bool store);
281 void bt_mesh_cdb_subnet_store(const struct bt_mesh_cdb_subnet *sub);
289 uint8_t bt_mesh_cdb_subnet_flags(const struct bt_mesh_cdb_subnet *sub);
305 int bt_mesh_cdb_subnet_key_import(struct bt_mesh_cdb_subnet *sub, int key_idx,
322 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-latest/tests/kconfig/functions/
DKconfig18 default $(sub, 10)
22 default $(sub, 10, 3)
26 default $(sub, 10, 3, 2)
/Zephyr-latest/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
Dearly_mem_funcs.S39 sub x2, x2, #8
69 sub x2, x2, #8
/Zephyr-latest/samples/subsys/zbus/benchmark/src/
Dsub.c38 struct zbus_observer *sub = sub_ref; in sub_thread() local
41 if (zbus_sub_wait(sub, &chan, K_FOREVER) == 0) { in sub_thread()
/Zephyr-latest/subsys/zbus/
Dzbus.c488 int zbus_sub_wait(const struct zbus_observer *sub, const struct zbus_channel **chan, in zbus_sub_wait() argument
492 _ZBUS_ASSERT(sub != NULL, "sub is required"); in zbus_sub_wait()
493 _ZBUS_ASSERT(sub->type == ZBUS_OBSERVER_SUBSCRIBER_TYPE, "sub must be a SUBSCRIBER"); in zbus_sub_wait()
494 _ZBUS_ASSERT(sub->queue != NULL, "sub queue is required"); in zbus_sub_wait()
497 return k_msgq_get(sub->queue, chan, timeout); in zbus_sub_wait()
502 int zbus_sub_wait_msg(const struct zbus_observer *sub, const struct zbus_channel **chan, void *msg, in zbus_sub_wait_msg() argument
506 _ZBUS_ASSERT(sub != NULL, "sub is required"); in zbus_sub_wait_msg()
507 _ZBUS_ASSERT(sub->type == ZBUS_OBSERVER_MSG_SUBSCRIBER_TYPE, in zbus_sub_wait_msg()
509 _ZBUS_ASSERT(sub->message_fifo != NULL, "sub message_fifo is required"); in zbus_sub_wait_msg()
513 struct net_buf *buf = k_fifo_get(sub->message_fifo, timeout); in zbus_sub_wait_msg()

12345678