Lines Matching refs:dhcpv6
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()
98 memset(&test_ctx.iface->config.dhcpv6.prefix, 0, in clear_test_addr_on_iface()
99 sizeof(test_ctx.iface->config.dhcpv6.prefix)); in clear_test_addr_on_iface()
100 test_ctx.iface->config.dhcpv6.prefix_len = 0; in clear_test_addr_on_iface()
121 memcpy(&iface->config.dhcpv6.serverid, &test_serverid, in set_fake_server_duid()
161 if (dhcpv6_add_header(pkt, msg_type, iface->config.dhcpv6.tid) < 0) { in test_dhcpv6_create_message()
224 memset(&test_ctx.iface->config.dhcpv6, 0, in dhcpv6_tests_before()
225 sizeof(test_ctx.iface->config.dhcpv6)); in dhcpv6_tests_before()
228 test_ctx.iface->config.dhcpv6.state = NET_DHCPV6_DISABLED; in dhcpv6_tests_before()
229 test_ctx.iface->config.dhcpv6.addr_iaid = 10; in dhcpv6_tests_before()
230 test_ctx.iface->config.dhcpv6.prefix_iaid = 20; in dhcpv6_tests_before()
231 test_ctx.iface->config.dhcpv6.exchange_start = k_uptime_get(); in dhcpv6_tests_before()
232 test_ctx.iface->config.dhcpv6.params = (struct net_dhcpv6_params){ in dhcpv6_tests_before()
269 zassert_mem_equal(tid, iface->config.dhcpv6.tid, sizeof(tid), in verify_dhcpv6_header()
280 zassert_equal(duid.length, iface->config.dhcpv6.clientid.length, in verify_dhcpv6_clientid()
282 zassert_mem_equal(&duid.duid, &iface->config.dhcpv6.clientid.duid, in verify_dhcpv6_clientid()
293 zassert_equal(duid.length, iface->config.dhcpv6.serverid.length, in verify_dhcpv6_serverid()
295 zassert_mem_equal(&duid.duid, &iface->config.dhcpv6.serverid.duid, in verify_dhcpv6_serverid()
338 zassert_equal(ia_na.iaid, iface->config.dhcpv6.addr_iaid, in verify_dhcpv6_ia_na()
366 zassert_equal(ia_pd.iaid, iface->config.dhcpv6.prefix_iaid, in verify_dhcpv6_ia_pd()
595 ret = dhcpv6_add_option_clientid(pkt, &iface->config.dhcpv6.clientid); in set_generic_client_options()
623 test_ctx.iface->config.dhcpv6.state = NET_DHCPV6_INIT; in ZTEST()
648 .iaid = iface->config.dhcpv6.addr_iaid, in set_advertise_options()
656 .iaid = iface->config.dhcpv6.prefix_iaid, in set_advertise_options()
666 ret = dhcpv6_add_option_clientid(pkt, &iface->config.dhcpv6.clientid); in set_advertise_options()
676 if (test_ctx.iface->config.dhcpv6.params.request_addr) { in set_advertise_options()
683 if (test_ctx.iface->config.dhcpv6.params.request_prefix) { in set_advertise_options()
713 test_ctx.iface->config.dhcpv6.state = state; in ZTEST()
727 zassert_equal(test_ctx.iface->config.dhcpv6.server_preference, in ZTEST()
729 zassert_equal(test_ctx.iface->config.dhcpv6.serverid.length, in ZTEST()
731 zassert_mem_equal(&test_ctx.iface->config.dhcpv6.serverid.duid, in ZTEST()
750 .iaid = iface->config.dhcpv6.addr_iaid, in set_reply_options()
758 .iaid = iface->config.dhcpv6.prefix_iaid, in set_reply_options()
768 ret = dhcpv6_add_option_clientid(pkt, &iface->config.dhcpv6.clientid); in set_reply_options()
778 if (iface->config.dhcpv6.state == NET_DHCPV6_CONFIRMING) { in set_reply_options()
817 test_ctx.iface->config.dhcpv6.state = state; in ZTEST()
844 zassert_mem_equal(&test_ctx.iface->config.dhcpv6.addr, in ZTEST()
848 zassert_mem_equal(&test_ctx.iface->config.dhcpv6.prefix, in ZTEST()
852 zassert_equal(test_ctx.iface->config.dhcpv6.prefix_len, in ZTEST()
883 zassert_equal(iface->config.dhcpv6.state, NET_DHCPV6_REQUESTING, in test_solicit_expect_request_send_reply()
896 zassert_equal(iface->config.dhcpv6.state, NET_DHCPV6_BOUND, in test_solicit_expect_request_send_reply()
898 zassert_mem_equal(&test_ctx.iface->config.dhcpv6.addr, in test_solicit_expect_request_send_reply()
900 zassert_mem_equal(&test_ctx.iface->config.dhcpv6.prefix, in test_solicit_expect_request_send_reply()
902 zassert_equal(test_ctx.iface->config.dhcpv6.prefix_len, in test_solicit_expect_request_send_reply()
923 zassert_equal(iface->config.dhcpv6.state, NET_DHCPV6_SOLICITING, in test_solicit_expect_solicit_send_advertise()
925 zassert_equal(iface->config.dhcpv6.server_preference, -1, in test_solicit_expect_solicit_send_advertise()
941 zassert_equal(iface->config.dhcpv6.state, NET_DHCPV6_SOLICITING, in test_solicit_expect_solicit_send_advertise()
943 zassert_equal(iface->config.dhcpv6.server_preference, test_preference, in test_solicit_expect_solicit_send_advertise()
945 zassert_equal(test_serverid.length, iface->config.dhcpv6.serverid.length, in test_solicit_expect_solicit_send_advertise()
947 zassert_mem_equal(&test_serverid.duid, &iface->config.dhcpv6.serverid.duid, in test_solicit_expect_solicit_send_advertise()
963 memset(&test_ctx.iface->config.dhcpv6, 0, in ZTEST()
964 sizeof(test_ctx.iface->config.dhcpv6)); in ZTEST()
1030 zassert_equal(test_ctx.iface->config.dhcpv6.state, NET_DHCPV6_BOUND, in test_dhcpv6_start_and_enter_bound()
1048 zassert_equal(iface->config.dhcpv6.state, NET_DHCPV6_CONFIRMING, in test_confirm_expect_confirm_send_reply()
1063 zassert_equal(iface->config.dhcpv6.state, NET_DHCPV6_BOUND, in test_confirm_expect_confirm_send_reply()
1065 zassert_equal(test_serverid.length, iface->config.dhcpv6.serverid.length, in test_confirm_expect_confirm_send_reply()
1067 zassert_mem_equal(&test_serverid.duid, &iface->config.dhcpv6.serverid.duid, in test_confirm_expect_confirm_send_reply()
1086 memset(&test_ctx.iface->config.dhcpv6, 0, in ZTEST()
1087 sizeof(test_ctx.iface->config.dhcpv6)); in ZTEST()
1117 zassert_equal(iface->config.dhcpv6.state, NET_DHCPV6_REBINDING, in test_rebind_expect_rebind_send_reply()
1132 zassert_equal(iface->config.dhcpv6.state, NET_DHCPV6_BOUND, in test_rebind_expect_rebind_send_reply()
1134 zassert_equal(test_serverid.length, iface->config.dhcpv6.serverid.length, in test_rebind_expect_rebind_send_reply()
1136 zassert_mem_equal(&test_serverid.duid, &iface->config.dhcpv6.serverid.duid, in test_rebind_expect_rebind_send_reply()
1156 memset(&test_ctx.iface->config.dhcpv6, 0, in ZTEST()
1157 sizeof(test_ctx.iface->config.dhcpv6)); in ZTEST()
1191 zassert_equal(iface->config.dhcpv6.state, NET_DHCPV6_RENEWING, in test_renew_expect_renew_send_reply()
1206 zassert_equal(iface->config.dhcpv6.state, NET_DHCPV6_BOUND, in test_renew_expect_renew_send_reply()
1208 zassert_equal(test_serverid.length, iface->config.dhcpv6.serverid.length, in test_renew_expect_renew_send_reply()
1210 zassert_mem_equal(&test_serverid.duid, &iface->config.dhcpv6.serverid.duid, in test_renew_expect_renew_send_reply()
1228 memset(&test_ctx.iface->config.dhcpv6, 0, in ZTEST()
1229 sizeof(test_ctx.iface->config.dhcpv6)); in ZTEST()
1235 test_ctx.iface->config.dhcpv6.t1 = k_uptime_get(); in ZTEST()
1236 test_ctx.iface->config.dhcpv6.timeout = test_ctx.iface->config.dhcpv6.t1; in ZTEST()
1261 memset(&test_ctx.iface->config.dhcpv6, 0, in ZTEST()
1262 sizeof(test_ctx.iface->config.dhcpv6)); in ZTEST()
1268 test_ctx.iface->config.dhcpv6.t1 = k_uptime_get(); in ZTEST()
1269 test_ctx.iface->config.dhcpv6.timeout = test_ctx.iface->config.dhcpv6.t1; in ZTEST()
1278 test_ctx.iface->config.dhcpv6.t2 = k_uptime_get(); in ZTEST()
1279 test_ctx.iface->config.dhcpv6.timeout = test_ctx.iface->config.dhcpv6.t2; in ZTEST()