/Zephyr-Core-3.7.0/tests/net/dhcpv6/src/ |
D | main.c | 40 struct test_dhcpv6_context test_ctx; variable 76 NET_DEVICE_INIT(test_dhcpv6, "test_dhcpv6", NULL, NULL, &test_ctx, NULL, 82 test_ctx.test_fn = test_fn; in set_dhcpv6_test_fn() 87 memcpy(&test_ctx.iface->config.dhcpv6.addr, &test_addr, in set_test_addr_on_iface() 88 sizeof(test_ctx.iface->config.dhcpv6.addr)); in set_test_addr_on_iface() 89 memcpy(&test_ctx.iface->config.dhcpv6.prefix, &test_prefix, in set_test_addr_on_iface() 90 sizeof(test_ctx.iface->config.dhcpv6.prefix)); in set_test_addr_on_iface() 91 test_ctx.iface->config.dhcpv6.prefix_len = test_prefix_len; in set_test_addr_on_iface() 96 memset(&test_ctx.iface->config.dhcpv6.addr, 0, in clear_test_addr_on_iface() 97 sizeof(test_ctx.iface->config.dhcpv6.addr)); in clear_test_addr_on_iface() [all …]
|
/Zephyr-Core-3.7.0/tests/net/dhcpv4/server/src/ |
D | main.c | 47 } test_ctx; variable 67 test_ctx.iface = iface; in server_iface_init() 96 zassert_ok(net_recv_data(test_ctx.iface, reply), "Failed to receive data"); in send_icmp_echo_reply() 108 if (test_ctx.send_echo_reply) { in server_send() 109 test_ctx.send_echo_reply = false; in server_send() 110 memcpy(&test_ctx.declined_ip, ipv4_hdr->dst, in server_send() 118 test_ctx.pkt = pkt; in server_send() 121 k_sem_give(&test_ctx.test_proceed); in server_send() 139 if (test_ctx.pkt != NULL) { in test_pkt_free() 140 net_pkt_unref(test_ctx.pkt); in test_pkt_free() [all …]
|
/Zephyr-Core-3.7.0/tests/bsim/bluetooth/host/l2cap/multilink_peripheral/src/ |
D | dut.c | 36 struct test_ctx { struct 42 static struct test_ctx contexts[CONFIG_BT_MAX_CONN]; argument 70 static void resume_sending_until_done(struct test_ctx *ctx) in resume_sending_until_done() 90 static struct test_ctx *get_ctx_from_chan(struct bt_l2cap_chan *chan) in get_ctx_from_chan() 93 struct test_ctx *ctx = CONTAINER_OF(le_chan, struct test_ctx, le_chan); in get_ctx_from_chan() 102 struct test_ctx *ctx = get_ctx_from_chan(chan); in sent_cb() 154 static struct test_ctx *alloc_ctx(void) in alloc_ctx() 157 struct test_ctx *context = &contexts[i]; in alloc_ctx() 168 memset(context, 0, sizeof(struct test_ctx)); in alloc_ctx() 176 static struct test_ctx *get_ctx_from_address(const bt_addr_le_t *address) in get_ctx_from_address() [all …]
|
/Zephyr-Core-3.7.0/tests/bsim/bluetooth/host/l2cap/credits/src/ |
D | main.c | 34 struct test_ctx { struct 38 } test_ctx; argument 67 void continue_sending(struct test_ctx *ctx) in continue_sending() 84 if (test_ctx.tx_left) { in sent_cb() 85 test_ctx.tx_left--; in sent_cb() 88 continue_sending(&test_ctx); in sent_cb() 103 test_ctx.rx_sdu = net_buf_ref(buf); in recv_cb() 142 struct bt_l2cap_le_chan *le_chan = &test_ctx.le_chan; in server_accept_cb() 262 net_buf_unref(test_ctx.rx_sdu); in test_peripheral_main() 263 bt_l2cap_chan_recv_complete(&test_ctx.le_chan.chan, test_ctx.rx_sdu); in test_peripheral_main() [all …]
|
/Zephyr-Core-3.7.0/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/src/ |
D | main.c | 32 struct test_ctx { struct 35 } test_ctx; argument 67 void continue_sending(struct test_ctx *ctx) in continue_sending() 84 if (test_ctx.tx_left) { in sent_cb() 85 test_ctx.tx_left--; in sent_cb() 88 continue_sending(&test_ctx); in sent_cb() 115 bt_l2cap_chan_give_credits(&test_ctx.le_chan.chan, 1); in recv_cb() 148 struct bt_l2cap_le_chan *le_chan = &test_ctx.le_chan; in server_accept_cb() 281 bt_l2cap_chan_give_credits(&test_ctx.le_chan.chan, 1); in test_peripheral_main() 341 struct bt_l2cap_le_chan *le_chan = &test_ctx.le_chan; in connect_l2cap_channel() [all …]
|
/Zephyr-Core-3.7.0/tests/bsim/bluetooth/host/l2cap/stress/src/ |
D | main.c | 53 struct test_ctx { struct 59 static struct test_ctx contexts[L2CAP_CHANS]; argument 61 struct test_ctx *get_ctx(struct bt_l2cap_chan *chan) in get_ctx() 64 struct test_ctx *ctx = CONTAINER_OF(le_chan, struct test_ctx, le_chan); in get_ctx() 107 void continue_sending(struct test_ctx *ctx) in continue_sending() 122 struct test_ctx *ctx = get_ctx(chan); in sent_cb() 186 struct test_ctx *ctx = CONTAINER_OF(k_work_delayable_from_work(item), in deferred_send() 187 struct test_ctx, work_item); in deferred_send() 196 struct test_ctx *alloc_test_context(void) in alloc_test_context() 205 memset(&contexts[i], 0, sizeof(struct test_ctx)); in alloc_test_context() [all …]
|
/Zephyr-Core-3.7.0/tests/bsim/bluetooth/host/l2cap/many_conns/src/ |
D | main.c | 38 struct test_ctx { struct 43 static struct test_ctx contexts[L2CAP_CHANS]; argument 45 struct test_ctx *get_ctx(struct bt_l2cap_chan *chan) in get_ctx() 48 struct test_ctx *ctx = CONTAINER_OF(le_chan, struct test_ctx, le_chan); in get_ctx() 82 struct test_ctx *ctx = get_ctx(chan); in sent_cb() 142 struct test_ctx *alloc_test_context(void) in alloc_test_context() 151 memset(&contexts[i], 0, sizeof(struct test_ctx)); in alloc_test_context() 162 struct test_ctx *ctx = NULL; in server_accept_cb() 327 struct test_ctx *ctx = alloc_test_context(); in connect_l2cap_channel()
|
/Zephyr-Core-3.7.0/tests/bsim/bluetooth/mesh/src/ |
D | test_sar.c | 32 static struct bt_mesh_msg_ctx test_ctx = { variable 198 ASSERT_OK(dummy_vnd_mod_get(dummy_vnd_mod, &test_ctx, dummy_msg)); in cli_max_len_sdu_send()
|
D | test_beacon.c | 1622 struct priv_test_ctx *test_ctx = (struct priv_test_ctx *)ctx; in pp_beacon_check() local 1625 proxy_adv_hash_calc(&pp_net0, beacon.pp_random, test_ctx->node_id_addr, true)); in pp_beacon_check()
|