Lines Matching refs:buf

23 	} buf = {};  in getsetsockopt()  local
65 buf.u8[0] = 1; in getsetsockopt()
66 err = setsockopt(fd, SOL_IP, IP_TTL, &buf, 1); in getsetsockopt()
74 buf.u8[0] = 0x01; in getsetsockopt()
75 err = setsockopt(fd, SOL_CUSTOM, 0, &buf, 1); in getsetsockopt()
81 buf.u32 = 0x00; in getsetsockopt()
83 err = getsockopt(fd, SOL_CUSTOM, 0, &buf, &optlen); in getsetsockopt()
93 if (buf.u8[0] != 0x01) { in getsetsockopt()
94 log_err("Unexpected buf[0] 0x%02x != 0x01", buf.u8[0]); in getsetsockopt()
122 buf.u32 = 0x01010101; in getsetsockopt()
123 err = setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &buf, 4); in getsetsockopt()
129 buf.u32 = 0x00; in getsetsockopt()
131 err = getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &buf, &optlen); in getsetsockopt()
137 if (buf.u32 != 0x55AA*2) { in getsetsockopt()
139 buf.u32); in getsetsockopt()
145 strcpy(buf.cc, "nv"); in getsetsockopt()
146 err = setsockopt(fd, SOL_TCP, TCP_CONGESTION, &buf, strlen("nv")); in getsetsockopt()
153 optlen = sizeof(buf.cc); in getsetsockopt()
154 err = getsockopt(fd, SOL_TCP, TCP_CONGESTION, &buf, &optlen); in getsetsockopt()
160 if (strcmp(buf.cc, "cubic") != 0) { in getsetsockopt()
162 buf.cc, "cubic"); in getsetsockopt()
167 memset(&buf, 0, sizeof(buf)); in getsetsockopt()
168 optlen = sizeof(buf.zc); in getsetsockopt()
169 err = getsockopt(fd, SOL_TCP, TCP_ZEROCOPY_RECEIVE, &buf, &optlen); in getsetsockopt()
176 memset(&buf, 0, sizeof(buf)); in getsetsockopt()
177 buf.zc.address = 12345; /* Not page aligned. Rejected by tcp_zerocopy_receive() */ in getsetsockopt()
178 optlen = sizeof(buf.zc); in getsetsockopt()
180 err = getsockopt(fd, SOL_TCP, TCP_ZEROCOPY_RECEIVE, &buf, &optlen); in getsetsockopt()
196 buf.u32 = 1; in getsetsockopt()
198 err = setsockopt(fd, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP, &buf, optlen); in getsetsockopt()