Lines Matching refs:optlen
24 socklen_t optlen; in getsetsockopt() local
35 optlen = getpagesize() * 2; in getsetsockopt()
36 big_buf = calloc(1, optlen); in getsetsockopt()
43 err = setsockopt(fd, SOL_IP, IP_TOS, big_buf, optlen); in getsetsockopt()
49 memset(big_buf, 0, optlen); in getsetsockopt()
50 optlen = 1; in getsetsockopt()
51 err = getsockopt(fd, SOL_IP, IP_TOS, big_buf, &optlen); in getsetsockopt()
82 optlen = 4; in getsetsockopt()
83 err = getsockopt(fd, SOL_CUSTOM, 0, &buf, &optlen); in getsetsockopt()
89 if (optlen != 1) { in getsetsockopt()
90 log_err("Unexpected optlen %d != 1", optlen); in getsetsockopt()
100 optlen = getpagesize() * 2; in getsetsockopt()
101 memset(big_buf, 0, optlen); in getsetsockopt()
103 err = setsockopt(fd, SOL_IP, IP_FREEBIND, big_buf, optlen); in getsetsockopt()
109 err = getsockopt(fd, SOL_IP, IP_FREEBIND, big_buf, &optlen); in getsetsockopt()
115 if (optlen != 1 || *(__u8 *)big_buf != 0x55) { in getsetsockopt()
117 optlen, *(__u8 *)big_buf); in getsetsockopt()
130 optlen = 4; in getsetsockopt()
131 err = getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &buf, &optlen); in getsetsockopt()
153 optlen = sizeof(buf.cc); in getsetsockopt()
154 err = getsockopt(fd, SOL_TCP, TCP_CONGESTION, &buf, &optlen); in getsetsockopt()
168 optlen = sizeof(buf.zc); in getsetsockopt()
169 err = getsockopt(fd, SOL_TCP, TCP_ZEROCOPY_RECEIVE, &buf, &optlen); in getsetsockopt()
178 optlen = sizeof(buf.zc); in getsetsockopt()
180 err = getsockopt(fd, SOL_TCP, TCP_ZEROCOPY_RECEIVE, &buf, &optlen); in getsetsockopt()
197 optlen = sizeof(__u32); in getsetsockopt()
198 err = setsockopt(fd, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP, &buf, optlen); in getsetsockopt()
205 optlen = 0; in getsetsockopt()
206 err = getsockopt(fd, SOL_NETLINK, NETLINK_LIST_MEMBERSHIPS, NULL, &optlen); in getsetsockopt()
212 ASSERT_EQ(optlen, 8, "Unexpected NETLINK_LIST_MEMBERSHIPS value"); in getsetsockopt()