Lines Matching refs:optval

208 	int optval;  in ZTEST()  local
209 socklen_t optlen = sizeof(optval); in ZTEST()
214 rv = zsock_getsockopt(sock1, SOL_SOCKET, SO_TYPE, &optval, &optlen); in ZTEST()
216 zassert_equal(optval, SOCK_STREAM, "getsockopt got invalid type"); in ZTEST()
217 zassert_equal(optlen, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
219 rv = zsock_getsockopt(sock2, SOL_SOCKET, SO_TYPE, &optval, &optlen); in ZTEST()
221 zassert_equal(optval, SOCK_STREAM, "getsockopt got invalid type"); in ZTEST()
222 zassert_equal(optlen, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
233 int optval; in ZTEST() local
234 socklen_t optlen = sizeof(optval); in ZTEST()
239 rv = zsock_getsockopt(sock1, SOL_SOCKET, SO_PROTOCOL, &optval, &optlen); in ZTEST()
241 zassert_equal(optval, IPPROTO_TLS_1_2, in ZTEST()
243 zassert_equal(optlen, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
245 rv = zsock_getsockopt(sock2, SOL_SOCKET, SO_PROTOCOL, &optval, &optlen); in ZTEST()
247 zassert_equal(optval, IPPROTO_TLS_1_1, in ZTEST()
249 zassert_equal(optlen, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
1361 struct timeval optval = { in ZTEST() local
1373 ret = zsock_setsockopt(c_sock, SOL_SOCKET, SO_RCVTIMEO, &optval, in ZTEST()
1374 sizeof(optval)); in ZTEST()
1746 int optval; in ZTEST() local
1747 socklen_t optlen = sizeof(optval); in ZTEST()
1764 ret = zsock_getsockopt(new_sock, SOL_SOCKET, SO_ERROR, &optval, &optlen); in ZTEST()
1766 zassert_equal(optval, ECONNABORTED, "getsockopt got invalid error %d", in ZTEST()
1767 optval); in ZTEST()
1783 int optval; in ZTEST() local
1784 socklen_t optlen = sizeof(optval); in ZTEST()
1801 ret = zsock_getsockopt(s_sock, SOL_SOCKET, SO_ERROR, &optval, &optlen); in ZTEST()
1803 zassert_equal(optval, ECONNABORTED, "getsockopt got invalid error %d", in ZTEST()
1804 optval); in ZTEST()