Lines Matching refs:optval

504 	struct timeval optval = {  in ZTEST()  local
530 rv = zsock_setsockopt(new_sock, SOL_SOCKET, SO_RCVTIMEO, &optval, in ZTEST()
531 sizeof(optval)); in ZTEST()
1266 int optval; in ZTEST() local
1267 socklen_t optlen = sizeof(optval); in ZTEST()
1276 rv = zsock_getsockopt(sock1, SOL_SOCKET, SO_TYPE, &optval, &optlen); in ZTEST()
1278 zassert_equal(optval, SOCK_STREAM, "getsockopt got invalid type"); in ZTEST()
1279 zassert_equal(optlen, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
1281 rv = zsock_getsockopt(sock2, SOL_SOCKET, SO_TYPE, &optval, &optlen); in ZTEST()
1283 zassert_equal(optval, SOCK_STREAM, "getsockopt got invalid type"); in ZTEST()
1284 zassert_equal(optlen, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
1299 int optval; in ZTEST() local
1300 socklen_t optlen = sizeof(optval); in ZTEST()
1305 rv = zsock_getsockopt(sock1, SOL_SOCKET, SO_PROTOCOL, &optval, &optlen); in ZTEST()
1307 zassert_equal(optval, IPPROTO_TCP, "getsockopt got invalid protocol"); in ZTEST()
1308 zassert_equal(optlen, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
1310 rv = zsock_getsockopt(sock2, SOL_SOCKET, SO_PROTOCOL, &optval, &optlen); in ZTEST()
1312 zassert_equal(optval, IPPROTO_TCP, "getsockopt got invalid protocol"); in ZTEST()
1313 zassert_equal(optlen, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
1327 int optval = UINT16_MAX; in ZTEST() local
1328 socklen_t optlen = sizeof(optval); in ZTEST()
1333 rv = zsock_setsockopt(sock1, SOL_SOCKET, SO_RCVBUF, &optval, sizeof(optval)); in ZTEST()
1337 zassert_equal(retval, optval, "getsockopt got invalid rcvbuf"); in ZTEST()
1338 zassert_equal(optlen, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
1340 rv = zsock_setsockopt(sock2, SOL_SOCKET, SO_RCVBUF, &optval, sizeof(optval)); in ZTEST()
1344 zassert_equal(retval, optval, "getsockopt got invalid rcvbuf"); in ZTEST()
1345 zassert_equal(optlen, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
1347 optval = -1; in ZTEST()
1348 rv = zsock_setsockopt(sock2, SOL_SOCKET, SO_RCVBUF, &optval, sizeof(optval)); in ZTEST()
1351 optval = UINT16_MAX + 1; in ZTEST()
1352 rv = zsock_setsockopt(sock2, SOL_SOCKET, SO_RCVBUF, &optval, sizeof(optval)); in ZTEST()
1416 int optval = UINT16_MAX; in ZTEST() local
1417 socklen_t optlen = sizeof(optval); in ZTEST()
1422 rv = zsock_setsockopt(sock1, SOL_SOCKET, SO_SNDBUF, &optval, sizeof(optval)); in ZTEST()
1426 zassert_equal(retval, optval, "getsockopt got invalid rcvbuf"); in ZTEST()
1427 zassert_equal(optlen, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
1429 rv = zsock_setsockopt(sock2, SOL_SOCKET, SO_SNDBUF, &optval, sizeof(optval)); in ZTEST()
1433 zassert_equal(retval, optval, "getsockopt got invalid rcvbuf"); in ZTEST()
1434 zassert_equal(optlen, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
1436 optval = -1; in ZTEST()
1437 rv = zsock_setsockopt(sock2, SOL_SOCKET, SO_SNDBUF, &optval, sizeof(optval)); in ZTEST()
1440 optval = UINT16_MAX + 1; in ZTEST()
1441 rv = zsock_setsockopt(sock2, SOL_SOCKET, SO_RCVBUF, &optval, sizeof(optval)); in ZTEST()
1514 struct timeval optval = { in ZTEST() local
1530 rv = zsock_setsockopt(c_sock, SOL_SOCKET, SO_RCVTIMEO, &optval, in ZTEST()
1531 sizeof(optval)); in ZTEST()
1534 optval.tv_usec = 0; in ZTEST()
1535 rv = zsock_setsockopt(new_sock, SOL_SOCKET, SO_RCVTIMEO, &optval, in ZTEST()
1536 sizeof(optval)); in ZTEST()
1581 struct timeval optval = { in ZTEST() local
1597 rv = zsock_setsockopt(c_sock, SOL_SOCKET, SO_RCVTIMEO, &optval, in ZTEST()
1598 sizeof(optval)); in ZTEST()
1601 optval.tv_usec = 0; in ZTEST()
1602 rv = zsock_setsockopt(new_sock, SOL_SOCKET, SO_RCVTIMEO, &optval, in ZTEST()
1603 sizeof(optval)); in ZTEST()
2213 int fd, flags, ret, optval; in ZTEST() local
2214 socklen_t optlen = sizeof(optval); in ZTEST()
2260 ret = zsock_getsockopt(fd, SOL_SOCKET, SO_ERROR, &optval, &optlen); in ZTEST()
2266 zassert_equal(optval, ECONNREFUSED, "unexpected connect status, %d", optval); in ZTEST()
2281 int fd, flags, ret, optval; in ZTEST() local
2283 socklen_t optlen = sizeof(optval); in ZTEST()
2325 ret = zsock_getsockopt(fd, SOL_SOCKET, SO_ERROR, &optval, &optlen); in ZTEST()
2331 zassert_equal(optval, ECONNREFUSED, "unexpected connect status, %d", optval); in ZTEST()
2341 int optval; in ZTEST() local
2342 socklen_t optlen = sizeof(optval); in ZTEST()
2347 ret = zsock_getsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, &optval, &optlen); in ZTEST()
2349 zassert_equal(optval, 0, "getsockopt got invalid value"); in ZTEST()
2350 zassert_equal(optlen, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
2353 optval = 1; in ZTEST()
2355 &optval, sizeof(optval)); in ZTEST()
2358 ret = zsock_getsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, &optval, &optlen); in ZTEST()
2360 zassert_equal(optval, 1, "getsockopt got invalid value"); in ZTEST()
2361 zassert_equal(optlen, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
2364 ret = zsock_getsockopt(sock, IPPROTO_TCP, TCP_KEEPIDLE, &optval, &optlen); in ZTEST()
2366 zassert_equal(optval, CONFIG_NET_TCP_KEEPIDLE_DEFAULT, in ZTEST()
2368 zassert_equal(optlen, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
2370 ret = zsock_getsockopt(sock, IPPROTO_TCP, TCP_KEEPINTVL, &optval, &optlen); in ZTEST()
2372 zassert_equal(optval, CONFIG_NET_TCP_KEEPINTVL_DEFAULT, in ZTEST()
2374 zassert_equal(optlen, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
2376 ret = zsock_getsockopt(sock, IPPROTO_TCP, TCP_KEEPCNT, &optval, &optlen); in ZTEST()
2378 zassert_equal(optval, CONFIG_NET_TCP_KEEPCNT_DEFAULT, in ZTEST()
2380 zassert_equal(optlen, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
2383 optval = 123; in ZTEST()
2385 &optval, sizeof(optval)); in ZTEST()
2388 optval = 10; in ZTEST()
2390 &optval, sizeof(optval)); in ZTEST()
2393 optval = 2; in ZTEST()
2395 &optval, sizeof(optval)); in ZTEST()
2398 ret = zsock_getsockopt(sock, IPPROTO_TCP, TCP_KEEPIDLE, &optval, &optlen); in ZTEST()
2400 zassert_equal(optval, 123, "getsockopt got invalid value"); in ZTEST()
2401 zassert_equal(optlen, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
2403 ret = zsock_getsockopt(sock, IPPROTO_TCP, TCP_KEEPINTVL, &optval, &optlen); in ZTEST()
2405 zassert_equal(optval, 10, "getsockopt got invalid value"); in ZTEST()
2406 zassert_equal(optlen, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
2408 ret = zsock_getsockopt(sock, IPPROTO_TCP, TCP_KEEPCNT, &optval, &optlen); in ZTEST()
2410 zassert_equal(optval, 2, "getsockopt got invalid value"); in ZTEST()
2411 zassert_equal(optlen, sizeof(optval), "getsockopt got invalid size"); in ZTEST()
2423 int optval; in ZTEST() local
2430 optval = 1; in ZTEST()
2432 &optval, sizeof(optval)); in ZTEST()
2435 &optval, sizeof(optval)); in ZTEST()
2438 optval = 1; in ZTEST()
2440 &optval, sizeof(optval)); in ZTEST()
2443 &optval, sizeof(optval)); in ZTEST()
2446 optval = 1; in ZTEST()
2448 &optval, sizeof(optval)); in ZTEST()
2451 &optval, sizeof(optval)); in ZTEST()
2454 optval = 1; in ZTEST()
2456 &optval, sizeof(optval)); in ZTEST()
2459 &optval, sizeof(optval)); in ZTEST()