Lines Matching defs:sockfd

226 	int sockfd = *(int *)arg;
234 n = recvfrom(sockfd, buf, sizeof(buf), MSG_WAITALL,
242 sendto(sockfd, buf, sizeof(buf), MSG_NOSIGNAL | MSG_CONFIRM,
247 close(sockfd);
252 static int dut_run_echo_thread(pthread_t *t, int *sockfd)
256 sockfd = start_reuseport_server(AF_INET6, SOCK_DGRAM, NULL,
258 if (!sockfd) {
266 err = pthread_create(t, NULL, dut_echo_thread, sockfd);
271 free_fds(sockfd, 1);
339 static int recv_msg(int sockfd, void *buf, size_t bufsize, void *val,
345 len = recv(sockfd, buf, bufsize, 0);
363 int state, err = 0, *sockfd, ctrl_sockfd, echo_sockfd;
368 sockfd = start_reuseport_server(AF_INET6, SOCK_STREAM, NULL,
370 if (!sockfd) {
376 ctrl_sockfd = accept(*sockfd, (struct sockaddr *)&ctrl_addr, &addrlen);
381 free_fds(sockfd, 1);
490 free_fds(sockfd, 1);
528 static int send_and_recv_msg(int sockfd, enum test_commands cmd, void *val,
538 err = send(sockfd, buf, sizeof(*tlv), 0);
542 err = recv_msg(sockfd, buf, BUFSIZE, val, val_size);
553 int sockfd, n;
555 sockfd = socket(AF_INET6, SOCK_DGRAM, 0);
556 if (sockfd < 0) {
566 n = sendto(sockfd, buf, sizeof(*tlv), MSG_NOSIGNAL | MSG_CONFIRM,
568 close(sockfd);
579 int i, err, sockfd;
582 sockfd = socket(AF_INET6, SOCK_STREAM, 0);
583 if (sockfd < 0) {
589 if (settimeo(sockfd, 1000) < 0)
592 err = connect(sockfd, (struct sockaddr *)&env.dut_ctrl_addr,
600 err = send_and_recv_msg(sockfd, CMD_GET_XDP_CAP, &advertised_feature,
603 close(sockfd);
622 err = send_and_recv_msg(sockfd, CMD_START, NULL, 0);
634 err = send_and_recv_msg(sockfd, CMD_GET_STATS, &stats, sizeof(stats));
639 err = send_and_recv_msg(sockfd, CMD_STOP, NULL, 0);
651 close(sockfd);