/Zephyr-latest/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-latest/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-latest/tests/net/lib/mqtt/v3_1_1/mqtt_client/src/ |
D | main.c | 46 } test_ctx; variable 230 zassert_equal(length - var_len, strlen(test_ctx.payload), in broker_validate_packet() 232 zassert_mem_equal(buf + var_len, test_ctx.payload, in broker_validate_packet() 233 strlen(test_ctx.payload), "Invalid payload"); in broker_validate_packet() 260 zassert_equal(message_id, test_ctx.msg_id, in broker_validate_packet() 443 zassert_equal(test_ctx.payload_left, in publish_handler() 448 ret = mqtt_readall_publish_payload(client, buf, test_ctx.payload_left); in publish_handler() 450 zassert_mem_equal(test_ctx.payload, buf, in publish_handler() 454 test_ctx.payload_left = 0; in publish_handler() 455 test_ctx.publish_handled = true; in publish_handler() [all …]
|
/Zephyr-latest/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-latest/tests/bsim/bluetooth/host/l2cap/credits/src/ |
D | main.c | 34 struct test_ctx { struct 38 } test_ctx; variable 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() 257 net_buf_unref(test_ctx.rx_sdu); in test_peripheral_main() 258 bt_l2cap_chan_recv_complete(&test_ctx.le_chan.chan, test_ctx.rx_sdu); in test_peripheral_main() [all …]
|
/Zephyr-latest/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/src/ |
D | main.c | 32 struct test_ctx { struct 35 } test_ctx; variable 62 void continue_sending(struct test_ctx *ctx) in continue_sending() 79 if (test_ctx.tx_left) { in sent_cb() 80 test_ctx.tx_left--; in sent_cb() 83 continue_sending(&test_ctx); in sent_cb() 110 bt_l2cap_chan_give_credits(&test_ctx.le_chan.chan, 1); in recv_cb() 142 struct bt_l2cap_le_chan *le_chan = &test_ctx.le_chan; in server_accept_cb() 271 bt_l2cap_chan_give_credits(&test_ctx.le_chan.chan, 1); in test_peripheral_main() 331 struct bt_l2cap_le_chan *le_chan = &test_ctx.le_chan; in connect_l2cap_channel() [all …]
|
/Zephyr-latest/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-latest/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() 322 struct test_ctx *ctx = alloc_test_context(); in connect_l2cap_channel()
|
/Zephyr-latest/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()
|