Lines Matching refs:sfd
660 int err, i, fd, udp, sfd[6] = {0xdeadbeef}; in test_sockmap() local
672 sfd[i] = socket(AF_INET, SOCK_STREAM, 0); in test_sockmap()
673 if (sfd[i] < 0) in test_sockmap()
675 err = setsockopt(sfd[i], SOL_SOCKET, SO_REUSEADDR, in test_sockmap()
681 err = ioctl(sfd[i], FIONBIO, (char *)&one); in test_sockmap()
690 err = bind(sfd[i], (struct sockaddr *)&addr, sizeof(addr)); in test_sockmap()
693 err, i, sfd[i]); in test_sockmap()
696 err = listen(sfd[i], 32); in test_sockmap()
704 sfd[i] = socket(AF_INET, SOCK_STREAM, 0); in test_sockmap()
705 if (sfd[i] < 0) in test_sockmap()
707 err = setsockopt(sfd[i], SOL_SOCKET, SO_REUSEADDR, in test_sockmap()
717 err = connect(sfd[i], (struct sockaddr *)&addr, sizeof(addr)); in test_sockmap()
726 sfd[i] = accept(sfd[i - 4], NULL, NULL); in test_sockmap()
727 if (sfd[i] < 0) { in test_sockmap()
743 close(sfd[i]); in test_sockmap()
764 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_ANY); in test_sockmap()
767 i, sfd[i]); in test_sockmap()
927 err = bpf_map_update_elem(map_fd_rx, &i, &sfd[i], BPF_ANY); in test_sockmap()
930 err, i, sfd[i]); in test_sockmap()
933 err = bpf_map_update_elem(map_fd_tx, &i, &sfd[i], BPF_ANY); in test_sockmap()
936 err, i, sfd[i]); in test_sockmap()
946 err, i, sfd[i]); in test_sockmap()
952 err, i, sfd[i]); in test_sockmap()
959 err = bpf_map_update_elem(map_fd_msg, &i, &sfd[2], BPF_ANY); in test_sockmap()
969 sc = send(sfd[2], buf, 20, 0); in test_sockmap()
976 FD_SET(sfd[3], &w); in test_sockmap()
979 s = select(sfd[3] + 1, &w, NULL, NULL, &to); in test_sockmap()
988 if (!FD_ISSET(sfd[3], &w)) { in test_sockmap()
993 rc = recv(sfd[3], buf, sizeof(buf), 0); in test_sockmap()
1003 sc = send(sfd[2], buf, 20, 0); in test_sockmap()
1011 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_NOEXIST); in test_sockmap()
1017 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_ANY); in test_sockmap()
1023 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_EXIST); in test_sockmap()
1034 err, i, sfd[i]); in test_sockmap()
1053 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_ANY); in test_sockmap()
1056 err, i, sfd[i]); in test_sockmap()
1059 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_NOEXIST); in test_sockmap()
1062 err, i, sfd[i]); in test_sockmap()
1065 err = bpf_map_update_elem(fd, &i, &sfd[i], BPF_EXIST); in test_sockmap()
1068 err, i, sfd[i]); in test_sockmap()
1081 &sfd[i], BPF_ANY); in test_sockmap()
1083 &sfd[i], BPF_ANY); in test_sockmap()
1121 close(sfd[i]); in test_sockmap()
1131 close(sfd[i]); in test_sockmap()
1140 close(sfd[i]); in test_sockmap()