Lines Matching refs:optval

330 	uint8_t optval;  in ZTEST()  local
341 optval = 2; in ZTEST()
342 rv = zsock_setsockopt(sock1, SOL_SOCKET, SO_PRIORITY, &optval, in ZTEST()
343 sizeof(optval)); in ZTEST()
346 optval = 6; in ZTEST()
347 rv = zsock_setsockopt(sock2, SOL_SOCKET, SO_PRIORITY, &optval, in ZTEST()
348 sizeof(optval)); in ZTEST()
710 int optval; in ZTEST() local
711 socklen_t optsize = sizeof(optval); in ZTEST()
716 rv = zsock_getsockopt(sock1, SOL_SOCKET, SO_TYPE, &optval, &optsize); in ZTEST()
718 zassert_equal(optval, SOCK_DGRAM, "getsockopt got invalid type"); in ZTEST()
719 zassert_equal(optsize, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
721 rv = zsock_getsockopt(sock2, SOL_SOCKET, SO_TYPE, &optval, &optsize); in ZTEST()
723 zassert_equal(optval, SOCK_DGRAM, "getsockopt got invalid type"); in ZTEST()
724 zassert_equal(optsize, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
738 int optval; in ZTEST() local
749 optval = true; in ZTEST()
750 rv = zsock_setsockopt(sock1, SOL_SOCKET, SO_TXTIME, &optval, in ZTEST()
751 sizeof(optval)); in ZTEST()
754 optval = false; in ZTEST()
755 rv = zsock_setsockopt(sock2, SOL_SOCKET, SO_TXTIME, &optval, in ZTEST()
756 sizeof(optval)); in ZTEST()
759 optlen = sizeof(optval); in ZTEST()
760 rv = zsock_getsockopt(sock1, SOL_SOCKET, SO_TXTIME, &optval, &optlen); in ZTEST()
762 zassert_equal(optlen, sizeof(optval), "invalid optlen %d vs %d", in ZTEST()
763 optlen, sizeof(optval)); in ZTEST()
764 zassert_equal(optval, true, "getsockopt txtime"); in ZTEST()
766 optlen = sizeof(optval); in ZTEST()
767 rv = zsock_getsockopt(sock2, SOL_SOCKET, SO_TXTIME, &optval, &optlen); in ZTEST()
769 zassert_equal(optlen, sizeof(optval), "invalid optlen %d vs %d", in ZTEST()
770 optlen, sizeof(optval)); in ZTEST()
771 zassert_equal(optval, false, "getsockopt txtime"); in ZTEST()
789 struct timeval optval = { in ZTEST() local
803 rv = zsock_setsockopt(sock1, SOL_SOCKET, SO_RCVTIMEO, &optval, in ZTEST()
804 sizeof(optval)); in ZTEST()
807 optval.tv_usec = 400000; in ZTEST()
808 rv = zsock_setsockopt(sock2, SOL_SOCKET, SO_RCVTIMEO, &optval, in ZTEST()
809 sizeof(optval)); in ZTEST()
846 struct timeval optval = { in ZTEST() local
860 rv = zsock_setsockopt(sock1, SOL_SOCKET, SO_SNDTIMEO, &optval, in ZTEST()
861 sizeof(optval)); in ZTEST()
864 optval.tv_usec = 0; in ZTEST()
865 rv = zsock_setsockopt(sock2, SOL_SOCKET, SO_SNDTIMEO, &optval, in ZTEST()
866 sizeof(optval)); in ZTEST()
880 int optval; in ZTEST() local
881 socklen_t optsize = sizeof(optval); in ZTEST()
886 rv = zsock_getsockopt(sock1, SOL_SOCKET, SO_PROTOCOL, &optval, &optsize); in ZTEST()
888 zassert_equal(optval, IPPROTO_UDP, "getsockopt got invalid protocol"); in ZTEST()
889 zassert_equal(optsize, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
891 rv = zsock_getsockopt(sock2, SOL_SOCKET, SO_PROTOCOL, &optval, &optsize); in ZTEST()
893 zassert_equal(optval, IPPROTO_UDP, "getsockopt got invalid protocol"); in ZTEST()
894 zassert_equal(optsize, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
1059 int optval; in ZTEST_USER() local
1096 optval = true; in ZTEST_USER()
1097 rv = zsock_setsockopt(client_sock, SOL_SOCKET, SO_TXTIME, &optval, in ZTEST_USER()
1098 sizeof(optval)); in ZTEST_USER()
2469 int optval; in check_ipv6_address_preferences() local
2476 optval = preference; in check_ipv6_address_preferences()
2478 &optval, sizeof(optval)); in check_ipv6_address_preferences()
2481 optval = 0; optlen = 0U; in check_ipv6_address_preferences()
2483 &optval, &optlen); in check_ipv6_address_preferences()
2485 zassert_equal(optlen, sizeof(optval), "invalid optlen %d vs %d", in check_ipv6_address_preferences()
2486 optlen, sizeof(optval)); in check_ipv6_address_preferences()
2487 zassert_equal(optval, preference, in check_ipv6_address_preferences()
2552 int optval; in ZTEST() local
2581 optval = 0; optlen = 0U; in ZTEST()
2583 &optval, &optlen); in ZTEST()
2585 zexpect_equal(optlen, sizeof(optval), "invalid optlen %d vs %d", in ZTEST()
2586 optlen, sizeof(optval)); in ZTEST()
2588 zexpect_equal(optval, ifindex, in ZTEST()
2590 ifindex, optval); in ZTEST()
2599 optval = 0; optlen = 0U; in ZTEST()
2601 &optval, &optlen); in ZTEST()
2615 optval = 0; optlen = sizeof(int); in ZTEST()
2617 &optval, optlen); in ZTEST()
2620 zexpect_equal(optlen, sizeof(optval), "invalid optlen %d vs %d", in ZTEST()
2621 optlen, sizeof(optval)); in ZTEST()
2624 optval = net_if_get_by_iface(net_if_get_default()); optlen = sizeof(int); in ZTEST()
2626 &optval, optlen); in ZTEST()
2628 zexpect_equal(optlen, sizeof(optval), "invalid optlen %d vs %d", in ZTEST()
2629 optlen, sizeof(optval)); in ZTEST()
2631 optval = 0; optlen = 0U; in ZTEST()
2633 &optval, &optlen); in ZTEST()
2637 zexpect_equal(optval, net_if_get_by_iface(net_if_get_default()), in ZTEST()
2639 net_if_get_by_iface(net_if_get_default()), optval); in ZTEST()
2939 uint32_t optval; in check_port_range() local
2959 optval = PORT_RANGE(1024, 1500); in check_port_range()
2961 &optval, sizeof(optval)); in check_port_range()
2965 optval = 0; optlen = 0U; in check_port_range()
2967 &optval, optlen); in check_port_range()
2971 optval = 0; optlen = sizeof(uint64_t); in check_port_range()
2973 &optval, optlen); in check_port_range()
2977 optval = PORT_RANGE(0, 0); in check_port_range()
2979 &optval, sizeof(optval)); in check_port_range()
2985 optval = PORT_RANGE(1024, 0); in check_port_range()
2987 &optval, sizeof(optval)); in check_port_range()
2990 optval = PORT_RANGE(0, 1024); in check_port_range()
2992 &optval, sizeof(optval)); in check_port_range()
2996 optval = PORT_RANGE(10000, 10010); in check_port_range()
2998 &optval, sizeof(optval)); in check_port_range()
3001 optval = 0; optlen = sizeof(optval); in check_port_range()
3003 &optval, &optlen); in check_port_range()
3005 zexpect_equal(optval, PORT_RANGE(10000, 10010), "Invalid port range"); in check_port_range()
3028 optval = PORT_RANGE(1001, 1000); in check_port_range()
3030 &optval, sizeof(optval)); in check_port_range()
3036 optval = PORT_RANGE(1001, 1001); in check_port_range()
3038 &optval, sizeof(optval)); in check_port_range()
3043 optval = PORT_RANGE(0, 1000); in check_port_range()
3045 &optval, sizeof(optval)); in check_port_range()