Lines Matching refs:tcp
55 data->tcp.expecting = sys_rand32_get() % ipsum_len; in send_tcp_data()
56 } while (data->tcp.expecting == 0U); in send_tcp_data()
58 data->tcp.received = 0U; in send_tcp_data()
60 ret = sendall(data->tcp.sock, lorem_ipsum, data->tcp.expecting); in send_tcp_data()
68 data->tcp.expecting); in send_tcp_data()
77 if (data->tcp.received + received > data->tcp.expecting) { in compare_tcp_data()
82 if (memcmp(buf, lorem_ipsum + data->tcp.received, received) != 0) { in compare_tcp_data()
97 data->tcp.sock = socket(family, SOCK_STREAM, IPPROTO_TLS_1_2); in start_tcp_proto()
99 data->tcp.sock = socket(family, SOCK_STREAM, IPPROTO_TCP); in start_tcp_proto()
101 if (data->tcp.sock < 0) { in start_tcp_proto()
133 ret = setsockopt(data->tcp.sock, SOL_SOCKET, SO_SOCKS5, in start_tcp_proto()
148 ret = setsockopt(data->tcp.sock, SOL_TLS, TLS_SEC_TAG_LIST, in start_tcp_proto()
156 ret = setsockopt(data->tcp.sock, SOL_TLS, TLS_HOSTNAME, in start_tcp_proto()
168 (void)setsockopt(data->tcp.sock, IPPROTO_IPV6, in start_tcp_proto()
173 ret = connect(data->tcp.sock, addr, addrlen); in start_tcp_proto()
189 received = recv(data->tcp.sock, buf, sizeof(buf), MSG_DONTWAIT); in process_tcp_proto()
210 data->tcp.received += received; in process_tcp_proto()
211 if (data->tcp.received < data->tcp.expecting) { in process_tcp_proto()
218 data->proto, data->tcp.received); in process_tcp_proto()
221 if (++data->tcp.counter % 1000 == 0U) { in process_tcp_proto()
223 data->tcp.counter); in process_tcp_proto()
305 if (conf.ipv6.tcp.sock >= 0) { in stop_tcp()
306 (void)close(conf.ipv6.tcp.sock); in stop_tcp()
311 if (conf.ipv4.tcp.sock >= 0) { in stop_tcp()
312 (void)close(conf.ipv4.tcp.sock); in stop_tcp()